/* assets/css/style.css */
:root {
    --primary-color: #f43f5e;
    /* Vibrant Rose */
    --primary-hover: #e11d48;
    --secondary-color: #0ea5e9;
    /* Cyan */
    --accent-color: #f59e0b;
    /* Amber */
    --dark-bg: #0f172a;
    --light-bg: #fdf2f8;
    /* Very light pink tint */
    --card-bg: rgba(255, 255, 255, 0.8);
    --text-main: #1e293b;
    --text-muted: #64748b;
    --white: #ffffff;
    --glass: rgba(255, 255, 255, 0.5);
    --glass-border: rgba(255, 255, 255, 0.3);
    --shadow: 0 8px 30px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.1);
    --radius: 16px;
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--light-bg);
    color: var(--text-main);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navbar */
.navbar {
    background: var(--dark-bg);
    color: var(--white);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

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

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--white);
    text-decoration: none;
}

.logo span {
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 25px;
}

.nav-links a {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.cart-icon {
    position: relative;
    color: var(--white);
    font-size: 1.2rem;
    text-decoration: none;
}

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

.nav-btn {
    padding: 8px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    background: var(--primary-color);
    color: white;
}

.nav-btn.btn-outline {
    background: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

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

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
}

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

.btn-secondary {
    background: var(--secondary-color);
}

/* Auth Pages */
.auth-container {
    max-width: 450px;
    margin: 80px auto;
    padding: 40px;
    background: var(--card-bg);
    border-radius: 15px;
    box-shadow: var(--shadow-lg);
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.3s;
}

.form-group input:focus {
    border-color: var(--primary-color);
}

.password-wrapper {
    position: relative;
}

.password-wrapper i {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--text-muted);
}

.password-wrapper i:hover {
    color: var(--primary-color);
}

.auth-footer {
    text-align: center;
    margin-top: 20px;
    color: var(--text-muted);
}

.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

/* Footer */
.footer {
    background: var(--dark-bg);
    color: var(--white);
    padding: 60px 0 20px;
    margin-top: 80px;
}

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

.footer h3,
.footer h4 {
    margin-bottom: 20px;
}

.footer h3 span {
    color: var(--primary-color);
}

.footer ul {
    list-style: none;
}

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

.footer ul a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.3s;
}

.footer ul a:hover {
    color: var(--white);
}

.newsletter-form {
    display: flex;
    gap: 10px;
}

.newsletter-form input {
    flex: 1;
    padding: 10px;
    border-radius: 5px;
    border: none;
}

.footer-bottom {
    text-align: center;
    margin-top: 50px;
    padding-top: 20px;
    border-top: 1px solid #1e293b;
    color: #64748b;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--dark-bg) 0%, #1e1b4b 50%, #312e81 100%);
    color: var(--white);
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    align-items: center;
    gap: 60px;
}

.hero-content {
    animation: fadeInUp 0.6s ease-out both;
    /* 'both' keeps the element at final state, preventing flicker */
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 25px;
    letter-spacing: -2px;
    line-height: 1.1;
}

.hero h1 span {
    color: var(--primary-color);
}

.hero p {
    font-size: 1.2rem;
    color: #94a3b8;
    margin-bottom: 40px;
}

.hero-mockup-wrapper {
    position: relative;
    animation: float 6s ease-in-out infinite;
}

.hero-mockup {
    width: 100%;
    max-width: 550px;
    border-radius: 30px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

@media (max-width: 992px) {
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-mockup-wrapper {
        margin-top: 50px;
    }

    .hero h1 {
        font-size: 3rem;
    }
}

/* Product Grid */
.section-header {
    margin: 60px 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.product-card {
    background: #ffffff;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid rgba(226, 232, 240, 0.8);
    position: relative;
    /* Smooth hover — only transition the properties we actually change */
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

/* Image wrapper locks height before image loads — shimmer placeholder */
.product-image-wrap {
    width: 100%;
    height: 280px;
    overflow: hidden;
    background: #f1f5f9;
    display: block;
    position: relative;
}

/* Shimmer effect on the wrapper while image is loading */
.product-image-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.6) 50%, transparent 100%);
    background-size: 200% 100%;
    animation: shimmer 1.4s ease-in-out infinite;
    pointer-events: none;
}

/* Once image is loaded, hide the shimmer */
.product-image-wrap.img-loaded::after {
    display: none;
}

@keyframes shimmer {
    0%   { background-position: -200% 0; }
    100% { background-position:  200% 0; }
}

.product-image {
    width: 100%;
    height: 280px;
    object-fit: cover;
    display: block;
    /* Always visible — no opacity trick that can break */
    opacity: 1;
    transition: transform 0.4s ease;
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

.product-info {
    padding: 25px;
    background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.9));
}

.product-category {
    font-size: 0.8rem;
    color: var(--primary-color);
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.product-title {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--text-main);
}

.product-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 15px;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.9rem;
}

/* Category Filters */
.filters {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 16px;
    border-radius: 20px;
    background: white;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-btn.active,
.filter-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Mobile Menu */
.mobile-menu-icon {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Customization Options */
.color-swatch {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.color-swatch:hover {
    transform: scale(1.15);
}

.color-swatch.active {
    border-color: var(--primary-color);
    transform: scale(1.1);
    box-shadow: 0 0 0 2px white, 0 0 0 4px var(--primary-color);
}

.size-btn {
    padding: 10px 20px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    background: white;
}

.size-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.size-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 4px 15px rgba(244, 63, 94, 0.3);
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .mobile-menu-icon {
        display: block;
    }

    /* Mobile nav open state — toggled by JS */
    .nav-links.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 60px;
        left: 0;
        width: 100%;
        background: var(--dark-bg);
        padding: 20px;
        border-top: 1px solid rgba(255,255,255,0.08);
        z-index: 999;
        gap: 14px;
    }
}