/* Modern Blue Furniture Store Design */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    /* Modern Blue Color Palette */
    --primary-color: #1E40AF;      /* Modern Blue */
    --primary-dark: #1E3A8A;       /* Darker Blue */
    --primary-light: #3B82F6;      /* Light Blue */
    --secondary-color: #0EA5E9;    /* Sky Blue */
    --secondary-light: #E0F2FE;    /* Very Light Blue */
    --accent-color: #06B6D4;       /* Cyan */
    --accent-light: #22D3EE;       /* Light Cyan */
    --accent-dark: #0891B2;        /* Dark Cyan */
    
    /* Modern Colors */
    --success-color: #10B981;      /* Emerald Green */
    --danger-color: #EF4444;       /* Modern Red */
    --warning-color: #F59E0B;      /* Amber */
    --info-color: #3B82F6;         /* Blue */
    
    /* Modern Neutral Colors */
    --light-bg: #FFFFFF;          /* Pure White */
    --dark-bg: #F8FAFC;           /* Very Light Blue Gray */
    --text-primary: #0F172A;      /* Slate 900 */
    --text-secondary: #475569;     /* Slate 600 */
    --border-color: #E2E8F0;      /* Slate 200 */
    --card-bg: #FFFFFF;            /* White */
    
    /* Modern Shadows */
    --shadow-sm: 0 1px 3px rgba(30, 64, 175, 0.1);
    --shadow-md: 0 4px 6px rgba(30, 64, 175, 0.15);
    --shadow-lg: 0 10px 15px rgba(30, 64, 175, 0.2);
    --shadow-xl: 0 20px 25px rgba(30, 64, 175, 0.25);
    --shadow-subtle: 0 2px 8px rgba(30, 64, 175, 0.08);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.5;
    color: var(--text-primary);
    background-color: var(--light-bg);
    overflow-x: hidden;
    font-weight: 400;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    line-height: 1.3;
    margin-bottom: 1rem;
    letter-spacing: -0.025em;
}

/* Header Styles */
.navbar {
    background: var(--light-bg);
    box-shadow: var(--shadow-subtle);
    position: sticky;
    top: 0;
    z-index: 50;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.navbar-brand {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 1.5rem;
    color: var(--primary-color) !important;
    text-decoration: none;
    transition: all 0.2s ease;
}

.navbar-brand:hover {
    color: var(--accent-color) !important;
}

.navbar-nav .nav-link {
    color: var(--text-primary) !important;
    font-weight: 400;
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    transition: all 0.2s ease;
    position: relative;
    margin: 0 0.125rem;
}

.navbar-nav .nav-link:hover {
    color: var(--accent-color) !important;
    background-color: var(--secondary-light);
}

.navbar-nav .nav-link.active {
    color: var(--accent-color) !important;
    background-color: var(--secondary-light);
    font-weight: 500;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    padding: 4rem 0;
    color: white;
    text-align: center;
    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 xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="modern" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="2" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23modern)"/></svg>');
    opacity: 0.4;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-family: 'Inter', sans-serif;
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 600;
    margin-bottom: 1rem;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2.5vw, 1.4rem);
    font-weight: 400;
    margin-bottom: 2rem;
    color: var(--secondary-light);
}

/* Search Bar */
.search-container {
    max-width: 700px;
    margin: 0 auto;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 1rem 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 1rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
    background: var(--light-bg);
}

.search-input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.15);
}

.search-button {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: var(--accent-color);
    border: none;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.25rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.search-button:hover {
    background: var(--accent-dark);
    box-shadow: var(--shadow-md);
}

/* Category Cards */
.category-section {
    padding: 5rem 0;
    background: var(--card-bg);
}

.section-title {
    text-align: center;
    font-family: 'Inter', sans-serif;
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: 600;
    margin-bottom: 3rem;
    color: var(--primary-color);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: var(--accent-color);
    border-radius: 1px;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
    margin-bottom: 4rem;
}

.category-card {
    background: var(--card-bg);
    border-radius: 1rem;
    padding: 2rem 1.5rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
}

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

.category-icon {
    width: 140px; /* Increased size */
    height: 140px; /* Increased size */
    margin: 0 auto 1.5rem;
    border-radius: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden; /* Ensures image stays within bounds */
    box-shadow: var(--shadow-lg);
    position: relative;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.category-image {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures image covers the area without distortion */
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    filter: brightness(0.9) contrast(1.1);
}

.category-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 123, 255, 0.8), rgba(40, 167, 69, 0.8));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-radius: 1.5rem;
}

.category-icon-inner {
    color: white;
    font-size: 2rem;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.category-card:hover .category-icon {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 20px 40px rgba(0, 123, 255, 0.3);
}

.category-card:hover .category-image {
    transform: scale(1.15);
    filter: brightness(1.1) contrast(1.2);
}

.category-card:hover .category-overlay {
    opacity: 1;
}

.category-card:hover .category-icon-inner {
    transform: translateY(0);
}

.category-name {
    font-family: 'Inter', sans-serif;
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
}

.category-count {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 2rem;
}

/* Category Link Styling */
.category-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    text-decoration: none;
    border-radius: 2rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.category-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.category-link:hover::before {
    left: 100%;
}

.category-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 123, 255, 0.4);
}

.category-link-text {
    position: relative;
    z-index: 1;
}

.category-link-icon {
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease;
}

.category-link:hover .category-link-icon {
    transform: translateX(5px);
}

/* Product Grid */
.product-section {
    padding: 5rem 0;
    background: var(--light-bg);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2.5rem;
    margin-bottom: 4rem;
}

.product-card {
    background: var(--card-bg);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    position: relative;
}

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

.product-image-container {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4/3;
    background: var(--light-bg);
}

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

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

.product-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.25px;
    box-shadow: var(--shadow-md);
}

.product-content {
    padding: 2rem;
}

.product-category {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.product-title {
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--primary-color);
    margin-bottom: 1rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Price Section - Modern Blue Design */
.price-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1.25rem;
    background: linear-gradient(135deg, var(--secondary-light), var(--light-bg));
    border-radius: 0.75rem;
    border: 1px solid var(--primary-light);
    box-shadow: var(--shadow-sm);
}

.current-price {
    font-family: 'Inter', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--success-color);
}

.original-price {
    font-size: 1.2rem;
    color: var(--text-secondary);
    text-decoration: line-through;
    font-weight: 500;
}

.discount-badge {
    background: linear-gradient(135deg, var(--danger-color), #B22222);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 1.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: var(--shadow-md);
}

.product-actions {
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 0.875rem 1.75rem;
    border: none;
    border-radius: 0.75rem;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 0.9rem;
    box-shadow: var(--shadow-sm);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    flex: 1;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--accent-dark));
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--secondary-light);
    color: var(--text-primary);
    border: 1px solid var(--primary-light);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Featured Products */
.featured-section {
    padding: 5rem 0;
    background: var(--card-bg);
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 3rem;
}

.featured-card {
    background: var(--light-bg);
    border-radius: 1rem;
    padding: 2.5rem 2rem;
    text-align: center;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.featured-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
}

.featured-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
    box-shadow: var(--shadow-md);
}

.featured-card h3 {
    font-family: 'Inter', sans-serif;
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 500;
}

.featured-card p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.6;
}

/* Hero Slider */
.hero-slider {
    position: relative;
    height: 500px;
    overflow: hidden;
    border-radius: 1rem;
    margin: 2rem 0;
    box-shadow: var(--shadow-lg);
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.slide.active {
    opacity: 1;
}

.slide-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    padding: 3rem 2rem 2rem;
    text-align: center;
}

.slide-title {
    font-family: 'Inter', sans-serif;
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: white;
}

.slide-description {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.9);
}

.slide-button {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 0.75rem;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
}

.slide-button:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--accent-dark));
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: white;
}

.slider-controls {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 1rem;
    z-index: 10;
}

.slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider-dot.active {
    background: var(--accent-color);
    transform: scale(1.2);
}

.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.3rem;
    box-shadow: var(--shadow-md);
}

.slider-arrow:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--accent-dark));
    transform: translateY(-50%) scale(1.1);
    box-shadow: var(--shadow-lg);
}

.slider-prev {
    left: 2rem;
}

.slider-next {
    right: 2rem;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    margin-top: 4rem;
}

.page-link {
    padding: 0.875rem 1.25rem;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 0.75rem;
    transition: all 0.3s ease;
    font-weight: 500;
    box-shadow: var(--shadow-sm);
}

.page-link:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.page-link.active {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    border-color: var(--primary-color);
    box-shadow: var(--shadow-lg);
}

/* Footer */
.footer {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    color: white;
    padding: 3rem 0 2rem;
    border-top: 2px solid var(--accent-color);
}

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

.footer-section h3 {
    color: var(--accent-light);
    margin-bottom: 1rem;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
}

.footer-section p,
.footer-section a {
    color: var(--secondary-light);
    text-decoration: none;
    transition: color 0.3s ease;
    line-height: 1.6;
}

.footer-section a:hover {
    color: var(--accent-light);
    text-shadow: 0 0 8px rgba(34, 211, 238, 0.5);
}

.footer-bottom {
    border-top: 1px solid var(--accent-color);
    padding-top: 1.5rem;
    text-align: center;
    color: var(--accent-light);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        padding: 2.5rem 0;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .search-container {
        max-width: 100%;
        padding: 0 1rem;
    }
    
    .category-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 1rem;
    }
    
    .product-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 1rem;
    }
    
    .featured-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 1rem;
    }
    
    .hero-slider {
        height: 350px;
        margin: 1rem;
    }
    
    .slide-title {
        font-size: 1.5rem;
    }
    
    .slider-arrow {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .slider-prev {
        left: 0.75rem;
    }
    
    .slider-next {
        right: 0.75rem;
    }
}

@media (max-width: 480px) {
    .hero-section {
        padding: 2rem 0;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .search-input {
        padding: 0.875rem 1.25rem;
        font-size: 0.9rem;
    }
    
    .search-button {
        padding: 0.625rem 1.25rem;
    }
    
    .product-card {
        margin: 0 0.75rem;
    }
    
    .btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.85rem;
    }
    
    .hero-slider {
        height: 250px;
    }
    
    .slide-title {
        font-size: 1.25rem;
    }
    
    .slide-description {
        font-size: 0.9rem;
    }
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    margin: -12px 0 0 -12px;
    border: 3px solid var(--secondary-light);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

/* Focus States for Accessibility */
.btn:focus,
.search-input:focus,
.page-link:focus {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --light-bg: #0f172a;
        --card-bg: #1e293b;
        --text-primary: #f8fafc;
        --text-secondary: #cbd5e1;
        --border-color: #334155;
    }
    
    body {
        background-color: var(--light-bg);
    }
    
    .product-card,
    .category-card,
    .featured-card {
        background: var(--card-bg);
        border-color: var(--border-color);
    }
}

/* Modern Blue Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

.fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

.slide-in-left {
    animation: slideInLeft 0.8s ease-out;
}

.pulse {
    animation: pulse 2s infinite;
}
