﻿/* ============================================================ */
/* Cart Page                                                     */
/* ============================================================ */

.cart-page {
    padding: 20px 0 60px;
}

.cart-breadcrumb {
    margin-bottom: 20px;
}

.cart-title {
    font-family: var(--font-heading);
    font-size: 26px;
    color: #1a2233;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 12px;
}

    .cart-title i {
        color: var(--color-primary);
    }

/* ═══════════════════════════════════════════════════════ */
/* Empty State                                            */
/* ═══════════════════════════════════════════════════════ */
.cart-empty {
    text-align: center;
    padding: 80px 20px;
    background: #f8f9fb;
    border-radius: 16px;
    border: 1px dashed #cbd5e1;
}

    .cart-empty i {
        font-size: 72px;
        color: #cbd5e1;
        margin-bottom: 20px;
        display: block;
    }

    .cart-empty h3 {
        font-family: var(--font-heading);
        font-size: 22px;
        color: #1a2233;
        margin: 0 0 12px;
    }

    .cart-empty p {
        color: #64748b;
        margin-bottom: 24px;
    }

    .cart-empty .btn {
        padding: 12px 28px;
        font-size: 15px;
    }

/* ═══════════════════════════════════════════════════════ */
/* Layout — اسکرول مستقل ستون‌ها در دسکتاپ                 */
/* ═══════════════════════════════════════════════════════ */
.cart-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 24px;
    align-items: start;
    max-height: calc(100vh - 180px);
}

/* Wrapper برای Fade Gradient */
.cart-items-wrapper {
    position: relative;
    max-height: calc(100vh - 180px);
    border-radius: 12px;
    overflow: hidden; /* برای اینکه fade به گوشه‌ها نفوذ نکند */
}

    /* Fade Gradient پایین — ضخیم‌تر و محسوس‌تر */
    .cart-items-wrapper::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        right: 14px;
        height: 90px; /* ← از ۴۸ به ۹۰ */
        background: linear-gradient(to top, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0.95) 20%, rgba(255, 255, 255, 0.7) 50%, rgba(255, 255, 255, 0.3) 80%, rgba(255, 255, 255, 0) 100%);
        pointer-events: none;
        border-radius: 0 0 12px 12px;
        transition: opacity 0.25s ease;
        z-index: 2;
    }

    /* وقتی به انتهای اسکرول رسید، fade محو شود */
    .cart-items-wrapper.at-bottom::after {
        opacity: 0;
    }

/* ═══════════════════════════════════════════════════════ */
/* Cart Items Column — اسکرول مستقل                       */
/* ═══════════════════════════════════════════════════════ */
.cart-items-column {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    gap: 20px;
    /* ← این‌ها حیاتی هستند */
    max-height: calc(100vh - 180px);
    overflow-y: auto;
    overflow-x: hidden;
    /* اسکرول‌بار — Firefox */
    scrollbar-width: thin;
    scrollbar-color: #d4a017 #f1f5f9;
}

    /* اسکرول‌بار — WebKit */
    .cart-items-column::-webkit-scrollbar {
        width: 16px;
    }

    .cart-items-column::-webkit-scrollbar-track {
        background: #f1f5f9;
        border-radius: 8px;
        border: 1px solid #e5e7eb;
    }

    .cart-items-column::-webkit-scrollbar-thumb {
        background: linear-gradient(180deg, #d4a017 0%, #c8940f 100%);
        border-radius: 8px;
        border: 3px solid #f1f5f9;
        min-height: 40px;
    }

        .cart-items-column::-webkit-scrollbar-thumb:hover {
            background: linear-gradient(180deg, #b8890f 0%, #a67a0a 100%);
            border-color: #e5e7eb;
        }

    .cart-items-column::-webkit-scrollbar-corner {
        background: #f1f5f9;
    }

/* ستون خلاصه — ثابت با اسکرول داخلی */
.cart-summary-column {
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 180px);
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 #f1f5f9;
}

    .cart-summary-column::-webkit-scrollbar {
        width: 8px;
    }

    .cart-summary-column::-webkit-scrollbar-track {
        background: #f1f5f9;
        border-radius: 4px;
    }

    .cart-summary-column::-webkit-scrollbar-thumb {
        background: #cbd5e1;
        border-radius: 4px;
    }

        .cart-summary-column::-webkit-scrollbar-thumb:hover {
            background: #94a3b8;
        }

/* ═══════════════════════════════════════════════════════ */
/* Alerts                                                 */
/* ═══════════════════════════════════════════════════════ */
.cart-alert {
    margin-bottom: 0;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cart-items-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e5e7eb;
    font-family: var(--font-primary);
    font-size: 14px;
    color: #64748b;
}

.btn-clear-cart {
    background: none;
    border: none;
    color: #dc2626;
    cursor: pointer;
    font-size: 13px;
    font-family: var(--font-primary);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: opacity 0.2s;
}

    .btn-clear-cart:hover {
        opacity: 0.7;
    }

/* ═══════════════════════════════════════════════════════ */
/* Cart Item                                              */
/* ═══════════════════════════════════════════════════════ */
.cart-items-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.cart-item {
    display: grid;
    grid-template-columns: 100px 1fr 110px 120px 120px 40px;
    gap: 16px;
    align-items: center;
    padding: 16px;
    background: #f8f9fb;
    border-radius: 10px;
    transition: background 0.2s;
}

    .cart-item:hover {
        background: #f1f5f9;
    }

.cart-item-image {
    display: block;
    width: 100px;
    height: 130px;
    border-radius: 8px;
    overflow: hidden;
    background: #e5e7eb;
}

    .cart-item-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

.cart-item-info {
    min-width: 0;
}

.cart-item-title {
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: bold;
    margin: 0 0 6px;
    line-height: 1.4;
}

    .cart-item-title a {
        color: #1a2233;
        text-decoration: none;
    }

        .cart-item-title a:hover {
            color: var(--color-primary);
        }

.cart-item-author {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.cart-item-badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

    .cart-item-badges .badge {
        padding: 3px 10px;
        border-radius: 12px;
        font-size: 11px;
        font-weight: normal;
    }

.badge-item-type {
    background: #dbeafe;
    color: #1e40af;
}

.badge-weight {
    background: #f1f5f9;
    color: #475569;
}

    .badge-weight i {
        font-size: 10px;
        margin-left: 2px;
    }

.badge-availability.avail-ok {
    background: #dcfce7;
    color: #16a34a;
}

.badge-availability.avail-low {
    background: #fef3c7;
    color: #d97706;
}

.badge-availability.avail-out {
    background: #fee2e2;
    color: #dc2626;
}

.badge-availability.avail-soon {
    background: #ede9fe;
    color: #7c3aed;
}

.badge-availability.avail-backorder {
    background: #cffafe;
    color: #0891b2;
}

.cart-item-warning {
    font-size: 12px;
    color: #dc2626;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
}

.cart-item-discount .discount-badge {
    background: #ef4444;
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
}

/* Gift wrap */
.cart-item-gift {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed #e5e7eb;
}

.gift-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #64748b;
    cursor: pointer;
    user-select: none;
}

    .gift-toggle input {
        accent-color: var(--color-primary);
    }

    .gift-toggle i {
        color: #d97706;
    }

    .gift-toggle small {
        color: #94a3b8;
    }

.gift-note-wrapper {
    margin-top: 6px;
}

.gift-note-input {
    font-size: 12px;
    padding: 4px 8px;
}

/* Item description */
.cart-item-desc-toggle {
    margin-top: 6px;
}

.btn-link-desc {
    background: none;
    border: none;
    color: #64748b;
    font-size: 12px;
    cursor: pointer;
    padding: 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: var(--font-primary);
}

    .btn-link-desc:hover {
        color: var(--color-primary);
    }

.cart-item-desc-wrapper {
    margin-top: 6px;
}

/* Price */
.cart-item-price {
    text-align: center;
    font-family: var(--font-primary);
}

.price-original {
    font-size: 12px;
    color: #94a3b8;
    text-decoration: line-through;
    margin-bottom: 4px;
}

.price-final {
    font-size: 15px;
    font-weight: bold;
    color: #dc2626;
}

.cart-item-price small {
    font-size: 11px;
    color: #64748b;
}

/* Quantity */
.cart-item-qty {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 4px;
    width: fit-content;
    margin: 0 auto;
}

.qty-btn {
    width: 30px;
    height: 30px;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 6px;
    color: #475569;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .qty-btn:hover:not(:disabled) {
        background: #f1f5f9;
        color: var(--color-primary);
    }

    .qty-btn:disabled {
        opacity: 0.4;
        cursor: not-allowed;
    }

.qty-input {
    width: 40px;
    text-align: center;
    border: none;
    background: transparent;
    font-family: var(--font-primary);
    font-size: 14px;
    font-weight: bold;
    color: #1a2233;
}

/* Total */
.cart-item-total {
    text-align: center;
    font-family: var(--font-primary);
}

.total-value {
    font-size: 16px;
    font-weight: bold;
    color: #1a2233;
}

.cart-item-total small {
    font-size: 11px;
    color: #64748b;
    display: block;
}

/* Remove */
.cart-item-remove {
    display: flex;
    justify-content: center;
}

.btn-remove {
    width: 32px;
    height: 32px;
    border: none;
    background: #fee2e2;
    color: #dc2626;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .btn-remove:hover {
        background: #dc2626;
        color: #fff;
    }

.cart-actions-bottom {
    text-align: right;
    padding-top: 8px;
}

/* ═══════════════════════════════════════════════════════ */
/* Section (Address/Shipping/Packaging/Description)      */
/* ═══════════════════════════════════════════════════════ */
.checkout-section {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 18px;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 15px;
    color: #1a2233;
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--color-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

    .section-title i {
        color: var(--color-primary);
    }

/* ═══════════════════════════════════════════════════════ */
/* Address                                                */
/* ═══════════════════════════════════════════════════════ */
.address-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
}

.address-option {
    display: flex;
    gap: 12px;
    padding: 12px 14px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

    .address-option:hover {
        border-color: #cbd5e1;
        background: #f8f9fb;
    }

    .address-option.selected,
    .address-option:has(input:checked) {
        border-color: var(--color-primary);
        background: rgba(212, 160, 23, 0.05);
    }

    .address-option input {
        margin-top: 4px;
        accent-color: var(--color-primary);
    }

.address-name {
    font-weight: 600;
    font-size: 14px;
    color: #1a2233;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.address-phone {
    font-weight: normal;
    font-size: 12px;
    color: #64748b;
}

.badge-default {
    background: #dcfce7;
    color: #16a34a;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 11px;
}

.address-text {
    font-size: 13px;
    color: #64748b;
    line-height: 1.6;
}

.address-postcode {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 4px;
}

.address-empty {
    text-align: center;
    padding: 20px;
    color: #94a3b8;
}

    .address-empty i {
        font-size: 32px;
        margin-bottom: 8px;
        display: block;
        color: #cbd5e1;
    }

.btn-add-address {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
}

/* ═══════════════════════════════════════════════════════ */
/* Shipping ComboBox                                      */
/* ═══════════════════════════════════════════════════════ */
.shipping-combobox-wrapper {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.shipping-combobox {
    font-family: var(--font-primary);
    font-size: 14px;
    padding: 10px 14px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    background-color: #fff;
    color: #1a2233;
    cursor: pointer;
    transition: all 0.2s;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23d4a017' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: left 12px center;
    background-size: 14px;
    padding-left: 36px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

    .shipping-combobox:focus {
        outline: none;
        border-color: var(--color-primary);
        box-shadow: 0 0 0 3px rgba(212, 160, 23, 0.15);
    }

    .shipping-combobox:hover {
        border-color: #cbd5e1;
    }

    .shipping-combobox option {
        padding: 8px;
        font-family: var(--font-primary);
    }

.shipping-selected-info {
    padding: 12px 14px;
    background: #f8f9fb;
    border-radius: 10px;
    border-right: 3px solid var(--color-primary);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.shipping-selected-cost {
    font-size: 14px;
    font-weight: bold;
    color: #1a2233;
}

    .shipping-selected-cost .text-warning {
        color: #d97706 !important;
        font-weight: normal;
        font-size: 13px;
    }

    .shipping-selected-cost .text-success {
        color: #16a34a !important;
        font-weight: normal;
        font-size: 13px;
    }

.shipping-selected-days {
    font-size: 12px;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 6px;
}

.shipping-selected-desc {
    font-size: 12px;
    color: #94a3b8;
    line-height: 1.6;
    margin-top: 4px;
    padding-top: 6px;
    border-top: 1px dashed #e5e7eb;
}

/* ═══════════════════════════════════════════════════════ */
/* Packaging ComboBox                                     */
/* ═══════════════════════════════════════════════════════ */
.packaging-combobox-wrapper {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.packaging-combobox {
    font-family: var(--font-primary);
    font-size: 14px;
    padding: 10px 14px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    background-color: #fff;
    color: #1a2233;
    cursor: pointer;
    transition: all 0.2s;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23d4a017' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: left 12px center;
    background-size: 14px;
    padding-left: 36px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

    .packaging-combobox:focus {
        outline: none;
        border-color: var(--color-primary);
        box-shadow: 0 0 0 3px rgba(212, 160, 23, 0.15);
    }

    .packaging-combobox:hover {
        border-color: #cbd5e1;
    }

    .packaging-combobox option {
        padding: 8px;
        font-family: var(--font-primary);
    }

.packaging-selected-info {
    padding: 12px 14px;
    background: #f8f9fb;
    border-radius: 10px;
    border-right: 3px solid var(--color-primary);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.packaging-selected-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.packaging-selected-title {
    font-size: 14px;
    font-weight: 600;
    color: #1a2233;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

    .packaging-selected-title i {
        color: var(--color-primary);
    }

.packaging-selected-cost {
    font-size: 14px;
    font-weight: bold;
    color: #dc2626;
}

    .packaging-selected-cost .text-success {
        color: #16a34a !important;
        font-weight: normal;
    }

.packaging-selected-desc {
    font-size: 12px;
    color: #64748b;
    line-height: 1.6;
}

.packaging-selected-meta {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    font-size: 11px;
    color: #94a3b8;
    padding-top: 8px;
    border-top: 1px dashed #e5e7eb;
}

    .packaging-selected-meta span {
        display: inline-flex;
        align-items: center;
        gap: 4px;
    }

    .packaging-selected-meta i {
        font-size: 10px;
    }

/* Order description */
.order-desc-section textarea {
    font-size: 13px;
    resize: vertical;
}

/* ═══════════════════════════════════════════════════════ */
/* Summary Column                                         */
/* ═══════════════════════════════════════════════════════ */
.cart-summary {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.cart-summary-title {
    font-family: var(--font-heading);
    font-size: 18px;
    color: #1a2233;
    margin: 0 0 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--color-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.cart-summary-rows {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-primary);
    font-size: 14px;
    color: #475569;
}

.row-value {
    font-weight: 500;
    color: #1a2233;
}

.summary-discount .row-value {
    color: #16a34a;
}

.summary-wallet .row-value {
    color: #16a34a;
}

.summary-divider {
    border: none;
    border-top: 1px dashed #cbd5e1;
    margin: 12px 0;
}

.summary-total {
    font-size: 16px;
}

    .summary-total .row-label {
        font-weight: bold;
        color: #1a2233;
    }

    .summary-total .total-value {
        font-size: 20px;
        color: #dc2626;
    }

        .summary-total .total-value small {
            font-size: 12px;
            color: #64748b;
            font-weight: normal;
        }

.summary-total-discount {
    margin-top: 12px;
    padding: 10px 12px;
    background: #f0fdf4;
    border-radius: 8px;
    color: #16a34a;
    font-size: 13px;
    text-align: center;
}

/* ═══════════════════════════════════════════════════════ */
/* Coupon                                                 */
/* ═══════════════════════════════════════════════════════ */
.coupon-wrapper {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px dashed #e5e7eb;
}

.coupon-applied {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f0fdf4;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 13px;
}

.coupon-applied-info {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #16a34a;
}

.coupon-code-applied {
    background: #dcfce7;
    color: #166534;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

.coupon-title {
    font-size: 11px;
    color: #64748b;
}

.btn-remove-coupon {
    background: none;
    border: none;
    color: #dc2626;
    font-size: 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-add-coupon {
    background: none;
    border: none;
    color: var(--color-primary);
    text-decoration: underline;
    cursor: pointer;
    font-size: 12px;
    padding: 0;
}

/* ═══════════════════════════════════════════════════════ */
/* Wallet                                                 */
/* ═══════════════════════════════════════════════════════ */
.wallet-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px dashed #e5e7eb;
}

.wallet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.wallet-info {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #1a2233;
}

    .wallet-info i {
        color: var(--color-primary);
    }

.wallet-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    cursor: pointer;
    user-select: none;
}

    .wallet-toggle input {
        accent-color: var(--color-primary);
    }

.wallet-slider-wrapper {
    margin-top: 12px;
    padding: 12px;
    background: #f8f9fb;
    border-radius: 8px;
}

.wallet-slider-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    margin-bottom: 8px;
}

.wallet-amount-display {
    font-weight: bold;
    color: #16a34a;
}

.wallet-slider {
    width: 100%;
    accent-color: var(--color-primary);
}

.wallet-slider-meta {
    display: flex;
    justify-content: space-between;
    margin-top: 6px;
    flex-wrap: wrap;
    gap: 6px;
}

    .wallet-slider-meta small {
        font-size: 11px;
    }

/* ═══════════════════════════════════════════════════════ */
/* Checkout Button                                        */
/* ═══════════════════════════════════════════════════════ */
.btn-checkout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px;
    background: var(--color-primary);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-family: var(--font-primary);
    font-size: 15px;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.2s;
    margin-top: 12px;
    cursor: pointer;
}

    .btn-checkout:hover:not(:disabled) {
        background: var(--color-primary-hover, #b8890f);
        color: #fff;
        transform: translateY(-2px);
    }

    .btn-checkout:disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }

.summary-note {
    margin-top: 16px;
    text-align: center;
    font-size: 12px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

    .summary-note i {
        color: #16a34a;
    }

/* ═══════════════════════════════════════════════════════ */
/* Guest Notice Box                                       */
/* ═══════════════════════════════════════════════════════ */
.guest-notice-box {
    text-align: center;
    padding: 30px 20px;
    background: #fffbeb;
    border: 1px dashed #fde68a;
    border-radius: 12px;
    margin-top: 8px;
}

    .guest-notice-box i {
        font-size: 40px;
        color: #d4a017;
        margin-bottom: 12px;
        display: block;
    }

    .guest-notice-box h4 {
        font-family: var(--font-heading);
        font-size: 16px;
        color: #1a2233;
        margin: 0 0 10px;
    }

    .guest-notice-box p {
        font-size: 13px;
        color: #64748b;
        line-height: 1.8;
        margin-bottom: 16px;
    }

    .guest-notice-box .btn {
        padding: 10px 28px;
        font-size: 14px;
    }

/* ═══════════════════════════════════════════════════════ */
/* Address Modal                                          */
/* ═══════════════════════════════════════════════════════ */
#addressModal .modal-content {
    border-radius: 14px;
}

#addressModal .modal-header {
    background: #f8f9fb;
    border-bottom: 2px solid var(--color-primary);
    border-radius: 14px 14px 0 0;
}

#addressModal .modal-title {
    font-family: var(--font-heading);
    color: #1a2233;
    display: flex;
    align-items: center;
    gap: 8px;
}

#addressModal .form-label {
    font-size: 13px;
    color: #475569;
    margin-bottom: 4px;
}

#addressModal .form-control,
#addressModal .form-select {
    font-size: 13px;
}

/* ═══════════════════════════════════════════════════════ */
/* Mini Cart                                              */
/* ═══════════════════════════════════════════════════════ */
.mini-cart {
    min-width: 320px;
    max-width: 380px;
}

.mini-cart-empty {
    text-align: center;
    padding: 30px 20px;
    color: #94a3b8;
}

    .mini-cart-empty i {
        font-size: 40px;
        margin-bottom: 12px;
        display: block;
        color: #cbd5e1;
    }

.mini-cart-items {
    max-height: 320px;
    overflow-y: auto;
    padding: 8px 0;
}

.mini-cart-item {
    display: flex;
    gap: 10px;
    padding: 8px 12px;
    transition: background 0.2s;
}

    .mini-cart-item:hover {
        background: #f8f9fb;
    }

.mini-item-image {
    width: 50px;
    height: 65px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    background: #e5e7eb;
}

    .mini-item-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.mini-item-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.mini-item-title {
    font-size: 13px;
    font-weight: 500;
    color: #1a2233;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.4;
}

    .mini-item-title:hover {
        color: var(--color-primary);
    }

.mini-item-qty {
    font-size: 12px;
    color: #64748b;
    margin-top: 4px;
}

.mini-cart-more {
    text-align: center;
    padding: 8px;
    font-size: 12px;
    color: #64748b;
    border-top: 1px dashed #e5e7eb;
}

.mini-cart-footer {
    border-top: 1px solid #e5e7eb;
    padding: 12px 16px;
}

.mini-cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 14px;
}

    .mini-cart-total strong {
        color: #dc2626;
        font-size: 16px;
    }

.mini-cart-footer .btn-block {
    display: block;
    width: 100%;
    text-align: center;
    padding: 10px;
    border-radius: 8px;
}

/* ═══════════════════════════════════════════════════════ */
/* Responsive                                             */
/* ═══════════════════════════════════════════════════════ */
@media (max-width: 992px) {
    .cart-layout {
        grid-template-columns: 1fr;
        max-height: none;
    }

    /* در موبایل/تبلت: بدون اسکرول مستقل، بدون fade */
    .cart-items-wrapper {
        max-height: none;
        overflow: visible;
    }

        .cart-items-wrapper::after {
            display: none; /* ← fade اصلاً نمایش داده نشود */
        }

    .cart-items-column,
    .cart-summary-column {
        max-height: none;
        overflow: visible;
        position: static;
    }

    .cart-item {
        grid-template-columns: 80px 1fr;
        grid-template-areas:
            "image info"
            "qty price"
            "total remove";
        gap: 12px;
    }

    .cart-item-image {
        grid-area: image;
        width: 80px;
        height: 105px;
    }

    .cart-item-info {
        grid-area: info;
    }

    .cart-item-qty {
        grid-area: qty;
    }

    .cart-item-price {
        grid-area: price;
        text-align: left;
    }

    .cart-item-total {
        grid-area: total;
        text-align: right;
    }

    .cart-item-remove {
        grid-area: remove;
    }
}

/* ═══════════════════════════════════════════════════════ */
/* Guest notice in MiniCart                               */
/* ═══════════════════════════════════════════════════════ */
.mini-cart-guest-notice {
    text-align: center;
    padding: 24px 20px;
    color: #64748b;
}

    .mini-cart-guest-notice i {
        font-size: 36px;
        color: #cbd5e1;
        margin-bottom: 12px;
        display: block;
    }

    .mini-cart-guest-notice p {
        font-size: 13px;
        margin-bottom: 10px;
        line-height: 1.6;
    }

    .mini-cart-guest-notice .notice-text {
        color: #94a3b8;
        font-size: 12px;
        margin-bottom: 14px;
    }
