@import url('https://fonts.googleapis.com/css?family=Bungee+Shade&display=swap');

:root {
  --primary-color: #d8ff3e;
  --glitch-color-1: #ff00c1;
  --glitch-color-2: #00fff9;
  --dark-bg: #000000;
  --light-bg: #111;
  --text-color: #f0f0f0;
  --text-muted: #aaa;
  --border-color: #222;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Montserrat', sans-serif;
}

body {
  background-color: var(--dark-bg);
  color: var(--text-color);
  scroll-behavior: smooth;
}

.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--dark-bg);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    transition: opacity 0.7s ease, visibility 0.7s ease;
    overflow: hidden;
}
.preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

.glitch-logo {
  --f-size: 15;
  --f-unit: 1vmin;
  --f: calc(var(--f-size) * var(--f-unit));
  font-family: 'Bungee Shade', cursive;
  font-size: var(--f);
  flex: 1;
  line-height: .75;
  margin: auto;
  color: var(--primary-color);
  text-align: center;
  transform: scaleX(var(--scale, 1));
  animation: glitch-p 11s infinite alternate;
}

.glitch-logo::before,
.glitch-logo::after {
  --top: 0;
  --left: 0;
  --v-height: 30%;
  --n-tenth: calc(var(--f-size) * .1 * var(--top));
  --t-cut: calc(var(--n-tenth) / var(--f-size) * 100%);
  --b-cut: calc(var(--t-cut) + var(--v-height));
  content: attr(data-text);
  position: absolute;
  width: 100%;
  left: 0;
  text-align: center;
  transform: translateX(calc(var(--left) * 100%));
  filter: drop-shadow(0 0 transparent);
  text-shadow: calc(var(--left) * -3em) 0 .02em var(--glitch-color-2),
               calc(var(--left) * -6em) 0 .02em var(--glitch-color-1);
  background-color: var(--dark-bg);
  clip-path: polygon(0% var(--t-cut), 100% var(--t-cut), 100% var(--b-cut), 0% var(--b-cut));
} 

.glitch-logo::before {
  animation: glitch-b 1.7s infinite alternate-reverse;
}
.glitch-logo::after {
  animation: glitch-a 3.1s infinite alternate;
}

@keyframes glitch-p {
  17% { --scale: .87; }
  31% { --scale: 1.1; }
  37% { --scale: 1.3; }
  47% { --scale: .91; }
  87% { --scale: 1; }
}

@keyframes glitch-a {
  10%,30%,50%,70%,90% {
    --top: 0;
    --left: 0;
  }
  0% {
  --v-height: 15%; 
  }
  20% {
    --left: .005;
  }
  40% {
    --left: .01;
    --v-height: 20%;
    --top: 3;
  }
  60% {
    --left: .03;
    --v-height: 25%;
    --top: 6;
  }
  80% {
    --left: .07;
    --v-height: 5%;
    --top: 8;
  }
  100% {
    --left: .083;
    --v-height: 30%;
    --top: 1;
  }
}

@keyframes glitch-b {
    10%,30%,50%,70%,90% {
    --top: 0;
    --left: 0;
  }
  0% {
  --v-height: 15%; 
  --top: 10;
  }
  20% {
    --left: -.005;
  }
  40% {
    --left: -.01;
    --v-height: 17%;
    --top: 3;
  }
  60% {
    --left: -.03;
    --v-height: 35%;
    --top: 6;
  }
  80% {
    --left: -.07;
    --v-height: 5%;
    --top: 8;
  }
  100% {
    --left: -.083;
    --v-height: 30%;
    --top: 1;
  }
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
  background-color: rgba(10, 10, 10, 0.7);
  backdrop-filter: blur(12px);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  border-bottom: 1px solid var(--border-color);
}

.logo {
  font-size: 1.8em;
  font-weight: 900;
  color: var(--primary-color);
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.lookbook-btn {
    background: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.3s ease;
}

.lookbook-btn:hover {
    background: var(--primary-color);
    color: #000;
}

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 100vh;
  padding: 120px 30px 40px;
  overflow: hidden;
}
.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: opacity 1.5s ease-in-out;
}
.hero-content {
    position: relative;
    z-index: 2;
    background: rgba(0,0,0,0.5);
    padding: 40px;
    border-radius: 15px;
}

.hero h1 {
  font-size: 4.5em;
  font-weight: 900;
  text-transform: uppercase;
  background: linear-gradient(45deg, var(--primary-color), #fff, #aaff44);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradient-animation 4s ease infinite;
}

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

.hero p {
  font-size: 1.3em;
  margin: 20px 0 30px;
  color: var(--text-muted);
}

.cta {
  font-size: 1em;
  background: var(--primary-color);
  border: 2px solid var(--primary-color);
  color: #000;
  padding: 14px 35px;
  text-transform: uppercase;
  font-weight: 700;
  border-radius: 8px;
  transition: all 0.3s ease;
  cursor: pointer;
  text-decoration: none;
}

.cta:hover {
  background: transparent;
  color: var(--primary-color);
  transform: scale(1.05);
}

main {
    padding: 80px 20px;
    position: relative; /* Establish stacking context */
    z-index: 5;       /* Ensure it sits above the hero section */
    background-color: var(--dark-bg); /* Ensure it has a background */
}

.section-title-container {
    text-align: center;
    margin: 80px 0 40px;
}

.section-title {
    color: var(--primary-color);
    font-size: 2.5em;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 2px;
    display: inline-block;
}

.filter-tabs {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-tab {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 700;
}

.filter-tab:hover {
    background-color: var(--border-color);
    color: #fff;
}

.filter-tab.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #000;
}

.products {
  display: grid;
  gap: 30px;
  grid-template-columns: 1fr;
  margin-top: 40px;
}

#limitedProductsList {
    display: flex;
    justify-content: center;
    align-items: stretch;
    flex-wrap: wrap;
    gap: 40px;
}

#limitedProductsList .product-card {
    width: 380px;
    flex-shrink: 0;
    border: none; /* Using pseudo-elements for border */
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    z-index: 1;
}

/* The rotating gradient layer */
/* The rotating gradient layer */
#limitedProductsList .product-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 2;
    margin: -2px; /* Make it slightly larger to avoid gaps */
    background: conic-gradient(from 90deg at 50% 50%, var(--primary-color), #fff, var(--primary-color));
    animation: border-glow 4s linear infinite;
}

@keyframes border-glow {
    from {
        transform: translateZ(0) rotate(0deg);
    }
    to {
        transform: translateZ(0) rotate(360deg);
    }
}

/* The opaque overlay that creates the border effect */
#limitedProductsList .product-card::after {
    content: '';
    position: absolute;
    top: 2px; left: 2px; right: 2px; bottom: 2px; /* This creates the 2px border */
    background: var(--light-bg);
    z-index: 3;
    border-radius: 14px; /* Slightly smaller radius for the inner layer */
}

/* Ensure all direct children of the card sit on top of the pseudo-elements */
#limitedProductsList .product-card > * {
    position: relative;
    z-index: 4;
}

@property --angle {
  syntax: '<angle>';
  inherits: false;
  initial-value: 0deg;
}

@keyframes border-glow {
    to {
        --angle: 360deg;
    }
}

.product-card {
  background: var(--light-bg);
  border-radius: 16px;
  overflow: hidden;
  text-align: center;
  padding: 24px;
  border: 1px solid var(--border-color);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  position: relative;
}

.product-card:hover {
  transform: translateY(-10px) scale(1.02);
  border-color: var(--primary-color);
  box-shadow: 0 0 25px rgba(216, 255, 62, 0.15);
}

#limitedProductsList .product-card:hover {
    transform: translateY(-5px) scale(1.01);
}

.badge {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: var(--primary-color);
    color: #000;
    padding: 6px 18px;
    font-size: 0.9em;
    font-weight: 700;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 1px;
    z-index: 5; /* Higher z-index to be on top of everything */
    border: 2px solid var(--dark-bg);
}

.product-image-wrapper {
    width: 100%;
    height: 350px;
    background-color: #000;
    border-radius: 12px;
    margin-bottom: 20px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.product-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  cursor: pointer;
  border-radius: 12px;
}

.product-card h3 {
  margin: 0 0 10px;
  font-size: 1.5em;
  color: #fff;
  font-weight: 700;
}

.product-card p {
  font-size: 1.2em;
  margin-bottom: 20px;
  color: var(--primary-color);
  font-weight: 700;
}

.product-controls {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 15px;
}

.size-select {
  padding: 12px;
  font-size: 1em;
  border-radius: 8px;
  border: 1px solid #333;
  outline: none;
  background-color: var(--dark-bg);
  color: #fff;
  cursor: pointer;
  transition: border-color 0.3s;
}
.size-select:focus {
    border-color: var(--primary-color);
}

.qty-control {
  display: flex;
  justify-content: center;
  gap: 10px;
  align-items: center;
}

.qty-btn {
  background: var(--primary-color);
  color: #000;
  border: none;
  height: 30px;
  width: 30px;
  font-size: 1.2em;
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.2s;
}
.qty-btn:active {
    transform: scale(0.9);
}

.qty-control input {
  width: 50px;
  text-align: center;
  border: none;
  background: transparent;
  color: #fff;
  font-size: 1.2em;
  font-weight: bold;
}

.order-btn {
  background: var(--primary-color);
  color: #000;
  border: 2px solid var(--primary-color);
  padding: 14px;
  border-radius: 8px;
  font-weight: bold;
  font-size: 1em;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
}

.order-btn:hover {
  background: transparent;
  color: var(--primary-color);
  transform: scale(1.05);
}

footer {
  margin-top: 80px;
  padding: 60px 40px;
  background: var(--light-bg);
  color: var(--text-muted);
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 30px;
  text-align: center;
  border-top: 1px solid var(--border-color);
}

footer h4 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.2em;
    text-transform: uppercase;
}

footer p {
    margin-bottom: 8px;
    cursor: pointer;
    transition: color 0.3s;
}

footer p:hover {
    color: #fff;
}

.modal {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 10002;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal.active {
  display: flex;
  opacity: 1;
}

.modal-content {
  background: var(--light-bg);
  padding: 30px;
  border-radius: 10px;
  max-width: 500px;
  width: 100%;
  color: #eee;
  position: relative;
  box-shadow: 0 0 30px rgba(216, 255, 62, 0.2);
  text-align: center;
}

#imageModal .modal-content {
    padding: 0;
    background: transparent;
}

.modal-content img {
  width: 100%;
  height: auto;
  max-width: 80vw;
  max-height: 75vh;
  object-fit: contain;
  border-radius: 12px;
}

.close-btn {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 1.8em;
  cursor: pointer;
  color: var(--primary-color);
  transition: transform 0.3s;
}
.close-btn:hover {
    transform: scale(1.2);
}

#whatsapp-confirm-modal .modal-icon {
    margin-bottom: 20px;
}
#whatsapp-confirm-modal .modal-icon svg {
    width: 60px;
    height: 60px;
    fill: var(--primary-color);
}
#whatsapp-confirm-modal h2 {
    margin-bottom: 15px;
    color: #fff;
}
#whatsapp-confirm-modal p {
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 25px;
}
.modal-buttons {
    display: flex;
    gap: 15px;
}
.modal-buttons button {
    flex: 1;
    padding: 12px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    border: 2px solid var(--primary-color);
}
.modal-buttons .confirm-btn {
    background: var(--primary-color);
    color: #000;
}
.modal-buttons .confirm-btn:hover {
    background: transparent;
    color: var(--primary-color);
}
.modal-buttons .cancel-btn {
    background: transparent;
    color: var(--primary-color);
}
.modal-buttons .cancel-btn:hover {
    background: var(--primary-color);
    color: #000;
}

.toast {
  position: fixed;
  bottom: -100px;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--primary-color);
  color: #000;
  padding: 14px 28px;
  border-radius: 8px;
  font-weight: bold;
  z-index: 9999;
  box-shadow: 0 4px 10px rgba(0,0,0, 0.3);
  transition: bottom 0.5s ease-in-out;
}

.toast.show {
    bottom: 30px;
}

.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--primary-color);
    color: #000;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    cursor: pointer;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mobile-nav {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 380px;
    background: rgba(20, 20, 20, 0.7);
    backdrop-filter: blur(12px);
    display: none;
    justify-content: space-around;
    border-radius: 50px;
    z-index: 1001;
    padding: 5px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 12px;
    transition: color 0.3s;
    padding: 5px 10px;
    flex-grow: 1;
}

.mobile-nav-item svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
    margin-bottom: 4px;
}

.mobile-nav-item.active,
.mobile-nav-item:hover {
    color: var(--primary-color);
}


/* Responsive Grid Layout */
@media (min-width: 576px) {
    .products {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .products {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1200px) {
    .products {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
  .hero h1 {
    font-size: 3em;
  }
  .hero p {
    font-size: 1.1em;
  }
  header {
      padding: 15px 20px;
  }
  footer {
      flex-direction: column;
      align-items: center;
      padding-bottom: 80px; /* Space for mobile nav */
  }
  #limitedProductsList .product-card {
    width: 300px;
  }
  .mobile-nav {
      display: flex;
  }
  .back-to-top {
      bottom: 100px; /* Adjust to avoid mobile nav */
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 2.5em;
  }
  .hero-content {
    padding: 20px;
  }
}

/* Lookbook Styles */
.lookbook-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10001;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    overflow-y: auto;
    padding: 60px 20px 20px;
}

.lookbook-modal.active {
    opacity: 1;
    visibility: visible;
}

.lookbook-modal .close-btn {
    position: fixed; /* Fixed position relative to viewport */
    top: 20px;
    right: 30px;
    z-index: 10002;
}

.lookbook-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.lookbook-item {
    position: relative;
    cursor: pointer;
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.lookbook-item:hover {
    transform: scale(1.05);
    border-color: var(--primary-color);
}

.lookbook-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.lookbook-item-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0,0,0,0.8);
    color: #fff;
    padding: 8px;
    text-align: center;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    font-size: 0.9em;
}

.lookbook-item:hover .lookbook-item-info {
    transform: translateY(0);
}

.product-card.highlight {
    box-shadow: 0 0 35px var(--primary-color);
    border-color: var(--primary-color);
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

@media (min-width: 768px) {
    .lookbook-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 20px;
    }
}

/* Quick View Modal Styles */
#quick-view-modal {
    z-index: 10001; /* Set below whatsapp modal but above regular content */
    background: rgba(0, 0, 0, 0.9); /* Ensure it has a background */
}

#quick-view-content .product-card {
    border: none;
    box-shadow: none;
    padding: 30px;
    text-align: center;
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    max-width: 500px;
    width: 100%;
    margin: 0 auto;
    background: var(--light-bg);
    border-radius: 16px;
}

#quick-view-content .product-image-wrapper {
    height: auto;
    max-height: 60vh;
    margin-bottom: 0;
    background: transparent;
}

#quick-view-content .product-details {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#quick-view-content h3 {
    font-size: 2.5em;
}

#quick-view-content p {
    font-size: 1.8em;
}

#quick-view-content .product-controls {
    margin-top: auto;
}

@media (max-width: 768px) {
    #quick-view-content .product-card {
        grid-template-columns: 1fr;
    }
    #quick-view-content .product-image-wrapper {
        max-height: 50vh;
    }
    #quick-view-content h3 {
        font-size: 2em;
    }
    #quick-view-content p {
        font-size: 1.5em;
    }
}
