/* =========================================================
   Public Website
   ========================================================= */

* {
    box-sizing: border-box;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('/sales/fonts/vazirmatn/Vazirmatn-Regular.woff2') format('woff2');
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('/sales/fonts/vazirmatn/Vazirmatn-Bold.woff2') format('woff2');
    font-style: normal;
    font-weight: 700;
    font-display: swap;
}

body {
    margin: 0;
    font-family: 'Vazirmatn', Tahoma, Arial, sans-serif;
    background: #f7f7f7;
    color: #222;
}

/* =========================================================
   Public Header
========================================================= */

.public-header {
    background: #ffcc33;
    border-bottom: 1px solid #e0b500;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}


/* ---------------------------------------------------------
   ردیف بالا
--------------------------------------------------------- */

.public-header-top {
    background: rgba(255, 255, 255, 0.16);
    border-bottom: 1px solid rgba(120, 90, 0, 0.12);
}

.public-header-top-inner {
    max-width: 1200px;
    min-height: 42px;

    margin: 0 auto;
    padding: 0 20px;

    display: flex;
    align-items: center;
    justify-content: flex-start;
}


/* منوی حساب */

.public-account-nav {
    display: flex;
    align-items: center;

    gap: 4px;
}


/* لینک‌های ردیف بالا */

.public-top-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 30px;

    padding: 4px 12px;

    border: 0;
    border-radius: 6px;

    background: transparent;
    color: #3b3100;

    font-family: inherit;
    font-size: 13px;
    font-weight: 700;

    text-decoration: none;
    white-space: nowrap;

    cursor: pointer;

    transition:
        background-color 0.18s ease,
        color 0.18s ease,
        transform 0.18s ease;
}

.public-top-link:hover {
    
    color: #171300;
    text-decoration: none;
}


/* سبد خرید */



.public-cart-link:hover {
    
}


/* خروج */

.public-logout-form {
    margin: 0;
    padding: 0;
}

.public-logout-button {
    
}

.public-logout-button:hover {
    
    color: #000;
}


/* ---------------------------------------------------------
   ردیف اصلی
--------------------------------------------------------- */

.public-header-main {
    background: #ffcc33;
}

.public-header-main-inner {
    max-width: 1200px;

    min-height: 92px;

    margin: 0 auto;
    padding: 10px 20px;

    display: flex;
    align-items: center;

    direction: rtl;
}


/* ---------------------------------------------------------
   لوگو
--------------------------------------------------------- */

.public-header-brand {
    flex-shrink: 0;

    display: flex;
    align-items: center;

    margin-left: 24px;
}

.public-logo {
    display: inline-flex;
    align-items: center;

    text-decoration: none;
}

.public-logo img {
    display: block;

    max-width: 230px;
    max-height: 72px;

    width: auto;
    height: auto;

    object-fit: contain;
}




/* ---------------------------------------------------------
   منوی اصلی ردیف پایین
--------------------------------------------------------- */

.public-main-nav {
    display: flex;
    align-items: center;

    gap: 5px;

    direction: rtl;
}


/* لینک اصلی */

.public-main-nav-link {
    position: relative;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 44px;

    padding: 7px 15px;

    border-radius: 8px;

    color: #302800;

    font-family: inherit;
    font-size: 14px;
    font-weight: 700;

    text-decoration: none;
    white-space: nowrap;

    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

.public-main-nav-link:hover {
    color: #171300;
    text-decoration: none;
    transform: translateY(-1px);
}


/* خط ظریف زیر گزینه هنگام hover */

.public-main-nav-link:not(.public-main-nav-link-disabled)::after {
    content: "";

    position: absolute;

    right: 15px;
    left: 15px;
    bottom: 4px;

    height: 2px;

    border-radius: 2px;

    background: #3b3100;

    transform: scaleX(0);
    transform-origin: center;

    transition: transform 0.2s ease;
}

.public-main-nav-link:not(.public-main-nav-link-disabled):hover::after {
    transform: scaleX(1);
}


/* تیکت غیرفعال */

.public-main-nav-link-disabled {
    color: #746520;
    opacity: 0.62;

    cursor: default;
}

.public-main-nav-link-disabled:hover {
    background: transparent;
    color: #746520;
    box-shadow: none;
    transform: none;
}

.public-main-nav-link-disabled::after {
    display: none;
}


/* ---------------------------------------------------------
   موبایل
--------------------------------------------------------- */


@media (max-width: 500px) {

    .public-header-top-inner {
        justify-content: center;
    }

    .public-account-nav {
        justify-content: center;
        flex-wrap: wrap;
    }

    .public-top-link {
        padding-left: 9px;
        padding-right: 9px;
        font-size: 12px;
    }

    .public-header-main-inner {
        padding: 12px 10px;
    }

    .public-main-nav {
        gap: 3px;
    }

    .public-main-nav-link {
        min-height: 38px;
        padding: 5px 8px;
        font-size: 12px;
    }
}



.public-site-title {
    color: #222;
    font-size: 22px;
    font-weight: bold;
}

.public-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
}

/* =========================================================
   Footer
   ========================================================= */

.public-footer {
    margin-top: 30px;
    background: #222;
    color: #eee;
    padding: 35px 20px 20px;
}

.public-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 40px;
}

.public-footer-column {
    min-width: 0;
}

.public-footer-title {
    margin: 0 0 18px;
    padding-bottom: 10px;
    border-bottom: 2px solid #ffcc33;
    font-size: 17px;
    color: #fff;
}

.public-footer-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 12px;
    line-height: 1.9;
    font-size: 14px;
}

.public-footer-label {
    flex-shrink: 0;
    font-weight: bold;
    color: #ffcc33;
}

.public-footer-link {
    color: #eee;
    text-decoration: none;
    word-break: break-word;
}

.public-footer-link:hover {
    color: #ffcc33;
}

.public-footer-address {
    align-items: flex-start;
}

.public-footer-socials {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.public-footer-social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid #555;
    border-radius: 50%;
    color: #eee;
    background: transparent;
    text-decoration: none;
    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}

.public-footer-social-icon svg {
    display: block;
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.public-footer-social-icon:hover {
    color: #222;
    background: #ffcc33;
    border-color: #ffcc33;
    transform: translateY(-2px);
}

.public-footer-copyright {
    max-width: 1200px;
    margin: 25px auto 0;
    padding-top: 18px;
    border-top: 1px solid #444;
    color: #aaa;
    text-align: center;
    font-size: 13px;
    line-height: 1.9;
}

@media (max-width: 600px) {
    .public-footer {
        padding: 30px 15px 18px;
    }

    .public-footer-inner {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .public-footer-item {
        flex-wrap: wrap;
    }
}
/* =========================================================
   Product Purchase Page
========================================================= */

.container {
    width: 100%;
    max-width: 1200px;

    margin: 0 auto;
    padding: 42px 44px;

    background: #ffffff;

    border: 1px solid #e8e8e8;
    border-radius: 22px;

    box-shadow:
        0 12px 35px rgba(0, 0, 0, 0.07);
}


/* ---------------------------------------------------------
   عنوان صفحه
--------------------------------------------------------- */

.header {
    position: relative;

    display: flex;
    flex-direction: column;
    align-items: stretch;

    gap: 16px;

    margin-bottom: 34px;
    padding-bottom: 26px;

    border-bottom: 1px solid #eeeeee;
}

.header::before {
    content: "";

    position: absolute;

    right: 0;
    bottom: -1px;

    width: 90px;
    height: 4px;

    background: #ffcc00;

    border-radius: 4px;
}

.header h1 {
    margin: 0;

    color: #222;

    font-size: 30px;
    font-weight: 700;

    line-height: 1.5;
}


/* ---------------------------------------------------------
   توضیحات خرید
--------------------------------------------------------- */

.purchase-top-description {
    width: 100%;

    padding: 16px 20px;

    background: #fffdf2;

    border: 1px solid #f0df92;
    border-right: 4px solid #ffcc00;

    border-radius: 12px;

    color: #555;

    font-size: 14px;
    line-height: 2;

    text-align: right;
}

.purchase-operator-description {
    margin-bottom: 20px;

    padding: 15px 18px;

    background: #fffdf2;

    border: 1px solid #f0df92;
    border-right: 4px solid #ffcc00;

    border-radius: 12px;

    color: #555;

    font-size: 14px;
    line-height: 2;

    text-align: right;
}

.purchase-bottom-description {
    margin-top: 32px;
    padding: 18px 20px;

    background: #fafafa;

    border: 1px solid #e4e4e4;

    border-radius: 12px;

    color: #555;

    font-size: 14px;
    line-height: 2;

    text-align: right;
}


/* ---------------------------------------------------------
   خطاها
--------------------------------------------------------- */

.error {
    margin-bottom: 22px;
    padding: 15px 18px;

    background: #fff1f0;

    border: 1px solid #f1c3bf;
    border-right: 4px solid #dc3545;

    border-radius: 12px;

    color: #a61b1b;

    line-height: 1.9;
}

.error strong {
    display: block;
    margin-bottom: 6px;
}

.error ul {
    margin: 6px 0 0;
    padding-right: 22px;
}


/* ---------------------------------------------------------
   بخش‌ها
--------------------------------------------------------- */

.section {
    margin-bottom: 30px;
    padding: 25px;

    background: #fcfcfc;

    border: 1px solid #eeeeee;
    border-radius: 16px;
    display: block;
}

.section-title {
    position: relative;

    display: block;

    margin-bottom: 20px;
    padding-right: 14px;

    color: #252525;

    font-size: 16px;
    font-weight: 700;
    line-height: 1.7;
}

.section-title::before {
    content: "";

    position: absolute;

    right: 0;
    top: 5px;

    width: 4px;
    height: 24px;

    background: #ffcc00;

    border-radius: 4px;
}
/* =========================================================
   Product Cards
========================================================= */

.section:has(> .product-option) {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.section:has(> .product-option) > .section-title,
.section:has(> .product-option) > .purchase-operator-description,
.section:has(> .product-option) > .no-stock-message {
    grid-column: 1 / -1;
}

.product-option {
    position: relative;
    display: block;
    min-width: 0;
    min-height: 175px;
    padding: 0;
    border: 2px solid #e6e6e6;
    border-radius: 18px;
    background: #ffffff;
    cursor: pointer;
    overflow: hidden;
    transition:
        transform .2s ease,
        border-color .2s ease,
        box-shadow .2s ease,
        background-color .2s ease;
}

.product-option:hover {
    transform: translateY(-3px);
    border-color: #ffcc00;
    box-shadow: 0 10px 25px rgba(0, 0, 0, .08);
}

.product-option:has(input[type="radio"]:checked) {
    border-color: #ffcc00;
    background: #fffdf2;
    box-shadow: 0 10px 28px rgba(255, 204, 0, .20);
}

.product-option:has(input[type="radio"]:checked)::after {
    content: "✓";
    position: absolute;
    top: 12px;
    left: 12px;
    width: 27px;
    height: 27px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #ffcc00;
    color: #222;
    font-size: 16px;
    font-weight: bold;
    z-index: 2;
}

.product-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.product-card-content {
    min-height: 175px;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.product-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 20px;
}

.product-card-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 12px;
    background: #fff4bf;
    color: #8a6800;
    font-size: 12px;
    font-weight: bold;
}

.product-card-status {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: bold;
}

.product-card-status.available {
    background: #edf8ef;
    color: #287a35;
}

.product-card-status.available::before {
    content: "";
    width: 7px;
    height: 7px;
    margin-left: 6px;
    border-radius: 50%;
    background: #35a943;
}

.product-card-status.unavailable {
    background: #f1f1f1;
    color: #888;
}

.product-name {
    margin-bottom: auto;
    color: #222;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.8;
}

.product-card-bottom {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid #eeeeee;
}

.product-price {
    color: #222;
    font-size: 17px;
    font-weight: 800;
    white-space: nowrap;
}

.product-price span {
    margin-right: 3px;
    color: #777;
    font-size: 11px;
    font-weight: 500;
}

.product-select-hint {
    color: #987600;
    font-size: 11px;
    font-weight: bold;
    white-space: nowrap;
}

.product-select-hint span {
    font-size: 15px;
    margin-right: 3px;
}

.product-option.disabled {
    opacity: .55;
    cursor: not-allowed;
    background: #fafafa;
}

.product-option.disabled:hover {
    transform: none;
    border-color: #e6e6e6;
    box-shadow: none;
}

.product-option.disabled .product-card-icon {
    background: #eeeeee;
    color: #888;
}


/* ---------------------------------------------------------
   مشخصات مشتری
--------------------------------------------------------- */

.customer-info {
    padding: 20px;

    background: #ffffff;

    border: 1px solid #e7e7e7;

    border-radius: 12px;
}

.customer-row {
    display: flex;
    align-items: center;

    gap: 10px;

    margin-bottom: 12px;

    color: #444;

    line-height: 1.8;
}

.customer-row:last-child {
    margin-bottom: 0;
}

.customer-row strong {
    color: #222;
}


/* ---------------------------------------------------------
   فرم‌ها
--------------------------------------------------------- */

.field {
    margin-bottom: 23px;
}

.field:last-child {
    margin-bottom: 0;
}

.field label {
    display: block;

    margin-bottom: 9px;

    color: #333;

    font-size: 14px;
    font-weight: 700;
}

.field input {
    box-sizing: border-box;

    width: 100%;
    min-height: 48px;

    padding: 10px 14px;

    background: #ffffff;

    border: 1px solid #d7d7d7;
    border-radius: 10px;

    color: #222;

    font-family: inherit;
    font-size: 15px;

    outline: none;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background-color 0.2s ease;
}

.field input:hover {
    border-color: #c4c4c4;
}

.field input:focus {
    background: #fffef8;

    border-color: #d5b000;

    box-shadow:
        0 0 0 3px rgba(255, 204, 0, 0.16);
}

.field small {
    display: block;

    margin-top: 7px;

    color: #777;

    font-size: 12px;
    line-height: 1.8;
}

.quantity-input {
    width: 150px !important;

    text-align: center;
    font-weight: 700;
}


/* ---------------------------------------------------------
   کوپن
--------------------------------------------------------- */

.coupon-row {
    display: flex;
    align-items: stretch;

    gap: 10px;
}

.coupon-field {
    flex: 1;

    margin-bottom: 0;
}

.coupon-input {
    direction: ltr;

    text-align: left;

    letter-spacing: 0.5px;
}

.coupon-button {
    min-width: 145px;

    padding: 10px 18px;

    border: 1px solid #d2aa00;
    border-radius: 10px;

    background: #ffcc00;

    color: #3e3300;

    font-family: inherit;
    font-size: 14px;
    font-weight: 700;

    cursor: pointer;

    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.coupon-button:hover {
    background: #ffd633;

    border-color: #bd9700;

    box-shadow:
        0 5px 14px rgba(160, 125, 0, 0.14);

    transform: translateY(-1px);
}

.coupon-button:disabled {
    background: #e2e2e2;

    border-color: #d0d0d0;

    color: #888;

    cursor: not-allowed;

    box-shadow: none;

    transform: none;
}

.coupon-message {
    display: none;

    margin-top: 10px;
    padding: 10px 13px;

    border-radius: 9px;

    font-size: 13px;
    line-height: 1.8;
}

.coupon-message.success {
    display: block;

    background: #edf8f0;

    border: 1px solid #c7e6cf;

    color: #146c43;
}

.coupon-message.error {
    display: block;

    background: #fff1f0;

    border: 1px solid #f1c3bf;

    color: #b42318;
}


/* ---------------------------------------------------------
   خلاصه مبلغ
--------------------------------------------------------- */

.total,
.discount-row,
.tax-row,
.final-total {
    display: flex;

    justify-content: space-between;
    align-items: center;

    gap: 20px;
}

.total {
    padding: 13px 16px;

    color: #444;

    font-size: 14px;
}

.discount-row {
    display: none;

    margin-top: 8px;
    padding: 12px 16px;

    background: #fff9df;

    border: 1px solid #f0df92;

    border-radius: 10px;

    color: #806700;

    font-size: 14px;
}

.tax-row {
    display: none;

    margin-top: 8px;
    padding: 12px 16px;

    background: #fff9df;

    border: 1px solid #f0df92;

    border-radius: 10px;

    color: #806700;

    font-size: 14px;
}

.tax-row > span:last-child {
    direction: ltr;

    text-align: left;

    white-space: nowrap;
}

.final-total {
    margin-top: 14px;
    padding: 19px 20px;

    background: #fffbea;

    border: 1px solid #e7ca48;

    border-radius: 13px;

    color: #332a00;

    font-size: 19px;
    font-weight: 700;

    box-shadow:
        0 5px 16px rgba(160, 125, 0, 0.07);
}

.final-total > span:last-child {
    color: #715b00;

    font-size: 21px;
}


/* ---------------------------------------------------------
   دکمه خرید
--------------------------------------------------------- */

.button {
    position: relative;

    width: 100%;

    min-height: 56px;

    padding: 13px 20px;

    margin-top: 22px;

    border: 0;
    border-radius: 12px;

    background: #222;

    color: #fff;

    font-family: inherit;
    font-size: 16px;
    font-weight: 700;

    cursor: pointer;

    box-shadow:
        0 7px 18px rgba(0, 0, 0, 0.13);

    transition:
        background-color 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.button:hover {
    background: #111;

    box-shadow:
        0 10px 24px rgba(0, 0, 0, 0.17);

    transform: translateY(-1px);
}

.button:active {
    transform: translateY(0);
}

.button:disabled {
    background: #a5a5a5;

    box-shadow: none;

    cursor: not-allowed;

    transform: none;
}


/* ---------------------------------------------------------
   پیام‌های عمومی
--------------------------------------------------------- */

.login-notice {
    margin-bottom: 20px;
    padding: 13px 16px;

    background: #edf8f0;

    border: 1px solid #c7e6cf;

    border-radius: 10px;

    color: #146c43;
}


/* ---------------------------------------------------------
   واکنش‌گرایی صفحه خرید
--------------------------------------------------------- */

@media (max-width: 800px) {

    .container {
        max-width: none;

        padding: 30px 24px;

        border-radius: 18px;
    }

    .header h1 {
        font-size: 25px;
    }

    .section {
        padding: 20px;
    }

    .product-option {
        min-height: 76px;

        padding: 15px;
    }

    .product-info {
        padding-left: 70px;
    }
}


@media (max-width: 600px) {

    .public-main {
        padding: 20px 12px;
    }

    .container {
        padding: 24px 15px;

        border-radius: 15px;

        box-shadow:
            0 7px 22px rgba(0, 0, 0, 0.06);
    }

    .header {
        margin-bottom: 25px;
        padding-bottom: 20px;
    }

    .header h1 {
        font-size: 22px;
    }

    .section {
        margin-bottom: 20px;
        padding: 16px;

        border-radius: 13px;
    }

    .section-title {
        font-size: 16px;
    }

    .product-option {
        align-items: flex-start;

        gap: 12px;

        padding: 15px 13px;
    }

    .product-info {
        padding-left: 0;
    }

    .product-option:has(input[type="radio"]:checked)::after {
        position: static;

        margin-right: auto;

        align-self: flex-start;

        white-space: nowrap;
    }

    .product-name {
        font-size: 15px;
    }

    .product-price {
        font-size: 14px;
    }

    .customer-row {
        flex-direction: column;

        align-items: flex-start;

        gap: 2px;
    }

    .coupon-row {
        flex-direction: column;

        align-items: stretch;
    }

    .coupon-button {
        width: 100%;
    }

    .quantity-input {
        width: 100% !important;
    }

    .total,
    .discount-row,
    .tax-row,
    .final-total {
        gap: 12px;
    }

    .final-total {
        font-size: 16px;
    }

    .final-total > span:last-child {
        font-size: 16px;
    }
}

/* Customer Login */
.customer-login-form .field label {
    color: #0649F2;
}

.remember-label {
    display: inline-flex;
    flex-direction: row-reverse;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    color: #222;
    cursor: pointer;
}

.remember-label input[type="checkbox"] {
    margin: 0;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.customer-login-button {
    background: #0649F2;
    color: #fff;
    border: none;
}

/* Customer Login */
.register-error {
    padding: 18px 20px;
    border: 1px solid #ccc;
    border-radius: 10px;
}

.register-error-title {
    font-weight: 700;
    margin-bottom: 10px;
}

.register-error-message {
    margin-bottom: 8px;
}

.register-error-help {
    margin-top: 8px;
    margin-bottom: 16px;
    font-size: 14px;
    line-height: 1.9;
}

.register-error-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.register-error-link {
    display: inline-block;
    padding: 8px 16px;
    border: 1px solid #0649F2;
    border-radius: 6px;
    color: #0649F2;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    transition: 0.2s;
}

.register-error-link:hover {
    background: #0649F2;
    color: #fff;
}

small {
    color: #666;
}

@media (max-width: 600px) {
    .container {
        padding: 20px 15px;
    }

    .header {
        align-items: flex-start;
    }

    .coupon-row {
        flex-direction: column;
        align-items: stretch;
    }

    .coupon-button {
        width: 100%;
    }
}



/* =========================================================
   Product Cards - Responsive Override
========================================================= */

@media (max-width: 800px) {
    .section:has(> .product-option) {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 15px;
    }

    .product-card-content {
        min-height: 165px;
        padding: 17px;
    }

    .product-card-top {
        margin-bottom: 17px;
    }

    .product-name {
        font-size: 16px;
    }

    .product-price {
        font-size: 15px;
    }
}

@media (max-width: 600px) {
    .section:has(> .product-option) {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .product-option,
    .product-card-content {
        min-height: 150px;
    }

    .product-card-content {
        padding: 16px;
    }

    .product-name {
        font-size: 16px;
    }
}

/* Fix public header horizontal overflow on mobile */

@media (max-width: 600px) {

    .public-header-main-inner {
        width: 100%;
        max-width: 100%;
        padding: 10px 12px;
        flex-direction: column;
        align-items: stretch;
    }

    .public-header-brand {
        width: 100%;
        margin-left: 0;
        justify-content: center;
        margin-bottom: 10px;
    }

    .public-logo img {
        max-width: 170px;
        max-height: 55px;
    }

    .public-main-nav {
        width: 100%;
        max-width: 100%;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 5px;
    }

    .public-main-nav-link {
        max-width: 100%;
        white-space: nowrap;
    }
}


/* =========================================================
   Cart Page
========================================================= */

.cart-container {
    max-width: 1200px;
}

.cart-header {
    margin-bottom: 20px;
    text-align: center;
}

.cart-header h1 {
    margin: 0;
    font-size: 26px;
    font-weight: 700;
}

.cart-header p {
    margin: 8px 0 0;
    color: #666;
    line-height: 1.8;
}

.cart-card {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.05);
}

.cart-message {
    margin-bottom: 18px;
    padding: 13px 16px;
    border-radius: 8px;
    line-height: 1.8;
}

.cart-message-success {
    background: #eef8f0;
    border: 1px solid #c9e6ce;
    color: #276b30;
}

.cart-message-error {
    background: #fff0f0;
    border: 1px solid #efcaca;
    color: #a52828;
}

.cart-section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 15px;
}

.cart-section-title h2,
.cart-customer-section h2,
.cart-summary h2 {
    margin: 0 0 15px;
    font-size: 16px;
    font-weight: 700;
}

.cart-section-title h2 {
    margin-bottom: 0;
}

.cart-count {
    padding: 5px 10px;
    background: #f5f5f5;
    border-radius: 20px;
    color: #666;
    font-size: 13px;
}

.cart-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cart-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 17px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
}

.cart-item-main {
    flex: 1;
    min-width: 0;
}

.cart-item-name {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.8;
}

.cart-item-price {
    margin-top: 7px;
    color: #666;
    font-size: 13px;
    line-height: 1.8;
}

.cart-item-price strong {
    color: #333;
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.cart-quantity-form {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.cart-quantity-form label,
.cart-label {
    display: block;
    color: #777;
    font-size: 13px;
    margin-bottom: 5px;
}

.cart-quantity-control {
    display: flex;
    align-items: center;
    gap: 6px;
}

.cart-quantity-control input {
    width: 65px;
    height: 38px;
    padding: 5px 8px;
    border: 1px solid #d8d8d8;
    border-radius: 6px;
    font-family: inherit;
    font-size: 14px;
    text-align: center;
}

.cart-update-button {
    height: 38px;
    padding: 0 11px;
    border: 1px solid #d8d8d8;
    border-radius: 6px;
    background: #fff;
    color: #333;
    font-family: inherit;
    font-size: 13px;
    cursor: pointer;
}

.cart-update-button:hover {
    background: #f5f5f5;
}

.cart-item-total {
    min-width: 135px;
    text-align: left;
}

.cart-item-total strong {
    display: block;
    font-size: 15px;
    line-height: 1.8;
}

.cart-remove-form {
    margin: 0;
}

.cart-remove-button {
    border: 0;
    background: transparent;
    color: #c62828;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.cart-remove-button:hover {
    text-decoration: underline;
}

.cart-customer-section {
    margin-top: 28px;
}

.cart-customer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.cart-info-box {
    padding: 15px;
    background: #f8f8f8;
    border-radius: 8px;
}

.cart-info-box strong {
    line-height: 1.8;
}

.cart-summary {
    margin-top: 28px;
    padding: 20px;
    background: #f8f8f8;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
}

.cart-summary h2 {
    margin-bottom: 10px;
}

.cart-summary-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 8px 0;
}

.cart-coupon-row {
    color: #666;
}

.cart-discount-row {
    color: #2e7d32;
}

.cart-tax-row {
    color: #8a6d1d;
}

.cart-summary-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 10px;
    padding-top: 15px;
    border-top: 1px solid #ddd;
    font-size: 19px;
    font-weight: 700;
}

.cart-summary-total strong {
    font-size: 21px;
}

.cart-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 25px;
}

.cart-actions form {
    margin: 0;
}

.cart-primary-button,
.cart-secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 20px;
    border-radius: 7px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    box-sizing: border-box;
}

.cart-primary-button {
    border: 0;
    background: #0649F2;
    color: #fff;
}

.cart-primary-button:hover {
    background: #043dcc;
}

.cart-secondary-button {
    border: 1px solid #d8d8d8;
    background: #fff;
    color: #333;
}

.cart-secondary-button:hover {
    background: #f5f5f5;
}

.cart-clear-button {
    min-height: 48px;
    padding: 0 18px;
    border: 1px solid #e0baba;
    border-radius: 7px;
    background: #fff;
    color: #b32626;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.cart-clear-button:hover {
    background: #fff5f5;
}

.cart-checkout-form {
    margin-right: auto !important;
}

.cart-checkout-button {
    min-width: 180px;
}

.cart-empty {
    text-align: center;
    padding: 45px 25px;
}

.cart-empty-icon {
    margin-bottom: 15px;
    font-size: 42px;
}

.cart-empty h2 {
    margin: 0;
    font-size: 20px;
}

.cart-empty p {
    margin: 8px 0 22px;
    color: #666;
    line-height: 1.8;
}


/* ---------------------------------------------------------
   Cart Responsive
--------------------------------------------------------- */

@media (max-width: 700px) {

    .cart-container {
        padding-left: 15px;
        padding-right: 15px;
    }

    .cart-card {
        padding: 18px;
    }

    .cart-item {
        flex-direction: column;
        align-items: stretch;
    }

    .cart-item-actions {
        flex-wrap: wrap;
        align-items: flex-end;
    }

    .cart-item-total {
        min-width: 0;
        text-align: right;
    }

    .cart-customer-grid {
        grid-template-columns: 1fr;
    }

    .cart-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .cart-actions form,
    .cart-checkout-form,
    .cart-primary-button,
    .cart-secondary-button {
        width: 100%;
    }

    .cart-checkout-form {
        margin-right: 0 !important;
        order: -1;
    }

    .cart-checkout-button {
        width: 100%;
    }
}

@media (max-width: 450px) {

    .cart-section-title {
        align-items: flex-start;
        flex-direction: column;
    }

    .cart-item-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .cart-quantity-control {
        width: 100%;
    }

    .cart-quantity-control input {
        flex: 1;
    }

    .cart-update-button {
        flex: 1;
    }
}

/* =========================================================
   Customer Panel
========================================================= */

.customer-wrapper {
    display: flex;
    min-height: 100vh;
}

.customer-sidebar {
    width: 240px;
    flex-shrink: 0;
    background: #ffcc33;
    color: #000;
}

.customer-sidebar a,
.customer-sidebar a:link,
.customer-sidebar a:visited,
.customer-sidebar a:hover,
.customer-sidebar a:active {
    color: #000 !important;
    text-decoration: none;
}

.customer-sidebar button {
    color: #000 !important;
}

.customer-content {
    flex: 1;
    min-width: 0;
    padding: 25px;
}

.customer-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .08);
}

.customer-content h1,
.customer-content h2,
.customer-content h3 {
    margin-top: 0;
}

@media (max-width: 700px) {

    .customer-wrapper {
        display: block;
    }

    .customer-sidebar {
        width: 100%;
    }

    .customer-content {
        padding: 15px;
    }

}

@media (max-width: 700px) {

    html,
    body {
        min-height: 100%;
        height: auto;
        overflow-y: auto;
    }

    .customer-wrapper {
        min-height: 300vh;
        height: auto;
        overflow: visible;
    }

    .customer-content {
        height: auto;
        min-height: 0;
        overflow: visible;
    }
}



/* =========================================================
   Customer Panel Page Titles
   عنوان یکپارچه تمام صفحات پنل مشتری
   ========================================================= */

.customer-content h1 {
    position: relative;
    display: table;

    margin-bottom: 30px;
    padding-bottom: 12px;

    color: #252525;
    font-size: 27px;
    font-weight: 900;
    line-height: 1.8;
    letter-spacing: -0.5px;
}

/* خط زمینه زیر عنوان */
.customer-content h1::before {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;

    width: 100%;
    height: 3px;

    background: #e9e9e9;
    border-radius: 10px;
}

/* خط زرد متحرک */
.customer-content h1::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;

    width: 58px;
    height: 3px;

    background: #ffcc00;
    border-radius: 10px;

    animation: customerTitleLine 0.7s ease-out both;
}

@keyframes customerTitleLine {
    from {
        width: 0;
        opacity: 0.4;
    }

    to {
        width: 58px;
        opacity: 1;
    }
}

/* رعایت تنظیم کاهش حرکت کاربر */
@media (prefers-reduced-motion: reduce) {
    .customer-content h1::after {
        animation: none;
    }
}

/* نمایش در موبایل */
@media (max-width: 600px) {
    .customer-content h1 {
        font-size: 23px;
        margin-bottom: 22px;
    }
}



/* آیکون‌های منوی حساب کاربری در هدر */
.public-account-nav .public-top-icon {
    display: inline-block;
    flex-shrink: 0;
    width: 17px;
    height: 17px;
    margin-left: 6px;
    vertical-align: middle;
    color: #000;
}

/* رنگ مشکی آیکون‌ها در حالت عادی و hover */
.public-account-nav .public-top-link .public-top-icon {
    color: #000;
}

.public-account-nav .public-top-link:hover .public-top-icon {
    color: #000;
}

/* آیکون و متن خروج هم‌تراز بمانند */
.public-account-nav .public-logout-button {
    display: inline-flex;
    align-items: center;
    gap: 0;
}

nav a span {
    padding-top: 5px;
}


/* تراز عمودی منوی اصلی کنار لوگو */
.public-main-nav {
    display: flex;
    align-items: center;
    align-self: center;
    height: 100%;
}

.public-main-nav > a,
.public-main-nav > button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    margin-top: 0;
    margin-bottom: 0;
    line-height: 1.5;
}


/* یکسان‌سازی ظاهر لینک‌های منوی اصلی */
.public-main-nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    box-sizing: border-box;
    margin-top: 0;
    margin-bottom: 0;
    padding: 8px 12px;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: inherit;
    line-height: 1.5;
    text-decoration: none;
    vertical-align: middle;
}

.public-main-nav a:hover {
    background: transparent;
    box-shadow: none;
    text-decoration: none;
}











/* Customer mobile header and menu */

.customer-mobile-header {
    display: none;
}

@media (max-width: 700px) {
    .customer-mobile-header {
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
        width: 100%;
        height: 76px;
        padding: 8px 65px;
        box-sizing: border-box;
        background: #ffcc33;
        border-bottom: 1px solid rgba(0, 0, 0, 0.15);
        z-index: 1000;
    }

    .customer-mobile-logo {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        height: 60px;
        text-decoration: none;
    }

    .customer-mobile-logo img {
        display: block;
        max-width: 170px;
        max-height: 58px;
        width: auto;
        height: auto;
        object-fit: contain;
    }

    .customer-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        right: 12px;
        top: 50%;
        transform: translateY(-50%);
        width: 44px;
        height: 44px;
        padding: 0;
        border: 1px solid rgba(0, 0, 0, 0.2);
        border-radius: 8px;
        background: transparent;
        color: #111;
        font-size: 27px;
        cursor: pointer;
        box-shadow: none;
    }

    .customer-sidebar {
        display: none;
        position: fixed;
        top: 76px;
        right: 0;
        bottom: 0;
        width: min(280px, 85vw);
        height: auto;
        overflow-y: auto;
        z-index: 1001;
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.18);
    }

    .customer-sidebar.is-open {
        display: block;
    }

    .customer-wrapper {
        display: block;
        min-height: 100vh;
        height: auto;
        overflow: visible;
    }

    .customer-content {
        min-width: 0;
        height: auto;
        min-height: 0;
        padding: 15px;
        overflow: visible;
    }
}



@media (max-width: 700px) {
    #customerSidebar {
        position: fixed !important;
        top: 76px !important;
        right: 0 !important;
        bottom: 0 !important;
        left: auto !important;
        width: min(280px, 85vw) !important;
        height: auto !important;
        overflow-y: auto !important;
        z-index: 1001;
    }
}

@media (max-width: 700px) {
    #customerSidebar > div:first-child,
    #customerSidebar > hr {
        display: none;
    }
}


@media (max-width: 700px) {
    html:has(body.customer-menu-open),
    body.customer-menu-open {
        overflow: hidden !important;
        overscroll-behavior: none;
    }

    body.customer-menu-open .customer-wrapper,
    body.customer-menu-open .customer-content {
        overflow: hidden !important;
    }

    body.customer-menu-open #customerSidebar {
        overscroll-behavior: contain;
        touch-action: pan-y;
    }
}


.customer-sidebar a{font-size: 14px;}

/* =========================================================
   Public Tariffs - Mobile Responsive Table
========================================================= */

@media (max-width: 767px) {

    .csp-inline-645bbb62ac7f {
        width: 100%;
        max-width: 100%;
        overflow: visible;
    }

    .csp-inline-6581cb58bef5 {
        display: block;
        width: 100%;
        min-width: 0;
        border-collapse: collapse;
    }

    .csp-inline-6581cb58bef5 thead {
        display: none;
    }

    .csp-inline-6581cb58bef5 tbody {
        display: block;
        width: 100%;
    }

    .csp-inline-6581cb58bef5 tbody tr {
        display: block;
        width: 100%;
        margin-bottom: 12px;
        padding: 10px;
        border: 1px solid #e5e5e5;
        border-radius: 10px;
        background: #fff;
    }

.csp-inline-6581cb58bef5 tbody td {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    min-width: 0;
    padding: 9px 4px;
    direction: rtl;
    text-align: right;
    overflow-wrap: anywhere;
    box-sizing: border-box;
}

    .csp-inline-6581cb58bef5 tbody td::before {
        content: attr(data-label);
        flex: 0 0 38%;
        font-weight: 700;
        color: #666;
    }

    .csp-inline-6581cb58bef5 tbody td[dir="ltr"] {
        direction: ltr;
    }
}

