* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: #ffffff;
    color: #1a1a1a;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

/* section layout */
.products-section {
    padding: 80px 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

/* texts */
.subtitle {
    color: #9a9a9a;
    font-size: 13px;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.title {
    font-size: 34px;
    font-weight: 600;
    margin-bottom: 10px;
}

.description {
    color: #7a7a7a;
    font-size: 15px;
    margin-bottom: 45px;
}

/* categories */
.categories {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-bottom: 60px;
    flex-wrap: wrap;
}

.category {
    font-size: 15px;
    color: #666;
    cursor: pointer;
    padding-bottom: 5px;
    transition: 0.3s;
}

.category.active {
    border-bottom: 2px solid #000;
    color: #000;
    font-weight: 600;
}

/* product grid — 4 in a row */
.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    justify-items: center;
}

/* product card */
.product-card {
    background-color: #f8f6f3;
    border-radius: 10px;
    padding: 0 25px 30px 25px;
    width: 100%;
    text-align: left;
    transition: all 0.3s ease;
    overflow: hidden;

    display: flex;
    flex-direction: column;
}

.product-card img {
    width: calc(100% + 50px);
    margin: 0 -25px 20px -25px;
    display: block;
    object-fit: cover;
    object-position: top;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    height: 300px;
    max-width: max-content;
}

.product-name {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 12px;
    color: #222;
}

.product-desc {
    font-size: 14px;
    color: #888;
    line-height: 1.5;
    margin-bottom: 15px;
    flex-grow: 1;
}

/* .price {
    color: #e63946;
    font-weight: 600;
    font-size: 16px;
    text-align: center;
    position: relative;
    padding: 10px 0;
    margin-bottom: 10px;
}

.price::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 15%;
    height: 1.5px;
    background-color: #000;
} */

/* order summary table */
.order-summary {
    background-color: #f8f6f3;
    border-radius: 10px;
    padding: 40px;
    max-width: 800px;
    margin: 0 auto 80px;
    text-align: left;
}

.order-summary h2 {
    font-size: 24px;
    margin-bottom: 25px;
    text-align: center;
    color: #222;
}

table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

th,
td {
    padding: 15px 10px;
    border-bottom: 1px solid #ddd;
    text-align: center;
    text-align: center;
    word-wrap: break-word;
}

th {
    background-color: #f1efeb;
    color: #333;
    font-weight: 600;
}

td {
    color: #555;
}

tr:last-child td {
    border-bottom: none;
}

.total-row td {
    font-weight: 600;
    font-size: 20px;
    color: #000;
    text-align: right;
}

.total-row td:last-child {
    color: #e63946;
}

/* actions inside product card */
.product-card .actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
    align-items: center;
    justify-content: center;
}

.qty-input {
    width: 60px;
    margin: 5px 0;
    padding: 6px 8px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 0.8rem;
    resize: none;
}

.qty-input:focus {
    outline: none;
    border-color: #472d1c;
    box-shadow: 0 0 5px rgba(230, 57, 70, 0.25);
}

.add-btn {
    padding: 10px 0;
    width: 120px;
    font-size: 1rem;
    font-weight: 700;
    background-color: #1a1a1a;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.15s;
        text-align: center;
}


.add-btn:hover {
    background-color: #333;
    transform: translateY(-1px);
}

/* custom product adjustments */
.custom-product input,
.custom-product textarea {
    width: 100%;
    margin: 5px 0;
    padding: 7px 10px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 0.9rem;
    resize: none;
}

.custom-product textarea:focus,
.custom-product input:focus {
    outline: none;
    border-color: #472d1c;
    box-shadow: 0 0 5px rgba(230, 57, 70, 0.2);
}

/* align custom product actions neatly */
.custom-product .actions {
    display: flex;
    justify-content: flex-start;
    gap: 10px;
    align-items: center;
}

/* ====== SELECT DIMENSIUNI (variations) ====== */

.variation-label {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #1a1a1a;
    display: block;
}

.variation-select {
    width: 100%;
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 0.95rem;
    background-color: #fff;
    color: #333;
    appearance: none;
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    cursor: pointer;
    margin-bottom: 15px;
}

.variation-select:focus {
    outline: none;
    border-color: #472d1c; /* aceeași culoare ca la input focus */
    box-shadow: 0 0 5px rgba(230, 57, 70, 0.25);
}

/* --- FORMULAR CLIENT --- */
#customer-form {
    background-color: #f8f6f3;
    border-radius: 10px;
    padding: 50px 60px;
    max-width: 800px;
    margin: 60px auto;
    text-align: left;
}

#customer-form h2 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 35px;
    text-align: center;
    color: #222;
}

#customer-form label {
    display: block;
    margin-top: 20px;
    margin-bottom: 8px;
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    text-align: left;
}

#customer-form input,
#customer-form textarea {
    width: 100%;
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 0.95rem;
    resize: none;
    background-color: #fff;
    color: #333;
}

#customer-form input:focus,
#customer-form textarea:focus {
    outline: none;
    border-color: #472d1c;
    box-shadow: 0 0 5px rgba(230, 57, 70, 0.2);
}

/* nota sub total */
.order-summary .note {
    font-size: 14px;
    color: #777;
    margin-top: 15px;
    line-height: 1.4;
    font-style: italic;
    text-align: left;
}

/* --- PAGINA THANK YOU --- */
.thank-you-section {
    padding: 100px 0;
    background-color: #f8f6f3;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.thank-you-section .container {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    background-color: #fff;
    padding: 60px 50px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.thank-you-section .subtitle {
    color: #9a9a9a;
    font-size: 13px;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.thank-you-section .title {
    font-size: 34px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #222;
}

.thank-you-section .description {
    color: #555;
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 25px;
}

.thank-you-section .add-btn {
    background-color: #1a1a1a;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 10px 20px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.15s;
}

.thank-you-section .add-btn:hover {
    background-color: #333;
    transform: translateY(-2px);
}

/* --- Select Styling (Customer Type) --- */
#customer_type {
    width: 100%;
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 0.95rem;
    background-color: #fff;
    color: #333;
    appearance: none;
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    cursor: pointer;
}

#customer_type:focus {
    outline: none;
    border-color: #472d1c;
    box-shadow: 0 0 5px rgba(230, 57, 70, 0.2);
}

#customer_info {
    background: #fff8e6;
    border-left: 4px solid #e6b800;
    padding: 12px 15px;
    margin-top: 15px;
    border-radius: 6px;
    font-size: 14px;
    color: #6a5400;
    line-height: 1.4;
}
.api-error {
    background: #ff0000;
    border-left: 4px solid #e60000;
    padding: 12px 15px;
    margin: 15px 0;
    border-radius: 6px;
    font-size: 14px;
    color: #fff;
    line-height: 1.4;
    box-sizing: border-box;
}

/* === PRODUCT FILTER BUTTONS === */
.product-filters {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-bottom: 40px;
}

.filter-label {
    font-size: 15px;
    color: #666;
    cursor: pointer;
    padding-bottom: 6px;
    transition: 0.3s;
}

.filter-label.active {
    border-bottom: 2px solid #000;
    font-weight: 600;
    color: #000;
}

#glass_warning {
    background: #ffecec;
    border-left: 4px solid #d9534f;
    padding: 10px 12px;
    border-radius: 6px;
    margin-top: 10px;
}

#glass_type {
    width: 100%;
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 0.95rem;
    background-color: #fff;
    color: #333;
    appearance: none;
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    cursor: pointer;
}

#glass_type:focus {
    outline: none;
    border-color: #472d1c;
    box-shadow: 0 0 5px rgba(230, 57, 70, 0.2);
}

/* ==== LAYOUT FACTURA (stil identic cu produsele) ==== */

.offer-container {
    max-width: 1100px;
    margin: 20px auto;
    background: #fff;
    padding: 50px 60px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.offer-section-title {
    font-size: 26px;
    font-weight: 600;
    color: #222;
    margin-bottom: 20px;
}

.flex-row {
    display: flex;
    justify-content: space-between;
    gap: 40px;
    margin-bottom: 40px;
}

.info-block {
    flex: 1;
    background: #f8f6f3;
    padding: 20px 25px;
    border-radius: 10px;
    text-align: left;
}

.info-block h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
    color: #222;
}

.info-block p {
    font-size: 15px;
    color: #555;
    margin-bottom: 6px;
    line-height: 1.4;
}

/* ===== TABEL PRODUSE (stil ca în order summary) ===== */

.offer-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    margin-bottom: 30px;
}

.offer-table th,
.offer-table td {
    padding: 15px 10px;
    border-bottom: 1px solid #ddd;
    text-align: left;
    color: #555;
    word-break: break-word;
}

.offer-table th {
    background: #f1efeb;
    color: #333;
    font-weight: 600;
}

.totals-box {
    text-align: right;
    margin-top: 20px;
}

.totals-box p {
    margin: 4px 0;
    font-size: 16px;
    color: #333;
}

.totals-box strong {
    font-weight: 700;
    color: #000;
}

/* ===== Accept & Reject ===== */

.response-box {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid #eee;
}
.response-box.accepted{
    background-color: #198754;
    color: #fff !important;
    padding: 20px 0 10px;
    text-align: center;
    margin: 30px 0;
}
.response-box.rejected{
    background-color: #dc3545;
    color: #fff !important;
    padding: 20px 0 10px;
    text-align: center;
    margin: 30px 0;
}
.response-box.accepted .offer-section-title,
.response-box.rejected .offer-section-title{
    color: inherit;
}

.response-box textarea {
    width: 100%;
    min-height: 130px;
    margin: 15px 0;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 15px;
}

.response-actions {
    /* display: flex; */
    gap: 12px;
    margin-top: 10px;
}

.btn-accept {
     float: right;
    background: #198754;
    color: #fff;
    padding: 12px 25px;
    font-weight: 700;
    border-radius: 6px;
    border: none;
    cursor: pointer;
}

.btn-accept:hover {
    background: #116d42;
}

.btn-reject {
    float: right;
    background: #e63946;
    color: #fff;
    padding: 12px 25px;
    font-weight: 700;
    border-radius: 6px;
    border: none;
    cursor: pointer;
}

.btn-reject:hover {
    background: #b92d38;
}

#response-message {
    margin-top: 10px;
    font-size: 15px;
}

.offer-logo {
    text-align: center;
    margin-bottom: 30px;
    padding: 15px;
    background: #52504f; /* exact nuanța backgroundului cardurilor tale */
    border-radius: 8px;
}

.offer-logo img {
    max-width: 250px;
    width: 100%;
    height: auto;
    display: inline-block;
}

/* responsive design */
@media (max-width: 768px) {
    .offer-container{
        padding: 10px;
        margin: 10px auto;
    }
    .flex-row{
        gap: 10px
    }
    .categories {
        gap: 15px;
        font-size: 14px;
    }

    .product-grid {
        grid-template-columns: 1fr;
        max-width: 90%;
        margin: 0 auto;
    }

    .product-card {
        padding: 0 20px 25px 20px;
    }

    .product-card img {
        height: 300px;
    }

    .product-name {
        font-size: 20px;
    }

    .price {
        font-size: 15px;
    }

    .order-summary {
        max-width: 90%;
        padding: 25px 20px;
    }

    table {
        font-size: 14px;
    }

    th,
    td {
        padding: 10px 6px;
    }

    /* thank you */
    .thank-you-section {
        padding: 60px 20px;
    }

    .thank-you-section .container {
        padding: 40px 25px;
    }

    .thank-you-section .title {
        font-size: 28px;
    }

    .thank-you-section .description {
        font-size: 15px;
    }

    .thank-you-section .add-btn {
        padding: 8px 16px;
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .subtitle {
        font-size: 12px;
    }

    .title {
        font-size: 24px;
    }

    .description {
        font-size: 13px;
        margin-bottom: 30px;
    }

    .categories {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .product-card img {
        height: 200px;
    }

    .product-name {
        font-size: 18px;
    }

    .product-desc {
        font-size: 13px;
    }

    .order-summary h2 {
        font-size: 20px;
    }

    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    th,
    td {
        padding: 8px 5px;
    }

    /* thank you */
    .thank-you-section {
        padding: 40px 10px;
    }

    .thank-you-section .container {
        padding: 30px 15px;
    }

    .thank-you-section .subtitle {
        font-size: 11px;
    }

    .thank-you-section .title {
        font-size: 22px;
    }

    .thank-you-section .description {
        font-size: 13px;
    }

    .thank-you-section .add-btn {
        width: 100%;
        padding: 10px 0;
        font-size: 0.9rem;
    }
}

@media (max-width: 1200px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }

    .product-card {
        max-width: 400px;
    }
}
.row.invalid input,
.row.invalid select,
.row.invalid textarea{
    border-color: red !important;
}
.row.invalid .err-msg{
    display: block;
    text-align: left;
    color: red;
}