/* ================================================================
   B2C PAGES - CONSOLIDATED STYLES
   Extracted from cart/index.php and cart/checkout.php
   ================================================================ */

/* ---- SHARED DESIGN TOKENS ---- */
:root {
    --b2c-bg: #f4f6f9;
    --b2c-card-bg: #ffffff;
    --b2c-border: rgba(0,0,0,0.06);
    --b2c-radius: 16px;
    --b2c-radius-sm: 12px;
    --b2c-shadow: 0 2px 12px rgba(0,0,0,0.04);
    --b2c-shadow-lg: 0 8px 30px rgba(0,0,0,0.08);
    --b2c-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --b2c-green: #10b981;
    --b2c-red: #ef4444;
}

/* ================================================================
   SECTION 1: CART PAGE
   Mobile-first approach with premium aesthetics.
   ================================================================ */

.cart-page-wrapper {
    min-height: 60vh;
    padding-bottom: 80px; /* space for mobile sticky bar */
    background-color: var(--b2c-bg);
}


@media (min-width: 992px) {
    .cart-page-wrapper {
        padding-bottom: 0;
    }
}

/* ---- HEADER ---- */
.cart-header {
    padding-bottom: 0;
}

.cart-icon-wrapper {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(var(--bs-primary-rgb), 0.1), rgba(var(--bs-primary-rgb), 0.05));
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
}

.cart-icon-wrapper i {
    font-size: 1.5rem;
    color: var(--bs-primary);
}

.cart-icon-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--bs-primary);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--cart-bg, #f4f6f9);
}

.cart-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: #1e293b;
}

.cart-subtitle {
    font-size: 0.85rem;
    color: #64748b;
}

.btn-back-shopping {
    background: var(--cart-card-bg, #fff);
    color: #475569;
    border: 1px solid var(--cart-border, rgba(0,0,0,0.06));
    border-radius: 50px;
    padding: 8px 20px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.btn-back-shopping:hover {
    background: var(--bs-primary);
    color: #fff;
    border-color: var(--bs-primary);
    transform: translateY(-1px);
}

@media (max-width: 575px) {
    .cart-title {
        font-size: 1.15rem;
    }
    .cart-icon-wrapper {
        width: 42px;
        height: 42px;
        border-radius: 10px;
    }
    .cart-icon-wrapper i {
        font-size: 1.2rem;
    }
    .btn-back-shopping {
        font-size: 0.78rem;
        padding: 6px 14px;
    }
}

/* ---- ALERTS ---- */
.cart-alert {
    border: none;
    border-radius: var(--cart-radius-sm, 12px);
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.cart-alert-limits {
    background: linear-gradient(135deg, #fefce8, #fef9c3);
    border: 1px solid #fde68a;
    border-radius: var(--cart-radius, 16px);
    padding: 16px 20px;
    color: #92400e;
}

.limit-violation-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.6);
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid rgba(245, 158, 11, 0.15);
}

/* ---- EMPTY CART STATE ---- */
.empty-cart-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-cart-illustration {
    margin-bottom: 24px;
}

.empty-cart-circle {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    animation: emptyCartPulse 3s ease-in-out infinite;
}

.empty-cart-circle i {
    font-size: 4rem;
    color: #94a3b8;
}

.empty-cart-dots span {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #cbd5e1;
    margin: 0 4px;
    animation: emptyCartDot 1.5s ease-in-out infinite;
}

.empty-cart-dots span:nth-child(2) { animation-delay: 0.2s; }
.empty-cart-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes emptyCartPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes emptyCartDot {
    0%, 100% { opacity: 0.3; transform: translateY(0); }
    50% { opacity: 1; transform: translateY(-4px); }
}

.btn-start-shopping {
    border-radius: 50px;
    padding: 12px 32px;
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(var(--bs-primary-rgb), 0.35);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-start-shopping:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(var(--bs-primary-rgb), 0.45);
}

/* ---- CART ITEMS LIST ---- */
.cart-items-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ---- CART ITEM CARD ---- */
.cart-item-card {
    background: var(--cart-card-bg, #fff);
    border-radius: var(--cart-radius, 16px);
    border: 1px solid var(--cart-border, rgba(0,0,0,0.06));
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: cartItemSlideIn 0.4s ease forwards;
    opacity: 0;
    transform: translateY(10px);
    /* Override global product-card styles */
    height: auto !important;
    min-height: unset !important;
    cursor: default !important;
    position: relative;
}

.cart-item-card:hover {
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
    transform: translateY(-2px) !important;
}

@keyframes cartItemSlideIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cart-item-inner {
    display: flex;
    gap: 0;
    padding: 0;
}

/* Image */
.cart-item-image {
    width: 130px;
    min-width: 130px;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    min-height: 130px;
}

.cart-item-discount-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #ef4444;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    letter-spacing: -0.02em;
}

/* Details */
.cart-item-details {
    flex: 1;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 6px;
}

.cart-item-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
}

.cart-item-name {
    font-size: 0.92rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cart-item-remove-btn {
    background: none;
    border: none;
    color: #94a3b8;
    padding: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    border-radius: 8px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-item-remove-btn:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.08);
}

/* Promotions */
.cart-item-promos {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.cart-promo-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.68rem;
    font-weight: 600;
    color: #2563eb;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    padding: 2px 8px;
    border-radius: 20px;
}

/* Bottom row: price + qty */
.cart-item-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-top: auto;
}

.cart-item-price {
    display: flex;
    align-items: baseline;
    gap: 6px;
    flex-wrap: wrap;
}

.price-current {
    font-size: 1rem;
    font-weight: 800;
    color: var(--bs-primary);
}

.price-original {
    font-size: 0.78rem;
    color: #94a3b8;
    text-decoration: line-through;
}

/* Quantity Controls */
.cart-qty-controls {
    display: inline-flex;
    align-items: center;
    background: #f1f5f9;
    border-radius: 50px;
    padding: 3px;
    gap: 0;
    flex-shrink: 0;
}

.cart-qty-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.9rem;
    padding: 0;
}

.cart-qty-increase {
    background: var(--bs-primary);
    color: #fff;
}

.cart-qty-increase:hover {
    filter: brightness(1.1);
    transform: scale(1.05);
}

.cart-qty-decrease {
    background: #fff;
    color: #475569;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.cart-qty-decrease:hover {
    background: #e2e8f0;
}

.cart-qty-decrease.is-delete {
    color: #ef4444;
}

.cart-qty-decrease.is-delete:hover {
    background: #fef2f2;
}

.cart-qty-value {
    min-width: 28px;
    text-align: center;
    font-weight: 700;
    font-size: 0.9rem;
    color: #1e293b;
    user-select: none;
}

/* Subtotal row */
.cart-item-subtotal {
    display: flex;
    align-items: center;
    gap: 6px;
    padding-top: 8px;
    border-top: 1px dashed #e2e8f0;
    flex-wrap: wrap;
}

.subtotal-label {
    font-size: 0.75rem;
    color: #94a3b8;
    font-weight: 500;
}

.subtotal-value {
    font-size: 0.95rem;
    font-weight: 800;
    color: #1e293b;
}

.savings-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 0.65rem;
    font-weight: 600;
    color: #10b981;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.15);
    padding: 2px 8px;
    border-radius: 20px;
    margin-right: auto;
}

/* ---- Mobile Optimizations for Cart Items ---- */
@media (max-width: 575px) {
    .cart-item-image {
        width: 100px;
        min-width: 100px;
    }
    .cart-item-image img {
        min-height: 100px;
    }
    .cart-item-details {
        padding: 10px 12px;
        gap: 5px;
    }
    .cart-item-name {
        font-size: 0.82rem;
    }
    .cart-qty-btn {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }
    .cart-qty-value {
        min-width: 22px;
        font-size: 0.82rem;
    }
    .price-current {
        font-size: 0.88rem;
    }
    .subtotal-value {
        font-size: 0.85rem;
    }
    .cart-item-remove-btn {
        width: 28px;
        height: 28px;
        font-size: 0.85rem;
    }
}

/* ---- CART ACTIONS ---- */
.cart-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    flex-wrap: wrap;
    gap: 8px;
}

.btn-cart-action {
    background: var(--cart-card-bg, #fff);
    border: 1px solid var(--cart-border, rgba(0,0,0,0.06));
    color: #475569;
    border-radius: 50px;
    padding: 8px 16px;
    font-size: 0.82rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-cart-action:hover {
    border-color: var(--bs-primary);
    color: var(--bs-primary);
    background: rgba(var(--bs-primary-rgb), 0.04);
}

.btn-cart-clear {
    background: none;
    border: none;
    color: #ef4444;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 50px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-cart-clear:hover {
    background: #fef2f2;
    color: #dc2626;
}

.cart-auto-update-hint {
    font-size: 0.72rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 4px;
}

@media (max-width: 575px) {
    .cart-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .cart-auto-update-hint {
        text-align: center;
        justify-content: center;
    }
}

/* ---- PROMOTIONS CARD ---- */
.cart-promotions-card {
    background: var(--cart-card-bg, #fff);
    border: 1px solid var(--cart-border, rgba(0,0,0,0.06));
    border-radius: var(--cart-radius, 16px);
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
    overflow: hidden;
    margin-top: 16px;
}

.cart-promotions-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 18px;
    border-bottom: 1px solid #f1f5f9;
}

.cart-promotions-header i {
    color: var(--bs-primary);
    font-size: 1.1rem;
}

.cart-promotions-body {
    padding: 14px 18px;
}

/* ---- ORDER SUMMARY SIDEBAR ---- */
.cart-summary-sidebar {
    position: sticky;
    top: 100px;
    z-index: 10;
}

.cart-summary-card {
    background: var(--cart-card-bg, #fff);
    border-radius: var(--cart-radius, 16px);
    border: 1px solid var(--cart-border, rgba(0,0,0,0.06));
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
    overflow: hidden;
}

.cart-summary-header {
    background: linear-gradient(135deg, #1e293b, #334155);
    color: #fff;
    padding: 18px 20px;
}

.cart-summary-body {
    padding: 20px;
}

.summary-rows {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.summary-label {
    font-size: 0.88rem;
    color: #64748b;
    font-weight: 500;
}

.summary-value {
    font-size: 0.9rem;
    font-weight: 700;
    color: #1e293b;
}

.summary-row-discount {
    background: rgba(16, 185, 129, 0.06);
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid rgba(16, 185, 129, 0.1);
}

.summary-row-cart-discount {
    background: rgba(6, 182, 212, 0.06);
    border-color: rgba(6, 182, 212, 0.1);
}

.summary-divider {
    height: 1px;
    background: linear-gradient(to right, transparent, #e2e8f0, transparent);
    margin: 4px 0;
}

.summary-row-total .summary-label {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
}

.summary-total-price {
    font-size: 1.3rem !important;
    font-weight: 800 !important;
    color: var(--bs-primary) !important;
}

.summary-savings-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #92400e;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 600;
}

.summary-savings-banner i {
    font-size: 1.1rem;
}

/* Promotions in summary */
.summary-promotions {
    margin-bottom: 16px;
}

.summary-promotions-label {
    font-size: 0.78rem;
    color: #64748b;
    font-weight: 700;
    margin-bottom: 8px;
    display: block;
}

.summary-promo-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8fafc;
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid #f1f5f9;
}

.summary-promo-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(var(--bs-primary-rgb), 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.summary-promo-icon i {
    color: var(--bs-primary);
    font-size: 0.75rem;
}

.summary-promo-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: #334155;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Checkout Button */
.btn-checkout-main {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 14px;
    background: var(--bs-primary);
    color: #fff;
    border: none;
    border-radius: var(--cart-radius-sm, 12px);
    font-size: 1rem;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 14px rgba(var(--bs-primary-rgb), 0.35);
}

.btn-checkout-main:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(var(--bs-primary-rgb), 0.45);
    background-color: var(--bs-primary) !important;
    color: #fff !important;
}

.btn-checkout-disabled {
    background: #94a3b8 !important;
    box-shadow: none !important;
    cursor: not-allowed !important;
    opacity: 0.6;
}

.btn-checkout-disabled:hover {
    transform: none !important;
}

/* Trust Badges */
.summary-trust-badges {
    display: flex;
    justify-content: space-around;
    background: #f8fafc;
    border: 2px dashed #e2e8f0;
    border-radius: var(--cart-radius-sm, 12px);
    padding: 14px 8px;
    margin-top: 16px;
}

.trust-badge-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.trust-badge-item i {
    font-size: 1.2rem;
}

.trust-badge-item:nth-child(1) i { color: #10b981; }
.trust-badge-item:nth-child(2) i { color: var(--bs-primary); }
.trust-badge-item:nth-child(3) i { color: #f59e0b; }

.trust-badge-item span {
    font-size: 0.68rem;
    font-weight: 700;
    color: #475569;
}

/* ---- MOBILE STICKY CHECKOUT BAR (CART) ---- */
.mobile-checkout-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1010;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(0,0,0,0.06);
    box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
    padding: 10px 16px;
    padding-bottom: max(10px, env(safe-area-inset-bottom));
}

.mobile-checkout-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    max-width: 600px;
    margin: 0 auto;
}

.mobile-checkout-total {
    display: flex;
    flex-direction: column;
}

.mobile-total-label {
    font-size: 0.7rem;
    color: #94a3b8;
    font-weight: 500;
}

.mobile-total-value {
    font-size: 1.15rem;
    font-weight: 800;
    color: #1e293b;
}

.btn-mobile-checkout {
    background: var(--bs-primary);
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 10px 28px;
    font-size: 0.9rem;
    font-weight: 700;
    white-space: nowrap;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 14px rgba(var(--bs-primary-rgb), 0.35);
}

.btn-mobile-checkout:hover,
.btn-mobile-checkout:active {
    color: #fff;
    filter: brightness(1.1);
}

/* ---- PROMOTIONS LOADED STYLES ---- */
.bg-success-soft {
    background-color: rgba(16, 185, 129, 0.08) !important;
}

.bg-primary-soft {
    background-color: rgba(var(--bs-primary-rgb), 0.08) !important;
}

/* ---- DELETE MODAL STYLES ---- */
#deleteModal .modal-content {
    border: none;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

/* ---- RESPONSIVE TUNING ---- */
@media (max-width: 991px) {
    .cart-summary-sidebar {
        position: static;
    }
}

/* Extra small screens */
@media (max-width: 400px) {
    .cart-item-image {
        width: 85px;
        min-width: 85px;
    }
    .cart-item-image img {
        min-height: 85px;
    }
    .cart-item-details {
        padding: 8px 10px;
    }
    .cart-qty-btn {
        width: 26px;
        height: 26px;
    }
    .cart-qty-value {
        min-width: 20px;
        font-size: 0.78rem;
    }
    .price-current {
        font-size: 0.82rem;
    }
    .cart-item-name {
        font-size: 0.78rem;
    }
    .mobile-total-value {
        font-size: 1rem;
    }
    .btn-mobile-checkout {
        padding: 9px 20px;
        font-size: 0.82rem;
    }
}


/* ================================================================
   SECTION 2: CHECKOUT PAGE
   Matches cart page design system.
   ================================================================ */

/* ---- HEADER ---- */
.checkout-page-wrapper {
    min-height: 60vh;
    padding-bottom: 90px;
    background-color: var(--b2c-bg);
}

@media (min-width: 992px) {
    .checkout-page-wrapper { padding-bottom: 0; }
}

.checkout-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.checkout-icon-wrapper {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(var(--bs-primary-rgb), 0.1), rgba(var(--bs-primary-rgb), 0.05));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.checkout-icon-wrapper i {
    font-size: 1.5rem;
    color: var(--bs-primary);
}

.checkout-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: #1e293b;
}

.checkout-subtitle {
    font-size: 0.85rem;
    color: #64748b;
}

.btn-back-cart {
    background: #fff;
    color: #475569;
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 50px;
    padding: 8px 20px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    text-decoration: none;
}

.btn-back-cart:hover {
    background: var(--bs-primary);
    color: #fff;
    border-color: var(--bs-primary);
    transform: translateY(-1px);
}

@media (max-width: 575px) {
    .checkout-title { font-size: 1.15rem; }
    .checkout-icon-wrapper { width: 42px; height: 42px; border-radius: 10px; }
    .checkout-icon-wrapper i { font-size: 1.2rem; }
    .btn-back-cart { font-size: 0.78rem; padding: 6px 14px; }
}

/* ---- PROGRESS STEPS ---- */
.checkout-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 16px 0;
}

.checkout-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    position: relative;
    z-index: 1;
}

.step-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 3px solid transparent;
}

.checkout-step.active .step-icon {
    background: var(--bs-primary);
    color: #fff;
    border-color: rgba(var(--bs-primary-rgb), 0.2);
    box-shadow: 0 4px 14px rgba(var(--bs-primary-rgb), 0.3);
}

.checkout-step.completed .step-icon {
    background: #10b981;
    color: #fff;
    border-color: rgba(16, 185, 129, 0.2);
}

.step-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #94a3b8;
}

.checkout-step.active .step-label { color: var(--bs-primary); }
.checkout-step.completed .step-label { color: #10b981; }

.step-connector {
    flex: 1;
    max-width: 80px;
    height: 3px;
    background: #e2e8f0;
    margin: 0 8px;
    border-radius: 3px;
    align-self: center;
    margin-bottom: 22px;
}

.step-connector.completed {
    background: #10b981;
}

@media (max-width: 575px) {
    .step-icon { width: 36px; height: 36px; font-size: 0.95rem; }
    .step-label { font-size: 0.68rem; }
    .step-connector { max-width: 50px; margin-bottom: 20px; }
}

/* ---- ALERT ---- */
.checkout-alert {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
    font-size: 0.9rem;
}

/* ---- SECTIONS ---- */
.checkout-section {
    background: #fff;
    border-radius: 16px;
    border: 1px solid rgba(0,0,0,0.06);
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
    margin-bottom: 16px;
    overflow: hidden;
}

.checkout-section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 20px;
    border-bottom: 1px solid #f1f5f9;
}

.section-header-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(var(--bs-primary-rgb), 0.1), rgba(var(--bs-primary-rgb), 0.05));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: var(--bs-primary);
    flex-shrink: 0;
}

.section-header-icon.store-icon {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(16, 185, 129, 0.05));
    color: #10b981;
}

.section-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
}

.section-subtitle {
    font-size: 0.8rem;
    color: #64748b;
}

.checkout-section-body {
    padding: 20px;
}

@media (max-width: 575px) {
    .checkout-section-header { padding: 14px 16px; }
    .checkout-section-body { padding: 16px; }
    .section-header-icon { width: 34px; height: 34px; font-size: 0.95rem; }
    .section-title { font-size: 0.9rem; }
}

/* ---- ADDRESS SELECTION ---- */
.address-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.address-card {
    display: block;
    cursor: pointer;
    position: relative;
}

.address-radio { display: none; }

.address-card-content {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 12px;
    border: 2px solid #e2e8f0;
    background: #f8fafc;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.address-radio:checked + .address-card-content {
    border-color: var(--bs-primary);
    background: rgba(var(--bs-primary-rgb), 0.03);
    box-shadow: 0 0 0 3px rgba(var(--bs-primary-rgb), 0.1);
}

.address-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    flex-shrink: 0;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.address-radio:checked + .address-card-content .address-card-icon {
    background: var(--bs-primary);
    color: #fff;
}

.address-card-icon.new-icon {
    background: rgba(var(--bs-primary-rgb), 0.08);
    color: var(--bs-primary);
}

.address-card-details {
    flex: 1;
    min-width: 0;
}

.address-line {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.4;
}

.address-meta {
    font-size: 0.78rem;
    color: #64748b;
}

.address-default-badge {
    font-size: 0.65rem;
    font-weight: 700;
    background: rgba(var(--bs-primary-rgb), 0.08);
    color: var(--bs-primary);
    padding: 2px 8px;
    border-radius: 20px;
    white-space: nowrap;
}

.address-check-mark {
    color: #cbd5e1;
    font-size: 1.2rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.address-radio:checked + .address-card-content .address-check-mark {
    color: var(--bs-primary);
}

.no-address-notice {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #eff6ff;
    border-radius: 10px;
    color: #1d4ed8;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 16px;
}

.new-address-form {
    margin-top: 16px;
    padding: 20px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

/* ---- INPUTS ---- */
.checkout-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 6px;
}

.checkout-input {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.9rem;
    color: #1e293b;
    background: #fff;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
}

.checkout-input:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 3px rgba(var(--bs-primary-rgb), 0.1);
}

.checkout-input::placeholder {
    color: #94a3b8;
}

.checkout-textarea {
    resize: vertical;
    min-height: 80px;
}

/* ---- ORDER ITEMS ---- */
.checkout-items-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.checkout-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.checkout-item:hover {
    background: #f1f5f9;
}

.checkout-item-img {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: #e2e8f0;
}

.checkout-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.checkout-item-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 1.2rem;
}

.checkout-item-details {
    flex: 1;
    min-width: 0;
}

.checkout-item-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.checkout-item-sku {
    font-size: 0.7rem;
    color: #94a3b8;
}

.checkout-item-qty {
    font-size: 0.78rem;
    color: #64748b;
}

.checkout-item-price {
    text-align: left;
    flex-shrink: 0;
}

.checkout-item-total {
    display: block;
    font-size: 0.88rem;
    font-weight: 700;
    color: #1e293b;
    white-space: nowrap;
}

.checkout-item-unit {
    display: block;
    font-size: 0.68rem;
    color: #94a3b8;
    white-space: nowrap;
}

/* ---- STORE TOTAL ---- */
.checkout-store-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #f0fdf4;
    border-radius: 10px;
    border: 1px solid rgba(16, 185, 129, 0.15);
    margin-bottom: 16px;
    font-weight: 600;
    color: #065f46;
    font-size: 0.9rem;
}

.checkout-store-total-price {
    font-weight: 800;
    color: #10b981;
}

/* ---- PAYMENT METHODS ---- */
.checkout-payment-section {
    border-top: 1px solid #f1f5f9;
    padding-top: 16px;
}

.payment-section-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 12px;
}

.payment-methods-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.payment-method-card {
    display: block;
    cursor: pointer;
}

.payment-radio { display: none; }

.payment-method-content {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 10px;
    border: 2px solid #e2e8f0;
    background: #f8fafc;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.payment-radio:checked + .payment-method-content {
    border-color: var(--bs-primary);
    background: rgba(var(--bs-primary-rgb), 0.03);
    box-shadow: 0 0 0 3px rgba(var(--bs-primary-rgb), 0.08);
}

.payment-method-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    flex-shrink: 0;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.payment-radio:checked + .payment-method-content .payment-method-icon {
    background: var(--bs-primary);
    color: #fff;
}

.payment-method-name {
    flex: 1;
    font-size: 0.88rem;
    font-weight: 600;
    color: #1e293b;
}

.payment-check-mark {
    color: #cbd5e1;
    font-size: 1.1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.payment-radio:checked + .payment-method-content .payment-check-mark {
    color: var(--bs-primary);
}

.checkout-alert-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #fffbeb;
    border-radius: 10px;
    color: #92400e;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid #fde68a;
}

/* ---- TRANSACTION VERIFICATION ---- */
.checkout-transaction-section {
    margin-top: 14px;
}

.transaction-box {
    padding: 16px;
    background: #f0f9ff;
    border-radius: 10px;
    border: 1px solid #bae6fd;
}

.transaction-input-group {
    display: flex;
    gap: 8px;
}

.transaction-input-group .checkout-input {
    flex: 1;
}

.btn-verify {
    background: var(--bs-primary);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 10px 18px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 4px;
}

.btn-verify:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.btn-verify:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.verification-message {
    margin-top: 8px;
    font-size: 0.82rem;
    font-weight: 500;
}

/* ---- CHECKOUT SIDEBAR SUMMARY ---- */
.checkout-summary-sidebar {
    position: sticky;
    top: 20px;
}

.checkout-summary-card {
    background: #fff;
    border-radius: 16px;
    border: 1px solid rgba(0,0,0,0.06);
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
    overflow: hidden;
}

.checkout-summary-header {
    padding: 18px 20px;
    background: linear-gradient(135deg, #1e293b, #334155);
    color: #fff;
}

.checkout-summary-header h5 { color: #fff; }

.checkout-summary-body {
    padding: 20px;
}

.checkout-submit-section {
    margin-top: 20px;
}

.btn-checkout-submit {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

.btn-checkout-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.45);
    color: #fff;
}

.btn-checkout-submit:active {
    transform: translateY(0);
}

/* ---- TRUST BADGES (CHECKOUT) ---- */
.checkout-trust-badges {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #f1f5f9;
}

.trust-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 0.68rem;
    color: #94a3b8;
    font-weight: 500;
}

.trust-badge i {
    font-size: 1.1rem;
    color: #10b981;
}

/* ---- MOBILE STICKY BAR (CHECKOUT) ---- */
.mobile-checkout-bar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    max-width: 600px;
    margin: 0 auto;
}

.mobile-checkout-label {
    font-size: 0.72rem;
    color: #64748b;
    font-weight: 500;
}

.mobile-checkout-price {
    font-size: 1.1rem;
    font-weight: 800;
    color: #1e293b;
}

.btn-mobile-checkout-submit {
    flex: 1;
    max-width: 200px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
    white-space: nowrap;
}

.btn-mobile-checkout-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(16, 185, 129, 0.45);
}

/* ---- EXTRA SMALL SCREENS (CHECKOUT) ---- */
@media (max-width: 400px) {
    .checkout-item-img { width: 40px; height: 40px; }
    .checkout-item-name { font-size: 0.78rem; }
    .checkout-item-total { font-size: 0.82rem; }
    .address-line { font-size: 0.82rem; }
    .payment-method-name { font-size: 0.82rem; }
    .payment-method-icon { width: 32px; height: 32px; font-size: 0.9rem; }
    .mobile-checkout-price { font-size: 1rem; }
    .btn-mobile-checkout-submit { font-size: 0.82rem; padding: 10px 16px; }
}

/* ================================================================
   SECTION 5: QUICK VIEW MODAL
   Premium product preview modal.
   ================================================================ */

/* Modal Override */
#productQuickViewModal .modal-content {
    border: none;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.15);
}

#productQuickViewModal .modal-dialog {
    max-width: 820px;
}

.qv-modal-inner {
    position: relative;
}

.qv-close-btn {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 10;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(0,0,0,0.06);
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.qv-close-btn:hover {
    background: #fff;
    color: #ef4444;
    transform: scale(1.1);
}

/* Image Section */
.qv-image-section {
    padding: 20px;
    background: #f8fafc;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.qv-main-image {
    position: relative;
    width: 100%;
    aspect-ratio: 1/1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

.qv-main-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.4s ease;
}

.qv-main-image:hover img {
    transform: scale(1.05);
}

.qv-discount-badge {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.qv-thumbnails {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 4px;
}

.qv-thumbnails::-webkit-scrollbar { display: none; }

.qv-thumb {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.qv-thumb:hover, .qv-thumb.active {
    border-color: var(--bs-primary, #3b82f6);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(var(--bs-primary-rgb, 59, 130, 246), 0.2);
}

.qv-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Info Section */
.qv-info-section {
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-height: 500px;
    overflow-y: auto;
}

.qv-category-badge {
    display: inline-block;
    padding: 4px 14px;
    background: #eff6ff;
    color: #2563eb;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    width: fit-content;
}

.qv-product-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: #1e293b;
    line-height: 1.4;
    margin: 0;
}

.qv-price-block {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.qv-price-current {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--bs-primary, #3b82f6);
}

.qv-price-old {
    font-size: 1rem;
    color: #94a3b8;
    text-decoration: line-through;
}

.qv-save-badge {
    padding: 3px 10px;
    background: #fef2f2;
    color: #ef4444;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
}

.qv-stock-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    width: fit-content;
}

.qv-stock-status.in-stock {
    background: #f0fdf4;
    color: #15803d;
}

.qv-stock-status.out-of-stock {
    background: #fef2f2;
    color: #dc2626;
}

.qv-description {
    font-size: 0.88rem;
    color: #64748b;
    line-height: 1.7;
    padding: 12px 0;
    border-top: 1px solid #f1f5f9;
}

/* Variants in QV */
.qv-section-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: #334155;
    margin: 0 0 10px;
    display: flex;
    align-items: center;
}

.qv-variants-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.qv-variant-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px solid #f1f5f9;
    transition: all 0.2s;
}

.qv-variant-row:hover {
    background: #f1f5f9;
    border-color: #e2e8f0;
}

.qv-variant-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.qv-variant-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: #1e293b;
    white-space: normal;
    word-break: break-word;
}

.qv-variant-stock {
    font-size: 0.7rem;
    color: #10b981;
}

.qv-variant-price {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--bs-primary, #3b82f6);
    white-space: nowrap;
}

.qv-variant-qty {
    flex-shrink: 0;
}

/* Actions */
.qv-actions {
    padding-top: 8px;
    border-top: 1px solid #f1f5f9;
}

.qv-btn-details {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 12px;
    background: var(--gradient-blue, linear-gradient(135deg, #0c4caa 0%, #3b82f6 100%));
    color: #fff;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(var(--bs-primary-rgb, 59, 130, 246), 0.3);
}

.qv-btn-details:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(var(--bs-primary-rgb, 59, 130, 246), 0.4);
}

/* Quick View Button on Product Card */
.qv-trigger-btn {
    position: absolute;
    top: 80px;
    left: 8px;
    z-index: 10;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(4px);
    color: #64748b;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.75rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s;
    opacity: 0;
    transform: scale(0.8);
}

.product-card:hover .qv-trigger-btn,
.product-card.mobile-active .qv-trigger-btn {
    opacity: 1;
    transform: scale(1);
}

@media (hover: none), (max-width: 768px) {
    .qv-trigger-btn { opacity: 1 !important; transform: scale(1) !important; }
}

.qv-trigger-btn:hover {
    background: var(--bs-primary, #3b82f6);
    color: #fff;
    transform: scale(1.12) !important;
    box-shadow: 0 4px 12px rgba(var(--bs-primary-rgb, 59, 130, 246), 0.35);
}

/* Compare Button on Product Card */
.compare-toggle-btn {
    position: absolute;
    top: 46px;
    left: 8px;
    z-index: 10;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(4px);
    color: #94a3b8;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.75rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    transition: all 0.3s;
    opacity: 0;
    transform: scale(0.8);
}

.product-card:hover .compare-toggle-btn,
.product-card.mobile-active .compare-toggle-btn {
    opacity: 1;
    transform: scale(1);
}

@media (hover: none), (max-width: 768px) {
    .compare-toggle-btn { opacity: 1 !important; transform: scale(1) !important; }
}

.compare-toggle-btn:hover {
    background: #fff;
    color: var(--bs-primary, #3b82f6);
    transform: scale(1.15) !important;
}

.compare-toggle-btn.active {
    background: var(--bs-primary, #3b82f6);
    color: #fff;
    opacity: 1;
    transform: scale(1);
}

/* Mobile Quick View */
@media (max-width: 768px) {
    #productQuickViewModal .modal-dialog {
        margin: 0;
        max-width: 100%;
        min-height: auto;
    }
    
    #productQuickViewModal .modal-content {
        border-radius: 20px 20px 0 0;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        max-height: 90vh;
        overflow-y: auto;
    }

    .qv-image-section {
        padding: 12px;
    }
    
    .qv-main-image {
        aspect-ratio: 4/3;
    }

    .qv-info-section {
        padding: 20px 16px;
        max-height: none;
    }

    .qv-product-title {
        font-size: 1.1rem;
    }

    .qv-price-current {
        font-size: 1.3rem;
    }

    .qv-trigger-btn {
        width: 26px;
        height: 26px;
        font-size: 0.65rem;
        top: 70px;
        left: 6px;
    }
    
    .compare-toggle-btn {
        width: 26px;
        height: 26px;
        font-size: 0.65rem;
        top: 40px;
        left: 6px;
    }
}


/* ================================================================
   SECTION 6: RECENTLY VIEWED PRODUCTS
   Horizontal scroller for recently viewed items.
   ================================================================ */

.rv-section {
    margin-bottom: 2rem;
}

.rv-scroller {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 8px 4px 16px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-snap-type: x mandatory;
}

.rv-scroller::-webkit-scrollbar { display: none; }

.rv-card {
    flex-shrink: 0;
    width: 130px;
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    border: 1px solid rgba(0,0,0,0.04);
    transition: all 0.3s;
    scroll-snap-align: start;
}

.rv-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    border-color: rgba(0,0,0,0.08);
}

.rv-card-img {
    width: 100%;
    aspect-ratio: 1/1;
    overflow: hidden;
    background: #f8fafc;
}

.rv-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.rv-card:hover .rv-card-img img {
    transform: scale(1.05);
}

.rv-card-info {
    padding: 8px 10px 10px;
    text-align: center;
}

.rv-card-name {
    font-size: 0.72rem;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 4px;
}

.rv-card-price {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--bs-primary, #3b82f6);
}

@media (max-width: 768px) {
    .rv-card {
        width: 110px;
    }
    .rv-card-name {
        font-size: 0.68rem;
    }
}


/* ================================================================
   SECTION 7: COMPARE PRODUCTS
   Floating bar and compare page.
   ================================================================ */

/* Floating Comparison Bar */
.compare-floating-bar {
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1035;
    transition: bottom 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    width: auto;
    max-width: 90%;
}

.compare-floating-bar.visible {
    bottom: 90px;
}

@media (min-width: 992px) {
    .compare-floating-bar.visible {
        bottom: 30px;
    }
}

.compare-bar-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(12px);
    padding: 10px 16px;
    border-radius: 50px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.25);
}

.compare-bar-items {
    display: flex;
    gap: 6px;
}

.compare-bar-item {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid rgba(255,255,255,0.2);
    flex-shrink: 0;
}

.compare-bar-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.compare-item-remove {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ef4444;
    color: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.55rem;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s;
}

.compare-bar-item:hover .compare-item-remove {
    opacity: 1;
}

.compare-bar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.compare-bar-count {
    color: rgba(255,255,255,0.7);
    font-size: 0.78rem;
    font-weight: 500;
    white-space: nowrap;
}

.compare-bar-btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 18px;
    background: var(--bs-primary, #3b82f6);
    color: #fff;
    border-radius: 25px;
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
}

.compare-bar-btn:hover {
    color: #fff;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(var(--bs-primary-rgb, 59, 130, 246), 0.4);
}

.compare-bar-clear {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.6);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.8rem;
}

.compare-bar-clear:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

/* Compare Page */
.compare-page-wrapper {
    min-height: 60vh;
    background: #f8fafc;
    padding: 20px 0 40px;
}

.compare-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.compare-table {
    min-width: 600px;
}

.compare-product-col {
    min-width: 200px;
    max-width: 250px;
    padding: 16px;
    text-align: center;
    vertical-align: top;
}

.compare-product-img {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: contain;
    border-radius: 12px;
    background: #fff;
    border: 1px solid #f1f5f9;
    margin-bottom: 12px;
}

.compare-product-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
    line-height: 1.4;
}

.compare-product-price {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--bs-primary, #3b82f6);
    margin-bottom: 12px;
}

.compare-remove-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    background: #fef2f2;
    color: #ef4444;
    border: none;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.compare-remove-btn:hover {
    background: #ef4444;
    color: #fff;
}

.compare-attr-label {
    font-weight: 600;
    color: #64748b;
    font-size: 0.85rem;
    background: #f8fafc;
    padding: 12px 16px;
    position: sticky;
    right: 0;
    z-index: 2;
    border-left: 1px solid #e2e8f0;
    white-space: nowrap;
}

.compare-attr-value {
    padding: 12px 16px;
    font-size: 0.85rem;
    color: #334155;
    text-align: center;
    border-bottom: 1px solid #f1f5f9;
}

/* Product Card Sort/Filter Toolbar */
.products-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.sort-dropdown {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s;
}

.sort-dropdown:hover {
    border-color: var(--bs-primary, #3b82f6);
    color: var(--bs-primary, #3b82f6);
}

.products-count-badge {
    font-size: 0.82rem;
    color: #64748b;
    font-weight: 500;
}

/* --- Skeleton Loading System --- */
@keyframes skeleton-shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.skeleton-box {
    display: inline-block;
    height: 1em;
    position: relative;
    overflow: hidden;
    background-color: #f1f5f9;
    border-radius: 4px;
}

.skeleton-box::after {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    transform: translateX(-100%);
    background-image: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0,
        rgba(255, 255, 255, 0.2) 20%,
        rgba(255, 255, 255, 0.5) 60%,
        rgba(255, 255, 255, 0)
    );
    animation: skeleton-shimmer 2s infinite;
    content: '';
}

.skeleton-img { width: 100%; height: 100%; border-radius: 12px; }
.skeleton-text { width: 100%; height: 14px; margin-bottom: 8px; }
.skeleton-text.short { width: 40%; }
.skeleton-text.medium { width: 70%; }
.skeleton-title { height: 24px; margin-bottom: 12px; border-radius: 6px; }
.skeleton-avatar { width: 48px; height: 48px; border-radius: 50%; }
.skeleton-price { width: 60px; height: 20px; }

/* Product Card Skeleton Specifics */
.product-card.is-loading .product-image { opacity: 0; }
.product-card.is-loading .skeleton-box { display: block; }
.product-card.is-loading .product-title,
.product-card.is-loading .price-container,
.product-card.is-loading .product-image-container {
    visibility: hidden;
}

.product-card.is-loading .product-image-container::before {
    content: '';
    position: absolute;
    inset: 0;
    background: #f1f5f9;
    z-index: 1;
}

.product-image-container.skeleton {
    background: #f1f5f9;
    overflow: hidden;
}

.product-image-container.skeleton::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0,
        rgba(255, 255, 255, 0.2) 20%,
        rgba(255, 255, 255, 0.5) 60%,
        rgba(255, 255, 255, 0)
    );
    animation: skeleton-shimmer 2s infinite;
}
