* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f9f9f9;
    color: #333;
    padding-top: 80px;
    min-height: 100vh;
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navbar - Responsive */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}

.navbar .logo {
    font-size: 20px;
    font-weight: 700;
    color: #2c3e50;
}

.navbar nav {
    display: flex;
    gap: 15px;
}

.navbar nav a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    font-size: 14px;
    transition: color 0.3s ease;
}

.navbar nav a:hover {
    color: #3498db;
}

/* Hamburger Menu for Mobile */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: #333;
    transition: 0.3s;
}

/* Hero Section - Responsive */
.hero {
    position: relative;
    height: 80vh;
    min-height: 500px;
    width: 100%;
    overflow: hidden;
    margin-bottom: 40px;
}

.hero-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(80%);
}

.hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    padding: 0 20px;
    width: 100%;
}

.hero-content h1 {
    font-size: clamp(28px, 5vw, 48px);
    font-weight: 700;
    margin-bottom: 15px;
}

.hero-content h1 span {
    color: #ffd700;
}

.hero-content p {
    font-size: clamp(14px, 2vw, 18px);
    margin: 10px 0 20px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.btn {
    background: white;
    color: black;
    padding: 12px 25px;
    border-radius: 50px;
    font-size: 14px;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Header */
header {
    text-align: center;
    margin-bottom: 40px;
    padding: 20px;
    animation: fadeInDown 1s ease-out;
}

header h1 {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    color: #2c3e50;
    margin-bottom: 10px;
}

header p {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: #7f8c8d;
    max-width: 700px;
    margin: 0 auto;
}

.highlight {
    color: #e74c3c;
    font-weight: bold;
}

/* Filters - Responsive */
.filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 40px;
    animation: fadeIn 1.2s ease-out;
    padding: 0 10px;
}

.filter-btn {
    padding: 10px 20px;
    background-color: white;
    border: 2px solid #ddd;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    white-space: nowrap;
}

.filter-btn:hover, .filter-btn.active {
    background-color: #3498db;
    color: white;
    border-color: #3498db;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.2);
}

/* Products Grid - Fully Responsive */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 50px;
    padding: 0 10px;
}


.product-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s forwards;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-img-container {
    height: 250px;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

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

.product-info {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 1.2rem;
    margin-bottom: 8px;
    color: #2c3e50;
}

.product-description {
    color: #7f8c8d;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 15px;
    flex-grow: 1;
}

.product-price {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.current-price {
    font-size: 1.4rem;
    font-weight: bold;
    color: #2c3e50;
}

.original-price {
    font-size: 1rem;
    color: #95a5a6;
    text-decoration: line-through;
}

.product-actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
}

.add-to-cart, .view-details {
    flex: 1;
    text-align: center;
    white-space: nowrap;
}

.add-to-cart {
    background-color: #2ecc71;
    color: white;
    border: none;
    padding: 12px 15px;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
}

.view-details {
    background-color: transparent;
    color: #3498db;
    border: 2px solid #3498db;
    padding: 10px 15px;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

/* Size and Color Options - Responsive */
.size-options {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.size-option {
    min-width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f1f2f6;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
    padding: 0 5px;
    font-size: 14px;
}

.color-options {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

/* Footer */
footer {
    text-align: center;
    padding: 30px 20px;
    color: #7f8c8d;
    border-top: 1px solid #eee;
    margin-top: 30px;
    animation: fadeIn 1.5s ease-out;
}

/* Animations */
@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Media Queries for Responsive Design */
@media (max-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }
    
    .hero {
        height: 70vh;
    }
}

@media (max-width: 992px) {
    .container {
        padding: 0 15px;
    }
    
    .navbar {
        padding: 12px 15px;
    }
    
    .navbar nav {
        gap: 10px;
    }
    
    .navbar nav a {
        font-size: 13px;
    }
    
    .hero-content {
        padding: 0 15px;
    }
    
    .product-img-container {
        height: 220px;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .navbar nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: white;
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
    }
    
    .navbar nav.active {
        display: flex;
    }
    
    .navbar nav a {
        margin: 5px 0;
        padding: 10px;
        border-bottom: 1px solid #eee;
    }
    
    .hero {
        height: 60vh;
        min-height: 400px;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 15px;
    }
    
    .filters {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 10px;
        -webkit-overflow-scrolling: touch;
    }
    
    .filter-btn {
        flex-shrink: 0;
    }
    
    .product-actions {
        flex-direction: column;
    }
    
    .add-to-cart, .view-details {
        width: 100%;
    }
}

@media (max-width: 576px) {
    body {
        padding-top: 70px;
    }
    
    .hero {
        height: 50vh;
        min-height: 350px;
    }
    
    .hero-content h1 {
        font-size: 24px;
    }
    
    .hero-content p {
        font-size: 14px;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 13px;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .product-img-container {
        height: 200px;
    }
    
    .product-info {
        padding: 15px;
    }
    
    .product-title {
        font-size: 1.1rem;
    }
    
    header h1 {
        font-size: 1.5rem;
    }
    
    header p {
        font-size: 0.9rem;
    }
    
    .filters {
        gap: 5px;
    }
    
    .filter-btn {
        padding: 8px 15px;
        font-size: 12px;
    }
}

/* For very small screens */
@media (max-width: 375px) {
    .navbar {
        padding: 10px;
    }
    
    .logo {
        font-size: 18px;
    }
    
    .hero {
        height: 45vh;
    }
    
    .product-actions {
        gap: 8px;
    }
    
    .add-to-cart, .view-details {
        padding: 10px;
        font-size: 12px;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .filter-btn:hover, 
    .add-to-cart:hover, 
    .view-details:hover,
    .product-card:hover {
        transform: none;
    }
    
    .filter-btn:active, 
    .add-to-cart:active, 
    .view-details:active {
        transform: scale(0.98);
    }
}

/* Print styles */
@media print {
    .navbar, .hero, .filters, .product-actions, footer {
        display: none;
    }
    
    body {
        padding: 0;
        background: white;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .product-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}
/* Page Container Layout */
.page-container {
    display: flex;
    min-height: calc(100vh - 80px); /* Adjust based on your header height */
    gap: 2rem;
    padding: 2rem;
    margin: 0 auto;
}

/* Filter Sidebar */
.filter-sidebar {
    width: 280px;
    flex-shrink: 0;
    position: sticky;
    top: 20px;
    height: fit-content;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

.filter-wrapper {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    padding: 20px;
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.filter-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.clear-filters-btn {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #495057;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s ease;
}

.clear-filters-btn:hover {
    background: #e5e7eb;
    border-color: #adb5bd;
}

.filter-section {
    margin-bottom: 1rem;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 15px;
}

.filter-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.filter-accordion {
    border-radius: 6px;
    overflow: hidden;
}

.filter-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    cursor: pointer;
    list-style: none;
    font-weight: 500;
    color: #444;
    font-size: 15px;
}

.filter-summary::-webkit-details-marker {
    display: none;
}

.accordion-icon {
    transition: transform 0.3s ease;
    font-size: 10px;
    color: #888;
}

.filter-accordion[open] .accordion-icon {
    transform: rotate(180deg);
}

.filter-options {
    margin-top: 10px;
    padding-left: 5px;
}

.filter-option {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.filter-option input[type="checkbox"],
.filter-option input[type="radio"] {
    margin-right: 0.5rem;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.filter-option label {
    cursor: pointer;
    font-size: 0.875rem;
    color: #555;
    user-select: none;
}

.sort-select {
        border: 2px solid #d1d5db;
        border-radius: 8px;
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
        cursor: pointer;
        background: white;
        min-width: 200px;
    }

.sort-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Main Content Area */
.main-content {
    flex: 1;
    min-width: 0;
    padding: 20px;
}

/* Products Grid */
.products-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    align-content: start;
    margin-top: 1.5rem;
}

.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.product-img-container {
    position: relative;
    height: 500px;
    overflow: hidden;
    background: #f8f9fa;
}

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

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

.product-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: linear-gradient(135deg, #ff6b6b, #ff8e8e);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.product-info {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #1f2937;
    line-height: 1.4;
}

.product-description {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 0.75rem;
    line-height: 1.5;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.size-options {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.size-option {
    padding: 0.25rem 0.5rem;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 0.75rem;
    color: #4b5563;
    background: #f3f4f6;
}

.product-price {
    margin-bottom: 1rem;
}

.current-price {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
}

.product-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: auto;
}

.add-to-cart {
    flex: 1;
    padding: 0.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;

}

.view-details {
    flex: 1;
    background: white;
    color: #3b82f6;
    border: 1px solid #3b82f6;
    padding: 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
}

.add-to-cart {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
}

.add-to-cart:hover {
    background: linear-gradient(135deg, #2980b9, #1c6ea4);
    transform: translateY(-2px);
}

.view-details {
    background: #f8f9fa;
    color: #495057;
    border: 2px solid #dee2e6;
}

.view-details:hover {
    background: #e9ecef;
    border-color: #adb5bd;
    transform: translateY(-2px);
}

/* Loading and Empty States */
#loading-indicator {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
}

.loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3b82f6;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

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

#no-products {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    background: #f8f9fa;
    border-radius: 12px;
    margin-top: 20px;
}

#no-products p {
    font-size: 16px;
    color: #666;
    margin-bottom: 20px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-container {
        flex-direction: column;
        gap: 20px;
    }
    
    .filter-sidebar {
        width: 100%;
        position: static;
        max-height: none;
    }
    
    .filter-wrapper {
        padding: 15px;
    }
    
    .products-grid-container {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .page-container {
        padding: 15px;
    }
    
    .products-grid-container {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 15px;
    }
    
    .product-img-container {
        height: 200px;
    }
    
    .product-info {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .products-grid-container {
        grid-template-columns: 1fr;
    }
    
    .product-actions {
        flex-direction: column;
    }
    
    .filter-options {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .filter-option {
        margin-bottom: 0;
    }
}


/* FULL SCREEN LOADER */
#page-loader {
  position: fixed;
  inset: 0;
  background: #ffffff; /* white background */
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.2s ease;
}

/* SPINNER */
.loader-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #eee;
  border-top: 4px solid #e10600; /* red accent */
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

/* SPIN ANIMATION */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* HIDE LOADER */
#page-loader.hidden {
  opacity: 0;
  pointer-events: none;
}
