@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700&display=swap');

:root {
    --primary: #0369a1; /* Deep Sky Blue */
    --primary-light: #0ea5e9; /* Bright Sky Blue */
    --accent-orange: #f97316; /* Vivid Orange */
    --accent-magenta: #ec4899; /* Hot Pink/Magenta */
    --accent-yellow: #eab308; /* Bold Yellow */
    --dark: #0f172a;
    --light: #ffffff;
    --bg-alt: #f1f5f9;
    --glass: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.6);
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --hero-text: #ffffff;
    --hero-shadow: 0 2px 20px rgba(0,0,0,0.5);
}



* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--light);
    color: var(--dark);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInRight {
    from { transform: translateX(100px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

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

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: var(--transition);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Scrollable Container */
#app {
    width: 100%;
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.5rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
    background: linear-gradient(to bottom, rgba(0,0,0,0.55), transparent);
}

nav.scrolled {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(16px);
    padding: 1rem 5%;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

nav.scrolled .logo {
    color: var(--primary);
    text-shadow: none;
}



.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

nav.scrolled .logo {
    color: var(--primary);
    text-shadow: none;
}

.logo img {
    height: 40px;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: rgba(255,255,255,0.92);
    font-weight: 600;
    transition: var(--transition);
    position: relative;
    text-shadow: 0 1px 6px rgba(0,0,0,0.4);
    letter-spacing: 0.3px;
}

nav.scrolled .nav-links a {
    color: var(--dark);
    text-shadow: none;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-orange);
    transition: var(--transition);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    gap: 1.8rem;
    align-items: center;
}

#auth-status {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.menu-btn {
    display: none;
    font-size: 1.5rem;
    color: white;
    cursor: pointer;
    transition: var(--transition);
}

nav.scrolled .menu-btn {
    color: var(--dark);
}


.cart-icon {
    position: relative;
    cursor: pointer;
    color: #ffffff;
    font-size: 1.2rem;
    text-shadow: 0 1px 6px rgba(0,0,0,0.4);
}

nav.scrolled .cart-icon {
    color: var(--dark);
    text-shadow: none;
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -10px;
    background: var(--accent-magenta);
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 50%;
}

/* Auth Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal-overlay.open {
    opacity: 1;
    visibility: visible;
}

.auth-modal {
    background: white;
    padding: 40px;
    border-radius: 20px;
    width: 100%;
    max-width: 400px;
    text-align: center;
}

/* Hero Section */
.hero {
    height: 100vh;
    background:
        linear-gradient(135deg, rgba(3, 105, 161, 0.82) 0%, rgba(15, 23, 42, 0.75) 60%, rgba(249, 115, 22, 0.45) 100%),
        url('/assets/hero.png');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0 10%;
    color: #ffffff;
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 120px;
    background: linear-gradient(transparent, #ffffff);
    pointer-events: none;
}

.hero-content {
    max-width: 700px;
    animation: fadeIn 1s ease-out;
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 4.5rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: #ffffff;
    text-shadow: 0 4px 24px rgba(0,0,0,0.45);
}

.hero h1 span {
    background: linear-gradient(90deg, #fbbf24, var(--accent-orange));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 8px rgba(249,115,22,0.5));
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    color: rgba(255,255,255,0.88);
    font-weight: 500;
    text-shadow: 0 2px 12px rgba(0,0,0,0.35);
    max-width: 560px;
}

.btn {
    padding: 1rem 2.5rem;
    border-radius: 50px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: inline-block;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(90deg, var(--accent-orange), var(--accent-magenta));
    color: white;
    box-shadow: 0 8px 24px rgba(249, 115, 22, 0.5), 0 0 0 0 rgba(249,115,22,0);
    font-size: 1rem;
}

.btn-primary:hover {
    transform: translateY(-5px) scale(1.03);
    box-shadow: 0 16px 36px rgba(249, 115, 22, 0.55);
}

/* Categories Section */
.categories {
    padding: 100px 5%;
    background: white;
}

/* Hero secondary button */
.hero .btn:not(.btn-primary) {
    border: 2px solid rgba(255,255,255,0.75);
    color: #ffffff;
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(6px);
}

.hero .btn:not(.btn-primary):hover {
    background: rgba(255,255,255,0.22);
    border-color: #ffffff;
    transform: translateY(-4px);
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 2.8rem;
    color: var(--dark);
    margin-bottom: 15px;
    font-weight: 700;
}

.section-title p {
    color: #475569;
    font-size: 1.05rem;
    max-width: 500px;
    margin: 0 auto;
}

.section-title .underline {
    width: 80px;
    height: 4px;
    background: var(--accent-orange);
    margin: 0 auto;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.category-card {
    position: relative;
    height: 400px;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.category-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.category-card:hover img {
    transform: scale(1.1);
}

.category-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 40px 30px;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
}

/* Shop Location Styles (Desktop) */
.shop-location-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 60px;
    align-items: center;
    background: white;
    border-radius: 40px;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(15, 23, 42, 0.08);
    margin: 40px 0;
    border: 1px solid #f1f5f9;
}

.shop-image-wrap {
    height: 500px;
    overflow: hidden;
    position: relative;
}

.shop-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.shop-image-wrap:hover img {
    transform: scale(1.08);
}

.shop-details {
    padding: 60px;
}

.shop-details h3 {
    font-size: 2.2rem;
    color: var(--primary);
    margin-bottom: 20px;
    font-weight: 800;
}

.shop-details p {
    color: #64748b;
    line-height: 1.8;
    font-size: 1.1rem;
    margin-bottom: 25px;
}

/* Admin Panel Styles */
#admin-panel {
    background: #f1f5f9;
    min-height: 100vh;
    padding: 50px 5%;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.admin-card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.inventory-table {
    width: 100%;
    border-collapse: collapse;
}

.inventory-table th, .inventory-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.inventory-table th {
    background: #f8fafc;
    color: var(--primary);
}

.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-instock { background: #dcfce7; color: #166534; }
.status-low { background: #fef9c3; color: #854d0e; }
.status-out { background: #fee2e2; color: #991b1b; }

/* Cart Drawer */
.drawer {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: white;
    z-index: 2000;
    box-shadow: -10px 0 30px rgba(0,0,0,0.1);
    transition: var(--transition);
    padding: 30px;
    display: flex;
    flex-direction: column;
}

.drawer.open {
    right: 0;
}

.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.cart-item {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e2e8f0;
}

.cart-item img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 10px;
}

.cart-footer {
    margin-top: auto;
    padding-top: 30px;
    border-top: 2px solid #e2e8f0;
}

/* Footer */
footer {
    background: var(--primary);
    color: white;
    padding: 80px 5% 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 50px;
    margin-bottom: 50px;
}

.footer-col h4 {
    margin-bottom: 25px;
    font-size: 1.2rem;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul li a {
    color: #94a3b8;
    text-decoration: none;
    transition: var(--transition);
}

.footer-col ul li a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 40px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: #94a3b8;
    font-size: 0.9rem;
}

/* Overlay */
#overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0,0,0,0.5);
    z-index: 1500;
    display: none;
}

#overlay.active {
    display: block;
}

/* Modal Styles */
.modal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 3000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    overflow-y: auto;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background-color: white;
    padding: 30px;
    border-radius: 24px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh; /* Don't exceed screen height */
    overflow-y: auto; /* Enable internal scrolling */
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: modalSlideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    margin: auto;
}

@keyframes modalSlideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 15px;
}

.close-modal {
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    color: #64748b;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark);
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-toggle {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    color: #64748b;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, color 0.2s;
    user-select: none;
    z-index: 2;
}

.password-toggle:hover {
    color: var(--primary);
    transform: scale(1.15);
}

/* Login Page Styles */
.login-container {
    max-width: 400px;
    margin: 150px auto;
    padding: 40px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    text-align: center;
}

.login-container h2 {
    margin-bottom: 30px;
    color: var(--primary);
}

.auth-btn {
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}

.auth-btn-login {
    color: var(--primary);
    border: 1px solid var(--primary);
    margin: 0 !important; /* Override inline margins */
}

.auth-btn-login:hover {
    background: var(--primary);
    color: white;
}





/* Responsive */
@media (max-width: 992px) {
    .nav-links { gap: 1.5rem; }
    .hero h1 { font-size: 3.5rem; }
}

@media (max-width: 768px) {
    .hero {
        padding: 0 5%;
        justify-content: center;
        text-align: center;
    }
    .hero h1 { font-size: 2.8rem; }
    .hero p { font-size: 1.1rem; margin: 0 auto 2rem; }
    
    .nav-links { display: none; }
    .menu-btn { display: block; }
    
    .logo span { display: none; } /* Hide text logo on very small screens if needed */
    
    .nav-actions { gap: 1.4rem; }
    
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .category-card {
        height: 220px;
    }

    .category-overlay {
        padding: 20px 15px;
    }

    .category-overlay h3 {
        font-size: 1.1rem;
    }

    .product-card-img-wrap {
        height: 150px;
    }

    .product-card-body {
        padding: 10px;
    }

    .product-card-title {
        font-size: 0.9rem;
        font-weight: 700;
        height: 2.8em;
        line-height: 1.4;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        margin-bottom: 4px;
        color: var(--dark);
    }

    .product-card-desc {
        display: none;
    }

    .product-card-footer {
        margin-bottom: 10px;
        flex-wrap: wrap;
        gap: 4px;
    }

    .product-card-price {
        font-size: 1rem;
    }

    .product-card-stock {
        font-size: 0.65rem;
        padding: 2px 6px;
    }

    .product-card-badge {
        top: 8px;
        left: 8px;
        padding: 2px 8px;
        font-size: 0.6rem;
    }

    .product-card-actions {
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
    }

    .btn-outline-cart, .btn-buy {
        padding: 10px 8px !important;
        font-size: 0.85rem !important;
        width: 100% !important;
        border-radius: 30px !important; 
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 6px !important;
        height: auto !important;
    }

    .btn-outline-cart i, .btn-buy i {
        font-size: 0.9rem !important;
    }

    .drawer { width: 100%; right: -100%; }

    .admin-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .inventory-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    /* Shop Location Styles */
    .shop-location-grid {
        grid-template-columns: 1fr;
        gap: 0;
        margin: 20px 0;
        border-radius: 24px;
        box-shadow: 0 10px 25px rgba(0,0,0,0.06);
    }

    .shop-image-wrap {
        height: 250px;
        border-radius: 24px 24px 0 0;
    }

    .shop-details {
        padding: 25px 20px;
    }

    .shop-details h3 {
        font-size: 1.5rem;
        margin-bottom: 12px;
    }

    .shop-details p {
        font-size: 0.95rem;
        margin-bottom: 18px;
    }

    .shop-details {
        padding: 20px;
    }

    .shop-details h3 {
        font-size: 2rem;
        color: var(--primary);
        margin-bottom: 15px;
    }

    .shop-details p {
        color: #475569;
        margin-bottom: 20px;
    }
}

@media (min-width: 769px) {
    .shop-location-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 50px;
        align-items: center;
    }
    .shop-image-wrap {
        height: 450px;
    }
}



/* Mobile Menu Drawer */
.mobile-menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 85%;
    max-width: 350px;
    height: 100vh;
    background: white;
    z-index: 5000;
    transition: var(--transition);
    padding: 30px;
    display: flex;
    flex-direction: column;
    box-shadow: 10px 0 30px rgba(0,0,0,0.1);
}

.mobile-menu.active {
    left: 0;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.mobile-menu-header .logo {
    color: var(--primary);
    text-shadow: none;
}

#menu-close {
    font-size: 1.5rem;
    color: var(--dark);
    cursor: pointer;
}

.mobile-nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.mobile-nav-links a {
    text-decoration: none;
    color: var(--dark);
    font-size: 1.2rem;
    font-weight: 600;
    transition: var(--transition);
}

.mobile-nav-links a:hover {
    color: var(--primary);
    padding-left: 10px;
}

.mobile-menu-footer {
    margin-top: auto;
    text-align: center;
    color: #94a3b8;
    font-size: 0.9rem;
}


/* ===================== PRODUCT CARDS ===================== */
.product-card {
    background: white;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.07);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 40px rgba(3, 105, 161, 0.15);
}

.product-card-img-wrap {
    position: relative;
    height: 240px;
    overflow: hidden;
}

.product-card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.product-card:hover .product-card-img-wrap img {
    transform: scale(1.07);
}

.product-card-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    background: var(--accent-orange);
    color: white;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 12px;
    border-radius: 20px;
}

.product-card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 8px;
}

.product-card-desc {
    font-size: 0.875rem;
    color: #64748b;
    line-height: 1.5;
    flex: 1;
    margin-bottom: 14px;
}

.product-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.product-card-price {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--primary);
}

.product-card-stock {
    font-size: 0.78rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
}

.in-stock  { background: #dcfce7; color: #15803d; }
.low-stock { background: #fef9c3; color: #a16207; }
.out-stock { background: #fee2e2; color: #b91c1c; }

.product-card-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

/* Outline "Add to Cart" button */
.btn-outline-cart {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0.65rem 1rem;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.btn-outline-cart:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

/* Buy Now button */
.btn-buy {
    padding: 0.65rem 1rem;
    font-size: 0.85rem;
    border-radius: 50px;
}

/* ===================== PRODUCT DETAIL MODAL ===================== */
#product-detail-modal {
    display: none;
    position: fixed;
    z-index: 4000;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(6px);
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.25s ease;
}

.product-detail-content {
    background: white;
    border-radius: 24px;
    width: 100%;
    max-width: 860px;
    max-height: 90vh;
    overflow-y: auto;
    display: grid;
    grid-template-columns: 1fr;
    position: relative;
    box-shadow: 0 30px 80px rgba(0,0,0,0.25);
    animation: fadeIn 0.3s ease;
}

.detail-img-wrap {
    width: 100%;
    height: 320px;
    border-radius: 24px 24px 0 0;
    overflow: hidden;
}

.detail-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-info {
    padding: 30px 35px 35px;
}

.detail-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 8px;
    line-height: 1.2;
}

.detail-price {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 10px;
}

.detail-desc {
    font-size: 1rem;
    color: #475569;
    line-height: 1.7;
    margin-bottom: 20px;
}

.detail-divider {
    border: none;
    border-top: 1px solid #e2e8f0;
    margin: 20px 0;
}

.detail-meta {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}

.meta-label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #94a3b8;
    font-weight: 600;
    margin-bottom: 4px;
}

.meta-value {
    display: block;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--dark);
}

.detail-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.product-detail-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(4px);
    color: var(--dark);
    font-size: 1rem;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
    transition: var(--transition);
}

.product-detail-close:hover {
    background: #fee2e2;
    color: #b91c1c;
    transform: scale(1.1);
}

@media (min-width: 640px) {
    .product-detail-content {
        grid-template-columns: 1fr 1fr;
    }
    .detail-img-wrap {
        height: 100%;
        min-height: 380px;
        border-radius: 24px 0 0 24px;
    }
}

/* ===================== ANIMATIONS ===================== */
@keyframes rippleAnim {
    to { transform: scale(1); opacity: 0; }
}

@keyframes badgeBounce {
    0%   { transform: scale(1); }
    40%  { transform: scale(1.5); }
    70%  { transform: scale(0.85); }
    100% { transform: scale(1); }
}

@keyframes toastSlideUp {
    from { opacity: 0; transform: translateY(20px) scale(0.95); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toastFadeOut {
    from { opacity: 1; transform: translateY(0) scale(1); }
    to   { opacity: 0; transform: translateY(10px) scale(0.95); }
}

.cart-badge.bounce { animation: badgeBounce 0.55s ease; }

/* Toast notification */
.cart-toast {
    background: white;
    border-radius: 14px;
    padding: 14px 20px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0;
    min-width: 260px;
    border-left: 4px solid var(--primary);
    transition: opacity 0.35s ease, transform 0.35s ease;
    transform: translateY(20px) scale(0.95);
}
.cart-toast.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* ===================== CHECKOUT MODAL ===================== */
.checkout-box {
    background: white;
    border-radius: 24px;
    width: 100%;
    max-width: 520px;
    max-height: 92vh;
    overflow-y: auto;
    padding: 36px 36px 32px;
    position: relative;
    box-shadow: 0 30px 80px rgba(0,0,0,0.3);
    animation: fadeIn 0.3s ease;
}

.checkout-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 30px;
}

.step-dot {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    font-weight: 700;
    transition: all 0.3s ease;
    flex-shrink: 0;
}
.step-dot.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 16px rgba(3,105,161,0.35);
    transform: scale(1.12);
}
.step-dot.done {
    background: #22c55e;
    color: white;
}

.step-line {
    flex: 1;
    height: 3px;
    background: #e2e8f0;
    max-width: 60px;
    transition: background 0.3s ease;
}

.checkout-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 22px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.checkout-title i { color: var(--primary); }

.co-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Payment options */
.payment-options { display: flex; flex-direction: column; gap: 12px; }

.payment-option {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
}
.payment-option:hover {
    border-color: var(--primary);
    background: #f0f9ff;
    transform: translateX(4px);
}
.payment-option.selected {
    border-color: var(--primary);
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    box-shadow: 0 4px 16px rgba(3,105,161,0.15);
}
.pay-icon { font-size: 1.4rem; width: 28px; text-align: center; }
.pay-label { flex: 1; font-weight: 600; font-size: 0.95rem; color: var(--dark); }
.pay-check {
    color: #e2e8f0;
    font-size: 1.1rem;
    transition: color 0.2s;
}
.payment-option.selected .pay-check { color: var(--primary); }

/* Confirm table */
.confirm-success-icon {
    width: 70px; height: 70px;
    background: linear-gradient(135deg, #dbeafe, #ede9fe);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.8rem;
    color: var(--primary);
    margin: 0 auto 16px;
    animation: pulse 1.5s infinite;
}

.confirm-table {
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    overflow: hidden;
}
.confirm-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 13px 18px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.92rem;
}
.confirm-row:last-child { border-bottom: none; }
.confirm-row span { color: #64748b; flex-shrink: 0; }
.confirm-row strong { text-align: right; color: var(--dark); font-weight: 700; }

/* ===================== NAV AVATAR ===================== */
.nav-avatar {
    width: 38px; height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent-orange));
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    overflow: hidden;
    border: 2px solid rgba(255,255,255,0.6);
    transition: transform 0.2s, box-shadow 0.2s;
    flex-shrink: 0;
}
.nav-avatar:hover { transform: scale(1.1); box-shadow: 0 4px 14px rgba(3,105,161,0.35); }
.nav-avatar-initials { color: white; font-weight: 700; font-size: 0.85rem; }
.nav-avatar-img { width: 100%; height: 100%; object-fit: cover; }

/* ===================== PROFILE MODAL ===================== */
.profile-box {
    background: white;
    border-radius: 24px;
    width: 100%;
    max-width: 580px;
    max-height: 92vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 30px 80px rgba(0,0,0,0.3);
    animation: fadeIn 0.3s ease;
    position: relative;
}

.profile-header-banner {
    background: linear-gradient(135deg, var(--primary) 0%, #0ea5e9 60%, var(--accent-orange) 100%);
    padding: 28px 30px;
    display: flex;
    align-items: center;
    gap: 18px;
}
.profile-header-avatar {
    width: 64px; height: 64px;
    border-radius: 50%;
    background: rgba(255,255,255,0.25);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
    border: 3px solid rgba(255,255,255,0.7);
    flex-shrink: 0;
}
.profile-header-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-header-avatar span { font-size: 1.5rem; font-weight: 800; color: white; }
.profile-display-name { font-size: 1.25rem; font-weight: 800; color: white; }
.profile-display-email { font-size: 0.85rem; color: rgba(255,255,255,0.8); margin-top: 3px; }

.profile-tabs {
    display: flex;
    border-bottom: 2px solid #f1f5f9;
    background: white;
    flex-shrink: 0;
}
.profile-tab-btn {
    flex: 1; padding: 14px 10px;
    border: none; background: none;
    font-weight: 600; font-size: 0.85rem;
    color: #94a3b8; cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 6px;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
    font-family: inherit;
}
.profile-tab-btn:hover { color: var(--primary); }
.profile-tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }

.profile-tab-body {
    overflow-y: auto;
    padding: 24px 28px;
    flex: 1;
}

/* Order Cards */
.order-card {
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 16px 18px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.order-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 16px rgba(3,105,161,0.1);
    transform: translateX(3px);
}
.order-card-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 10px;
}
.order-id { font-weight: 800; font-size: 1rem; color: var(--dark); font-family: monospace; }
.order-badge {
    padding: 4px 12px; border-radius: 20px;
    font-size: 0.75rem; font-weight: 700;
}
.badge-delivered { background: #dcfce7; color: #15803d; }
.badge-processing { background: #fef9c3; color: #a16207; }
.badge-cancelled  { background: #fee2e2; color: #b91c1c; }

.order-card-body {
    display: flex; gap: 18px; flex-wrap: wrap;
    font-size: 0.85rem; color: #64748b; margin-bottom: 10px;
}
.order-card-body i { color: var(--accent-orange); margin-right: 4px; }
.order-total { color: var(--primary); font-weight: 700; }

.order-card-footer {
    display: flex; justify-content: space-between; align-items: center;
    font-size: 0.82rem; color: #94a3b8;
    border-top: 1px solid #f1f5f9; padding-top: 10px;
}
.view-detail-link { color: var(--primary); font-weight: 600; }

.empty-orders {
    text-align: center; padding: 48px 0;
    color: #94a3b8;
}
.empty-orders i { font-size: 3rem; margin-bottom: 14px; display: block; }

/* Order Detail */
.order-detail-box { border: 1px solid #e2e8f0; border-radius: 16px; overflow: hidden; }
.order-detail-header {
    padding: 20px 22px;
    display: flex; justify-content: space-between; align-items: flex-start;
    background: #f8fafc; border-bottom: 1px solid #e2e8f0;
}
.order-detail-header h3 { font-size: 1.15rem; font-weight: 800; color: var(--dark); }
.order-detail-grid {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 0;
}
.order-detail-item {
    padding: 14px 22px;
    border-right: 1px solid #f1f5f9;
    border-bottom: 1px solid #f1f5f9;
}
.order-detail-item:nth-child(even) { border-right: none; }

/* Order Timeline */
.order-timeline {
    display: flex; align-items: center; justify-content: center;
    padding: 22px; gap: 0; background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}
.timeline-step {
    display: flex; flex-direction: column; align-items: center; gap: 5px;
    font-size: 0.75rem; font-weight: 600; color: #94a3b8; min-width: 65px;
}
.timeline-step i { font-size: 1.3rem; }
.timeline-step.done { color: #22c55e; }
.timeline-step.pending { color: #e2e8f0; }
.timeline-line {
    flex: 1; height: 3px; background: #e2e8f0; max-width: 55px;
}
.timeline-line.done { background: #22c55e; }

/* Profile Avatar Upload */
.profile-avatar-section {
    display: flex; flex-direction: column; align-items: center; margin-bottom: 22px;
}
.profile-avatar-big {
    width: 90px; height: 90px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent-orange));
    display: flex; align-items: center; justify-content: center;
    overflow: hidden; margin-bottom: 12px;
    border: 4px solid #e0f2fe;
}
.profile-avatar-big img { width: 100%; height: 100%; object-fit: cover; }
.profile-avatar-big span { font-size: 2rem; font-weight: 800; color: white; }

.avatar-upload-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 16px; border-radius: 20px;
    border: 1.5px solid var(--primary); color: var(--primary);
    font-size: 0.82rem; font-weight: 600; cursor: pointer;
    transition: all 0.2s;
}
.avatar-upload-btn:hover { background: var(--primary); color: white; }

/* Language grid */
.lang-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.lang-option {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 14px; border-radius: 12px;
    border: 2px solid #e2e8f0; cursor: pointer;
    transition: all 0.2s;
}
.lang-option:hover { border-color: var(--primary); background: #f0f9ff; }
.lang-option.selected { border-color: var(--primary); background: linear-gradient(135deg,#f0f9ff,#e0f2fe); }
.lang-flag { font-size: 1.5rem; }
.lang-name { flex: 1; font-weight: 600; font-size: 0.9rem; color: var(--dark); }
.lang-check { color: #e2e8f0; transition: color 0.2s; }
.lang-option.selected .lang-check { color: var(--primary); }

.settings-section-title {
    font-size: 1rem; font-weight: 700; color: var(--dark);
    margin-bottom: 14px; display: flex; align-items: center; gap: 8px;
}
.settings-section-title i { color: var(--primary); }

/* Toggle switch */
.toggle-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 0; border-bottom: 1px solid #f1f5f9;
    font-size: 0.9rem; font-weight: 500; color: var(--dark);
}
.toggle-switch { position: relative; display: inline-block; width: 44px; height: 24px; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
    position: absolute; inset: 0; background: #e2e8f0;
    border-radius: 24px; cursor: pointer; transition: 0.3s;
}
.toggle-slider::before {
    content: ''; position: absolute;
    width: 18px; height: 18px; left: 3px; top: 3px;
    background: white; border-radius: 50%; transition: 0.3s;
}
.toggle-switch input:checked + .toggle-slider { background: var(--primary); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); }

/* Profile modal footer (logout) */
.profile-modal-footer {
    border-top: 1px solid #f1f5f9;
    padding: 14px 28px;
    flex-shrink: 0;
    background: white;
    border-radius: 0 0 24px 24px;
}

.btn-logout-profile {
    width: 100%;
    padding: 12px;
    border-radius: 12px;
    border: 2px solid #fee2e2;
    background: #fff5f5;
    color: #ef4444;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: inherit;
    transition: all 0.2s ease;
}
.btn-logout-profile:hover {
    background: #ef4444;
    color: white;
    border-color: #ef4444;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(239,68,68,0.3);
}

