:root {
  /* Brand Colors - New Dark Theme */
  --primary: #2563EB; /* Blue (Buttons/Buy Now) */
  --primary-dark: #1D4ED8;
  --secondary: #DC2626; /* Red (Discount/Limited) */
  --accent: #14B8A6; /* Teal (Ready Stock/Live) */
  
  --bg-dark: #0B0F19; /* Charcoal Black (Main Background) */
  --bg-card: #0F1623; /* Darker card background for contrast */
  --bg-ui: #1F2933; /* Dark Grey (UI Elements/Borders) */
  --bg-light: #F8FAFC; /* Soft White (Checkout Page) */
  
  --text-main: #FFFFFF;
  --text-muted: #94A3B8;
  --border: #1F2933;

  /* Fonts */
  --font-heading: 'Poppins', 'Montserrat', sans-serif;
  --font-body: 'Inter', 'Roboto', sans-serif;

  /* Gradients */
  --gradient-hero: linear-gradient(135deg, #0B0F19 0%, #111827 100%);
  --gradient-card: linear-gradient(180deg, rgba(31, 41, 51, 0.5) 0%, rgba(11, 15, 25, 0.8) 100%);

  /* Spacing */
  --container: 1200px;
  --header-height: 80px;

  /* Animation */
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: var(--font-body);
}

h1, h2, h3, h4, h5, h6, .logo, .section-title, .btn {
  font-family: var(--font-heading);
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
}

body.checkout-page {
    background-color: var(--bg-light);
    color: #1F2933; /* Dark text for white background */
}

body.checkout-page .container {
    color: #1F2933;
}

body.checkout-page h1, 
body.checkout-page h2, 
body.checkout-page h3, 
body.checkout-page p,
body.checkout-page span {
    color: #1F2933;
}

body.checkout-page .logo span {
    color: var(--primary);
}

/* Utilities */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  border-radius: 50px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-decoration: none;
  transition: var(--transition);
  cursor: pointer;
  border: none;
  font-size: 0.9rem;
}

.btn-primary {
  background: var(--primary);
  color: #000;
  box-shadow: 0 0 20px rgba(0, 242, 255, 0.3);
}

.btn-primary:hover {
  background: #fff;
  box-shadow: 0 0 30px rgba(0, 242, 255, 0.5);
  transform: translateY(-2px);
}

.btn-outline {
  border: 2px solid var(--primary);
  color: var(--primary);
  background: transparent;
}

.btn-outline:hover {
  background: rgba(0, 242, 255, 0.1);
  transform: translateY(-2px);
}

/* Header */
header {
  height: var(--header-height);
  background: rgba(11, 15, 25, 0.95); /* Charcoal with opacity */
  backdrop-filter: blur(10px);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  border-bottom: 1px solid var(--border);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
}

.logo {
  font-size: 1.8rem;
  font-weight: 800;
  color: #fff;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.logo span {
  color: var(--primary);
}

.nav-links {
  display: flex;
  gap: 30px;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
}

.nav-icons {
  display: flex;
  gap: 20px;
  align-items: center;
}

.cart-icon {
  position: relative;
  cursor: pointer;
  color: #fff;
  font-size: 1.2rem;
}

.cart-count {
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--secondary);
  color: #fff;
  font-size: 0.7rem;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

/* Language Switcher */
.lang-switch {
    display: flex;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 2px;
    position: relative;
    overflow: hidden;
}

.lang-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    padding: 5px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border-radius: 18px;
    position: relative;
    z-index: 2;
}

.lang-btn.active {
    color: #000;
    background: var(--primary);
    box-shadow: 0 0 10px rgba(37, 99, 235, 0.5);
}

.lang-btn:hover:not(.active) {
    color: #fff;
}

/* Sections */
section {
  padding: 80px 0;
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 15px;
  color: #fff;
}

.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 50px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Product Grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px;
}

.product-card {
  background: var(--bg-card);
  border-radius: 16px;
  overflow: hidden;
  transition: var(--transition);
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.product-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
  border-color: rgba(0, 242, 255, 0.3);
}

.product-image {
  width: 100%;
  height: 300px;
  object-fit: cover;
  background: var(--bg-card);
}

.product-badges {
  position: absolute;
  top: 15px;
  left: 15px;
  display: flex;
  gap: 10px;
}

.badge {
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.badge-new {
  background: var(--primary);
  color: #000;
}

.badge-sale {
  background: var(--secondary);
  color: #fff;
}

.product-info {
  padding: 20px;
}

.product-category {
  color: var(--text-muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 5px;
}

.product-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: #fff;
}

.product-price {
  font-size: 1.3rem;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 15px;
}

.product-actions {
  display: flex;
  gap: 10px;
}

.btn-add-cart {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  border: none;
  padding: 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
  font-weight: 600;
}

.btn-add-cart:hover {
  background: var(--primary);
  color: #000;
}

/* Footer */
footer {
  background: var(--bg-dark);
  padding: 60px 0 20px;
  border-top: 1px solid var(--border);
  margin-top: 80px;
}

.footer-content {
  display: flex;
  justify-content: space-between; /* Spread them out or use space-around/center */
  align-items: flex-start;
  gap: 40px;
  margin-bottom: 40px;
  text-align: center; /* Center text inside columns */
  flex-wrap: wrap;
}

/* Specific centering for the logo column to handle p width */
.footer-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center; /* Center items horizontally */
  min-width: 250px;
}

.footer-col h4 {
  color: #fff;
  margin-bottom: 20px;
  font-size: 1.1rem;
}

.footer-col p,
.footer-col a {
  color: var(--text-muted);
  font-size: 0.9rem;
  text-decoration: none;
  display: block;
  margin-bottom: 10px;
  transition: var(--transition);
}

.footer-col a:hover {
  color: var(--primary);
}

.copyright {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* Mobile Responsive */
.hamburger {
  display: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
}

/* Hero Section Utilities */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: var(--gradient-hero);
    overflow: hidden;
    padding-top: var(--header-height);
    position: relative;
}

.hero-bg-element {
    position: absolute;
    top: -20%;
    right: -10%;
    width: 60%;
    height: 80%;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.1) 0%, rgba(0,0,0,0) 70%);
    border-radius: 50%;
    filter: blur(80px);
    z-index: 1;
}

.hero-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.hero-text {
    max-width: 600px;
}

.hero-subtitle {
    color: var(--primary);
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 20px;
    display: block;
}

.hero-title {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 25px;
    color: white;
    font-family: var(--font-heading);
}

.hero-highlight {
    color: transparent;
    -webkit-text-stroke: 2px var(--primary);
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    font-family: var(--font-body);
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 20px;
}

.hero-image-wrapper {
    display: flex;
    justify-content: flex-end;
}

.hero-image {
    width: 100%;
    max-width: 500px;
    aspect-ratio: 1/1;
    border-radius: 40px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    object-fit: cover;
    border: 1px solid rgba(255,255,255,0.1);
}

@media (max-width: 991px) {
    .hero-title {
        font-size: 2.8rem;
    }
}

@media (max-width: 768px) {
  .nav-links {
    display: none; 
    position: fixed; /* Fixed for overlay */
    top: var(--header-height);
    left: 0;
    width: 100%;
    height: calc(100vh - var(--header-height));
    background: rgba(11, 15, 25, 0.98); /* Solid/Dark overlay */
    backdrop-filter: blur(10px);
    flex-direction: column;
    padding: 40px 20px;
    text-align: center;
    border-bottom: none;
    overflow-y: auto;
    gap: 25px;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .nav-links.active {
    display: flex;
    transform: translateX(0);
  }
  
  .nav-links a {
      font-size: 1.2rem;
      padding: 15px 0;
      border-bottom: 1px solid rgba(255,255,255,0.05);
      width: 100%;
      display: block;
  }

  .hamburger {
    display: block;
    z-index: 1001; /* Above nav overlay */
  }

  .section-title {
    font-size: 2rem;
  }
  
  /* Container Padding */
  .container {
      padding: 0 15px; /* Tighter padding for mobile */
  }
  
  /* Section Spacing */
  section {
      padding: 50px 0;
  }

  /* Hero Responsive */
  .hero-grid {
      grid-template-columns: 1fr;
      text-align: center;
      gap: 30px;
      padding-bottom: 40px;
  }
  
  .hero-text {
      margin: 0 auto;
      order: 2; /* Image first on mobile? or Text first? usually Image first for visual impact, but let's keep text first for SEO/Context unless user wants change. actually, let's keep text first for now. */
  }
  
  .hero-buttons {
      justify-content: center;
  }
  
  .hero-image-wrapper {
      justify-content: center;
      order: 1; /* Image first on mobile */
      margin-bottom: 20px;
  }
  
  .hero-image {
      max-width: 300px;
  }
  
  /* Feature Grid Responsive */
  .stats-grid {
      grid-template-columns: 1fr;
  }
  
  /* Footer Responsive */
  .footer-content {
      flex-direction: column;
      gap: 30px;
  }
  
  .footer-col {
      width: 100%;
  }

  /* About Grid */
  .about-grid {
      grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
    .btn {
        width: 100%;
        margin-bottom: 10px;
        min-height: 48px; /* Touch target size */
        display: flex; /* Ensure flex for centering */
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }
    
    .hero-title {
        font-size: 2.2rem;
    }
    
    .masonry-grid {
        column-count: 2;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    /* Product Grid Mobile - Force 2 Columns tightly packed */
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .product-card {
        border-radius: 12px;
    }
    
    .product-image {
        height: 150px; /* Smaller image height */
    }
    
    .product-info {
        padding: 10px;
    }
    
    .product-title {
        font-size: 1rem;
    }
    
    .product-price {
        font-size: 1.1rem;
        margin-bottom: 10px;
    }
    
    .btn-add-cart {
        padding: 8px;
        font-size: 0.8rem;
    }
}

/* Update Categories Grid to be responsive */
#categories > .container > div {
    display: grid !important; 
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)) !important; /* Smaller min-width for mobile */
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.about-text h3 {
    font-size: 1.8rem;
    color: #fff;
    margin-bottom: 20px;
}

.about-text p {
    color: var(--text-muted);
    margin-bottom: 20px;
    line-height: 1.8;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 30px;
}

.stat-item h4 {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 5px;
}

.stat-item p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Contact Section */
.contact-container {
    background: var(--bg-card);
    padding: 40px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.05);
}

.form-group {
    margin-bottom: 20px;
}

.form-input {
    width: 100%;
    padding: 15px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: #fff;
    font-size: 1rem;
    outline: none;
    transition: var(--transition);
}

.form-input:focus {
    border-color: var(--primary);
    background: rgba(255,255,255,0.05);
}

textarea.form-input {
    min-height: 150px;
    resize: vertical;
}

@media (max-width: 900px) {
    .about-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .stats-grid {
        justify-items: center;
    }
}

@media (max-width: 600px) {
    .contact-container form > div {
        grid-template-columns: 1fr !important;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* Masonry Gallery */
.masonry-grid {
    column-count: 4;
    column-gap: 15px;
}


.masonry-item {
    break-inside: avoid;
    margin-bottom: 15px;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    cursor: zoom-in;
    transition: transform 0.3s ease;
}

.masonry-item:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    z-index: 2;
}

.masonry-item img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    z-index: 2000;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.lightbox-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 80vh;
    border-radius: 8px;
    box-shadow: 0 0 50px rgba(0,0,0,0.5);
    animation: zoom 0.3s;
}

@keyframes zoom {
    from {transform:scale(0)}
    to {transform:scale(1)}
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 2001;
}

.lightbox-close:hover,
.lightbox-close:focus {
    color: var(--primary);
    text-decoration: none;
    cursor: pointer;
}

#lightbox-caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #ccc;
    padding: 10px 0;
    height: 150px;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    letter-spacing: 1px;
}

/* Responsive Columns */
@media (max-width: 1024px) {
    .masonry-grid {
        column-count: 3;
    }
}

@media (max-width: 600px) {
    .masonry-grid {
        column-count: 2;
    }
}

/* Product Detail Page */
.product-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    align-items: start;
}

.product-detail-image {
    width: 100%;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    aspect-ratio: 1/1;
    object-fit: cover;
}

.product-detail-category {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
    margin-bottom: 5px;
}

.product-detail-title {
    color: #fff;
    font-size: 2.5rem;
    margin: 10px 0;
    line-height: 1.2;
}

.product-detail-price {
    font-size: 2rem;
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 20px;
}

.product-specs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
    background: rgba(255,255,255,0.05);
    padding: 15px;
    border-radius: 8px;
    font-size: 0.95rem;
}

.product-detail-desc {
    color: var(--text-muted);
    margin-bottom: 30px;
    line-height: 1.8;
}

.product-detail-actions {
    display: flex;
    gap: 15px;
}

/* Cart Page */
.cart-item {
    display: flex;
    gap: 15px;
    align-items: center;
    background: #fff;
    border: 1px solid #e2e8f0;
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: transform 0.2s;
}

.cart-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.cart-item-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.cart-item-info {
    flex: 1;
    min-width: 0; /* Prevent text overflow */
}

.cart-item-title {
    color: #1F2933;
    margin-bottom: 5px;
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cart-item-price {
    color: var(--primary);
    font-size: 0.9rem;
    font-weight: 600;
}

.btn-remove-cart {
    background: rgba(255, 68, 68, 0.1);
    border: none;
    color: #ff4444;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 1.1rem;
}

.btn-remove-cart:hover {
    background: #ff4444;
    color: white;
}

/* Mobile Specific for Product & Cart */
@media (max-width: 480px) {
    /* Product Detail */
    .product-detail-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .product-detail-title {
        font-size: 2rem;
    }
    
    .product-detail-price {
        font-size: 1.8rem;
    }
    
    /* Cart */
    .cart-item {
        padding: 12px;
        gap: 12px;
    }
    
    .cart-item-image {
        width: 50px;
        height: 50px;
    }
}

/* Cart Layout */
.cart-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    margin-top: 30px;
}

.order-summary {
    background: var(--bg-card);
    padding: 25px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.05);
    height: fit-content;
}

@media (max-width: 768px) {
    .cart-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .order-summary {
        padding: 20px; /* Tighter padding for mobile */
    }
}
