* {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
}
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-family: Arial, sans-serif;
    font-size: 14px;
    color: rgb(82, 82, 129)
}        
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background-color: white;
    color: black;
}
p {
    text-align: left; 
    font-size: 16px; 
    padding: 20px;
}

pre {
    text-align: left; 
    font-size: 16px; 
    padding: 20px;
    font-family: Arial, sans-serif;
}

label {
    font-size: 14px;
    margin-right: 10px;
    font-weight: bold;
    color: black;
}

input[type="text"], input[type="email"], input[type="password"], input[type="number"] {
    width: 100%;
    padding: 10px;
    margin: 5px 0 20px 0;
    border: 1px solid #ccc;
    border-radius: 4px;
}

button {
    background-color: #1ba726;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}
button:hover {
    background-color: #00d612;
}


.logo {
    font-size: 1.5rem;
    font-weight: bold;
    padding-top: 3px;
    padding-bottom: 3px;
}
.logo svg {
    display: block;
    width: 290px; /* Adjust as needed */
    height: auto;
}

nav ul {
    display: flex;
    list-style: none;
}
nav ul li {
    margin: 0 10px;
}
nav ul li a {
    color: black;
    text-decoration: none;
}
.container {
    flex: 1;
    padding: 2rem;
    background-color: rgb(237, 243, 248);
    margin: 10px;
    border-radius: 3px;         /* Slightly reduce edges */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);  /* Soft shadow */
}
footer {
    text-align: center;
    padding: 1rem;
    background-color: #333;
    color: white;
}
.block {
    background-color:#4e4e55 ;
    padding: 1rem;
    color: white;
    height: 40px;
    display: flex; 
    align-items: center; 
    justify-content: left;
}

.fixed-box {
    position: fixed;
    bottom: 40px;
    right: 40px;
    min-width: 80px;
    max-height: 95vh;
    padding: 10px 15px;
    background-color: #E13644;
    border-radius: 5px;
    box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.5);
    color: white;
    display: flex;
    flex-direction: column;
    width: fit-content;
}

.fixed-box-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

#sales-box {
    display: none; /* hidden by default */
    position: fixed; /* stays in place */
    top: 50%;       /* center vertically */
    left: 50%;      /* center horizontally */
    transform: translate(-50%, -50%); /* adjust for element's own size */
    background-color: white;
    border: 1px solid #ccc;
    padding: 20px;
    z-index: 9999;   /* high z-index to appear on top */
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
    width: 60vw; /* responsive width */
    height: 50vh; /* responsive height */
    border-radius: 10px; /* rounded corners */
}

.invoice-content {
    overflow-y: auto;
    max-height: 73vh;
    width: 100%;
    margin-bottom: 10px;
}

#price-container {
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fullscreen {
    width: 95vw;
    height: 95vh;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgb(199, 199, 199);
    z-index: 9999;
    padding: 20px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: black;
    overflow-y: auto; /* اضافه شده */
}


@media (max-width: 768px) {
    header {
        flex-direction: column;
        text-align: center;
        align-items: center; /* اضافه شود */
    }
    nav ul {
        flex-direction: column;
        padding-top: 10px;
    }
    nav ul li {
        margin-bottom: 10px;
    }
    .logo svg {
        display: block;
        width: 150px; /* Adjust as needed */
        height: auto;
        margin: 0 auto; /* وسط‌چین افقی */                
    }
    p {
        text-align: left; 
        font-size: 15px; 
        padding: 10px;
    }
    
}

.form-container {
    margin-left: 40px;
    padding-top: 10px;
}


#dimensions-form {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
}

#dimensions-form > div {
    flex: 1 1 10px;
    min-width: 150px;
}

input[type="number"] {
    width: 100%;
    box-sizing: border-box;
}


@media (max-width: 600px) {
    #dimensions-form {
        flex-direction: column;
        align-items: stretch;
        gap: 10px; /* reduce vertical gap for mobile */
    }
}

#slab-list {
    margin-top: 20px;
}

/* فرم انتخاب متریال: چیدمان افقی در دسکتاپ */
#material-form.responsive-form {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 40px;
    align-items: flex-start;
}

/* هر بخش فرم به صورت ستونی مرتب بشه */
#material-form .form-item {
    display: flex;
    flex-direction: column;
}

/* در حالت موبایل: چیدمان عمودی */
@media (max-width: 768px) {
    #material-form.responsive-form {
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
    }
}


/* استایل سلکت2 */
/* تنظیم کلی ظاهر سلکت‌ها */
.select2-container .select2-selection--single {
    height: 38px !important;
    display: flex;
    align-items: center;
    padding: 0 8px;
    border-radius: 4px;
    box-sizing: border-box;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    display: flex;
    align-items: center;
    line-height: normal;
}

.select2-item-img,
.select2-results__option img,
.select2-selection__rendered img {
    width: 34px;
    height: 34px;
    object-fit: contain;
    margin-right: 8px;
    vertical-align: middle;
    border-radius: 4px;
    box-shadow: 0 0 5px rgba(0,0,0,0.5);
}

.select2-container--default .select2-search--dropdown {
    padding: 5px;
    width: 90%;
}

.select2-container--default .select2-search__field {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #f7f7f7;
}

.select2-results__options {
    max-height: 200px;
    overflow-y: auto;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #f0f0f0;
    color: #333;
}

.select2-container--open .select2-dropdown--below {
    margin-top: 0px;
    border-radius: 4px;
    z-index: 9999;
}

.covering-images {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px; 
    margin-top: 25px;
    justify-content: center;
}

/* Overlay background */
#image-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

/* Fullscreen image */
#image-overlay img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.6);
    cursor: zoom-out;
    transition: transform 0.5s ease;
}


.search-results {
  border: 1px solid #ccc;
  background: #fff;
  max-height: 240px;
  overflow-y: auto;
  position: absolute;
  z-index: 9999;
  width: 290px;
  display: none;
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}
.search-result-item {
  padding: 8px;
  cursor: pointer;
  display: flex;
  gap: 8px;
  align-items: center;
  border-bottom: 1px solid #eee;
}
.search-result-item:hover { background: #f6f6f6; }
.search-result-item img {max-height: 40px; max-width: 60px; width: auto; height: auto; object-fit: cover; border-radius: 4px;}

.search-result-item .sr-text { font-size: 13px; line-height:1.1; }
.search-result-item .sr-text small { color: #666; display:block; margin-top:4px; font-size:12px; }

