/* --- UI/UX SIMULATION: COMPONENT LIBRARY --- */

/* 1. MOBILE BOTTOM NAVIGATION */
.mobile-bottom-nav {
    display: none;
    /* Hidden on desktop */
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--white);
    border-top: 1px solid var(--light);
    box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.05);
    z-index: 9999;
    padding-bottom: env(safe-area-inset-bottom);
    transform: translate3d(0, 0, 0);
    will-change: transform;
}

.nav-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    height: 60px;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #64748b;
    font-size: 13px;
    transition: color 0.2s ease, transform 0.2s ease;
}

.nav-item:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: -5px;
    border-radius: 8px;
}

.nav-item i {
    font-size: 20px;
    margin-bottom: 4px;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.nav-item.active {
    color: #2563eb;
    /* Primary Blue */
    font-weight: 600;
}

.nav-item.active i {
    transform: translateY(-2px);
}

.nav-badge-wrapper {
    position: relative;
}

.nav-badge {
    position: absolute;
    top: -5px;
    right: -8px;
    background: #ef4444;
    color: white;
    font-size: 13px;
    font-weight: bold;
    min-width: 16px;
    height: 16px;
    border-radius: 99px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
}

/* 2. SKELETON LOADING ANIMATION */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #f8f8f8 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
    color: transparent !important;
}

.skeleton-text {
    height: 1em;
    margin-bottom: 0.5em;
    width: 80%;
}

.skeleton-rect {
    width: 100%;
    height: 100%;
    display: block;
}

.skeleton-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}


/* 3. MICRO-INTERACTIONS & ANIMATIONS */

/* Add to Cart Bounce */
@keyframes cartBounce {
    0% {
        transform: scale(1);
    }

    30% {
        transform: scale(1.2);
    }

    50% {
        transform: scale(0.9);
    }

    100% {
        transform: scale(1);
    }
}

.animate-bounce {
    animation: cartBounce 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Toast Notification */
.toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 12000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    width: 100%;
    align-items: center;
}

.toast {
    background: var(--white);
    color: var(--dark);
    padding: 12px 20px;
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 12px;
    width: 90vw;
    max-width: 350px;
    transform: translateY(-20px);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55), opacity 0.3s ease;
    pointer-events: auto;
    border-left: 4px solid #2563eb;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast.success {
    border-left-color: #22c55e;
}

.toast.error {
    border-left-color: #ef4444;
}


/* 4. EMPTY STATES */
.empty-state-modern {
    text-align: center;
    padding: 60px 20px;
}

.empty-state-icon {
    font-size: 64px;
    color: var(--gray);
    margin-bottom: 24px;
    animation: float 3s ease-in-out infinite;
}

.empty-state-modern h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 8px;
}

.empty-state-modern p {
    color: #64748b;
    margin-bottom: 24px;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

/* 5. SMART CART & CHECKOUT */
.cart-group {
    background: var(--white);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
    border: 1px solid var(--light);
}

.cart-group-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--light);
    margin-bottom: 15px;
    font-weight: 700;
    color: var(--dark);
}

.sticky-cart-footer {
    display: none;
    position: fixed;
    bottom: 60px;
    /* Above bottom nav */
    left: 0;
    width: 100%;
    background: var(--white);
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.05);
    padding: 15px 20px;
    z-index: 999;
    border-top: 1px solid var(--light);
    align-items: center;
    justify-content: space-between;
}

.trust-badges {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
    opacity: 0.8;
}

.trust-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 13px;
    color: #64748b;
    gap: 5px;
}

/* 6. GROWTH PACK: LOYALTY & PRIVACY */
.loyalty-badge {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.loyalty-badge:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 6px -1px rgba(245, 158, 11, 0.2);
}

.privacy-section {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    margin-top: 30px;
}

.privacy-warning {
    color: #ef4444;
    font-size: 16px;
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 7. CONSOLIDATED RESPONSIVE OVERRIDES */
@media (max-width: 768px) {

    /* Bottom Navigation Display */
    .mobile-bottom-nav {
        display: block;
    }

    /* Sticky Cart Footer Display */
    .sticky-cart-footer {
        display: flex;
    }

    /* Layout Adjustments */
    body {
        padding-bottom: 70px;
    }

    .cart-summary {
        display: none;
        /* Hide default sidebar summary on mobile */
    }

    .cart-section {
        padding-bottom: 80px;
        /* Space for sticky footer */
    }
}

/* 8. COMMON MOBILE COMPATIBILITY FIXES */
.glass {
    background: rgba(255, 255, 255, 0.7) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

svg {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
}

/* 9. PDP PREMIUM GRID & UTILITIES */
.pdp-main-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

@media (max-width: 992px) {
    .pdp-main-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
}

.fade-in {
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Star Rating Colors */
.fa-star.filled {
    color: #f59e0b;
}

/* Buying Context */
.buying-box .btn-buy:hover {
    filter: brightness(1.1);
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.2);
}

/* 10. CART PREMIUM STYLES */
.cart-progress-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    position: relative;
}

.cart-progress-steps::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: #e2e8f0;
    z-index: 1;
    transform: translateY(-50%);
}

.step-item {
    position: relative;
    z-index: 2;
    background: #fff;
    padding: 0 15px;
    text-align: center;
}

.step-circle {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    font-weight: 600;
    color: #64748b;
    transition: all 0.3s ease;
}

.step-item.active .step-circle {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
    box-shadow: 0 0 0 5px rgba(var(--primary-rgb), 0.1);
}

.step-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #64748b;
}

.step-item.active .step-label {
    color: var(--slate-900);
    font-weight: 600;
}

.cart-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 30px;
}

@media (max-width: 1024px) {
    .cart-grid {
        grid-template-columns: 1fr;
    }
}

.cart-card {
    background: #fff;
    border-radius: 16px;
    border: 1px solid #f1f5f9;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.cart-item-row {
    display: grid;
    grid-template-columns: 100px 1fr auto;
    gap: 20px;
    padding: 20px;
    border-bottom: 1px solid #f1f5f9;
    align-items: center;
    transition: background 0.2s ease;
}

.cart-item-row:last-child {
    border-bottom: none;
}

.cart-item-img {
    width: 100px;
    height: 100px;
    border-radius: 12px;
    object-fit: cover;
    background: #f8fafc;
}

.cart-item-info h4 {
    margin: 0 0 5px 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.variant-badge {
    display: inline-block;
    padding: 2px 8px;
    background: #f1f5f9;
    color: #64748b;
    font-size: 0.75rem;
    border-radius: 6px;
    margin-right: 5px;
}

.qty-control {
    display: flex;
    align-items: center;
    background: #f8fafc;
    border-radius: 100px;
    padding: 4px;
    width: fit-content;
}

.qty-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: #fff;
    color: var(--slate-600);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.qty-btn:hover {
    background: var(--primary-color);
    color: #fff;
}

.qty-input {
    width: 40px;
    text-align: center;
    border: none;
    background: transparent;
    font-weight: 600;
    pointer-events: none;
}

.item-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 15px;
}

.item-price {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--slate-900);
}

.summary-sidebar {
    position: sticky;
    top: 100px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    color: #64748b;
}

.summary-total {
    border-top: 1px dashed #e2e8f0;
    margin-top: 15px;
    padding-top: 15px;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--slate-900);
}

.empty-cart-state {
    padding: 80px 20px;
    text-align: center;
}

.empty-illustration {
    font-size: 5rem;
    color: #e2e8f0;
    margin-bottom: 20px;
}