
:root {
    --primary: #d32f2f;
    --primary-dark: #b71c1c;
    --primary-light: #ff6659;
    --background: #fff;
    --text: #222;
    --card-bg: #f8f8f8;
    --border: #e0e0e0;
    --transition: 0.3s cubic-bezier(.4,0,.2,1);
    border: 2px solid #ff4b2b;
    
}
[data-theme="dark"] {
    --background: #181818;
    --text: #f5f5f5;
    --card-bg: #232323;
    --border: #333;
}
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
html {
    font-size: 16px;
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}
input:focus {                                                   /* M*/
    border: 2px solid #ff4b2b;
    box-shadow: 0 0 15px rgba(255, 75, 43, 0.8),
                 0 0 30px rgba(255, 75, 43, 0.4);           
      outline: none;
   
}
body {
    font-family: 'Roboto', Arial, sans-serif;
    background: var(--background);
    color: var(--text);
    min-height: 100vh;
    transition: background var(--transition), color var(--transition);
    overflow-x: hidden;
    word-wrap: break-word;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

main {
    width: 100%;
    margin: 0;
    padding: 0;
}
header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--background);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: background var(--transition);
    width: 100%;
}
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    width: 100%;
}
.logo {
    font-size: clamp(1.2rem, 2.5vw, 1.7rem);
    font-weight: 700;
    color: var(--primary);
    
    display: flex;
    align-items: center;
    gap: 0.5rem;
    z-index: 1001;
    flex-shrink: 0;
}
.logo a {
    color: var(--primary);
    text-decoration: none;
}
.nav-links {
    display: flex;
    align-items: center;
    gap: clamp(0.5rem, 2vw, 1.5rem);
    list-style: none;
    flex-wrap: wrap;
}
.nav-links a {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    padding: clamp(0.3rem, 1vw, 0.5rem) clamp(0.5rem, 1.5vw, 0.8rem);
    border-radius: 4px;
    transition: background var(--transition), color var(--transition);
    min-height: 44px;
    display: flex;
    align-items: center;
    white-space: nowrap;
}
.nav-links a.active, .nav-links a:hover {
    background: var(--primary-light);
    color: #fff;
    border: 2px solid #ff4b2b;
    box-shadow: 0 0 15px rgba(255, 75, 43, 0.8),
                 0 0 30px rgba(255, 75, 43, 0.4);  /* m */
}
.dropdown {
    position: relative;
    transition: none;
}
.dropdown-content {
    display: none;
    position: absolute;
    background: var(--background);
    min-width: 160px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border-radius: 6px;
    top: 2.5rem;
    left: 0;
    z-index: 10;
    list-style: none;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    margin-top: 5px;
    z-index: 1000;
    max-width: 200px;
}
.dropdown:hover .dropdown-content,
.dropdown-content:hover,
.dropdown.hover .dropdown-content {
    display: block;
    opacity: 1;
    transform: translateY(0);
    border: 2px solid #ff4b2b;
    box-shadow: 0 0 15px rgba(255, 75, 43, 0.8),
                 0 0 30px rgba(255, 75, 43, 0.4);
}
.dropdown-content li a {
    display: block;
    padding: 0.7rem 1rem;
    color: var(--text);
    border-radius: 0;
    transition: background var(--transition), color var(--transition);
    min-height: 44px;
    word-wrap: break-word;
}
.dropdown-content li a:hover {
    background: var(--primary-light);
    color: #fff;
}
.search-bar {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    margin-left: 1.5rem;
    flex-shrink: 0;
}
.search-bar-input {
    padding: 0.4rem 0.8rem;
    border: 1px solid var(--border);
    border-radius: 4px 0 0 4px;
    outline: none;
    font-size: 1rem;
    background: var(--card-bg);
    color: var(--text);
    transition: border var(--transition);
    width: clamp(150px, 20vw, 200px);
    min-height: 44px;
    
}
.search-bar button {
    padding: 0.4rem 0.7rem;
    border: none;
    background: var(--primary);
    color: #fff;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    transition: background var(--transition);
    min-height: 44px;
    min-width: 44px;
    display: flex;
    align-items: center;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    user-select: none;
    
}
.search-bar button:hover {
    background: var(--primary-dark);
    border: 2px solid #c0c0c0;
  
  
}
#theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    position: relative;
    color: var(--text-color);

    margin-left: 1.2rem;
    transition: color var(--transition);
    padding: 0.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    user-select: none;
    transition: all 0.2s ease;
}


#theme-toggle .fa-moon {
    display: inline-block;
    
    text-shadow: 0 0 5px #555  
    , 0 0 10px rgba(100, 100, 100, 0.5)
    , 0 0 15px rgba(100, 100, 100, 0.3)
    , 0 0 20px rgba(100, 100, 100, 0.1) 
    , 0 0 2px rgba(100, 100, 100, 0.1);
    transition: all 0.3s ease;
    position: relative;
}


#theme-toggle .fa-sun {
    display: none;
    color: #ffd700;
    text-shadow: 0 0 10px gold, 0 0 20px rgba(255, 215, 0, 0.5);
    
    /* color: var(--primary-dark);
    text-shadow: 0 0 10px var(--primary-dark), 0 0 20px var(--primary-dark); */
    
    transition: all 0.3s ease;
}

 
[data-theme="dark"] #theme-toggle .fa-moon {
    display: none;
}

[data-theme="dark"] #theme-toggle .fa-sun {
    display: inline-block;
}




#theme-toggle:hover .fa-moon {
    transform: rotate(250deg);
    text-shadow: 0 0 5px #333  
    , 0 0 8px rgba(80, 80, 80, 0.6)
    , 0 0 15px rgba(80, 80, 80, 0.4)
    , 0 0 20px rgba(80, 80, 80, 0.2) 
    , 0 0 3px rgba(80, 80, 80, 0.1);}

#theme-toggle:hover .fa-sun {
    transform: rotate(360deg);
    text-shadow: 0 0 15px gold, 0 0 30px rgba(255, 215, 0, 0.7)
    , 0 0 45px rgba(255, 215, 0, 0.3) ;

    /* text-shadow: 0 0 15px var(--primary-dark), 0 0 30px rgba(255, 0, 0, 0.7)
    , 0 0 45px rgba(255, 0, 0, 0.3) ; */
}


#cart-count {
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    padding: 0.2rem 0.5rem;
    font-size: 0.8rem;
    margin-left: 0.3rem;
    display: inline-block;
    min-width: 1.2rem;
    text-align: center;
    
}
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary);
    margin-left: 1rem;
    cursor: pointer;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    user-select: none;
}
.hero {
    background: linear-gradient(90deg, var(--primary-light) 0%, var(--primary) 100%);
    color: #fff;
    padding: clamp(2rem, 8vh, 4rem) clamp(1rem, 4vw, 2rem) clamp(1.5rem, 6vh, 3rem) clamp(1rem, 4vw, 2rem);
    text-align: center;
    animation: fadeIn 1s;
    min-height: 40vh;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin: 0;
    box-sizing: border-box;
}
.hero-content {
    max-width: 800px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin: 0 auto;
    padding: 0;
    box-sizing: border-box;
}
.hero-content h1 {
    font-size: clamp(1.5rem, 5vw, 2.5rem);
    margin-bottom: clamp(0.5rem, 2vh, 1rem);
    line-height: 1.2;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
    background: linear-gradient(45deg, #eaeaea, #a9a9a9, #c69999);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 15px rgba(192, 192, 192, 0.7);
}
.hero-content p {
    font-size: clamp(0.9rem, 2.5vw, 1.2rem);
    margin-bottom: clamp(1rem, 4vh, 2rem);
    line-height: 1.4;
    text-align: center;
    width: 100%;
    max-width: 600px;
    box-sizing: border-box;
}
.btn {
    padding: clamp(0.5rem, 2vw, 0.7rem) clamp(1rem, 3vw, 1.5rem);
    border: none;
    border-radius: 4px;
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition), color var(--transition), box-shadow var(--transition);
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    text-align: center;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    user-select: none;
}
.btn-primary {
    background: var(--primary);
    color: #fff;
}
.btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: 0 2px 8px rgba(211,47,47,0.15);
    border: 2px solid #ff4b2b;
    box-shadow: 0 0 15px rgba(255, 75, 43, 0.8),
                 0 0 30px rgba(255, 75, 43, 0.4);
}
.featured-products, .product-listing, .cart-page, .auth-page {
    max-width: 1200px;
    margin: clamp(1rem, 4vh, 2rem) auto;
    padding: clamp(0.5rem, 2vw, 1rem) clamp(1rem, 4vw, 2rem);
    width: 100%;
}
.featured-products h2, .product-listing h2, .cart-page h2 {
    margin-bottom: clamp(0.8rem, 3vh, 1.5rem);
    color: var(--primary);
    font-size: clamp(1.5rem, 4vw, 2rem);
}
.product-categories {
    display: flex;
    gap: clamp(0.5rem, 2vw, 1rem);
    margin-bottom: clamp(1rem, 3vh, 1.5rem);
    flex-wrap: wrap;
    justify-content: center;
}
.category-btn {
    background: var(--card-bg);
    color: var(--primary);
    border: 1px solid var(--primary-light);
    border-radius: 4px;
    padding: clamp(0.3rem, 1.5vw, 0.5rem) clamp(0.8rem, 2.5vw, 1.2rem);
    cursor: pointer;
    font-weight: 500;
    transition: background var(--transition), color var(--transition);
    min-height: 44px;
    min-width: 44px;
    display: flex;
    align-items: center;
    white-space: nowrap;
    font-size: clamp(0.8rem, 2.5vw, 1rem);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    user-select: none;
}
.category-btn.active, .category-btn:hover {
    background: var(--primary);
    color: #fff;
    border: 2px solid #ff4b2b;
    box-shadow: 0 0 15px rgba(255, 75, 43, 0.8),
                 0 0 30px rgba(255, 75, 43, 0.4);
}
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(clamp(200px, 25vw, 280px), 1fr));
    gap: clamp(1rem, 3vw, 2rem);
    width: 100%;
}
.product-card {
    background: var(--card-bg);
    border-radius: 8px;
    padding: clamp(0.8rem, 2.5vw, 1rem);
    text-align: center;
    transition: transform var(--transition), box-shadow var(--transition);
    position: relative;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    height: 100%;
     box-shadow: 0 0 15px rgba(192, 192, 192, 0.8),
                 0 0 30px rgba(169, 169, 169, 0.4);
}
.product-card:hover  {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    box-shadow: 
    0 15px 30px rgba(0, 0, 0, 0.3),
    0 0 30px rgba(255, 75, 43, 0.8), 
    0 0 60px rgba(255, 75, 43, 0.4);
}
.product-card img {
    width: clamp(80px, 20vw, 150px);
    height: clamp(80px, 20vw, 150px);
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: clamp(0.5rem, 2vh, 1rem);
    align-self: center;
    
    
  
}
.product-card .wishlist {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(255,255,255,0.9);
    border: none;
    border-radius: 50%;
    width: clamp(44px, 8vw, 44px);
    height: clamp(44px, 8vw, 44px);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
    min-width: 44px;
    min-height: 44px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    user-select: none;
    /* Transition Heart */
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    font-size: 20px; 
    color: gray; 
}

  
  
  .product-card .wishlist:hover {
    color: red; 
    transform: scale(1.2);
    text-shadow: 0 0 8px rgba(255, 0, 0, 0.6);
  }
  
 
  .product-card .wishlist.active {
    color: red;
    text-shadow: 0 0 12px rgba(255, 0, 0, 0.8);
  }

.product-card h3 {
    margin-bottom: clamp(0.3rem, 1vh, 0.5rem);
    color: var(--text);
    font-size: clamp(0.9rem, 2.5vw, 1.1rem);
    line-height: 1.3;
}
.product-card .price {
    font-size: clamp(1rem, 3vw, 1.2rem);
    font-weight: 600;
    color: var(--primary);
    margin-bottom: clamp(0.5rem, 2vh, 1rem);
}
.product-card .add-cart-btn {
    width: 100%;
    background: var(--primary);
    color: #fff;
    border: none;
    padding: clamp(0.5rem, 2vw, 0.7rem);
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: background var(--transition);
    min-height: 44px;
    min-width: 44px;
    margin-top: auto;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    user-select: none;
    border: 2px solid #c0c0c0;
    
 
  
}
.add-cart-btn:hover {
    background-color: rgba(0, 204, 25, 0.8) ;
    box-shadow: 0 0 15px rgba(0, 204, 25, 0.8),
               0 0 30px rgba(0, 204, 25, 0.4);
}
.product-card .add-cart-btn:active {
    transform: scale(0.98);
        
}
.wishlist {
    color: #ccc;
    transition: color var(--transition);
}
.wishlist:active {
    transform: scale(0.95);
}
.listing-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: clamp(1rem, 4vh, 2rem);
    flex-wrap: wrap;
    gap: clamp(0.5rem, 2vw, 1rem);
}
.filters {
    display: flex;
    gap: clamp(0.5rem, 2vw, 1rem);
    flex-wrap: wrap;
   
}
.filters select {
    padding: clamp(0.4rem, 1.5vw, 0.5rem);
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--card-bg);
    color: var(--text);
    min-height: 44px;
    font-size: clamp(0.8rem, 2.5vw, 1rem);
    box-shadow: 0 0 15px rgba(192, 192, 192, 0.8),
    0 0 30px rgba(169, 169, 169, 0.4);
}
.cart-page {
    max-width: 800px;
}
#cart-items {
    margin-bottom: clamp(1rem, 4vh, 2rem);
}
.cart-item {
    display: flex;
    align-items: center;
    gap: clamp(0.5rem, 2vw, 1rem);
    padding: clamp(0.8rem, 2.5vw, 1rem);
    box-shadow: 0 0 15px rgba(192, 192, 192, 0.8),
    0 0 30px rgba(169, 169, 169, 0.4);
    border-radius: 8px;
    margin-bottom: clamp(0.5rem, 2vh, 1rem);
    background: var(--card-bg);
    flex-wrap: wrap;
}
.cart-item:last-child {
    margin-bottom: 0;
}
.cart-item img {
    width: clamp(50px, 15vw, 80px);
    height: clamp(50px, 15vw, 80px);
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}
.cart-item-details {
    flex: 1;
    min-width: 0;
}
.cart-item-title {
    font-weight: 600;
    margin-bottom: clamp(0.2rem, 1vh, 0.5rem);
    font-size: clamp(0.9rem, 2.5vw, 1rem);
}
.cart-item-price {
    color: var(--primary);
    font-weight: 600;
    font-size: clamp(0.9rem, 2.5vw, 1rem);
}
.cart-item-qty {
    display: flex;
    align-items: center;
    gap: clamp(0.3rem, 1vw, 0.5rem);
}
.cart-item-qty input {
    width: clamp(50px, 12vw, 60px);
    padding: clamp(0.2rem, 1vw, 0.3rem);
    border: 1px solid var(--border);
    border-radius: 4px;
    text-align: center;
    min-height: 44px;
    font-size: clamp(0.8rem, 2.5vw, 1rem);
}
.cart-item-remove {
    background: #dc3545;
    color: #fff;
    border: none;
    padding: clamp(0.3rem, 1.5vw, 0.5rem);
    border-radius: 4px;
    cursor: pointer;
    transition: background var(--transition);
    min-height: 44px;
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    user-select: none;
}
.cart-item-remove:hover {
    background: #c82333;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    box-shadow: 
    0 15px 30px rgba(0, 0, 0, 0.3),
    0 0 30px rgba(255, 75, 43, 0.8), 
    0 0 60px rgba(255, 75, 43, 0.4);
}
.cart-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: clamp(0.8rem, 2.5vw, 1rem);
    background: var(--card-bg);
    border-radius: 8px;
    border: 1px solid var(--border);
    flex-wrap: wrap;
    gap: clamp(0.5rem, 2vw, 1rem);
    box-shadow: 0 0 15px rgba(192, 192, 192, 0.8),
    0 0 30px rgba(169, 169, 169, 0.4);
}
#checkout-btn:hover {
    border: none;
    background-color: rgba(0, 204, 25, 0.8) ;
    box-shadow: 0 0 15px rgba(0, 204, 25, 0.8),
               0 0 30px rgba(0, 204, 25, 0.4);
}

.form-group {
    margin-bottom: clamp(1rem, 3vh, 1.5rem);
}
.form-group label {
    display: block;
    margin-bottom: clamp(0.3rem, 1vh, 0.5rem);
    font-weight: 500;
    font-size: clamp(0.9rem, 2.5vw, 1rem);
}
.form-group input {
    width: 100%;
    padding: clamp(0.5rem, 2vw, 0.7rem);
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--background);
    color: var(--text);
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    transition: border var(--transition);
    min-height: 44px;
}

.auth-form .btn {
    width: 100%;
    margin-top: clamp(0.8rem, 2.5vh, 1rem);
}
.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}
.toggle-password {
    position: absolute;
    right: clamp(0.5rem, 1.5vw, 0.7rem);
    cursor: pointer;
    color: var(--text);
    padding: clamp(0.3rem, 1.5vw, 0.5rem);
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    user-select: none;
}
.toggle-password:hover {
    color: var(--primary);
}
footer {
    background: var(--card-bg);
    padding: clamp(1rem, 4vh, 2rem);
    margin-top: clamp(2rem, 8vh, 4rem);
    border-top: 1px solid var(--border);
    width: 100%;
}
.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: clamp(0.5rem, 2vw, 1rem);
}
.footer-links {
    display: flex;
    gap: clamp(0.5rem, 2vw, 1rem);
    flex-wrap: wrap;
}
.footer-links a {
    color: var(--text);
    text-decoration: none;
    transition: color var(--transition);
    font-size: clamp(0.8rem, 2.5vw, 1rem);
}
.footer-links a:hover {
    color: var(--primary);
    
    text-shadow: 0 0 15px rgba(255, 75, 43, 0.8),
                 0 0 30px rgba(255, 75, 43, 0.4);
                
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.dropdown.open > .dropdown-content {
    display: block;
    opacity: 1;
    transform: translateY(0);
}
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
@keyframes slideOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.dropdown::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 10px;
    background: transparent;
}

/* ========== UNIVERSAL RESPONSIVE DESIGN ========== */

/* Ultra Wide Screens (2000px and above) */
@media (min-width: 2000px) {
    .navbar {
        padding: 1.5rem 4rem;
        max-width: 1600px;
    }
    .hero-content h1 {
        font-size: 4rem;
    }
    .hero-content p {
        font-size: 1.6rem;
    }
    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
        gap: 3rem;
    }
    .featured-products, .product-listing, .cart-page {
        max-width: 1600px;
        padding: 3rem 4rem;
    }
}

/* Large Desktop (1600px to 1999px) */
@media (max-width: 1999px) and (min-width: 1600px) {
    .navbar {
        padding: 1.5rem 3rem;
        max-width: 1400px;
    }
    .hero-content h1 {
        font-size: 3.5rem;
    }
    .hero-content p {
        font-size: 1.5rem;
    }
    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
        gap: 2.5rem;
    }
    .featured-products, .product-listing, .cart-page {
        max-width: 1400px;
        padding: 2.5rem 3rem;
    }
}

/* Desktop (1400px to 1599px) */
@media (max-width: 1599px) and (min-width: 1400px) {
    .navbar {
        padding: 1rem 3rem;
        max-width: 1200px;
    }
    .hero-content h1 {
        font-size: 3.5rem;
    }
    .hero-content p {
        font-size: 1.4rem;
    }
    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
        gap: 2.5rem;
    }
    .featured-products, .product-listing, .cart-page {
        padding: 2rem 3rem;
    }
}

/* Standard Desktop (1200px to 1399px) */
@media (max-width: 1399px) and (min-width: 1200px) {
    .navbar {
        padding: 1rem 2rem;
    }
    .hero-content h1 {
        font-size: 3rem;
    }
    .hero-content p {
        font-size: 1.3rem;
    }
    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
        gap: 2rem;
    }
    .featured-products, .product-listing, .cart-page {
        padding: 2rem;
    }
}

/* Large Tablet (992px to 1199px) */
@media (max-width: 1199px) and (min-width: 992px) {
    .navbar {
        padding: 1rem 1.5rem;
    }
    .hero-content h1 {
        font-size: 2.5rem;
    }
    .hero-content p {
        font-size: 1.2rem;
    }
    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1.8rem;
    }
    .featured-products, .product-listing, .cart-page {
        padding: 1.5rem 2rem;
    }
}

/* Tablet (768px to 991px) */
@media (max-width: 991px) and (min-width: 768px) {
    .navbar {
        padding: 1rem;
    }
    .nav-links {
        gap: 1rem;
    }
    .search-bar-input {
        width: 200px;
    }
    .hero-content h1 {
        font-size: 2.2rem;
    }
    .hero-content p {
        font-size: 1.1rem;
    }
    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.5rem;
    }
    .featured-products, .product-listing, .cart-page, .auth-page {
        padding: 1.5rem;
    }
    .auth-container {
        max-width: 450px;
    }
}

/* Mobile Large (600px to 767px) */
@media (max-width: 767px) and (min-width: 600px) {
    .navbar {
        flex-direction: column;
        align-items: flex-start;
        padding: 1rem;
        gap: 1rem;
    }
    
    .nav-links {
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--background);
        padding: 1rem;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        border-top: 1px solid var(--border);
        z-index: 1000;
    }
    
    .nav-links.open {
        display: flex;
    }
    
    .search-bar {
        margin: 0;
        width: 100%;
        order: 3;
    }
    
    .search-bar-input {
        width: 100%;
        border-radius: 4px;
        font-size: 16px;
    }
    
    .search-bar button {
        border-radius: 4px;
        margin-left: 0.5rem;
    }
    
    .menu-toggle {
        display: flex;
        position: absolute;
        top: 1rem;
        right: 1rem;
    }
    
    .dropdown-content {
        position: static;
        box-shadow: none;
        border: 1px solid var(--border);
        margin-top: 0.5rem;
        border-radius: 4px;
        opacity: 1;
        transform: none;
        display: none;
        width: 100%;
    }
    
    .dropdown.open .dropdown-content,
    .dropdown.hover .dropdown-content {
        display: block;
    }
    
    .hero {
        padding: 3rem 1rem 2rem 1rem;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
    }
    
    .hero-content h1 {
        font-size: 2rem;
        text-align: center;
        width: 100%;
    }
    
    .hero-content p {
        font-size: 1rem;
        text-align: center;
        width: 100%;
        max-width: 600px;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 1.2rem;
    }
    
    .featured-products, .product-listing, .cart-page, .auth-page {
        padding: 1rem;
    }
    
    .auth-container {
        padding: 1.5rem;
        max-width: 100%;
        margin: 0 auto;
    }
    
    .listing-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .filters {
        width: 100%;
        justify-content: space-between;
        gap: 0.5rem;
    }
    
    .filters select {
        flex: 1;
        min-width: 0;
    }
    
    .cart-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .cart-item img {
        width: 70px;
        height: 70px;
    }
    
    .cart-summary {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
}

/* Mobile Medium (480px to 599px) */
@media (max-width: 599px) and (min-width: 480px) {
    .navbar {
        flex-direction: column;
        align-items: flex-start;
        padding: 0.8rem;
        gap: 0.8rem;
    }
    
    .nav-links {
        flex-direction: column;
        gap: 0.4rem;
        width: 100%;
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--background);
        padding: 0.8rem;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        border-top: 1px solid var(--border);
        z-index: 1000;
    }
    
    .nav-links.open {
        display: flex;
    }
    
    .search-bar {
        margin: 0;
        width: 100%;
        order: 3;
    }
    
    .search-bar-input {
        width: 100%;
        border-radius: 4px;
        font-size: 16px;
        padding: 0.5rem 0.8rem;
    }
    
    .search-bar button {
        border-radius: 4px;
        margin-left: 0.5rem;
        padding: 0.5rem 0.8rem;
    }
    
    .menu-toggle {
        display: flex;
        position: absolute;
        top: 0.8rem;
        right: 0.8rem;
    }
    
    .dropdown-content {
        position: static;
        box-shadow: none;
        border: 1px solid var(--border);
        margin-top: 0.5rem;
        border-radius: 4px;
        opacity: 1;
        transform: none;
        display: none;
        width: 100%;
    }
    
    .dropdown.open .dropdown-content,
    .dropdown.hover .dropdown-content {
        display: block;
    }
    
    .hero {
        padding: 2.5rem 0.8rem 1.5rem 0.8rem;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
    }
    
    .hero-content h1 {
        font-size: 1.8rem;
        text-align: center;
        width: 100%;
    }
    
    .hero-content p {
        font-size: 0.95rem;
        text-align: center;
        width: 100%;
        max-width: 600px;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 1rem;
    }
    
    .featured-products, .product-listing, .cart-page, .auth-page {
        padding: 0.8rem;
    }
    
    .auth-container {
        padding: 1.2rem;
        max-width: 100%;
        margin: 0 auto;
    }
    
    .product-card {
        padding: 0.8rem;
    }
    
    .product-card img {
        width: 120px;
        height: 120px;
    }
    
    .cart-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .cart-item img {
        width: 60px;
        height: 60px;
    }
    
    .cart-summary {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .listing-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .filters {
        width: 100%;
        justify-content: space-between;
        gap: 0.5rem;
    }
    
    .filters select {
        flex: 1;
        min-width: 0;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
}

/* Mobile Small (320px to 479px) */
@media (max-width: 479px) {
    .navbar {
        flex-direction: column;
        align-items: flex-start;
        padding: 0.6rem;
        gap: 0.6rem;
    }
    
    .nav-links {
        flex-direction: column;
        gap: 0.3rem;
        width: 100%;
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--background);
        padding: 0.6rem;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        border-top: 1px solid var(--border);
        z-index: 1000;
    }
    
    .nav-links.open {
        display: flex;
    }
    
    .search-bar {
        margin: 0;
        width: 100%;
        order: 3;
    }
    
    .search-bar-input {
        width: 100%;
        border-radius: 4px;
        font-size: 16px;
        padding: 0.4rem 0.6rem;
    }
    
    .search-bar button {
        border-radius: 4px;
        margin-left: 0.3rem;
        padding: 0.4rem 0.6rem;
    }
    
    .menu-toggle {
        display: flex;
        position: absolute;
        top: 0.6rem;
        right: 0.6rem;
    }
    
    .dropdown-content {
        position: static;
        box-shadow: none;
        border: 1px solid var(--border);
        margin-top: 0.5rem;
        border-radius: 4px;
        opacity: 1;
        transform: none;
        display: none;
        width: 100%;
    }
    
    .dropdown.open .dropdown-content,
    .dropdown.hover .dropdown-content {
        display: block;
    }
    
    .hero {
        padding: 2rem 0.6rem 1.5rem 0.6rem;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
    }
    
    .hero-content h1 {
        font-size: 1.5rem;
        text-align: center;
        width: 100%;
    }
    
    .hero-content p {
        font-size: 0.9rem;
        text-align: center;
        width: 100%;
        max-width: 600px;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 0.8rem;
    }
    
    .featured-products, .product-listing, .cart-page, .auth-page {
        padding: 0.6rem;
    }
    
    .auth-container {
        padding: 1rem;
        max-width: 100%;
        margin: 0 auto;
    }
    
    .product-card {
        padding: 0.6rem;
    }
    
    .product-card img {
        width: 100px;
        height: 100px;
    }
    
    .product-card h3 {
        font-size: 0.9rem;
    }
    
    .product-card .price {
        font-size: 1rem;
    }
    
    .cart-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.4rem;
    }
    
    .cart-item img {
        width: 50px;
        height: 50px;
    }
    
    .cart-summary {
        flex-direction: column;
        gap: 0.8rem;
        align-items: flex-start;
    }
    
    .category-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }
    
    .filters select {
        font-size: 0.85rem;
        padding: 0.4rem 0.6rem;
    }
    
    .btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
    
    .listing-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.8rem;
    }
    
    .filters {
        width: 100%;
        justify-content: space-between;
        gap: 0.4rem;
    }
    
    .filters select {
        flex: 1;
        min-width: 0;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 0.8rem;
    }
}

/* Extra Small Mobile (below 320px) */
@media (max-width: 319px) {
    .hero-content h1 {
        font-size: 1.3rem;
        text-align: center;
        width: 100%;
    }
    
    .hero-content p {
        font-size: 0.8rem;
        text-align: center;
        width: 100%;
        max-width: 600px;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
        gap: 0.6rem;
    }
    
    .product-card {
        padding: 0.5rem;
    }
    
    .product-card img {
        width: 80px;
        height: 80px;
    }
    
    .auth-container {
        padding: 0.8rem;
        margin: 0 auto;
    }
    
    .navbar {
        padding: 0.5rem;
        gap: 0.5rem;
    }
    
    .nav-links {
        padding: 0.5rem;
        gap: 0.2rem;
    }
    
    .search-bar-input {
        padding: 0.3rem 0.5rem;
    }
    
    .search-bar button {
        padding: 0.3rem 0.5rem;
    }
    
    .menu-toggle {
        top: 0.5rem;
        right: 0.5rem;
    }
    
    .hero {
        padding: 1.5rem 0.5rem 1rem 0.5rem;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
    }
    
    .featured-products, .product-listing, .cart-page, .auth-page {
        padding: 0.5rem;
    }
}

/* Landscape orientation adjustments */
@media (max-width: 767px) and (orientation: landscape) {
    .hero {
        padding: 1.5rem 1rem;
        min-height: 40vh;
    }
    
    .hero-content h1 {
        font-size: 1.8rem;
        text-align: center;
        width: 100%;
    }
    
    .auth-page {
        min-height: 50vh;
    }
}

/* Portrait orientation adjustments */
@media (max-width: 767px) and (orientation: portrait) {
    .hero {
        min-height: 50vh;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .product-card img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Print styles */
@media print {
    .navbar, .menu-toggle, .search-bar, .btn, .wishlist {
        display: none !important;
    }
    
    .hero {
        background: none !important;
        color: #000 !important;
        padding: 1rem !important;
    }
    
    .product-card {
        break-inside: avoid;
        border: 1px solid #ccc !important;
    }
    
    .cart-page {
        display: none !important;
    }
}

/* Focus styles for accessibility */
@media (prefers-reduced-motion: no-preference) {
    .btn:focus,
    .nav-links a:focus,
    .category-btn:focus,
    .product-card .add-cart-btn:focus,
    .product-card .wishlist:focus,
    .form-group input:focus,
    .toggle-password:focus {
        outline: 2px solid var(--primary);
        outline-offset: 2px;
    }
}

/* Mobile touch improvements */
@media (max-width: 767px) {
    .btn,
    .category-btn,
    .product-card .add-cart-btn,
    .product-card .wishlist,
    .toggle-password,
    .cart-item-remove,
    .menu-toggle,
    #theme-toggle,
    .search-bar button {
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
        user-select: none;
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
    }
    
    /* Ensure buttons are large enough for touch */
    .btn,
    .category-btn,
    .product-card .add-cart-btn,
    .cart-item-remove {
        min-height: 48px;
        min-width: 48px;
    }
    
    /* Improve touch targets for small buttons */
    .product-card .wishlist,
    .toggle-password,
    .menu-toggle,
    #theme-toggle {
        min-height: 48px;
        min-width: 48px;
    }
} 