/* =========================================
   1. KEYFRAME ANIMATIONS
   ========================================= */

/* Background slowly shifting colors */
@keyframes ambientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Cards sliding up and fading in */
@keyframes cardEntrance {
  from {
    opacity: 0;
    transform: translateY(50px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* A pulse effect for the "Price" text */
@keyframes pulseGreen {
  0% { text-shadow: 0 0 5px rgba(0, 255, 136, 0.4); }
  50% { text-shadow: 0 0 20px rgba(0, 255, 136, 0.8), 0 0 10px rgba(0, 255, 136, 0.5); }
  100% { text-shadow: 0 0 5px rgba(0, 255, 136, 0.4); }
}

/* =========================================
   2. GLOBAL SETTINGS
   ========================================= */

:root {
  --neon-orange: #ff4500;
  --neon-green: #00ff88;
  --bg-dark: #0a0a0a;
  --card-bg: #141414;
  --text-grey: #a0a0a0;
}

body {
  background: linear-gradient(-45deg, #050505, #111111, #1a1a1a, #000000);
  background-size: 400% 400%;
  animation: ambientShift 15s ease infinite;
  color: #fff;
  font-family: 'Segoe UI', system-ui, sans-serif;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

a {
  text-decoration: none;
}

/* =========================================
   3. HEADER (Glassmorphism)
   ========================================= */

header {
  background: rgba(15, 15, 15, 0.85);
  backdrop-filter: blur(12px);
  padding: 20px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

header h1 {
  font-size: 1.8rem;
  color: #ff4500;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin: 0;
  text-shadow: 0 0 15px rgba(255, 69, 0, 0.5);
}

nav a {
  margin-left: 25px;
  color: var(--text-grey);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  position: relative;
}

nav a:hover {
  color: #fff;
  text-shadow: 0 0 8px var(--neon-orange);
}

nav a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background: var(--neon-orange);
  transition: width 0.3s;
}

nav a:hover::after {
  width: 100%;
}

/* =========================================
   4. PRODUCT GRID
   ========================================= */

.products {
  padding: 60px 40px;
  display: grid;
  /* Auto-fit creates a responsive layout that looks great on all screens */
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 40px;
  max-width: 1400px;
  margin: 0 auto;
}

/* =========================================
   5. PRODUCT CARDS (The Showroom)
   ========================================= */

.product {
  background: rgba(30, 30, 30, 0.4); /* Semi-transparent */
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 20px;
  border-radius: 16px;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  
  /* The Entrance Animation */
  animation: cardEntrance 0.8s backwards;
}

/* STAGGERED ANIMATION DELAYS
   This makes the items pop in one by one (up to 12 items) without changing HTML */
.product:nth-child(1) { animation-delay: 0.1s; }
.product:nth-child(2) { animation-delay: 0.2s; }
.product:nth-child(3) { animation-delay: 0.3s; }
.product:nth-child(4) { animation-delay: 0.4s; }
.product:nth-child(5) { animation-delay: 0.5s; }
.product:nth-child(6) { animation-delay: 0.6s; }
.product:nth-child(7) { animation-delay: 0.7s; }
.product:nth-child(8) { animation-delay: 0.8s; }
.product:nth-child(9) { animation-delay: 0.9s; }
.product:nth-child(10) { animation-delay: 1.0s; }

/* HOVER EFFECTS */
.product:hover {
  transform: translateY(-15px) scale(1.02);
  background: rgba(40, 40, 40, 0.8);
  border-color: var(--neon-orange);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 
              0 0 20px rgba(255, 69, 0, 0.2); /* Orange Glow */
}

/* Product Image Styling */
.product img {
  max-width: 100%;
  border-radius: 12px;
  margin-bottom: 20px;
  /* Make the image pop off the card slightly */
  box-shadow: 0 5px 15px rgba(0,0,0,0.5);
  transition: transform 0.4s ease;
}

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

/* Typography in Cards */
.product h3 {
  margin: 0 0 10px 0;
  color: #fff;
  font-size: 1.2rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: color 0.3s;
}

.product:hover h3 {
  color: var(--neon-orange);
}

.product p {
  color: var(--text-grey);
  font-size: 0.9rem;
  margin-bottom: 15px;
}

/* TARGETING THE PRICE specifically 
   (Assuming the last paragraph or a specific pattern in HTML implies price) */
.product p:last-of-type { 
  font-size: 1.4rem;
  font-weight: bold;
  color: var(--neon-green);
  margin-top: 15px;
  text-shadow: 0 0 10px rgba(0, 255, 136, 0.3);
  /* Add a subtle line above price */
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 15px;
  display: inline-block;
  width: 100%;
}

.product:hover p:last-of-type {
  animation: pulseGreen 2s infinite;
}

/* =========================================
   6. FOOTER
   ========================================= */

.footer {
  background: #080808;
  color: #555;
  padding: 40px;
  text-align: center;
  margin-top: 80px;
  border-top: 1px solid #222;
}

.footer a {
  color: var(--neon-orange);
  font-weight: bold;
}

.social-icons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
}

.social-icons img {
  width: 24px;
  height: 24px;
  filter: invert(1) opacity(0.5);
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.social-icons img:hover {
  filter: invert(1) opacity(1) drop-shadow(0 0 5px var(--neon-orange));
  transform: scale(1.3) rotate(15deg);
}

.cart-modal {
  display: none; /* Hidden by default */
  position: fixed; /* Stay in place */
  z-index: 1000; /* Sit on top */
  left: 0;
  top: 0;
  width: 100%; /* Full width */
  height: 100%; /* Full height */
  overflow: auto; /* Enable scroll if needed */
  background-color: rgba(0,0,0,0.7); /* Black w/ opacity */
  backdrop-filter: blur(5px);
  animation: fadeIn 0.3s ease-out;
}

.cart-modal-content {
  background-color: var(--card-bg);
  margin: 10% auto; /* 10% from the top and centered */
  padding: 30px;
  border: 1px solid #333;
  width: 80%; /* Could be more or less, depending on screen size */
  max-width: 600px;
  border-radius: 15px;
  position: relative;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.7);
  animation: slideInTop 0.4s ease-out;
}

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

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

.close-button {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  transition: color 0.3s;
}

.close-button:hover,
.close-button:focus {
  color: var(--neon-orange);
  text-decoration: none;
  cursor: pointer;
}

.cart-modal-content h2 {
  color: #fff;
  text-align: center;
  margin-bottom: 25px;
  font-size: 2rem;
}

.cart-items {
  max-height: 300px;
  overflow-y: auto;
  margin-bottom: 20px;
  padding-right: 10px; /* For scrollbar */
}

.cart-item {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
  padding-bottom: 15px;
  border-bottom: 1px solid #222;
}

.cart-item:last-child {
  border-bottom: none;
}

.cart-item img {
  width: 70px;
  height: 70px;
  border-radius: 10px;
  margin-right: 15px;
  object-fit: cover;
  border: 1px solid #444;
}

.cart-item-details {
  flex-grow: 1;
}

.cart-item-details h4 {
  margin: 0;
  color: #fff;
  font-size: 1.1rem;
}

.cart-item-details p {
  margin: 5px 0 0;
  color: #bbb;
  font-size: 0.9rem;
}

.cart-item-price {
  color: var(--neon-green);
  font-weight: bold;
  font-size: 1rem;
  margin-left: 15px;
}

.remove-item-button {
  background-color: #ff4500; /* Neon orange */
  color: white;
  border: none;
  border-radius: 5px;
  padding: 5px 10px;
  cursor: pointer;
  font-size: 0.8em;
  transition: background-color 0.3s;
}

.remove-item-button:hover {
  background-color: #e03e00;
}

.cart-summary {
  text-align: center; /* Centers the buttons as seen in the image */
  margin-top: 25px;
  padding-top: 20px;
  border-top: 1px solid #222;
}

.cart-summary p {
  font-size: 1.5rem;
  color: #fff;
  margin-bottom: 15px;
}

.cart-summary .button {
  border: none;
  cursor: pointer;
  font-family: 'Segoe UI', sans-serif;
  font-weight: 800; /* Extra bold text */
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 15px 35px;
  border-radius: 50px; /* This creates the Pill Shape */
  transition: all 0.3s ease;
  font-size: 0.9rem;
  margin: 10px 5px; /* Adds spacing between buttons */
  display: inline-block;
}

.cart-summary .clear-cart-button {
  background-color: #555;
}

.cart-summary .clear-cart-button:hover {
  background-color: #777;
}

/* Make the icon white using a filter */
.cart-img-white {
  width: 28px;
  height: auto;
  filter: invert(1); /* This turns the black icon white */
  transition: transform 0.3s ease;
}

.nav-cart-link {
  position: relative;
  display: flex;
  align-items: center;
  padding: 0 15px;
}

.nav-cart-link:hover .cart-img-white {
  transform: scale(1.1);
}

/* The red notification circle */
.cart-badge {
  position: absolute;
  top: -5px;
  right: 5px;
  background: #ff4500; /* Neon Orange/Red to match your theme */
  color: white;
  border-radius: 50%;
  padding: 2px 6px;
  font-size: 11px;
  font-weight: bold;
  min-width: 15px;
  text-align: center;
  border: 2px solid #000; /* Separates it from the icon */
}

/* Make the icon white using a filter */
.cart-img-white {
  width: 28px;
  height: auto;
  filter: invert(1); /* This turns the black icon white */
  transition: transform 0.3s ease;
}

.nav-cart-link {
  position: relative;
  display: flex;
  align-items: center;
  padding: 0 15px;
}

.nav-cart-link:hover .cart-img-white {
  transform: scale(1.1);
}

/* The red notification circle */
.cart-badge {
  position: absolute;
  top: -5px;
  right: 5px;
  background: #ff4500; /* Neon Orange/Red to match your theme */
  color: white;
  border-radius: 50%;
  padding: 2px 6px;
  font-size: 11px;
  font-weight: bold;
  min-width: 15px;
  text-align: center;
  border: 2px solid #000; /* Separates it from the icon */
}

nav {
  display: flex;
  align-items: center; /* Vertically centers the text and the cart icon */
  gap: 20px;           /* Adjust this number to control spacing between links */
}

.nav-cart-link {
  margin-left: 10px;   /* Adds a little extra breathing room for the cart icon */
  display: flex;
  align-items: center;
}

/* Ensure the cart image doesn't force the header to grow taller */
.cart-img-white {
  width: 24px;         /* Match the font size height of your text links */
  height: 24px;
  object-fit: contain;
}

.cart-quantity-control {
  margin-top: 5px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.cart-qty-input {
  width: 50px;
  padding: 4px;
  border-radius: 5px;
  background: #222;
  color: #fff;
  border: 1px solid #555;
  text-align: center;
}

#checkoutButton {
  background-color: #ff4500; /* Neon Orange */
  color: white;
  box-shadow: 0 4px 15px rgba(255, 69, 0, 0.3);
}

#checkoutButton:hover {
  background-color: #e03e00;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 69, 0, 0.4);
}

/* Clear Cart (Dark Button) */
#clearCartButton {
  background-color: #222; /* Dark Grey/Black */
  color: #fff;
  border: 1px solid #444;
}

#clearCartButton:hover {
  background-color: #333;
  border-color: #666;
  transform: translateY(-2px);
}

/* =========================================
   1. CATEGORY PAGE RESPONSIVE SYSTEM
   ========================================= */

:root {
  --neon-orange: #ff4500;
  --neon-green: #00ff88;
  --bg-dark: #0a0a0a;
  --card-bg: #141414;
  --text-grey: #a0a0a0;
}

body {
  background: linear-gradient(-45deg, #050505, #111111, #1a1a1a, #000000);
  background-size: 400% 400%;
  animation: ambientShift 15s ease infinite;
  color: #fff;
  font-family: 'Segoe UI', system-ui, sans-serif;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

@keyframes ambientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* =========================================
   2. HEADER
   ========================================= */

header {
  background: rgba(15, 15, 15, 0.85);
  backdrop-filter: blur(12px);
  padding: 15px 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

header h1 {
  font-size: clamp(1.2rem, 4vw, 1.8rem);
  color: var(--neon-orange);
  text-transform: uppercase;
  letter-spacing: 2px;
}

nav {
  display: flex;
  align-items: center;
  gap: clamp(10px, 3vw, 25px);
}

nav a {
  color: var(--text-grey);
  font-weight: 600;
  text-transform: uppercase;
  font-size: clamp(0.7rem, 2vw, 0.9rem);
  transition: all 0.3s ease;
}

nav a:hover {
  color: #fff;
  text-shadow: 0 0 8px var(--neon-orange);
}

/* =========================================
   3. PRODUCT GRID (Responsive)
   ========================================= */

.products {
  padding: clamp(20px, 5vw, 60px) 5%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: clamp(20px, 4vw, 40px);
  max-width: 1400px;
  margin: 0 auto;
}

.product {
  background: rgba(30, 30, 30, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: clamp(15px, 3vw, 25px);
  border-radius: 16px;
  text-align: center;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.product:hover {
  transform: translateY(-10px);
  background: rgba(40, 40, 40, 0.8);
  border-color: var(--neon-orange);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

.product img {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 20px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}

.product h3 {
  font-size: clamp(1rem, 3vw, 1.2rem);
  color: #fff;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.product p {
  color: var(--text-grey);
  font-size: clamp(0.8rem, 2vw, 0.9rem);
  margin-bottom: 15px;
}

.product p:last-of-type { 
  font-size: clamp(1.1rem, 3vw, 1.4rem);
  font-weight: bold;
  color: var(--neon-green);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 15px;
  margin-top: auto;
}

/* =========================================
   4. FOOTER
   ========================================= */

.footer {
  background: #080808;
  padding: 40px 20px;
  text-align: center;
  margin-top: 80px;
  border-top: 1px solid #222;
}

.social-icons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
}

.social-icons img {
  width: 24px;
  height: 24px;
  filter: invert(1) opacity(0.5);
}

@media (max-width: 768px) {
  header {
    flex-direction: column; /* Stacks the logo on top of the nav */
    gap: 15px; /* Adds breathing room between the logo and links */
  }
  
  nav {
    flex-wrap: wrap; /* Allows links to drop to a new line instead of stretching the screen */
    justify-content: center; /* Centers the links under the logo */
    width: 100%;
  }
}

.product-card-colors {
  margin: 10px 0;
  padding: 10px 0;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.color-swatches-container {
  display: flex;
  gap: 8px;
  justify-content: center;
}
.listing-color-swatch {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.2);
  cursor: pointer;
  transition: 0.3s;
}
.listing-color-swatch:hover, .listing-color-swatch.active {
  border-color: #ff4500;
  transform: scale(1.2);
}
.listing-color-swatch.active {
  box-shadow: 0 0 10px #ff4500;
}

.listing-color-swatch.active {
    border-color: #ff4500 !important;
    box-shadow: 0 0 8px #ff4500;
    transform: scale(1.2);
}

/* =========================================
   5. MOBILE RESPONSIVE GRID (2-Column Layout)
   ========================================= */

/* Mobile phones: 2-column grid layout */
@media (max-width: 768px) {
  .products {
    grid-template-columns: repeat(2, 1fr);
    gap: clamp(12px, 3vw, 20px);
    padding: clamp(15px, 3vw, 30px) 5%;
  }

  .product {
    padding: clamp(10px, 2vw, 15px);
  }

  .product img {
    margin-bottom: 10px;
  }

  .product h3 {
    font-size: clamp(0.9rem, 2.5vw, 1.1rem);
    margin-bottom: 5px;
  }

  .product p {
    font-size: clamp(0.75rem, 1.8vw, 0.85rem);
    margin-bottom: 8px;
  }

  .product p:last-of-type {
    font-size: clamp(0.95rem, 2.2vw, 1.1rem);
  }
}

/* Extra small phones: Ensure proper spacing */
@media (max-width: 480px) {
  .products {
    gap: clamp(8px, 2vw, 15px);
    padding: clamp(10px, 2vw, 20px) 3%;
  }

  .product {
    padding: clamp(8px, 1.5vw, 12px);
    border-radius: 12px;
  }

  .product img {
    margin-bottom: 8px;
    border-radius: 10px;
  }

  .product h3 {
    font-size: clamp(0.85rem, 2.2vw, 1rem);
    margin-bottom: 3px;
  }

  .product p {
    font-size: clamp(0.7rem, 1.5vw, 0.8rem);
    margin-bottom: 5px;
  }
}

/* Desktop: Preserve original multi-column layout */
@media (min-width: 769px) {
  .products {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: clamp(20px, 4vw, 40px);
    padding: clamp(20px, 5vw, 60px) 5%;
  }

  .product {
    padding: clamp(15px, 3vw, 25px);
  }
}