/* --- Global & Layout --- */
:root {
    --primary-color: #2563EB;
    --secondary-color: #1e293b;
    --bg-light: #f8fafc;
    --text-dark: #1e293b;
    --text-light: #64748b;
    --card-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-dark);
    background-color: #ffffff;
    margin: 0;
}

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

.section {
    padding: 60px 0;
}

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

.section-header.center {
    text-align: center;
    display: block;
}

.section-header h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-dark);
}

.section-header p {
    color: var(--text-light);
    font-size: 1rem;
}

.view-all-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: 0.3s;
}

.view-all-link:hover {
    gap: 8px;
}

/* --- Hero Section (Keep existing or slightly tweak) --- */
.hero {
    background-color: #f1f5f9;
    padding: 80px 0;
    margin-bottom: 0; /* Removed margin to flow better */
}
.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 40px;
}
.hero-text h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 20px;
}
.tagline {
    color: var(--primary-color);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
    display: block;
}
.btn-shop-now {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: var(--primary-color);
    color: white;
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    margin-top: 20px;
    transition: 0.3s;
}
.btn-shop-now:hover {
    background-color: #1d4ed8;
    transform: translateY(-2px);
}
.hero-image img {
    width: 100%;
    max-width: 500px;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0px); }
}

/* --- Shop by Category Section --- */
.category-section {
    background-color: #ffffff;
}

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

.category-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-shadow);
    border-color: var(--primary-color);
}

.cat-img-wrapper {
    height: 180px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    padding: 20px;
}

.cat-img-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: 0.3s;
}

.category-card:hover .cat-img-wrapper img {
    transform: scale(1.05);
}

.cat-content {
    padding: 20px;
    text-align: center;
    border-top: 1px solid #e2e8f0;
}

.cat-content h3 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--text-dark);
}

.btn-explore {
    margin-top: 10px;
    font-size: 0.9rem;
    color: var(--primary-color);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* --- Product Grid (New Arrivals) --- */
.products-section {
    background-color: #f8fafc;
}

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

.product-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: 0.3s;
    position: relative;
    border: 1px solid #f1f5f9;
}

.product-card:hover {
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    transform: translateY(-3px);
}

.badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: #ef4444;
    color: white;
    padding: 4px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 4px;
    z-index: 2;
}

.product-tumb {
    height: 220px;
    padding: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 12px 12px 0 0;
}

.product-tumb img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.product-details {
    padding: 20px;
    border-top: 1px solid #f1f5f9;
}

.product-cat {
    font-size: 0.8rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-details h4 {
    margin: 5px 0 15px;
}

.product-details h4 a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 600;
    transition: 0.2s;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-details h4 a:hover {
    color: var(--primary-color);
}

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

.product-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
}

.product-links a {
    color: var(--text-light);
    font-size: 1.2rem;
    transition: 0.2s;
}

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

/* --- Brand Section --- */
.brand-section {
    background-color: white;
    border-top: 1px solid #f1f5f9;
}

.brand-grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 40px;
    opacity: 0.7;
}

.brand-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    transition: 0.3s;
    cursor: pointer;
}

.brand-item:hover {
    opacity: 1;
    color: var(--primary-color);
    transform: scale(1.1);
}

.brand-item i {
    font-size: 3rem;
}

.brand-item span {
    font-weight: 600;
    font-size: 1.1rem;
}

/* --- Customer Reviews Section --- */
.reviews-section {
    background-color: #f8fafc;
}

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

.review-card {
    background: white;
    padding: 30px;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
}

.review-stars {
    color: #f59e0b; /* Star color (Yellow/Orange) */
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.review-text {
    font-style: italic;
    color: var(--text-dark);
    line-height: 1.6;
    margin-bottom: 20px;
}

.reviewer-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.reviewer-info img {
    border-radius: 50%;
}

.reviewer-info h5 {
    margin: 0;
    font-weight: 700;
    color: var(--text-dark);
}

.reviewer-info span {
    font-size: 0.85rem;
    color: var(--text-light);
}

/* --- Responsiveness --- */
@media (max-width: 768px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .hero-text h1 {
        font-size: 2.5rem;
    }
    .hero-image {
        display: none; /* Hide image on small screens or move it */
    }
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .brand-grid {
        gap: 20px;
    }
}
/* public/css/user/home.css */

.product-card {
    position: relative; /* Needed for absolute positioning */
}

.wishlist-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10; /* Ensure it sits on top of the image */
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.wishlist-btn i {
    color: #9ca3af; /* Default Grey */
    font-size: 1.1rem;
    transition: color 0.2s;
}

.wishlist-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 6px rgba(0,0,0,0.15);
}

.wishlist-btn:hover i {
    color: #ef4444; /* Red on hover */
}
.user-avatar-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    
    /* Your Gradient Code */
    background: linear-gradient(81deg, rgba(0, 0, 0, 1) 0%, rgba(255, 225, 0, 1) 100%);
    
    /* Text Styling */
    color: #ffffff;
    font-weight: bold;
    font-size: 20px;
    
    /* Centering the Letter */
    display: flex;
    align-items: center;
    justify-content: center;
    
    /* Prevent text selection */
    flex-shrink: 0; /* Ensures it doesn't squash in flex layouts */
}
/* 1. Define the size of the container box */
.hero-image {
    width: 60%;           /* Takes full width of its column */
    height: 450px;         /* FORCE a consistent height */
    display: flex;         /* Helps align the image perfectly */
    align-items: center;
    justify-content: center;
    overflow: hidden;      /* Hides any overflow, though object-fit handles this */
    border-radius: 12px;   /* Optional: Adds rounded corners like your design */
}

/* 2. Force the image to fill the box without stretching */
.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;     /* THE MAGIC: Crops image to fill the box */
    object-position: center; /* Centers the image so the middle is visible */
}


@media (max-width: 768px) {
    
    /* 1. Global Spacing */
    .container {
        padding: 0 16px; /* Reduced side padding */
    }
    .section {
        padding: 40px 0; /* Reduced vertical spacing */
    }

    /* 2. Hero Section Fixes */
    .hero {
        padding: 40px 0;
    }

    .hero-content {
        grid-template-columns: 1fr; /* Stack vertically (1 column) */
        text-align: center; /* Center text for mobile */
        gap: 30px;
    }

    .hero-text h1 {
        font-size: 2.2rem; /* Reduce from 3.5rem to fit screen */
    }

    /* Fix the Hero Image */
    .hero-image {
        display: flex; /* Force it to show (overrides any display:none) */
        width: 100%;   /* Full width of the screen */
        height: 300px; /* Smaller height for mobile */
        margin-top: 0;
        order: -1; /* OPTIONAL: Moves image ABOVE text on mobile. Remove if you want text first. */
    }

    /* 3. Section Headers */
    .section-header {
        flex-direction: column; /* Stack Title and 'View All' link */
        align-items: flex-start;
        gap: 10px;
        margin-bottom: 30px;
    }
    
    .section-header h2 {
        font-size: 1.75rem;
    }
    .reviews-grid,
    .product-grid,
    .category-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 15px; /* Smaller gaps between cards */
    }
    
    /* 5. Brands Section */
    .brand-grid {
        gap: 25px;
    }
    .brand-item i {
        font-size: 2.5rem; /* Slightly smaller icons */
    }
}