:root {
    /* Ocean Fresh Theme */
    --primary-gradient: linear-gradient(135deg, #0f766e 0%, #0ea5e9 100%); /* Teal to Sky Blue */
    --secondary-gradient: linear-gradient(120deg, #10b981 0%, #3b82f6 100%);
    --accent-color: #0d9488;
    
    --bg-color: #f8fafc; /* Lighter, more neutral background for less eye strain */
    --text-main: #1e293b; /* Softer dark blue-grey instead of pure black/slate */
    --text-muted: #64748b;
    
    --card-bg: #ffffff;
    --glass-border: 1px solid #e2e8f0;
    --promoted-border: 2px solid #fbbf24; /* Softer amber */
    
    --radius-lg: 16px;
    --radius-md: 12px;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Navbar */
.navbar {
    background: white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid #e2e8f0;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.75rem !important;
    padding-bottom: 0.75rem !important;
}

/* Wishlist Button Hover */
.wishlist-btn {
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    width: 36px; /* Slightly larger touch target */
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05); /* Subtle shadow for depth */
    color: #64748b; /* Default color */
}

.wishlist-btn:hover {
    transform: scale(1.05); /* Softer scale */
    color: #ef4444; /* Red on hover */
    background: #ffffff;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

    /* SVG Wave Separator */
    .wave-separator path {
        fill: var(--bg-color) !important;
        transition: fill 0.3s ease;
    }

/* Container Override for Homepage */
.container {
    max-width: 100%; /* Full width */
    margin: 0 auto;
    padding: 0 1rem; /* Reduced padding for more space */
    box-sizing: border-box; 
}

/* Ensure images don't overflow */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}
.nav-links a {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
    font-size: 0.95rem;
    white-space: nowrap;
}

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

.btn-primary {
    background: var(--primary-gradient);
    color: white !important;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
    border: none;
    cursor: pointer;
    display: inline-block;
    box-sizing: border-box;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(14, 165, 233, 0.4);
}

.btn-secondary {
    background: white;
    color: var(--text-main) !important;
    border: 1px solid #e2e8f0;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
    box-sizing: border-box;
}

.btn-secondary:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

/* Hero Section */
.hero-section {
    background: var(--primary-gradient);
    color: white;
    padding: 1.5rem 0 2rem; /* Reduced padding */
    text-align: center;
    border-radius: 0 0 30px 30px; /* Reduced curve radius */
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><circle cx="2" cy="2" r="1" fill="rgba(255,255,255,0.1)"/></svg>');
    opacity: 0.3;
    pointer-events: none;
}

.hero-section .container {
    position: relative;
    z-index: 1;
}

.hero-section h1 {
    font-size: 1.5rem; /* Smaller headline */
    margin-bottom: 0.8rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

/* Grid Layout */
.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); /* Slightly larger min-width for better filling */
    gap: 1.5rem; /* Increased gap for better spacing */
    padding-bottom: 4rem;
    width: 100%;
}

@media (min-width: 1800px) {
    .items-grid {
        grid-template-columns: repeat(7, 1fr); /* 7 columns on massive screens */
    }
}

@media (min-width: 1400px) and (max-width: 1799px) {
    .items-grid {
        grid-template-columns: repeat(6, 1fr); /* 6 columns on extra large screens */
    }
}

@media (min-width: 1200px) and (max-width: 1399px) {
    .items-grid {
        grid-template-columns: repeat(5, 1fr); /* 5 columns on large screens */
    }
}

@media (max-width: 1199px) and (min-width: 992px) {
    .items-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 991px) and (min-width: 576px) {
    .items-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 575px) {
    .items-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 columns on mobile */
        gap: 0.6rem;
    }
}

/* Item Card */
.item-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.2s ease;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

.item-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 12px -3px rgba(0, 0, 0, 0.1);
    border-color: #cbd5e1;
}

.card-img {
    aspect-ratio: 1/1; /* Square images for compactness */
    height: auto;
    width: 100%;
    background-color: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    overflow: hidden;
    position: relative;
}

/* Layout Classes */
.main-layout {
    display: flex;
    gap: 1rem; /* Reduced gap */
    align-items: flex-start;
    padding-bottom: 4rem;
}

.sidebar {
    width: 240px; /* Reduced width to give more space to products */
    background: white;
    padding: 1rem; /* Reduced padding */
    border-radius: var(--radius-lg);
    border: 1px solid #e2e8f0;
    flex-shrink: 0;
    position: sticky;
    top: 100px;
}

.content-area {
    flex: 1;
    width: 100%; /* Ensure it takes full available width */
    min-width: 0; /* Fix flexbox overflow issue */
}

@media (max-width: 992px) {
    .main-layout {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        position: static;
        margin-bottom: 2rem;
    }
}

/* Promoted Item Styling */
.item-card.promoted {
    border: var(--promoted-border);
    position: relative;
    background: linear-gradient(to bottom, #fffbeb, #fff);
}

.promoted-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.9);
    color: #f59e0b;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 4px 8px;
    border-radius: 6px;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    border: 1px solid #fcd34d;
}

.card-img img {
    transition: transform 0.5s;
}

.item-card:hover .card-img img {
    transform: scale(1.05);
}

.card-body {
    padding: 0.75rem; /* Reduced padding */
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-title {
    font-size: 0.9rem; /* Smaller title */
    font-weight: 600;
    margin: 0 0 0.25rem 0;
    color: var(--text-main);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Limit to 2 lines */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Search Form */
.search-form {
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    gap: 0.5rem;
    background: white;
    padding: 0.4rem;
    border-radius: 50px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.search-input {
    flex: 1;
    border: none;
    padding: 0.6rem 1.2rem;
    font-size: 1rem;
    border-radius: 50px;
    outline: none;
}

.search-btn {
    border-radius: 50px;
    padding: 0.6rem 1.5rem;
}

.card-price {
    font-size: 1rem; /* Smaller price */
    color: var(--text-main); /* Darker color for better readability */
    font-weight: 700;
}

/* Form Styling */
.auth-card, .form-card {
    background: white;
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    max-width: 500px;
    margin: 2rem auto;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-main);
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: all 0.2s;
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: #0ea5e9;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.alert {
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.alert-success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-danger {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    .hero-section {
        padding: 1.5rem 0 2rem;
        border-radius: 0 0 20px 20px;
    }
    
    .hero-section h1 {
        font-size: 1.5rem;
    }
    
    .main-layout {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        margin-bottom: 1.5rem;
    }
    
    .nav-container {
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .nav-links {
        width: auto;
        margin-left: auto;
        overflow-x: auto;
        padding-bottom: 0.5rem;
        justify-content: flex-end;
        -webkit-overflow-scrolling: touch;
    }
    
    .nav-links::-webkit-scrollbar {
        height: 3px;
    }
    
    .nav-links::-webkit-scrollbar-thumb {
        background: #cbd5e1;
        border-radius: 3px;
    }
    
    .search-form {
        width: 100%;
        box-sizing: border-box;
    }
    
    .item-main-col, .item-sidebar-col {
        min-width: 100% !important;
    }
}

/* Item Page Layout */
.item-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    align-items: flex-start;
}

.item-main-col {
    flex: 2;
    min-width: 300px;
}

.item-sidebar-col {
    flex: 1;
    min-width: 300px;
}

@media (max-width: 575px) {
    .items-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .card-body {
        padding: 0.6rem;
    }
    
    .card-title {
        font-size: 0.85rem;
    }
    
    .card-price {
        font-size: 0.95rem;
    }
    
    .btn-primary, .btn-secondary {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}
