* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.custom-modal .modal-content.cool-modal {
    background: linear-gradient(135deg, var(--modal-gradient-start), var(--modal-gradient-end));
    color: var(--modal-content-text);
    border-radius: 18px;
    border: none;
    padding: 15px;
    box-shadow: 0 0 35px var(--modal-shadow);
    animation: menuPop 0.35s ease-out;
    position: relative;
    overflow: hidden;
}

    .custom-modal .modal-content.cool-modal::before {
        content: '';
        position: absolute;
        top: -30%;
        left: -30%;
        width: 70%;
        height: 70%;
        background: var(--modal-light);
        filter: blur(80px);
        transform: rotate(45deg);
    }

@keyframes menuPop {
    from {
        transform: scale(0.8) translateY(20px);
        opacity: 0;
    }

    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.countdown-timer {
    font-size: 30px;
    font-weight: bold;
    text-align: center;
    color: var(--timer-color);
    margin-bottom: 20px;
    text-shadow: 0 0 8px var(--timer-shadow);
}

.note-box {
    padding: 12px 15px;
    border-right: 4px solid var(--note-border);
    background: var(--note-bg);
    border-radius: 12px;
    transition: 0.2s ease;
}

    .note-box:hover {
        background: var(--note-bg-hover);
        transform: translateX(-3px);
    }

    .note-box h6 {
        font-weight: bold;
        color: var(--note-title);
        margin-bottom: 5px;
        text-shadow: 0 0 5px var(--note-title-shadow);
    }

    .note-box p {
        color: var(--note-text-color);
        opacity: 0.9;
    }

.btn-close-white {
    filter: var(--btn-close-white-filter);
}

.modal-footer .btn {
    background: var(--modal-button-bg);
    color: var(--modal-button-text);
    font-weight: bold;
    border-radius: 10px;
    padding: 8px 18px;
    box-shadow: 0 0 10px var(--modal-button-shadow);
    transition: 0.2s ease;
}

    .modal-footer .btn:hover {
        background: var(--modal-button-hover-bg);
        color: var(--modal-button-hover-text);
        transform: translateY(-2px);
    }

@font-face {
    font-family: 'IranSansWeb';
    src: url('../Fonts/IRANSansWeb.woff2') format('woff2'), url('../Fonts/IRANSansWeb.woff') format('woff'), url('../Fonts/IRANSansWeb.ttf') format('truetype');
}

body {
    font-family: IranSansWeb;
    font-size: 16px;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    background: var(--card-bg);
    color: var(--text-white);
}

/* Daily discounts */
.daily-discount-category-section {
    background: rgba(16, 185, 129, 0.05);
    border: 1px solid rgba(16, 185, 129, 0.22);
    border-radius: 12px;
    padding: 10px;
}

.discount-line {
    border-color: #10b981;
}

.discount-title {
    color: #047857;
}

.daily-discount-item-card {
    border: 2px solid rgba(16, 185, 129, 0.48);
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.12);
}

.daily-discount-badge,
.daily-discount-inline-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border-radius: 999px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
}

.daily-discount-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 4;
}

.daily-discount-old-price {
    color: #94a3b8;
    font-size: 12px;
    margin-inline-end: 6px;
}

.daily-discount-price {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 5px;
    flex-wrap: wrap;
}

.daily-discount-slide .swiper-slide-link-content {
    border-color: rgba(16, 185, 129, 0.35);
}

.clearfix {
    clear: both;
    margin: 0;
    padding: 0;
}

/* ----- Loader Background ----- */
.scan-loader {
    position: fixed;
    inset: 0;
    background: var(--scan-loader-bg);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999999;
    transition: opacity .5s;
}

    .scan-loader.hidden {
        opacity: 0;
        visibility: hidden;
    }

/* ----- QR Box ----- */
.qr-box {
    width: 140px;
    height: 140px;
    border: 3px solid var(--qr-box-border);
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    background: var(--scan-loader-bg);
    box-shadow: 0 0 25px var(--qr-box-shadow);
}

.qr-box::before {
    content: "";
    position: absolute;
    width: 40px;
    height: 40px;
    top: 0;
    left: 0;
    background: var(--qr-box-border);
    box-shadow:
        100px 0 0 var(--qr-box-border),
        0 100px 0 var(--qr-box-border),
        100px 100px 0 var(--qr-box-border);
}

.qr-box::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    top: 60px;
    left: 60px;
    background: var(--qr-box-border);
}

/* ----- Scan Line ----- */
.scan-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: var(--scan-line-bg);
    box-shadow: 0 0 25px var(--scan-line-shadow);
    animation: scanMove 2s linear infinite;
}

@keyframes scanMove {
    0% {
        top: 0;
    }

    50% {
        top: 100%;
    }

    100% {
        top: 0;
    }
}

/* ----- Loading text ----- */
.loading-text {
    margin-top: 25px;
    color: var(--loading-text);
    font-size: 1.4rem;
    font-weight: 600;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.5;
    }
}

@keyframes lds-ring {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* ------- nav ------- */
nav {
    all: unset;
}

.header {
    width: 100%;
}

.header-logo-img {
    width: 58px;
    height: 58px;
    object-fit: contain;
    border-radius: 14px;
    padding: 4px;
    background: var(--header-logo-img-bg);
    margin-bottom: 6px;
}

.header-logo-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--header-logo-name-color);
    margin: 0;
    line-height: 1.4;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.header-logo-type {
    font-size: 10px;
    font-weight: 500;
    color: var(--header-logo-type-color);
    margin-top: 2px;
}

#header-divider {
    height: 2px;
    margin: 5px 0 !important;
}

.category-items {
    margin: 0 auto;
    text-align: center;
    padding: 10px;
    background: var(--card-bg);
    color: var(--text-white);
}

/* اجازه می‌دهد عنوان آخرین دسته هم مانند دسته‌های قبل در موقعیت فعال قرار بگیرد. */
.category-items-end-spacer {
    width: 100%;
    height: clamp(260px, 48vh, 560px);
    pointer-events: none;
}

.category-items-title-line {
    height: 3px;
    background-color: var(--category-line);
    width: 98%;
    margin: 0 auto;
}

.category-items-title {
    position: sticky;
    top: 0;
    z-index: 999 !important;
    background: var(--category-title-glass-bg);
    backdrop-filter: blur(14px) saturate(180%);
    -webkit-backdrop-filter: blur(14px) saturate(180%);
    border-bottom: 1px solid var(--category-title-glass-border-bottom);
    border-top: 1px solid var(--category-title-glass-border-top);
    box-shadow: 0 8px 28px var(--category-title-glass-shadow);
    padding: 14px 12px;
    font-size: 20px;
    font-weight: 800;
    color: var(--category-title-glass-color);
    text-shadow: 0 0 6px var(--category-title-glass-text-shadow);
    border-radius: 6px;
}

.item-card {
    background-color: var(--card-bg);
    border-radius: 5px;
    width: calc(50% - 10px);
    position: relative;
    margin: 0 5px 15px;
    float: right;
    display: inline-block;
    border: 1px solid var(--card-border);
}

.item-card-out-of-stock {
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
    border-radius: 5px;
    width: calc(50% - 10px);
    margin: 0 5px 15px;
    border: 3px solid var(--card-outofstock-border);
    float: right;
    display: inline-block;
    opacity: 0.5;
    filter: grayscale(30%);
    position: relative;
    cursor: pointer;
}

    .item-card-out-of-stock * {
        pointer-events: none;
    }

    .item-card-out-of-stock::after {
        content: "موجود نیست";
        position: absolute;
        inset: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        background: var(--item-card-outofstock-overlay-bg);
        color: var(--item-card-outofstock-overlay-color);
        font-size: clamp(16px, 2.5vw, 26px);
        font-weight: bold;
        border-radius: 12px;
        text-shadow: 0 0 4px var(--item-card-outofstock-overlay-text-shadow);
        pointer-events: none;
    }

    .item-card-out-of-stock .btn-add-cart {
        background: var(--btn-add-cart-disabled-bg);
        box-shadow: none;
        cursor: not-allowed;
    }

.item-card-content {
    padding: 8px;
    margin: 0;
    width: 100%;
    min-height: 100px;
    display: grid;
    grid-template-columns: 90px minmax(0, 1fr);
    grid-template-areas:
        "media details"
        "description description";
    gap: 8px 10px;
    align-items: start;
    direction: rtl;
}

/* Keep all card badges in one vertical rail so they never cover each other. */
.item-card-badges {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    max-width: calc(100% - 16px);
    pointer-events: none;
}

.item-card-badges .special-item-badge,
.item-card-badges .mini-special-badge,
.item-card-badges .daily-discount-badge,
.item-card-badges .item-discount-badge,
.item-card-badges .cart-badge {
    position: static !important;
    inset: auto !important;
    margin: 0 !important;
    flex: 0 0 auto;
    max-width: 100%;
    white-space: nowrap;
}

.item-card-badges .special-item-badge,
.item-card-badges .mini-special-badge,
.item-card-badges .daily-discount-badge,
.item-card-badges .item-discount-badge {
    display: inline-flex;
}

.item-card-badges .cart-badge {
    width: 20px;
    min-width: 20px;
    height: 20px;
    padding: 0;
}

.item-card-img {
    display: block;
    grid-area: media;
    height: 90px;
    margin: 0;
    border-radius: 5px;
    width: 90px;
    object-fit: cover;
}

.item-card-video {
    background: var(--full-image-overlay-bg, #111);
}

.item-card-details,
.item-card-details-whitout-image {
    grid-area: details;
    position: relative;
    min-height: 90px;
    height: auto !important;
    padding: 4px 0 4px 34px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    text-align: right;
    width: 100%;
    min-width: 0;
}

.item-card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--item-card-title-color);
    margin: 0 0 4px 0;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.item-card-description {
    grid-area: description;
    color: var(--item-card-description-color);
    font-size: 12px;
    font-weight: 400;
    margin: 0;
    padding: 0 2px 2px;
    text-align: right;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.item-card-price {
    position: static;
    margin: 2px 0 0;
    color: var(--text-white);
    text-align: right;
}

.item-card-price-from {
    color: var(--item-card-price-from);
    font-size: 13px;
    font-weight: 500;
}

.item-card-price-number {
    font-size: 16px;
    font-weight: 700;
}

.item-card-price-currency {
    color: var(--item-card-price-currency);
    font-size: 13px;
    font-weight: 500;
}

.accordion {
    --bs-accordion-border-color: none;
}

.accordion-item {
    border: none;
    background-color: var(--accordion-bg);
}

.accordion-header {
    border: none;
}

.accordion-button {
    padding: 6px 12px;
    background-color: var(--accordion-bg);
    color: var(--accordion-text);
}

    .accordion-button:not(.collapsed) {
        color: var(--text-white);
        background-color: var(--accordion-bg);
    }

    .accordion-button:focus {
        border: none;
        box-shadow: none;
    }

.accordion-button-p {
    padding: 0;
    margin: 0;
    color: var(--text-white);
    font-size: 15px;
    font-weight: 500;
}

.accordion-button-span {
    padding: 0;
    margin: 0;
    color: var(--accordion-accent);
    font-size: 14px;
    font-weight: 600;
}

.accordion-collapse {
    color: var(--accordion-collapse-text);
}

.accordion-body {
    padding: 6px 12px;
}

.accordion-body-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 5px;
}

.accordion-body-item-name {
    flex: 1;
    min-width: 0;
    text-align: right;
    font-size: 14px;
    color: var(--accordion-body-item-name-color);
    margin: 0;
}

.accordion-body-item-price {
    width: auto;
    min-width: max-content;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    direction: rtl;
    text-align: left;
    font-size: 13px;
    color: var(--accordion-body-item-price-color);
    font-weight: 600;
    margin: 0;
    white-space: nowrap;
}

.accordion-body-item-price > * {
    flex: 0 0 auto;
}

.accordion-body-item-price-currency {
    color: var(--accordion-body-item-price-currency-color);
    font-size: 12px;
    font-weight: 600;
}

.accordion-body-item-divider {
    border-bottom: 1px dashed var(--accordion-divider);
    margin: 6px 0;
}

    .accordion-body-item-divider:nth-last-of-type(1) {
        display: none;
    }

.accordion-body-item button {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: var(--accordion-body-item-button-bg);
    color: var(--accordion-body-item-button-color);
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: .2s;
}

    .accordion-body-item button:hover {
        background: var(--accordion-body-item-button-hover-bg);
        transform: scale(1.1);
    }

    .accordion-body-item button:active {
        transform: scale(0.9);
    }

#about-payanita-divider {
    width: 100%;
    height: 3px;
    background-color: var(--about-divider);
    margin: 15px 0;
}

#about-payanita-text {
    color: var(--about-payanita-text-color);
    font-size: 14px;
    font-weight: 500;
}

#about-payanita-link {
    text-decoration: none;
    color: var(--about-payanita-link-color);
    font-size: 16px;
    font-weight: 500;
}

.phone-btn {
    display: inline-block;
    padding: 6px 14px;
    background: var(--phone-btn-bg);
    color: var(--phone-btn-color);
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: 0.2s;
    white-space: nowrap;
}

    .phone-btn:hover {
        background: var(--phone-btn-hover);
    }

.insta-link {
    color: var(--insta-color);
    font-weight: 600;
    text-decoration: none;
}

    .insta-link:hover {
        color: var(--insta-hover);
    }

/* ------- shop cart button ------- */
.add-to-shopCart {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    background: var(--add-to-shopCart-bg);
    color: var(--add-to-shopCart-color) !important;
    border: 1px solid var(--add-to-shopCart-border);
    border-radius: 9px;
    text-decoration: none;
    position: absolute;
    bottom: 10px;
    left: 10px;
    box-shadow: 0 4px 10px var(--add-to-shopCart-shadow);
    transition: all .18s ease;
    cursor: pointer;
    z-index: 5;
}

    .add-to-shopCart i {
        font-size: 14px;
    }

    .add-to-shopCart:hover {
        background: var(--add-to-shopCart-hover-bg);
        color: var(--add-to-shopCart-hover-color) !important;
        transform: scale(1.07);
    }

    .add-to-shopCart:active {
        transform: scale(.88);
    }

/* ------- badge animation ------- */
.cart-badge.bump {
    animation: badge-bump .35s ease;
}

@keyframes badge-bump {
    0% {
        transform: scale(1);
    }

    40% {
        transform: scale(1.45);
    }

    100% {
        transform: scale(1);
    }
}

#haeder-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    text-align: center;
    padding: 10px 8px;
    border-radius: 14px;
    transition: all .25s ease;
    cursor: pointer;
}

.offcanvas-header {
    padding: 20px 20px 0 0;
}

.offcanvas-body {
    padding: 0;
}

.offcanvas,
.offcanvas-header,
.offcanvas-body {
    background: var(--item-modal-bg);
    color: var(--item-modal-text);
}

.header-modal-logo {
    border-bottom: 2px solid var(--header-modal-logo-border);
}

.pwa-install-banner {
    position: fixed;
    bottom: -120px;
    left: 0;
    right: 0;
    background: var(--pwa-bg);
    color: var(--pwa-install-color);
    display: flex;
    align-items: center;
    padding: 12px;
    box-shadow: 0 -2px 10px var(--pwa-install-shadow);
    transition: all .4s ease;
    z-index: 9999;
    font-family: tahoma;
}

    .pwa-install-banner.show {
        bottom: 0;
    }

.pwa-icon {
    width: 48px;
    height: 48px;
    margin-left: 10px;
    border-radius: 10px;
}

.pwa-text {
    flex: 1;
}

.pwa-title {
    font-size: 14px;
    font-weight: bold;
}

.pwa-desc {
    font-size: 12px;
    opacity: .8;
}

.install-btn {
    background: var(--pwa-button);
    border: none;
    color: var(--pwa-button-text);
    padding: 6px 12px;
    border-radius: 6px;
    margin-left: 8px;
    cursor: pointer;
}

.close-btn {
    background: none;
    border: none;
    color: var(--close-btn-color-white);
    font-size: 20px;
    cursor: pointer;
}

.pwa-update {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    z-index: 9999;
    background: var(--pwa-update-bg);
    color: var(--pwa-update-color);
    padding: 14px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 10px 30px var(--pwa-update-shadow);
}

.d-none {
    display: none;
}

.table-hover tbody tr:hover {
    background: var(--table-hover);
}

.table {
    --bs-table-bg: var(--table-value-bg);
    --bs-table-color: var(--text-white);
    --bs-table-border-color: var(--table-row-border);
    --bs-table-hover-bg: var(--table-hover);
    --bs-table-hover-color: var(--text-white);
    color: var(--text-white);
}

.items-table thead th {
    font-weight: 600;
    font-size: 13px;
}

.actions-grid .btn {
    border-radius: 6px;
}

.pagination .page-link {
    cursor: pointer;
}

.business-header {
    background: var(--business-card-bg);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 6px 25px var(--business-header-shadow);
    margin-top: 20px;
}

.modern-info-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 12px;
}

    .modern-info-table .info-title {
        width: 30%;
        font-weight: 600;
        color: var(--table-title-text);
        background: var(--table-title-bg);
        padding: 12px;
        border-radius: 12px;
        text-align: right;
        white-space: nowrap;
    }

    .modern-info-table .info-value {
        background: var(--table-value-bg);
        padding: 12px;
        border-radius: 12px;
        text-align: center;
    }

    .modern-info-table i {
        margin-left: 6px;
        color: var(--icon-orange);
        font-size: 18px;
    }

.business-logo {
    width: 90px;
    box-shadow: 0 4px 12px var(--business-logo-shadow);
}

.business-title {
    font-weight: bold;
    margin-top: 10px;
    color: var(--business-title);
}

.business-info td {
    padding: 10px;
    vertical-align: middle;
}

.business-info a {
    text-decoration: none;
    font-weight: 500;
}

    .business-info a:hover {
        color: var(--business-info-link-hover);
    }

#header-divider {
    border-top: 2px dashed var(--header-divider);
    margin: 20px 0;
}

#storetimesheet {
    border-radius: 12px;
    overflow: hidden;
}

    #storetimesheet th {
        background: linear-gradient(135deg, var(--store-header-gradient-start), var(--store-header-gradient-end));
        color: var(--store-header-text-color);
        padding: 12px;
        font-size: 16px;
    }

    #storetimesheet td {
        padding: 10px;
        background: var(--store-row-bg);
    }

    #storetimesheet tr:nth-child(even) td {
        background: var(--store-row-alt-bg);
    }

.text-danger {
    font-weight: bold;
}

.modal-main-image-thumbnail:hover,
.modal-main-video-thumbnail:hover {
    transform: scale(1.05);
    transition: transform 0.2s ease-in-out;
}

.modal-main-image-thumbnail,
.modal-main-video-thumbnail {
    cursor: zoom-in;
    object-fit: contain;
    max-width: 100%;
    border-radius: 8px;
}

.modal-main-video-thumbnail {
    width: 100%;
    max-height: 240px;
    background: var(--full-image-overlay-bg, #111);
}

.sub-items-list .sub-item:last-child {
    border-bottom: none;
}

.sub-items-list .sub-item-name {
    flex-grow: 1;
    margin-right: 1rem;
    color: var(--sub-item-name-color);
}

.sub-items-list .sub-item-price {
    font-weight: bold;
    color: var(--sub-item-price-color);
    min-width: 100px;
    text-align: right;
}

.sub-items-list .sub-item-price-currency {
    font-size: 12px;
    color: var(--sub-item-price-currency-color);
    margin-right: 5px;
}

.sub-item .btn-add-subitem {
    margin-left: 0.5rem;
    font-size: 12px;
    padding: 0.25rem 0.5rem;
}

.full-image-modal-overlay {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--full-image-overlay-bg);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 20000 !important;
    padding: 16px;
    cursor: zoom-out;
    isolation: isolate;
}

.full-image-modal-overlay.is-open {
    display: flex !important;
}

.full-image-modal-overlay img,
.full-image-modal-overlay video {
    max-width: min(96vw, 1200px);
    max-height: 92vh;
    object-fit: contain;
    border-radius: 8px;
    cursor: zoom-out;
}

.full-image-modal-overlay .close-full-image {
    position: fixed;
    top: max(16px, env(safe-area-inset-top));
    inset-inline-end: max(16px, env(safe-area-inset-right));
    width: 44px;
    height: 44px;
    font-size: 2rem;
    color: var(--full-image-close-btn-color);
    background: var(--full-image-close-btn-bg);
    border: none;
    cursor: pointer;
    z-index: 20001;
}

.full-image-modal-overlay .btn-close-white {
    color: var(--full-image-close-btn-color) !important;
    opacity: 1 !important;
}

.full-image-modal-overlay .btn-close-white:hover {
    color: var(--full-image-close-btn-hover-color) !important;
}

.swipe-indicator {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 6px;
}

.swipe-line {
    width: 45px;
    height: 5px;
    background: var(--swipe-line-bg);
    border-radius: 5px;
    animation: swipeHint 1.2s ease-in-out 2;
}

@keyframes swipeHint {
    0% {
        transform: translateY(0);
        opacity: 0.7;
    }

    50% {
        transform: translateY(10px);
        opacity: 1;
    }

    100% {
        transform: translateY(0);
        opacity: 0.7;
    }
}

.swiper-slide-link.active-category .swiper-slide-title {
    color: var(--active-category-title-color);
    font-weight: bold;
    text-wrap: auto;
    line-height: 1.25;
}

.swiper-slide-link.active-category img {
    border-radius: 8px;
    transition: all .3s ease;
    box-shadow: 0 0 0 2px var(--active-category-img-border);
}

#btnCustomerClub {
    border-radius: 12px;
    font-weight: bold;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

    #btnCustomerClub:disabled {
        cursor: default;
        opacity: 1;
        background-color: var(--customer-club-disabled-bg);
        border-color: var(--customer-club-disabled-border);
        color: var(--customer-club-disabled-color);
    }

.modal-content {
    border-radius: 20px;
    border: 1px solid var(--item-modal-border);
    background: var(--item-modal-bg);
    color: var(--item-modal-text);
}

.modal-header,
.modal-footer {
    border-color: var(--item-modal-border);
}

.btn-add-cart {
    width: 24px;
    height: 24px;
    border-radius: 20px;
    border: none;
    background: var(--btn-add-cart-bg);
    color: var(--btn-add-cart-color);
    font-size: 18px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all .18s ease;
    box-shadow: 0 4px 10px var(--btn-add-cart-shadow);
}

    .btn-add-cart:hover {
        transform: scale(1.1);
        background: var(--btn-add-cart-hover-bg);
    }

    .btn-add-cart:active {
        transform: scale(.9);
    }

.item-card .item-card-details > .btn-add-cart,
.item-card .item-card-details-without-image-full > .btn-add-cart,
.item-card-out-of-stock .item-card-details > .btn-add-cart,
.item-card-out-of-stock .item-card-details-without-image-full > .btn-add-cart {
    position: absolute;
    left: 0;
    bottom: 4px;
}

.item-card-feature-summary {
    clear: both;
    margin: 7px 0 26px;
    padding: 6px 8px;
    border: 1px solid var(--accordion-divider, #E2E8F0);
    border-radius: 8px;
    background: var(--accordion-bg, #F7FAFC);
    font-size: 11px;
}

.item-card-feature-summary-title {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 4px;
    color: var(--accordion-accent, #3182CE);
    font-weight: 700;
}

.item-card-feature-summary-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 4px 0;
    border-top: 1px dashed var(--accordion-divider, #E2E8F0);
}

.item-card-feature-name {
    min-width: 0;
    color: var(--accordion-body-item-name-color, #2D3748);
    overflow-wrap: anywhere;
}

.item-card-feature-unavailable {
    display: inline-block;
    margin-right: 4px;
    color: #b91c1c;
}

.item-card-feature-price {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: baseline;
    gap: 3px;
    color: var(--accordion-body-item-price-color, #3182CE);
    white-space: nowrap;
}

.item-card-feature-price del {
    color: #94a3b8;
    font-size: 10px;
}

.item-card-feature-price b { font-weight: 700; }
.item-card-feature-price small { color: #b45309; font-weight: 700; }
.item-card-feature-price em {
    color: var(--accordion-body-item-price-currency-color, #718096);
    font-size: 9px;
    font-style: normal;
}

body.full-image-open {
    overflow: hidden;
}

.accordion-body-item .btn-add-cart {
    position: relative !important;
    left: auto !important;
    bottom: auto !important;
    top: auto !important;
    right: auto !important;
    float: left;
    margin: 0 !important;
    width: 24px;
    height: 24px;
    border-radius: 20px;
}

.modal-add-cart {
    width: 100%;
    height: 42px;
    font-size: 15px;
    border-radius: 12px;
}

.price-with-badge {
    display: flex;
    align-items: center;
    gap: 6px;
}

.price-badge {
    background: var(--price-badge-bg);
    color: var(--price-badge-color);
    font-size: 11px;
    min-width: 18px;
    height: 18px;
    border-radius: 20px;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    font-weight: bold;
}

.modal-total-price {
    font-weight: bold;
    margin-right: 6px;
    color: var(--modal-total-price-color);
}

.btn-add-cart:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.item-details-modal .modal-dialog.modal-lg {
    max-width: 600px;
}

.modal-description {
    margin-top: 0.5rem;
    font-size: 14px;
    color: var(--modal-description-color);
}

.sub-items-list {
    margin-top: 1rem;
    border-top: 1px solid var(--sub-items-list-border-top);
    padding-top: 0.75rem;
}

    .sub-items-list .sub-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.5rem 0;
        border-bottom: 1px dashed var(--sub-item-border-bottom);
        font-size: 14px;
    }

.modal-badge {
    background: var(--modal-badge-bg);
    color: var(--modal-badge-color);
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 12px;
    margin-right: 6px;
}

.special-category-section {
    border-radius: 16px;
    padding: 15px;
    margin-bottom: 20px;
    background: var(--special-category-section-bg);
    border: 1px solid var(--special-category-section-border);
}

.special-line {
    background: var(--special-line-bg);
    height: 3px;
    border-radius: 3px;
}

.special-title {
    color: var(--special-title-color);
}

    .special-title i {
        margin-left: 8px;
        animation: starRotate 0.5s ease-in-out;
    }

@keyframes starRotate {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.special-item-card {
    position: relative;
    border: 2px solid var(--special-item-card-border);
    box-shadow: 0 4px 15px var(--special-item-card-shadow);
}

.special-item-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--special-item-badge-bg);
    color: var(--special-item-badge-color);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: bold;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 2px 8px var(--special-item-badge-shadow);
}

    .special-item-badge i {
        font-size: 10px;
        animation: starPulse 1s infinite;
    }

@keyframes starPulse {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }
}

.expiry-badge {
    background: var(--expiry-badge-bg);
    color: var(--expiry-badge-color);
    padding: 2px 6px;
    border-radius: 12px;
    font-size: 9px;
    margin-right: 3px;
}

.mini-special-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    background: var(--mini-special-badge-bg);
    color: var(--mini-special-badge-color);
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    font-size: 10px;
    box-shadow: 0 1px 4px var(--mini-special-badge-shadow);
}

.special-item-in-category {
    position: relative;
    border: 1px solid var(--special-item-in-category-border);
}

.item-card-details-without-image-full {
    grid-column: 1 / -1;
    grid-area: details;
    float: none;
    text-align: right;
    width: 100%;
    position: relative;
    min-height: 72px;
    padding: 4px 0 4px 34px;
    display: block;
}

    .item-card-details-without-image-full .item-card-price {
        position: static;
        margin: 6px 0 0;
    }

    .item-card-details-without-image-full .btn-add-cart {
        position: absolute;
        left: 0;
        bottom: 4px;
    }

/* =========================================
   SWIPER BASE
========================================= */
.customer-birthday-picker { display: flex; align-items: stretch; gap: 6px; width: 100%; }
.customer-birthday-picker .form-control { flex: 1; min-width: 0; }
.customer-birthday-picker-button { width: 42px; flex: 0 0 42px; padding: 0; border-color: var(--card-border); color: var(--modal-button-text); background: var(--modal-button-bg); border-radius: 10px; }
.customer-birthday-picker-button:hover { color: var(--modal-button-hover-text); background: var(--modal-button-hover-bg); border-color: var(--active-category-title-color); }

/* Shared Persian date picker. It is appended directly to body, so public Home
   pages need these rules in style.css rather than cms.css. */
body > .pdp-lite {
    position: fixed;
    z-index: 20000;
    display: block;
    width: min(320px, calc(100vw - 24px));
    min-width: 0;
    box-sizing: border-box;
    padding: 12px;
    direction: rtl;
    color: var(--modal-content-text, #172033);
    background: var(--card-bg, #fff);
    border: 1px solid var(--card-border, #dbe3ef);
    border-radius: 14px;
    box-shadow: 0 18px 45px var(--modal-shadow, rgba(15,23,42,.24));
    font-family: Tahoma, 'Segoe UI', sans-serif;
}
body > .pdp-lite .pdp-lite-head { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
body > .pdp-lite select { width: 100%; min-height: 36px; padding: 5px 7px; color: var(--modal-content-text, #172033); background: var(--card-bg, #fff); border: 1px solid var(--card-border, #dbe3ef); border-radius: 8px; font-size: 13px; }
body > .pdp-lite .pdp-lite-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; margin-bottom: 10px; }
body > .pdp-lite .pdp-lite-days button { min-height: 32px; padding: 4px; color: var(--modal-content-text, #344054); background: var(--card-bg, #fff); border: 1px solid var(--card-border, #e5e7eb); border-radius: 7px; cursor: pointer; font-size: 13px; }
body > .pdp-lite .pdp-lite-days button:hover, body > .pdp-lite .pdp-lite-days button.selected { color: var(--modal-add-cart-color, #fff); background: var(--modal-add-cart-bg, #0d6efd); border-color: var(--active-category-title-color, #0d6efd); }
body > .pdp-lite .pdp-lite-days button:disabled { color: var(--text-gray, #cbd5e1); background: var(--modal-button-bg, #f8fafc); border-color: var(--card-border, #eef2f7); cursor: not-allowed; }
body > .pdp-lite .pdp-lite-footer { display: flex; gap: 8px; margin-top: 8px; }
body > .pdp-lite .pdp-lite-footer button { flex: 1; min-height: 34px; border: 0; border-radius: 8px; color: var(--modal-add-cart-color, #fff); cursor: pointer; font-size: 13px; }
body > .pdp-lite .pdp-lite-today { background: var(--text-gray, #64748b); }
body > .pdp-lite .pdp-lite-done { background: var(--modal-add-cart-bg, #198754); }

.swiper {
    width: 100%;
    overflow: hidden;
}

.swiper-wrapper {
    align-items: stretch;
}

.swiper-slide {
    box-sizing: border-box;
    user-select: none;
    display: flex;
    align-items: stretch;
}

.swiper-slide-link {
    text-decoration: none;
    color: var(--swiper-slide-link-color);
    display: flex;
    width: 100%;
    height: 100%;
    min-width: 0;
    border-radius: inherit;
    overflow: hidden;
}

.swiper-slide-link-content {
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 100%;
    display: flex;
    border-radius: inherit;
    transition: background .18s ease, box-shadow .18s ease, color .18s ease, transform .18s ease;
}

.swiper-slide img {
    display: block;
    object-fit: cover;
}

.swiper-slide-title {
    color: var(--swiper-slide-link-color);
    text-align: center;
    word-break: break-word;
    font-size: 12px;
    white-space: nowrap;
    margin: 0;
    transition: color .18s ease;
}

/* =========================================
   LAYOUT
========================================= */
main {
    min-height: 100vh;
    background: var(--card-bg);
    color: var(--text-white);
    transition: all .25s ease;
}

/* =========================================
   VERTICAL MODE
========================================= */
body.swiper-direction-vertical .main-navigation {
    position: fixed;
    top: 0;
    right: 0;
    width: 105px;
    height: 100vh;
    background: var(--vertical-nav-bg);
    display: flex;
    flex-direction: column;
    padding: 8px 5px;
    box-shadow: -4px 0 18px var(--vertical-nav-shadow);
    overflow: hidden;
}

body.swiper-direction-vertical main {
    width: calc(100% - 105px);
    margin-right: 105px;
    float: left;
    box-sizing: border-box;
}

body.swiper-direction-vertical .nav-top-section {
    flex-shrink: 0;
    text-align: center;
    margin-bottom: 10px;
}

body.swiper-direction-vertical .header-logo-img {
    width: auto;
    max-width: 70px;
    height: auto;
    max-height: 70px;
    border-radius: 16px;
    margin: 0 auto;
    object-fit: contain;
    display: block;
    background-color: var(--header-logo-img-bg);
    padding: 4px;
}

body.swiper-direction-vertical .header-logo-name {
    font-size: 11px;
    line-height: 1.4;
    color: var(--header-logo-name-color);
    margin-top: 6px;
}

body.swiper-direction-vertical .header-logo-type {
    font-size: 9px;
    color: var(--header-logo-type-color);
}

body.swiper-direction-vertical .nav-swiper-section {
    flex: 1;
    overflow: hidden;
    min-height: 0;
    position: relative;
}

body.swiper-direction-vertical .swiper {
width: 100%;
height: 100%;
overflow-x: hidden !important;
overflow-y: auto !important;
overscroll-behavior: contain;
touch-action: pan-y;
-webkit-overflow-scrolling: touch;
}

body.swiper-direction-vertical .swiper-wrapper {
    height: auto !important;
    display: flex;
    flex-direction: column;
}

body.swiper-direction-vertical .swiper-slide {
    height: auto !important;
    min-height: 75px;
    margin-bottom: 8px;
    border-radius: 14px;
    background: var(--swiper-slide-bg);
    border: 1px solid var(--swiper-slide-border);
    transition: 0.18s ease;
    overflow: hidden;
    flex-shrink: 0;
}

    body.swiper-direction-vertical .swiper-slide:last-child {
        margin-bottom: 0;
    }

body.swiper-direction-vertical .swiper-slide-link-content {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 7px 5px;
}

body.swiper-direction-vertical .swiper-slide img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    margin: 0;
}

body.swiper-direction-vertical .swiper-slide-title {
    position: static;
    font-size: 11px;
    line-height: 1.3;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    text-wrap: auto;
    white-space: normal;
}

body.swiper-direction-vertical .swiper::-webkit-scrollbar {
    width: 4px;
}

body.swiper-direction-vertical .swiper::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
    border-radius: 4px;
}

body.swiper-direction-vertical .swiper::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 4px;
}

/* =========================================
   HORIZONTAL MODE
========================================= */
body.swiper-direction-horizontal .main-navigation {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: var(--horizontal-nav-bg);
    backdrop-filter: blur(14px);
    z-index: 1000;
}

body.swiper-direction-horizontal main {
    width: 100% !important;
    margin-right: 0 !important;
    margin-left: 0 !important;
    margin-top: 100px !important;
    float: none !important;
    box-sizing: border-box;
}

body.swiper-direction-horizontal .nav-top-section {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

body.swiper-direction-horizontal .header-logo-img {
    width: auto;
    max-width: 55px;
    height: auto;
    max-height: 55px;
    border-radius: 12px;
    margin: 0;
    object-fit: contain;
    display: block;
    background-color: var(--header-logo-img-bg);
    padding: 3px;
}

    body.swiper-direction-horizontal .header-logo-img[data-shape="wide"] {
        max-width: 70px;
        max-height: 45px;
        padding: 2px 4px;
    }

    body.swiper-direction-horizontal .header-logo-img[data-shape="tall"] {
        max-width: 45px;
        max-height: 70px;
        padding: 4px 2px;
    }

    body.swiper-direction-horizontal .header-logo-img:not([data-shape]) {
        width: 48px;
        height: 48px;
        object-fit: cover;
        border-radius: 12px;
        padding: 2px;
    }

body.swiper-direction-horizontal .header-logo-name {
    font-size: 12px;
    color: var(--header-logo-name-color);
    margin: 0;
}

body.swiper-direction-horizontal .header-logo-type {
    font-size: 9px;
    color: var(--header-logo-type-color);
}

body.swiper-direction-horizontal .nav-swiper-section {
    flex: 1;
    min-width: 0;
    width: auto;
    overflow: hidden !important;
}

body.swiper-direction-horizontal .nav-swiper-section .swiper {
    overflow-x: auto !important;
    overflow-y: hidden !important;
    overscroll-behavior: contain;
    touch-action: pan-x;
    -webkit-overflow-scrolling: touch;
}

body.swiper-direction-horizontal .main-navigation > hr {
    display: none;
}

body.swiper-direction-horizontal .swiper-slide {
    width: 90px !important;
    height: 80px !important;
    flex: 0 0 90px !important;
    border-radius: 14px;
    background: var(--swiper-slide-bg);
    border: 1px solid var(--swiper-slide-border);
    overflow: hidden;
}

body.swiper-direction-horizontal .swiper-slide-link-content {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 5px;
}

body.swiper-direction-horizontal .swiper-slide img {
    width: 36px;
    height: 36px;
    border-radius: 7px;
    margin: 0;
}

body.swiper-direction-horizontal .swiper-slide-title {
    position: static;
    font-size: 11px;
    line-height: 1.2;
}

body.swiper-direction-horizontal .swiper-slide.active-category-slide,
body.swiper-direction-vertical .swiper-slide.active-category-slide {
    background: var(--swiper-active-bg);
    box-shadow: 0 0 10px var(--swiper-active-shadow);
    border-color: transparent;
}

body.swiper-direction-horizontal .swiper-slide-link.active-category .swiper-slide-link-content,
body.swiper-direction-vertical .swiper-slide-link.active-category .swiper-slide-link-content {
    background: transparent;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.18);
    outline: none;
    border-radius: inherit;
    color: #fff;
    min-width: 0;
}

body.swiper-direction-horizontal .swiper-slide-link.active-category .swiper-slide-title,
body.swiper-direction-vertical .swiper-slide-link.active-category .swiper-slide-title,
body.swiper-direction-horizontal .swiper-slide-link.active-category i,
body.swiper-direction-vertical .swiper-slide-link.active-category i {
    color: #fff;
}

body.swiper-direction-horizontal .swiper-slide-link.active-category img,
body.swiper-direction-vertical .swiper-slide-link.active-category img {
    box-shadow: 0 0 0 2px rgba(255,255,255,.85);
}

.special-badge {
    background: var(--special-badge-bg);
    color: var(--special-badge-color);
    font-size: 10px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 20px;
    margin-right: 5px;
}

.swiper-slide-link-content img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: 5px;
}

.swiper-slide-link-content i {
    font-size: 24px;
    margin-bottom: 5px;
    display: inline-block;
}

body.swiper-direction-vertical .nav-swiper-section .swiper-wrapper {
    height: max-content !important;
}

/* Stable Swiper geometry for both navigation directions. */
.navbar-category-filter-bar {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:14px;
    width:100%;
    box-sizing:border-box;
    padding:10px 12px;
    margin:0 0 10px;
    color:var(--text-color,#344054);
    background:var(--card-bg,#fff);
    border:1px solid rgba(16,24,40,.1);
    border-radius:14px;
    box-shadow:0 5px 16px rgba(16,24,40,.07);
}
.navbar-category-filter-context { display:flex; align-items:center; min-width:0; gap:10px; }
.navbar-category-filter-icon {
    display:grid;
    place-items:center;
    flex:0 0 36px;
    width:36px;
    height:36px;
    color:#0d6efd;
    background:rgba(13,110,253,.1);
    border-radius:11px;
    font-size:1rem;
}
.navbar-category-filter-copy { display:flex; flex-direction:column; min-width:0; line-height:1.35; }
.navbar-category-filter-label { color:#98a2b3; font-size:.72rem; }
.navbar-category-filter-title { overflow:hidden; color:var(--heading-color,#172033); font-size:.98rem; text-overflow:ellipsis; white-space:nowrap; }
.navbar-category-filter-back {
    display:inline-flex;
    align-items:center;
    flex:0 0 auto;
    gap:8px;
    min-height:36px;
    padding:0 12px;
    color:#475467;
    background:#f8fafc;
    border:1px solid #d0d5dd;
    border-radius:10px;
    font-size:.8rem;
    font-weight:700;
    text-decoration:none;
    transition:color .2s ease, background .2s ease, border-color .2s ease, transform .2s ease;
}
.navbar-category-filter-back:hover { color:#0d6efd; background:#eff6ff; border-color:#93c5fd; transform:translateX(2px); }
.navbar-category-filter-back i { font-size:.78rem; }
@media (max-width:576px) {
    .navbar-category-filter-bar { align-items:stretch; flex-direction:column; gap:10px; padding:10px; }
    .navbar-category-filter-back { justify-content:center; width:100%; }
}
.navbar-category-filter-slide { order:-10 !important; }
.navbar-category-filter-link {
    color:var(--swiper-slide-link-color) !important;
    background:var(--swiper-slide-bg) !important;
    border:1px solid var(--swiper-slide-border) !important;
    box-shadow:none;
}
.navbar-category-filter-link:hover { color:var(--swiper-slide-link-color) !important; background:var(--swiper-slide-hover-bg) !important; }
.navbar-category-filter-link .swiper-slide-link-content { gap:4px; }
.navbar-category-filter-link .navbar-category-filter-icon {
    width:36px;
    height:36px;
    color:var(--swiper-slide-link-color);
    background:transparent;
    border-radius:8px;
    font-size:1.15rem;
}
.navbar-category-filter-link .swiper-slide-title { max-width:100%; overflow:hidden; text-align:center !important; text-overflow:ellipsis; white-space:nowrap; }
.navbar-category-filter-back-label { display:block; color:var(--swiper-slide-link-color); opacity:.7; font-size:.68rem; font-weight:600; }
.navbar-category-filter-back-label i { margin-left:4px; }

.navbar-swiper,
.navbar-swiper .swiper {
    box-sizing: border-box;
    min-width: 0;
    overscroll-behavior: contain;
}

.navbar-swiper .swiper-wrapper {
    box-sizing: border-box;
    min-width: 0;
}

body.swiper-direction-vertical .nav-swiper-section {
    height: auto;
    min-height: 0;
    flex: 1 1 auto;
    overflow: hidden;
}

body.swiper-direction-vertical .navbar-swiper,
body.swiper-direction-vertical .navbar-swiper .swiper {
    height: 100% !important;
    max-height: 100% !important;
    min-height: 0 !important;
}

body.swiper-direction-vertical .navbar-swiper .swiper-wrapper {
    width: 100% !important;
    height: auto !important;
    flex-direction: column !important;
    align-items: stretch;
}

body.swiper-direction-vertical .navbar-swiper .swiper-slide {
    width: 100% !important;
    height: 76px !important;
    min-height: 76px !important;
    max-height: 76px !important;
    flex: 0 0 76px !important;
    margin: 0 0 8px !important;
}

body.swiper-direction-vertical .navbar-swiper .swiper {
    touch-action: pan-y;
}

body.swiper-direction-horizontal .navbar-swiper,
body.swiper-direction-horizontal .navbar-swiper .swiper {
    height: 100% !important;
    min-height: 0 !important;
    max-height: 100% !important;
}

/* Horizontal category navigation is a draggable strip. Keep its viewport
   constrained while allowing the Swiper wrapper to exceed it. */
body.swiper-direction-horizontal .navbar-swiper,
body.swiper-direction-horizontal .navbar-swiper .swiper {
    width: 100% !important;
    min-width: 0 !important;
    overflow: hidden !important;
    touch-action: pan-x !important;
}

body.swiper-direction-horizontal .navbar-swiper .swiper-wrapper {
    display: flex !important;
    flex-direction: row !important;
    width: max-content !important;
    min-width: max-content !important;
}

body.swiper-direction-horizontal .navbar-swiper .swiper-wrapper {
    width: max-content !important;
    min-width: 100%;
    height: 100%;
    flex-direction: row !important;
    align-items: stretch;
}

body.swiper-direction-horizontal .navbar-swiper .swiper-slide {
    width: 90px !important;
    height: 80px !important;
    min-height: 80px !important;
    max-height: 80px !important;
    flex: 0 0 90px !important;
    margin: 0 6px !important;
}

body.swiper-direction-horizontal .navbar-swiper .swiper {
    touch-action: pan-x;
}

/* =========================================
   MOBILE RESPONSIVE
========================================= */
@media (max-width: 768px) {
    .item-card,
    .item-card-out-of-stock {
        width: 100%;
        margin: 0 auto 12px;
        float: none;
        display: block;
    }

    .item-card-content {
        min-height: auto;
        grid-template-columns: 82px minmax(0, 1fr);
        gap: 8px;
        padding: 8px;
    }

    .item-card-img {
        width: 80px;
        height: 80px;
    }

    .item-card-details,
    .item-card-details-whitout-image {
        width: 100%;
        height: auto;
        min-height: 80px;
        padding: 2px 0 4px 34px;
    }

    .item-card-details-without-image-full {
        padding: 2px 0 4px 34px;
        min-height: auto;
    }

    .add-to-shopCart {
        width: 32px;
        height: 32px;
        bottom: 8px;
        left: 8px;
        border-radius: 8px;
    }

        .add-to-shopCart i {
            font-size: 13px;
        }

    #haeder-link {
        padding: 6px;
    }

    .header-logo-img {
        width: 46px;
        height: 46px;
    }

    .header-logo-name {
        font-size: 11px;
    }

    .header-logo-type {
        font-size: 9px;
    }

    .category-items {
        padding: 8px 6px;
    }

    .accordion-body-item {
        padding: 8px 2px;
        gap: 6px;
    }

    .accordion-body-item-name {
        font-size: 13px;
    }

    .accordion-body-item-price {
        width: auto;
        min-width: max-content;
        font-size: 12px;
    }

    .accordion-body-item .btn-add-cart {
        width: 28px;
        height: 28px;
        font-size: 15px;
    }

    .item-details-modal .modal-dialog {
        max-width: 95%;
        margin: 0.5rem auto;
    }

    .item-details-modal .modal-content {
        border-radius: 16px;
        padding: 0.75rem;
    }

    .modal-main-image-thumbnail,
    .modal-main-video-thumbnail {
        max-width: 100%;
        max-height: 200px;
    }

    .modal-description {
        font-size: 13px;
        line-height: 1.6;
    }

    .sub-items-list .sub-item {
        font-size: 13px;
        padding: 0.4rem 0;
    }

    .modal-add-cart {
        height: 40px;
        font-size: 14px;
    }

    body.swiper-direction-vertical .main-navigation {
        width: 80px;
        padding: 8px 4px;
    }

    body.swiper-direction-vertical main {
        width: calc(100% - 84px);
        margin-right: 84px;
        float: left;
    }

    body.swiper-direction-vertical .swiper-slide {
        min-height: 74px;
    }

    body.swiper-direction-vertical .swiper-slide img,
    body.swiper-direction-vertical .swiper-slide-link-content img {
        width: 36px;
        height: 36px;
    }

    body.swiper-direction-vertical .swiper-slide-title {
        font-size: 10px;
        line-height: 1.25;
    }

    body.swiper-direction-horizontal .main-navigation {
        height: 92px;
        padding: 6px 8px;
        gap: 8px;
    }

    body.swiper-direction-horizontal main {
        margin-top: 92px;
    }

    body.swiper-direction-horizontal .swiper-slide {
        width: 78px !important;
        height: 72px !important;
    }

    body.swiper-direction-horizontal .swiper-slide img,
    body.swiper-direction-horizontal .swiper-slide-link-content img {
        width: 32px;
        height: 32px;
    }
}

.table-modal-box {
    background: var(--table-modal-box-bg);
    padding: 20px;
    border-radius: 20px;
}

.tables-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-top: 15px;
}

.table-item {
    padding: 18px 10px;
    border-radius: 14px;
    position: relative;
    cursor: pointer;
    text-align: center;
    background: var(--table-item-bg);
    border: 2px solid var(--table-item-border);
    transition: all .25s ease;
    box-shadow: 0 6px 14px var(--table-item-shadow);
}

    .table-item:hover {
        transform: translateY(-2px);
        box-shadow: 0 10px 20px var(--table-item-hover-shadow);
        border-color: var(--table-item-hover-border);
    }

    .table-item.active {
        background: var(--table-item-active-bg);
        color: var(--table-item-active-color);
        border: none;
        box-shadow: 0 10px 25px var(--table-item-active-shadow);
    }

        .table-item.active::after {
            content: "✓";
            position: absolute;
            top: 8px;
            left: 10px;
            font-size: 16px;
            font-weight: bold;
        }

.table-number {
    font-size: 18px;
    font-weight: 800;
}

.table-capacity {
    font-size: 12px;
    opacity: 0.9;
    margin-top: 3px;
}

.close-table-btn {
    width: 100%;
    padding: 12px;
    margin-top: 15px;
    background: var(--close-table-btn-bg);
    color: var(--close-table-btn-color);
    border: none;
    border-radius: 10px;
    font-size: 16px;
}

.btn-table-select {
    width: 100%;
    padding: 12px;
    background: var(--btn-table-select-bg);
    color: var(--btn-table-select-color);
    border: 1px solid var(--btn-table-select-border);
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.2s;
}

    .btn-table-select:hover {
        background: var(--btn-table-select-hover-bg);
        border-color: var(--btn-table-select-hover-border);
    }

/* ===============================
   Checkout / OTP / Payment Modals
   =============================== */

.modal,
#customer-mobile-modal,
#otp-modal,
#payment-modal {
    z-index: 10050 !important;
}

.modal-backdrop {
    z-index: 10040 !important;
}

#customer-mobile-modal .modal-content,
#otp-modal .modal-content,
#payment-modal .modal-content {
    border-radius: 18px;
    overflow: hidden;
}

    #customer-mobile-modal .modal-content.cool-modal,
    #otp-modal .modal-content.cool-modal,
    #payment-modal .modal-content.cool-modal {
        background: linear-gradient(135deg, var(--modal-gradient-start), var(--modal-gradient-end));
        color: var(--modal-content-text);
        border: none;
        box-shadow: 0 0 35px var(--modal-shadow);
    }

#customer-mobile-modal .modal-title,
#customer-mobile-modal .modal-body,
#customer-mobile-modal .form-label,
#customer-mobile-modal .form-text,
#otp-modal .modal-title,
#otp-modal .modal-body,
#otp-modal .form-label,
#otp-modal .form-text,
#payment-modal .modal-title,
#payment-modal .modal-body {
    color: var(--modal-content-text);
}

#customer-mobile-modal .text-light,
#otp-modal .text-light,
#payment-modal .text-light {
    color: var(--modal-content-text) !important;
    opacity: 0.78 !important;
}

#customer-mobile-modal .form-control,
#otp-modal .form-control {
    background: var(--custom-note-input-bg);
    color: var(--modal-content-text);
    border-color: var(--custom-note-input-border);
}

#customer-mobile-modal .form-control::placeholder,
#otp-modal .form-control::placeholder {
    color: var(--custom-note-placeholder-color);
}

.checkout-payment-option {
    display: flex;
    gap: 12px;
    flex-direction: column;
}

    .checkout-payment-option .btn {
        width: 100%;
        padding: 14px 16px;
        font-size: 16px;
        border-radius: 12px;
    }

body.swiper-direction-horizontal .navbar-swiper .swiper-slide {
    margin-left: 6px !important;
    margin-right: 6px !important;
}

body.swiper-direction-vertical .navbar-swiper .swiper-slide {
    margin-bottom: 12px !important;
}

.navbar-swiper .swiper-slide-link-content img {
    margin-bottom: 6px !important;
}

.navbar-swiper {
    width: 100%;
    height: 100%;
    min-height: 0;
    min-width: 0;
    overflow: hidden;
    padding: 8px 0 !important;
    margin-bottom: 10px !important;
}

body.swiper-direction-horizontal .navbar-swiper,
body.swiper-direction-horizontal .navbar-swiper .swiper {
    height: auto;
    max-width: 100%;
    /* در حالت افقی باید حرکت افقی به Swiper برسد؛ pan-y باعث قفل شدن drag می‌شد. */
    touch-action: pan-x;
}

body.swiper-direction-horizontal .navbar-swiper .swiper-wrapper {
    align-items: stretch;
    flex-direction: row !important;
    width: max-content;
    min-width: 100%;
}

body.swiper-direction-vertical .navbar-swiper,
body.swiper-direction-vertical .navbar-swiper .swiper {
    min-height: 0;
    touch-action: pan-x;
}

body.swiper-direction-vertical .swiper-wrapper {
    height: auto !important;
    padding-bottom: 15px;
}

body.swiper-direction-vertical .navbar-swiper .swiper-slide,
body.swiper-direction-horizontal .navbar-swiper .swiper-slide {
    flex-shrink: 0;
}

body.swiper-direction-vertical .nav-swiper-section::-webkit-scrollbar {
    width: 4px;
}

body.swiper-direction-vertical .nav-swiper-section::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
    border-radius: 4px;
}

body.swiper-direction-vertical .nav-swiper-section::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 4px;
}

body.swiper-direction-vertical .nav-swiper-section {
    overflow: hidden !important;
    height: 100%;
    flex: 1;
    min-height: 0;
    position: relative;
}

body.swiper-direction-vertical .swiper-slide:last-child {
    margin-bottom: 20px;
}

/* Keep the horizontal category bar measurable and scrollable. These rules
   intentionally come after the legacy responsive rules above. */
body.swiper-direction-horizontal .navbar-swiper,
body.swiper-direction-horizontal .navbar-swiper .swiper {
    height: 80px !important;
    max-height: 80px !important;
    min-height: 0 !important;
    width: 100% !important;
    min-width: 0 !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    touch-action: pan-x !important;
}

body.swiper-direction-horizontal .navbar-swiper .swiper-wrapper {
    display: flex !important;
    flex-direction: row !important;
    align-items: stretch !important;
    width: max-content !important;
    min-width: max-content !important;
    height: 80px !important;
}

.cart-badge {
    position: absolute;
    top: 6px;
    left: 6px;
    background: var(--cart-badge-bg);
    color: var(--cart-badge-color);
    font-size: 12px;
    min-width: 20px;
    height: 20px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    font-weight: bold;
    z-index: 5;
}

.cart-timer {
    margin-top: 8px;
    font-size: 13px;
    color: var(--cart-timer-color);
}

/* =========================================
   استایل مستقل سبد خرید - بدون تداخل
   ========================================= */

.custom-floating-cart {
    position: fixed;
    bottom: 154px;
    left: 20px;
    width: 56px;
    height: 56px;
    background: var(--custom-floating-cart-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px var(--custom-floating-cart-shadow);
    transition: all 0.3s ease;
    z-index: 999;
}

    .custom-floating-cart:hover {
        transform: scale(1.08);
        background: var(--custom-floating-cart-hover-bg);
    }

    .custom-floating-cart i {
        font-size: 24px;
        color: var(--custom-floating-cart-color);
    }

.custom-floating-waiter {
    position: fixed;
    bottom: 218px;
    left: 20px;
    width: 56px;
    height: 56px;
    background: #ffc107;
    color: #1f2933;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    z-index: 999;
}

    .custom-floating-waiter:hover {
        transform: scale(1.08);
        background: #ffca2c;
    }

    .custom-floating-waiter i {
        font-size: 23px;
    }

.custom-floating-club {
    position: fixed;
    bottom: 90px;
    left: 20px;
    width: 56px;
    height: 56px;
    background: #0d6efd;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    z-index: 999;
}

    .custom-floating-club:hover {
        transform: scale(1.08);
        background: #0b5ed7;
    }

    .custom-floating-club i {
        font-size: 23px;
    }

.waiter-selected-table {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-weight: 700;
}

.custom-cart-count {
    position: absolute;
    top: -6px;
    right: -6px;
    background: var(--custom-cart-count-bg);
    color: var(--custom-cart-count-color);
    border-radius: 50%;
    min-width: 20px;
    height: 20px;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    padding: 0 4px;
}

.custom-cart-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--custom-cart-modal-overlay);
    z-index: 10000;
}

.custom-cart-box {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    max-width: 420px;
    height: 100%;
    background: var(--custom-cart-box-bg);
    display: flex;
    flex-direction: column;
    box-shadow: -2px 0 20px var(--custom-cart-box-shadow);
    animation: customSlideIn 0.3s ease;
    color: var(--custom-item-name-color);
}

@keyframes customSlideIn {
    from {
        transform: translateX(100%);
    }

    to {
        transform: translateX(0);
    }
}

.custom-cart-header {
    padding: 16px 20px;
    background: var(--custom-cart-header-bg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

    .custom-cart-header span {
        font-size: 18px;
        font-weight: 600;
        color: var(--custom-cart-header-color);
    }

.custom-cart-close {
    background: var(--custom-cart-close-bg);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    color: var(--custom-cart-close-color);
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s;
}

    .custom-cart-close:hover {
        background: var(--custom-cart-close-hover-bg);
    }

.custom-select-table {
    padding: 12px 20px;
    border-bottom: 1px solid var(--custom-select-table-border);
    flex-shrink: 0;
}

.custom-btn-table {
    width: 100%;
    padding: 10px 12px;
    background: var(--custom-btn-table-bg);
    color: var(--custom-btn-table-color);
    border: 1px solid var(--custom-btn-table-border);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

    .custom-btn-table:hover {
        background: var(--custom-btn-table-hover-bg);
        border-color: var(--custom-btn-table-hover-border);
        color: var(--custom-btn-table-hover-color);
    }

.custom-cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 12px 20px;
}

.custom-cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid var(--custom-cart-item-border);
    transition: all 0.2s ease;
}

    .custom-cart-item:last-child {
        border-bottom: none;
    }

.custom-item-info {
    flex: 1;
}

.custom-item-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--custom-item-name-color);
    margin-bottom: 4px;
}

.custom-item-price {
    font-size: 12px;
    color: var(--custom-item-price-color);
    font-weight: 500;
}

.custom-qty-controls {
    display: flex;
    align-items: center;
    gap: 6px;
}

.custom-qty-btn {
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-qty-minus {
    background: var(--custom-qty-minus-bg);
    color: var(--custom-qty-minus-color);
}

    .custom-qty-minus:hover {
        background: var(--custom-qty-minus-hover-bg);
        transform: scale(1.05);
    }

.custom-qty-plus {
    background: var(--custom-qty-plus-bg);
    color: var(--custom-qty-plus-color);
}

    .custom-qty-plus:hover {
        background: var(--custom-qty-plus-hover-bg);
        transform: scale(1.05);
    }

.custom-qty-remove {
    background: var(--custom-qty-remove-bg);
    color: var(--custom-qty-remove-color);
    font-size: 12px;
}

    .custom-qty-remove:hover {
        background: var(--custom-qty-remove-hover-bg);
        color: var(--custom-qty-remove-hover-color);
        transform: scale(1.05);
    }

.custom-qty-value {
    min-width: 30px;
    text-align: center;
    font-weight: 600;
    font-size: 15px;
    color: var(--custom-qty-value-color);
}

.custom-qty-btn:active {
    transform: scale(0.95);
}

.custom-qty-minus:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

    .custom-qty-minus:disabled:hover {
        transform: none;
    }

.custom-cart-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--custom-cart-footer-border);
    background: var(--custom-cart-footer-bg);
    flex-shrink: 0;
}

/* انتخاب میز بخشی اختیاری از ثبت سفارش است و باید کنار دکمه ثبت سفارش باشد. */
.custom-cart-footer .custom-select-table {
    padding: 0;
    margin: 0 0 10px;
    border: 0;
}

.custom-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin: 0 0 12px;
    padding: 12px 14px;
    border: 1px solid var(--custom-cart-footer-border);
    border-radius: 12px;
    background: var(--custom-cart-footer-bg);
    box-shadow: 0 4px 14px rgba(15, 23, 42, .06);
}

.custom-total-label {
    font-size: 14px;
    color: var(--custom-total-label-color);
}

.custom-total-price {
    font-size: clamp(17px, 4vw, 22px);
    font-weight: 700;
    color: var(--custom-total-price-color);
    direction: rtl;
    white-space: nowrap;
}

.custom-total-line { display:flex; justify-content:space-between; align-items:center; gap:10px; padding:4px 0; font-size:12px; }
.custom-total-line strong { font-weight:700; white-space:nowrap; }
.custom-total-gross { color:#64748b; }
.custom-total-discount { color:#16a34a; }
.custom-total-payable { margin-top:5px; padding-top:9px; border-top:1px dashed var(--custom-cart-footer-border); color:var(--custom-total-price-color); font-size:14px; }
.custom-total-payable strong { font-size:clamp(17px,4vw,22px); }

@media (max-width: 420px) {
    .custom-total-row { align-items: flex-start; flex-direction: column; gap: 4px; padding: 10px 12px; }
    .custom-total-price { width: 100%; text-align: left; }
}

.custom-timer {
    background: var(--custom-timer-bg);
    border-radius: 10px;
    padding: 10px;
    text-align: center;
    margin: 12px 0;
    font-size: 13px;
    color: var(--custom-timer-color);
}

    .custom-timer span:first-child {
        margin-right: 5px;
    }

.custom-timer-value {
    font-weight: bold;
    font-size: 15px;
    color: var(--custom-timer-value-color);
}

.custom-checkout-btn {
    width: 100%;
    background: var(--custom-checkout-btn-bg);
    border: none;
    padding: 14px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 10px;
    color: var(--custom-checkout-btn-color);
    cursor: pointer;
    transition: all 0.2s;
}

    .custom-checkout-btn:hover {
        background: var(--custom-checkout-btn-hover-bg);
        transform: translateY(-1px);
    }

.custom-cart-items:empty::after {
    content: "🛒 سبد خرید شما خالی است";
    display: block;
    text-align: center;
    padding: 60px 20px;
    color: var(--custom-empty-cart-color);
    font-size: 14px;
}

@keyframes customPulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.15);
    }

    100% {
        transform: scale(1);
    }
}

.custom-floating-cart.pulse {
    animation: customPulse 0.3s ease;
}

.custom-table-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--custom-table-modal-overlay);
    z-index: 10001;
    align-items: center;
    justify-content: center;
}

.custom-table-container {
    background: var(--custom-table-container-bg);
    color: var(--custom-item-name-color);
    border-radius: 20px;
    width: 90%;
    max-width: 400px;
    max-height: 80vh;
    overflow: hidden;
    animation: customModalFade 0.2s ease;
}

@keyframes customModalFade {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.custom-table-header {
    padding: 16px 20px;
    background: var(--custom-table-header-bg);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

    .custom-table-header h3 {
        color: var(--custom-table-header-color);
        font-size: 18px;
        margin: 0;
    }

.custom-table-close {
    background: var(--custom-table-close-bg);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    color: var(--custom-table-close-color);
    cursor: pointer;
}

.custom-tables-grid {
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    max-height: 400px;
    overflow-y: auto;
}

.custom-table-item {
    padding: 16px;
    text-align: center;
    background: var(--custom-table-item-bg);
    border: 1px solid var(--custom-table-item-border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

    .custom-table-item:hover {
        background: var(--custom-table-item-hover-bg);
        border-color: var(--custom-table-item-hover-border);
        color: var(--custom-table-item-hover-color);
    }

    .custom-table-item.active {
        background: var(--custom-table-item-active-bg);
        color: var(--custom-table-item-active-color);
    }

.custom-table-number {
    font-size: 18px;
    font-weight: bold;
}

.custom-table-capacity {
    font-size: 11px;
    opacity: 0.7;
    margin-top: 4px;
}

@media (max-width: 480px) {
    .custom-floating-cart {
        width: 48px;
        height: 48px;
        bottom: 126px;
        left: 15px;
    }

        .custom-floating-cart i {
            font-size: 20px;
        }

.custom-floating-waiter {
	        width: 48px;
	        height: 48px;
	        bottom: 182px;
	        left: 15px;
	    }

	        .custom-floating-waiter i {
	            font-size: 20px;
	        }

	    .custom-floating-club {
	        width: 48px;
	        height: 48px;
	        bottom: 70px;
	        left: 15px;
	    }

	        .custom-floating-club i {
	            font-size: 20px;
	        }

	    .custom-cart-box {
        max-width: 100%;
    }

    .custom-cart-header {
        padding: 14px 16px;
    }

        .custom-cart-header span {
            font-size: 16px;
        }

    .custom-select-table,
    .custom-cart-items,
    .custom-cart-footer {
        padding-left: 16px;
        padding-right: 16px;
    }

    .custom-cart-item {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 12px 0;
    }

    .custom-qty-controls {
        justify-content: flex-end;
    }

    .custom-qty-btn {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }

    .custom-qty-value {
        min-width: 36px;
        font-size: 16px;
    }

    .custom-total-price {
        font-size: 18px;
    }

    .custom-tables-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 16px;
    }

    .custom-table-item {
        padding: 12px;
    }
}

@media (min-width: 481px) and (max-width: 768px) {
    .custom-cart-box {
        max-width: 380px;
    }

    .custom-qty-btn {
        width: 32px;
        height: 32px;
    }
}

.btn-notification-float {
    transition: all 0.3s ease;
}

    .btn-notification-float:hover {
        transform: scale(1.08);
        background: var(--btn-notification-float-hover-bg);
    }

.custom-item-note-section {
    margin-top: 8px;
    width: 100%;
}

.custom-note-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--custom-note-input-border);
    border-radius: 8px;
    font-size: 12px;
    font-family: inherit;
    background: var(--custom-note-input-bg);
    transition: all 0.2s ease;
    resize: vertical;
}

    .custom-note-input:focus {
        outline: none;
        border-color: var(--custom-note-input-focus-border);
        background: var(--custom-note-input-focus-bg);
        box-shadow: 0 0 0 2px var(--custom-note-input-focus-shadow);
    }

    .custom-note-input::placeholder {
        color: var(--custom-note-placeholder-color);
        font-size: 11px;
    }

.custom-note-count {
    text-align: left;
    font-size: 10px;
    color: var(--custom-note-count-color);
    margin-top: 4px;
}

    .custom-note-count.warning {
        color: var(--custom-note-count-warning);
    }

    .custom-note-count.danger {
        color: var(--custom-note-count-danger);
    }

@media (max-width: 480px) {
    .custom-note-input {
        font-size: 13px;
        padding: 10px 12px;
    }

    .custom-item-note-section {
        margin-top: 10px;
    }
}

@media (min-width: 768px) {
    .modal-main-image-thumbnail,
    .modal-main-video-thumbnail {
        max-width: 100%;
        max-height: 200px;
    }
}

.logged-in-user-info {
    background: var(--logged-in-user-info-bg);
    border-radius: 12px;
    padding: 10px 15px;
    margin: 10px 0;
    border: 1px solid var(--logged-in-user-info-border);
}

.user-info-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

    .user-info-row i {
        font-size: 20px;
        color: var(--user-info-icon-color);
    }

.user-name {
    flex: 1;
    font-weight: 500;
    color: var(--user-name-color);
}

.logout-from-cart-btn {
    background: none;
    border: none;
    color: var(--logout-btn-color);
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

    .logout-from-cart-btn:hover {
        background: var(--logout-btn-hover-bg);
    }
/* Customer order history */
.customer-history-modal {
    z-index: 10060 !important;
}

.customer-club-portal-modal {
    z-index: 10060 !important;
}

.customer-club-portal-modal + .modal-backdrop {
    z-index: 10055 !important;
}

.customer-club-portal-content {
    overflow: hidden;
    border: 0 !important;
    border-radius: 24px !important;
    background: var(--item-modal-bg);
    box-shadow: 0 24px 70px rgba(15, 23, 42, .28);
}

.customer-club-portal-content .modal-header {
    align-items: center;
    gap: 12px;
    padding: 18px 20px;
    border: 0;
    background: linear-gradient(135deg, var(--accordion-accent, #2563eb), #7c3aed);
    color: #fff;
}

.customer-club-portal-heading,
.customer-club-portal-actions,
.customer-club-benefit-card-top,
.customer-club-section-heading,
.customer-club-serial-row {
    display: flex;
    align-items: center;
}

.customer-club-portal-heading { gap: 11px; min-width: 0; }
.customer-club-portal-heading .modal-title { margin: 0; font-weight: 800; }
.customer-club-portal-heading small { display: block; margin-top: 4px; color: rgba(255,255,255,.78); overflow-wrap: anywhere; }
.customer-club-portal-icon,
.customer-club-welcome-icon,
.customer-club-benefit-icon {
    display: inline-grid;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 15px;
}
.customer-club-portal-icon { width: 44px; height: 44px; background: rgba(255,255,255,.18); font-size: 20px; }
.customer-club-portal-actions { gap: 8px; margin-right: auto; }
.customer-club-icon-button,
.customer-club-copy-button {
    border: 1px solid rgba(255,255,255,.3);
    color: inherit;
    background: rgba(255,255,255,.14);
    cursor: pointer;
}
.customer-club-icon-button { width: 34px; height: 34px; border-radius: 10px; }
.customer-club-icon-button:hover { background: rgba(255,255,255,.25); }
.customer-club-portal-content .modal-body { padding: 20px; }
.customer-club-welcome {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding: 14px;
    border: 1px solid var(--item-modal-border);
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(37,99,235,.08), rgba(124,58,237,.08));
}
.customer-club-welcome-icon { width: 40px; height: 40px; color: #7c3aed; background: rgba(124,58,237,.12); }
.customer-club-welcome strong,
.customer-club-welcome span { display: block; }
.customer-club-welcome span { margin-top: 3px; color: var(--modal-description-color); font-size: .82rem; }
.customer-club-stat-grid,
.customer-club-benefit-grid { display: grid; gap: 12px; }
.customer-club-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 22px; }
.customer-club-stat-card { padding: 15px; border: 1px solid var(--item-modal-border); border-radius: 16px; background: var(--item-modal-header-bg); }
.customer-club-stat-card span,
.customer-club-stat-card strong { display: block; }
.customer-club-stat-card span { color: var(--modal-description-color); font-size: .82rem; }
.customer-club-stat-card span i { margin-left: 5px; }
.customer-club-stat-card strong { margin-top: 8px; color: var(--item-modal-text); font-size: 1.1rem; }
.customer-club-stat-card.credit i { color: #2563eb; }
.customer-club-stat-card.points i { color: #d97706; }
.customer-club-section { margin-top: 20px; }
.customer-club-section-heading { justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.customer-club-section-heading h6 { margin: 0; font-weight: 800; }
.customer-club-section-heading h6 i { margin-left: 6px; color: var(--accordion-accent, #2563eb); }
.customer-club-section-heading > span { color: var(--modal-description-color); font-size: .78rem; }
.customer-club-benefit-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.customer-club-benefit-card { padding: 14px; border: 1px solid var(--item-modal-border); border-radius: 16px; background: var(--item-modal-header-bg); }
.customer-club-benefit-card-top { justify-content: space-between; gap: 8px; }
.customer-club-benefit-icon { width: 34px; height: 34px; color: #2563eb; background: rgba(37,99,235,.12); }
.customer-club-status { border-radius: 999px; padding: 4px 8px; color: #047857; background: rgba(16,185,129,.12); font-size: .72rem; }
.customer-club-benefit-title { display: block; margin-top: 10px; overflow-wrap: anywhere; }
.customer-club-benefit-value { margin-top: 7px; color: var(--modal-description-color); font-size: .82rem; }
.customer-club-benefit-value b { color: var(--item-modal-text); }
.customer-club-benefit-expiry { margin-top: 9px; color: var(--modal-description-color); font-size: .76rem; }
.customer-club-serial-row { gap: 6px; margin-top: 12px; }
.customer-club-serial-row code { flex: 1; min-width: 0; padding: 7px 8px; overflow: hidden; border-radius: 8px; color: var(--item-modal-text); background: rgba(127,127,127,.1); text-overflow: ellipsis; white-space: nowrap; }
.customer-club-copy-button { flex: 0 0 auto; width: 32px; height: 32px; border-color: var(--item-modal-border); border-radius: 9px; color: var(--item-modal-text); background: transparent; }
.customer-club-copy-button:hover { color: #fff; background: var(--accordion-accent, #2563eb); }
.customer-club-invoice-list .customer-history-invoice { margin-bottom: 8px; border-radius: 12px; }
.customer-club-invoice-list .customer-history-invoice summary { padding: 13px 14px; }

@media (max-width: 700px) {
    .customer-club-portal-content { min-height: 100%; border-radius: 0 !important; }
    .customer-club-portal-content .modal-body { padding: 14px; }
    .customer-club-benefit-grid { grid-template-columns: 1fr; }
    .customer-club-stat-card strong { font-size: .98rem; }
}

.customer-history-modal + .modal-backdrop {
    z-index: 10055 !important;
}

.customer-history-modal .modal-content {
    overflow: hidden;
    border: 1px solid var(--item-modal-border);
    border-radius: 8px;
    background: var(--item-modal-bg);
    color: var(--item-modal-text);
}

.customer-history-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    padding: 6px;
    background: var(--item-modal-header-bg);
}

.customer-history-tabs button {
    border: 1px solid transparent;
    border-radius: 6px;
    padding: 9px;
    background: transparent;
    color: var(--modal-description-color);
}

.customer-history-tabs button.active {
    border-color: var(--accordion-accent, #2563eb);
    background: var(--item-modal-bg);
    color: var(--accordion-accent);
    font-weight: 700;
}

.customer-history-invoice {
    margin-bottom: 8px;
    overflow: hidden;
    border: 1px solid var(--item-modal-border);
    border-radius: 7px;
}

.customer-history-invoice summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 12px;
    cursor: pointer;
    background: var(--item-modal-header-bg);
}

.customer-history-invoice summary span,
.customer-history-product {
    display: grid;
    gap: 3px;
}

.customer-history-invoice summary span:last-child {
    text-align: left;
}

.customer-history-invoice-body {
    display: grid;
    gap: 12px;
    padding: 12px;
}

.customer-history-totals {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
}

.customer-history-totals span,
.customer-history-payment,
.customer-history-product {
    padding: 9px;
    border: 1px solid var(--item-modal-border);
    border-radius: 6px;
    overflow-wrap: anywhere;
}

.customer-history-payment {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
}

.customer-history-invoice table {
    width: 100%;
    border-collapse: collapse;
}

.customer-history-invoice th,
.customer-history-invoice td {
    padding: 8px;
    border-bottom: 1px solid var(--item-modal-border);
    text-align: right;
}

.customer-history-product {
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    margin-bottom: 7px;
}

.customer-history-product small {
    grid-column: 1 / -1;
    color: var(--modal-description-color);
}

.customer-history-empty {
    padding: 28px 12px;
    color: var(--modal-description-color);
    text-align: center;
}

@media (max-width: 700px) {
    .customer-history-modal .modal-dialog {
        width: 100%;
        max-width: none;
        min-height: 100%;
        margin: 0;
    }

    .customer-history-modal .modal-content {
        min-height: 100vh;
        border-radius: 0;
    }

    .customer-history-totals {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .customer-history-product {
        grid-template-columns: 1fr auto;
    }
}

/* Category/item media fallbacks */
.item-card-content-without-image {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "details" "description";
}

.item-card-content-without-image .item-card-details-without-image-full {
    grid-area: details;
    grid-column: 1;
    width: 100%;
    text-align: right;
}

.item-card-content-without-image .item-card-details,
.item-card-content-without-image .item-card-details-whitout-image {
    grid-area: details;
    grid-column: 1;
    width: 100%;
    min-width: 0;
    text-align: right;
    padding-right: 2px;
}

.navbar-swiper .swiper-slide-link-content {
    position: relative;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.navbar-swiper .swiper-slide-link-content img,
.navbar-swiper .swiper-slide-link-content .category-image-fallback {
    flex: 0 0 auto;
}

/* Stable cards when an item has no image. The details use the full card
   width instead of leaving an empty media column behind. */
.item-card-content-without-image .item-card-img,
.item-card-content-without-image .item-card-video-preview {
    display: none;
}
.item-card-content-without-image {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "details" "description";
    align-items: stretch;
}
.item-card-content-without-image .item-card-details,
.item-card-content-without-image .item-card-details-whitout-image {
    min-height: 90px;
    padding-inline: 4px;
}

/* Feature and discount labels are card-level glass badges, not inline text. */
.special-item-badge,
.daily-discount-badge,
.item-discount-badge {
    left: 10px;
    right: auto;
    top: 10px;
    border: 1px solid rgba(255, 255, 255, .45);
    background: linear-gradient(135deg, rgba(30, 136, 229, .92), rgba(37, 99, 235, .78));
    backdrop-filter: blur(10px) saturate(165%);
    -webkit-backdrop-filter: blur(10px) saturate(165%);
    box-shadow: 0 5px 14px rgba(15, 23, 42, .16);
}
.daily-discount-badge,
.item-discount-badge {
    position: absolute;
    z-index: 10;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border-radius: 999px;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 4px 8px;
}
.daily-discount-badge,
.item-discount-badge {
    background: linear-gradient(135deg, rgba(16, 185, 129, .94), rgba(5, 150, 105, .82));
}
.item-discount-badge { top: 44px; }
.daily-discount-item-card .daily-discount-badge { top: 10px; }
.special-item-card .item-discount-badge { top: 44px; }
.item-card > .item-card-content .daily-discount-inline-badge { display: none; }

/* Keep navbar/category tiles stable when their image is missing. */
.navbar-swiper .swiper-slide-link-content {
    min-height: 74px;
}
.navbar-swiper .swiper-slide-link-content h5 {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
    text-align: right;
}
.navbar-swiper .swiper-slide-link-content img[style*="display: none"] + h5,
.navbar-swiper .swiper-slide-link-content.category-image-error-no-fallback h5 {
    margin-top: 0;
}

/* Vertical navbar cards keep a stable size without forcing grid rows. */
body.swiper-direction-vertical .navbar-swiper .swiper-slide {
    height: 86px !important;
    min-height: 86px !important;
    max-height: 86px !important;
    margin-bottom: 8px !important;
    box-sizing: border-box;
}
body.swiper-direction-vertical .navbar-swiper .swiper-slide-link-content {
    display: flex;
    flex-direction: column;
    align-content: center;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 5px 4px;
    min-height: 0;
    overflow: hidden;
}
body.swiper-direction-vertical .navbar-swiper .swiper-slide-link-content.category-image-error-no-fallback {
    display: flex;
    flex-direction: column;
    align-content: center;
    align-items: center;
    justify-content: center;
}
body.swiper-direction-vertical .navbar-swiper .swiper-slide-link-content.category-image-error-no-fallback .swiper-slide-title {
    display: -webkit-box;
    height: auto;
    max-height: none;
}
body.swiper-direction-vertical .navbar-swiper .swiper-slide-link-content img,
body.swiper-direction-vertical .navbar-swiper .navbar-swiper-icon,
body.swiper-direction-vertical .navbar-swiper .category-image-placeholder {
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    margin: 0;
    border-radius: 8px;
    display: grid;
    place-items: center;
    object-fit: cover;
}
body.swiper-direction-vertical .navbar-swiper .navbar-swiper-icon,
body.swiper-direction-vertical .navbar-swiper .category-image-placeholder {
    background: rgba(148, 163, 184, .12);
    color: var(--swiper-slide-link-color);
}
body.swiper-direction-vertical .navbar-swiper .navbar-swiper-icon i,
body.swiper-direction-vertical .navbar-swiper .category-image-placeholder i {
    margin: 0;
    font-size: 21px;
}
body.swiper-direction-vertical .navbar-swiper .swiper-slide-title {
    flex: 0 1 auto;
    align-self: stretch;
    width: 100%;
    min-height: 0;
    max-height: 28px;
    line-height: 1.25;
    font-size: 10px;
    white-space: normal;
    text-align: center !important;
    overflow-wrap: anywhere;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
body.swiper-direction-vertical .navbar-swiper .special-badge {
    display: inline-block;
    margin-inline-start: 2px;
    padding: 1px 5px;
    font-size: 9px;
    vertical-align: middle;
}

.navbar-swiper .swiper-slide-link-content.has-image-error {
    padding-inline: 8px;
}

.navbar-swiper .swiper-slide-link-content.category-image-error-no-fallback {
    align-items: flex-start;
    justify-content: center;
    text-align: right;
    padding-inline: 10px;
}

body.swiper-direction-vertical .navbar-swiper .swiper-slide-link-content.category-image-error-no-fallback {
    align-items: center;
    text-align: center;
    padding-inline: 6px;
}

@media (max-width: 576px) {
    .navbar-swiper .swiper-slide-link-content {
        gap: 4px;
        padding-inline: 4px;
    }

    .navbar-swiper .swiper-slide-title {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}
