/* ===== REFINED MODERN DESIGN SYSTEM (HTML/CSS Version) ===== */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');
@import url('auth.css');

:root {
    /* Colors - Deep & Trustworthy */
    /* Colors - Modern Pink to Purple Gradient Theme */
    --primary: #EC4899;
    --primary-end: #8B5CF6;
    /* Purple end for gradient */
    --primary-hover: #DB2777;
    --primary-soft: #FDF2F8;
    --primary-glow: rgba(236, 72, 153, 0.4);

    --secondary: #0f172a;
    /* Slate 900 */

    --accent: #f59e0b;
    /* Amber 500 */
    --danger: #ef4444;
    /* Red 500 */
    --success: #10b981;
    /* Emerald 500 */

    /* Backgrounds */
    --bg-body: #f8fafc;
    /* Slate 50 */
    --bg-surface: #ffffff;

    /* Text */
    --text-main: #1e293b;
    /* Slate 800 */
    --text-secondary: #64748b;
    /* Slate 500 */
    --text-light: #94a3b8;
    /* Slate 400 */

    --border-color: #e2e8f0;
    /* Slate 200 */

    /* Spacing & Layout */
    --container-width: 1240px;
    --header-height: 80px;

    /* Radius */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 999px;

    /* Shadows - Soft & Layered */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-card: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-float: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --shadow-inner: inset 0 2px 4px 0 rgb(0 0 0 / 0.05);

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    /* Admin & Extended Variables */
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f5f9;

    --gradient-primary: linear-gradient(135deg, var(--primary) 0%, var(--primary-end) 100%);
    --gradient-hover: linear-gradient(135deg, var(--primary-hover) 0%, #7C3AED 100%);
    --gradient-secondary: linear-gradient(135deg, var(--secondary) 0%, #334155 100%);
    --gradient-success: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    --gradient-warm: linear-gradient(135deg, var(--accent) 0%, #d97706 100%);

    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(255, 255, 255, 0.5);

    --primary-light: #8cd6d4;

    --radius-xl: 32px;

    --shadow-lg: var(--shadow-float);

    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
}

/* Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-body);
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

button,
input {
    font-family: inherit;
}

/* ===== NAVBAR ===== */
.navbar {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    height: var(--header-height);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 100%;
}

.d-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 800;
    font-size: 1.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* .logo-icon removed */

.nav-search {
    flex: 1;
    max-width: 480px;
    position: relative;
    margin: 0 2rem;
}

.nav-search input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.75rem;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-color);
    background: white;
    font-size: 0.95rem;
    transition: var(--transition);
}

.nav-search input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-soft);
}

.nav-search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
}

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px var(--primary-glow);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-hover);
    opacity: 0;
    z-index: -1;
    transition: var(--transition);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--primary-glow);
    color: white;
}

.btn-primary:hover::before {
    opacity: 1;
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}

.btn-ghost:hover {
    background: var(--primary-soft);
    color: var(--primary);
    box-shadow: 0 4px 10px rgba(236, 72, 153, 0.1);
}

/* User Dropdown */
.user-menu-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.btn-user-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary-soft);
    color: var(--primary);
    border: 2px solid var(--primary-soft);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: var(--transition);
}

.btn-user-avatar:hover {
    border-color: var(--primary);
    background: white;
}

.user-dropdown {
    position: absolute;
    top: 120%;
    right: 0;
    width: 200px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    padding: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s;
    border: 1px solid var(--border-color);
    z-index: 100;
}

.user-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-main);
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition);
}

.dropdown-item:hover {
    background: #f1f5f9;
    color: var(--primary);
}

.dropdown-item.danger {
    color: var(--danger);
}

.dropdown-item.danger:hover {
    background: #fee2e2;
}

/* ===== HERO SECTION ===== */
.hero {
    padding: 5rem 0;
    overflow: hidden;
    position: relative;
}

.hero-bg-accent {
    position: absolute;
    top: -10%;
    right: -5%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.15) 0%, rgba(139, 92, 246, 0.05) 100%);
    filter: blur(80px);
    z-index: -1;
    border-radius: var(--radius-full);
}

.hero-content {
    max-width: 600px;
}

.hero-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--primary-soft);
    color: var(--primary);
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(79, 70, 229, 0.2);
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--secondary);
}

.hero-title span {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

.hero-text {
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 90%;
}

/* ===== FILTER BAR & PRODUCTS ===== */
.filter-sticky {
    position: sticky;
    top: calc(var(--header-height) + 1rem);
    z-index: 90;
    margin-bottom: 2rem;
}

/* Filter Bar Wrapper for scrolling on mobile */
.filter-bar-wrapper {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    /* Firefox */
    display: flex;
    justify-content: center;
    /* Center on desktop */
}

.filter-bar-wrapper::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari, Edge */
}

.filter-bar {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 0.75rem;
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-color);
    display: inline-flex;
    gap: 0.5rem;
    flex-shrink: 0;
    /* Prevent shrinking */
    white-space: nowrap;
}

.filter-btn {
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius-full);
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-weight: 600;
    cursor: pointer;
    font-size: 0.9rem;
    transition: var(--transition);
}

.filter-btn:hover {
    color: var(--primary);
    background: var(--bg-body);
}

.filter-btn.active {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 12px var(--primary-glow);
}

.grid {
    display: grid;
    gap: 2rem;
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* ===== PREMIUM PRODUCT CARD ===== */
.product-card {
    background: white;
    border-radius: 20px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    display: flex;
    flex-direction: column;
    border: 1px solid transparent;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px -5px rgba(0, 0, 0, 0.1), 0 10px 20px -5px rgba(0, 0, 0, 0.04);
    border-color: rgba(91, 192, 190, 0.2);
    z-index: 2;
}

/* Image Area - Full Width Optimization */
.product-img-wrap {
    padding: 0;
    background: #f8fafc;
    height: 260px;
    display: flex;
    align-items: center;
    border-radius: 20px 20px 0 0;
    position: relative;
    overflow: hidden;
}

.product-img-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 60%, rgba(236, 72, 153, 0.05));
    opacity: 0;
    transition: var(--transition);
}

.product-card:hover .product-img-wrap::after {
    opacity: 1;
}

.product-card:hover .product-img-wrap {
    background: #f1f5f9;
}

.product-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.75), rgba(139, 92, 246, 0.75));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.4s ease;
    backdrop-filter: blur(2px);
    z-index: 5;
}

.product-card:hover .product-card-overlay {
    opacity: 1;
}

.btn-view-detail {
    color: white;
    font-weight: 700;
    font-size: 1rem;
    padding: 0.75rem 1.5rem;
    border: 2px solid white;
    border-radius: var(--radius-full);
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.product-card:hover .btn-view-detail {
    transform: translateY(0);
}

.btn-view-detail:hover {
    background: white;
    color: var(--primary);
}

.product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card:hover .product-img {
    transform: scale(1.1) translateY(-5px);
    filter: drop-shadow(0 20px 25px rgba(0, 0, 0, 0.15));
}

/* Badges & Actions Overlay */
.card-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--accent);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.35rem 0.75rem;
    border-radius: 99px;
    box-shadow: 0 4px 6px rgba(245, 158, 11, 0.3);
    z-index: 10;
}

.btn-wishlist {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: white;
    border: none;
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
    opacity: 0;
    transform: translateX(10px);
    z-index: 10;
}

.product-card:hover .btn-wishlist {
    opacity: 1;
    transform: translateX(0);
}

.btn-wishlist:hover {
    color: var(--danger);
    transform: scale(1.1) !important;
}

/* Info Area */
.product-info {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

.product-cat {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-light);
    margin-bottom: 0.5rem;
    letter-spacing: 0.05em;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo img {
    height: 120px;
    width: auto;
    object-fit: contain;
}

/* Old .logo-icon styles removed as we use image now */
.product-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.75rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-bottom {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
    /* Ensure items align to the left */
}

.product-price {
    font-size: 1.35rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
    text-align: left;
    width: 100%;
    /* Ensure it spans full width to respect text-align */
}

.btn-add-cart {
    width: 100%;
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    background: var(--bg-body);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
}

.btn-add-cart i {
    font-size: 1rem;
    color: var(--primary);
}

.btn-add-cart:hover {
    background: var(--gradient-primary);
    color: white;
    transform: translateY(-2px);
    border-color: transparent;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-add-cart:hover i {
    color: white;
}

/* ===== FOOTER ===== */
.footer {
    background: var(--secondary);
    color: white;
    padding: 5rem 0 2rem;
    margin-top: 5rem;
    border-top: 4px solid transparent;
    border-image: var(--gradient-primary) 1;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer h4 {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--text-light);
}

.footer-links a:hover {
    color: white;
    padding-left: 5px;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-btn {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    color: white;
    font-size: 1.1rem;
}

.social-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Brand-specific colors on hover */
.social-btn:has(.fa-facebook-f):hover {
    background: #1877F2;
}

.social-btn:has(.fa-youtube):hover {
    background: #FF0000;
}

.social-btn:has(.fa-instagram):hover {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}


/* MODAL styles now imported from auth.css but keeping overlay base */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: 0.3s;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.close-modal {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: var(--bg-body);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition);
}

.close-modal:hover {
    background: var(--danger);
    color: white;
}

/* Responsive */
@media (max-width: 1024px) {
    .container {
        padding: 0 1rem;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {

    /* Typography adjustments */
    .hero-title {
        font-size: 2rem;
        line-height: 1.2;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    /* Logo size for mobile */
    .logo img {
        height: 60px !important;
    }

    /* Navbar mobile optimization */
    .navbar {
        height: auto;
        padding: 0.75rem 0;
    }

    .navbar .d-flex {
        flex-direction: row;
        gap: 0.75rem;
        align-items: center;
        justify-content: space-between;
    }

    /* Hide search bar in navbar on mobile */
    .navbar .nav-search {
        display: none !important;
    }

    /* Show mobile search below hero */
    .mobile-search-wrapper {
        display: block;
        padding: 1rem 0;
        background: var(--bg-body);
    }

    .mobile-search-wrapper .nav-search {
        display: block;
        width: 100%;
        position: relative;
    }

    .nav-search input {
        font-size: 0.9rem;
    }

    /* Auth and cart buttons */
    .navbar .d-flex:last-child {
        flex-direction: row;
        justify-content: space-between;
        order: 1;
    }

    /* Product grid - 2 columns on mobile */
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    /* Product cards mobile optimization */
    .product-card {
        padding: 0.75rem;
    }

    .product-title {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
        -webkit-line-clamp: 2;
    }

    .product-price {
        font-size: 1.1rem;
    }

    .btn-add {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }

    /* Hide stock info on very small cards */
    .product-card div[style*="font-size: 0.85rem"] {
        font-size: 0.75rem;
    }


    /* Filter bar mobile - scroll from left */
    .filter-bar-wrapper {
        justify-content: flex-start;
    }

    .filter-bar {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        flex-wrap: nowrap;
    }

    .filter-bar::-webkit-scrollbar {
        display: none;
    }

    .filter-btn {
        white-space: nowrap;
        font-size: 0.85rem;
        padding: 0.5rem 1rem;
        flex-shrink: 0;
    }

    /* Footer mobile */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer {
        padding: 3rem 0 2rem;
    }

    /* Buttons mobile friendly */
    .btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
    }

    /* Hero section mobile */
    .hero {
        padding: 3rem 0;
        text-align: center;
    }

    /* Modal mobile */
    .modal-content {
        width: 95%;
        max-width: 95%;
        margin: 1rem;
        padding: 1.5rem;
    }

    /* Pagination mobile */
    .pagination {
        gap: 0.5rem;
    }

    .pagination button {
        min-width: 36px;
        height: 36px;
        font-size: 0.85rem;
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    .hero-title {
        font-size: 1.75rem;
    }

    .product-card {
        max-width: 100%;
    }

    /* Larger touch targets */
    .btn-add {
        width: 40px;
        height: 40px;
    }

    .filter-btn {
        padding: 0.6rem 1.2rem;
    }
}

/* Spinner Animation */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.spinner-sm {
    width: 20px;
    height: 20px;
    border-width: 2px;
}

.product-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.75rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-bottom {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.product-price {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.02em;
}

.btn-add {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: var(--bg-body);
    color: var(--text-main);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.btn-add:hover {
    background: var(--primary);
    color: white;
    transform: rotate(90deg);
    box-shadow: 0 4px 12px rgba(91, 192, 190, 0.4);
}

/* ===== FOOTER ===== */
.footer {
    background: var(--secondary);
    color: white;
    padding: 5rem 0 2rem;
    margin-top: 5rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer h4 {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--text-light);
}

.footer-links a:hover {
    color: white;
    padding-left: 5px;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-btn {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.social-btn:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

/* MODAL styles now imported from auth.css but keeping overlay base */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: 0.3s;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.close-modal {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: var(--bg-body);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition);
}

.close-modal:hover {
    background: var(--danger);
    color: white;
}

/* Responsive */
@media (max-width: 1024px) {
    .container {
        padding: 0 1rem;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .navbar {
        height: auto;
        padding: 1rem 0;
    }

    .d-flex {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-search {
        width: 100%;
        margin: 0;
    }

    .filter-bar {
        width: 100%;
        overflow-x: auto;
    }
}

/* Spinner Animation */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.spinner-sm {
    width: 20px;
    height: 20px;
    border-width: 2px;
}

/* Search Suggestions */
.nav-search {
    position: relative;
    /* Ensure absolute children are relative to this */
}

.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    margin-top: 0.5rem;
    z-index: 1000;
    overflow: hidden;
    display: none;
    /* Hidden by default */
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.search-suggestions.active {
    display: block;
    animation: fadeIn 0.2s ease-out;
}

.suggestion-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    gap: 1rem;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover,
.suggestion-item.selected {
    background: var(--bg-tertiary);
}

.suggestion-img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 8px;
    background: #f0f0f0;
}

.suggestion-info {
    flex: 1;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--text-light);
}

.footer-links a:hover {
    color: white;
    padding-left: 5px;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-btn {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.social-btn:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

/* MODAL styles now imported from auth.css but keeping overlay base */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: 0.3s;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.close-modal {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: var(--bg-body);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition);
}

.close-modal:hover {
    background: var(--danger);
    color: white;
}

/* Responsive */
@media (max-width: 1024px) {
    .container {
        padding: 0 1rem;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .navbar {
        height: auto;
        padding: 1rem 0;
    }

    .d-flex {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-search {
        width: 100%;
        margin: 0;
    }

    .filter-bar {
        width: 100%;
        overflow-x: auto;
    }
}

/* Spinner Animation */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.spinner-sm {
    width: 20px;
    height: 20px;
    border-width: 2px;
}

/* Search Suggestions */
.nav-search {
    position: relative;
    /* Ensure absolute children are relative to this */
}

.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    margin-top: 0.5rem;
    z-index: 1000;
    overflow: hidden;
    display: none;
    /* Hidden by default */
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.search-suggestions.active {
    display: block;
    animation: fadeIn 0.2s ease-out;
}

.suggestion-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    gap: 1rem;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover,
.suggestion-item.selected {
    background: var(--bg-tertiary);
}

.suggestion-img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 8px;
    background: #f0f0f0;
}

.suggestion-info {
    flex: 1;
}

.suggestion-price {
    font-size: 0.9rem;
    color: var(--primary);
    font-weight: 600;
}

/* ===== PRODUCT DETAIL PAGE ===== */
.product-detail-section {
    padding: 2rem 0 5rem;
}

.product-detail-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
    align-items: start;
}

.detail-gallery {
    background: white;
    border-radius: 24px;
    padding: 1rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 2rem;
}

.detail-main-img-wrap {
    height: 500px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    /* Consistent with cards */
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
}

.detail-main-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.detail-main-img:hover {
    transform: scale(1.05);
}

.detail-info {
    padding-top: 1rem;
}

.detail-breadcrumbs {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.detail-breadcrumbs span {
    margin: 0 0.5rem;
    color: var(--text-light);
    opacity: 0.5;
}

.detail-cat-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(236, 72, 153, 0.1);
    color: var(--primary);
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.detail-title {
    font-size: 2.75rem;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--text-main);
    font-weight: 800;
}

.detail-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
}

.stars {
    color: #f59e0b;
}

.detail-price-box {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.detail-price {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.03em;
}

.detail-old-price {
    font-size: 1.5rem;
    color: var(--text-light);
    text-decoration: line-through;
    font-weight: 600;
}

.detail-description {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
}

.action-label {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.75rem;
    display: block;
}

.detail-actions {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.quantity-wrapper {
    display: flex;
    align-items: center;
    background: var(--bg-tertiary);
    border-radius: 16px;
    padding: 0.25rem;
}

.qty-btn {
    width: 44px;
    height: 44px;
    border: none;
    background: white;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--text-main);
    border-radius: 12px;
    transition: all 0.2s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-btn:hover {
    background: var(--primary);
    color: white;
}

.qty-input {
    width: 50px;
    text-align: center;
    border: none;
    background: transparent;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-main);
}

.btn-add-cart-lg {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    background: var(--primary);
    color: white;
    border: none;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 10px 25px rgba(236, 72, 153, 0.25);
}

.btn-add-cart-lg:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(236, 72, 153, 0.35);
}

.policy-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 1rem;
}

.policy-item {
    text-align: center;
    padding: 1.5rem;
    background: #fff;
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: transform 0.2s;
}

.policy-item:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.policy-icon {
    width: 48px;
    height: 48px;
    background: rgba(236, 72, 153, 0.1);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin: 0 auto 1rem;
}

/* Tabs */
.content-tabs {
    background: white;
    border-radius: 24px;
    padding: 3rem;
    box-shadow: var(--shadow-sm);
}

.tab-header {
    display: flex;
    gap: 3rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
}

.tab-btn {
    padding-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-light);
    border-bottom: 3px solid transparent;
    cursor: pointer;
    transition: all 0.3s;
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

@media (max-width: 900px) {
    .product-detail-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .detail-gallery {
        position: static;
    }

    .detail-title {
        font-size: 2rem;
    }
}

/* Generic Modal Styles (Fixed) */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-float);
    position: relative;
    padding: 2rem;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--danger);
}