/* ============================================
   GENIUS CLUB - STREETWEAR CLOTHING STORE
   Clean / White Theme
   ============================================ */

/* --- Custom Properties --- */
:root {
  /* Colors - Light Theme */
  --color-bg: #ffffff;
  --color-bg-card: #ffffff;
  --color-bg-nav: #ffffff;
  --color-text: #111111;
  --color-text-muted: #6b6b6b;
  --color-accent: #111111;
  --color-highlight: #111111;
  --color-border: #e0e0e0;

  /* Typography */
  --font-display: 'Bebas Neue', 'Impact', sans-serif;
  --font-body: 'Inter', 'Helvetica Neue', Arial, sans-serif;

  /* Spacing (8px base) */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  --space-4xl: 96px;

  /* Layout */
  --max-width: 1280px;

  /* Animation */
  --announcement-speed: 30s;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--color-text);
  text-decoration: none;
  transition: color 0.2s ease;
}

img {
  max-width: 100%;
  display: block;
}

/* --- Announcement Bar --- */
.announcement-bar {
  background-color: var(--color-accent);
  color: #ffffff;
  overflow: hidden;
  white-space: nowrap;
  padding: var(--space-sm) 0;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

.announcement-bar__track {
  display: inline-block;
  animation: marquee var(--announcement-speed) linear infinite;
}

.announcement-bar__text {
  display: inline-block;
}

@keyframes marquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* --- Navigation --- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--color-bg-nav);
  border-bottom: 1px solid var(--color-border);
}

.navbar__container {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) var(--space-lg);
}

.navbar__logo {
  font-family: var(--font-display);
  font-size: 2rem;
  letter-spacing: 0.1em;
  color: var(--color-text);
}

.navbar__logo:hover {
  color: var(--color-text);
}

.navbar__links {
  display: flex;
  gap: var(--space-xl);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
}

.navbar__links a:hover {
  color: var(--color-text-muted);
}

.navbar__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-sm);
}

.navbar__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--color-text);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* --- Hero Section --- */
.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background-color: #f5f5f5;
}

.hero__img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  display: block;
}

.hero__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1;
}

.hero__content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--max-width);
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 10vw, 8rem);
  letter-spacing: 0.05em;
  line-height: 1;
  margin-bottom: var(--space-md);
  color: #ffffff;
}

.hero__subtitle {
  font-family: var(--font-body);
  font-size: 1.125rem;
  font-weight: 400;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: var(--space-xl);
}

.hero__cta {
  display: inline-block;
  padding: var(--space-md) var(--space-xl);
  background-color: #ffffff;
  color: #111111;
  font-family: var(--font-display);
  font-size: 1.25rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.hero__cta:hover {
  background-color: #111111;
  color: #ffffff;
}

/* --- Products Section --- */
.products {
  padding: var(--space-4xl) var(--space-lg);
  max-width: var(--max-width);
  margin: 0 auto;
}

.products__heading {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 4rem);
  letter-spacing: 0.05em;
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.products__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
}

/* --- Product Cards --- */
.product-card {
  background-color: var(--color-bg-card);
  border: 1px solid var(--color-border);
  overflow: hidden;
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.product-card:hover {
  border-color: #999999;
  transform: translateY(-4px);
}

/* Image wrapper: stacks front/back images for hover swap */
.product-card__image-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background-color: #f5f5f5;
}

.product-card__img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.4s ease;
}

/* Front image: visible by default */
.product-card__img--front {
  opacity: 1;
  z-index: 2;
}

/* Back image: hidden by default, underneath */
.product-card__img--back {
  opacity: 0;
  z-index: 1;
}

/* On hover: swap front/back */
.product-card:hover .product-card__img--front {
  opacity: 0;
}

.product-card:hover .product-card__img--back {
  opacity: 1;
}

.product-card__info {
  padding: var(--space-md);
}

.product-card__title {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-xs);
}

.product-card__price {
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
}

.product-card__button {
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  background-color: var(--color-accent);
  color: #ffffff;
  border: none;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
  display: block;
  text-align: center;
}

.product-card__button:hover {
  background-color: #333333;
  color: #ffffff;
}

.product-card__button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* --- Product Card as Link --- */
a.product-card {
  display: block;
  color: inherit;
  text-decoration: none;
}

/* --- Breadcrumb --- */
.breadcrumb {
  padding: var(--space-md) var(--space-lg);
  max-width: var(--max-width);
  margin: 0 auto;
}

.breadcrumb__container {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.breadcrumb__container a {
  color: var(--color-text-muted);
}

.breadcrumb__container a:hover {
  color: var(--color-text);
}

.breadcrumb__separator {
  opacity: 0.4;
}

.breadcrumb__current {
  color: var(--color-text);
}

/* --- Product Detail Page (PDP) --- */
.pdp {
  padding: var(--space-xl) var(--space-lg) var(--space-4xl);
  max-width: var(--max-width);
  margin: 0 auto;
}

.pdp__container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3xl);
  align-items: start;
}

/* Gallery */
.pdp__gallery {
  position: sticky;
  top: 80px;
}

.pdp__main-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  background-color: #f5f5f5;
  overflow: hidden;
  margin-bottom: var(--space-md);
}

.pdp__main-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pdp__thumbnails {
  display: flex;
  gap: var(--space-sm);
}

.pdp__thumb {
  width: 80px;
  height: 80px;
  background-color: #f5f5f5;
  border: 2px solid var(--color-border);
  cursor: pointer;
  overflow: hidden;
  padding: 0;
  transition: border-color 0.2s ease;
}

.pdp__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pdp__thumb:hover {
  border-color: #999999;
}

.pdp__thumb--active {
  border-color: var(--color-text);
}

/* Product Info */
.pdp__collection {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--color-text-muted);
  margin-bottom: var(--space-sm);
  font-weight: 600;
}

.pdp__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.5rem);
  letter-spacing: 0.03em;
  line-height: 1.1;
  margin-bottom: var(--space-sm);
}

.pdp__price {
  font-family: var(--font-body);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: var(--space-md);
}

.pdp__short-desc {
  color: var(--color-text-muted);
  font-size: 0.85rem;
  line-height: 1.6;
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--color-border);
}

.pdp__description {
  color: var(--color-text-muted);
  font-size: 0.85rem;
  line-height: 1.6;
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--color-border);
}

.pdp__details-list {
  list-style: none;
  margin-top: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.pdp__details-list li::before {
  content: '—';
  margin-right: var(--space-sm);
  color: var(--color-text-muted);
}

/* Fabric Info */
.pdp__fabric {
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-border);
}

.pdp__fabric-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm) var(--space-xl);
  margin-top: var(--space-sm);
}

.pdp__fabric-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pdp__fabric-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  font-weight: 600;
}

.pdp__fabric-value {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-text);
}

/* Size Selector */
.pdp__sizes {
  margin-bottom: var(--space-md);
}

.pdp__label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.pdp__size-options {
  display: flex;
  gap: var(--space-sm);
}

.pdp__size {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.pdp__size:hover {
  border-color: #999999;
}

.pdp__size--active {
  background-color: var(--color-accent);
  color: #ffffff;
  border-color: var(--color-accent);
}

/* Add to Cart (PDP) */
.pdp__add-to-cart {
  width: 100%;
  padding: var(--space-md) var(--space-xl);
  background-color: var(--color-accent);
  color: #ffffff;
  border: none;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
  margin-bottom: var(--space-xl);
}

.pdp__add-to-cart:hover {
  background-color: #333333;
  color: #ffffff;
}

/* Accordions */
.pdp__accordions {
  border-top: 1px solid var(--color-border);
}

.pdp__accordion {
  border-bottom: 1px solid var(--color-border);
}

.pdp__accordion-title {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: var(--space-md) 0;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pdp__accordion-title::-webkit-details-marker {
  display: none;
}

.pdp__accordion-title::after {
  content: '+';
  font-size: 1.2rem;
  font-weight: 300;
  transition: transform 0.2s ease;
}

.pdp__accordion[open] .pdp__accordion-title::after {
  content: '\2212';
}

.pdp__accordion-content {
  padding: 0 0 var(--space-md) 0;
  color: var(--color-text-muted);
  font-size: 0.85rem;
  line-height: 1.7;
}

/* Size Guide Table */
.pdp__size-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: var(--space-md);
  font-size: 0.8rem;
}

.pdp__size-table th,
.pdp__size-table td {
  padding: var(--space-sm) var(--space-sm);
  text-align: center;
  border-bottom: 1px solid var(--color-border);
}

.pdp__size-table th {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text);
  font-size: 0.7rem;
}

.pdp__size-table td:first-child {
  text-align: left;
  font-weight: 600;
  color: var(--color-text);
}

.pdp__size-table tbody tr:last-child td {
  border-bottom: none;
}

/* --- Shopify Cart Modal Overrides --- */
shopify-cart::part(dialog) {
  background-color: #ffffff;
  color: var(--color-text);
  border: 1px solid var(--color-border);
  font-family: var(--font-body);
  max-width: 420px;
}

shopify-cart::part(primary-button) {
  background-color: var(--color-accent);
  color: #ffffff;
  font-family: var(--font-body);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-radius: 0;
}

shopify-cart::part(secondary-button) {
  color: var(--color-text-muted);
  font-family: var(--font-body);
  fill: var(--color-text-muted);
}

shopify-cart::part(line-heading) {
  font-family: var(--font-body);
  font-weight: 600;
  text-transform: uppercase;
}

shopify-cart::backdrop {
  background: rgba(0, 0, 0, 0.4);
}

/* --- Footer --- */
.footer {
  border-top: 1px solid var(--color-border);
  padding: var(--space-2xl) var(--space-lg);
  text-align: center;
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.footer__container {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  align-items: center;
}

.footer__links {
  display: flex;
  gap: var(--space-lg);
}

.footer__links a {
  color: var(--color-text-muted);
}

.footer__links a:hover {
  color: var(--color-text);
}

/* --- Email Popup --- */
.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.popup-overlay.is-visible {
  opacity: 1;
  visibility: visible;
}

.popup {
  background-color: #ffffff;
  max-width: 440px;
  width: 100%;
  padding: var(--space-2xl) var(--space-xl);
  position: relative;
  text-align: center;
}

.popup__close {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--color-text-muted);
  line-height: 1;
  transition: color 0.2s ease;
}

.popup__close:hover {
  color: var(--color-text);
}

.popup__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  letter-spacing: 0.05em;
  margin-bottom: var(--space-sm);
}

.popup__text {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-bottom: var(--space-xl);
  line-height: 1.5;
}

.popup__form {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.popup__input {
  width: 100%;
  padding: var(--space-md);
  border: 1px solid var(--color-border);
  font-family: var(--font-body);
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.2s ease;
}

.popup__input:focus {
  border-color: var(--color-text);
}

.popup__submit {
  width: 100%;
  padding: var(--space-md);
  background-color: var(--color-accent);
  color: #ffffff;
  border: none;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.popup__submit:hover {
  background-color: #333333;
}

.popup__success {
  display: none;
  margin-top: var(--space-md);
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.popup__success.is-visible {
  display: block;
}

/* --- Account Page --- */
.account {
  padding: var(--space-4xl) var(--space-lg);
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.account__container {
  max-width: 420px;
  width: 100%;
}

.account__panel--hidden {
  display: none;
}

.account__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  letter-spacing: 0.03em;
  text-align: center;
  margin-bottom: var(--space-xs);
}

.account__subtitle {
  text-align: center;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-bottom: var(--space-xl);
}

.account__form {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.account__field {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.account__label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
}

.account__input {
  width: 100%;
  padding: var(--space-md);
  border: 1px solid var(--color-border);
  font-family: var(--font-body);
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.2s ease;
}

.account__input:focus {
  border-color: var(--color-text);
}

.account__submit {
  width: 100%;
  padding: var(--space-md);
  background-color: var(--color-accent);
  color: #ffffff;
  border: none;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  cursor: pointer;
  transition: background-color 0.2s ease;
  margin-top: var(--space-sm);
}

.account__submit:hover {
  background-color: #333333;
}

.account__switch {
  text-align: center;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-top: var(--space-sm);
}

.account__switch a {
  color: var(--color-text);
  font-weight: 600;
  text-decoration: underline;
}

.account__switch a:hover {
  color: var(--color-text-muted);
}

/* ============================================
   RESPONSIVE
   ============================================ */

/* Tablet: 768px and below */
@media (max-width: 768px) {
  .products__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Mobile nav */
  .navbar__links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--color-bg-nav);
    flex-direction: column;
    padding: var(--space-lg);
    gap: var(--space-lg);
    border-bottom: 1px solid var(--color-border);
  }

  .navbar__links.is-open {
    display: flex;
  }

  .navbar__toggle {
    display: flex;
  }

  /* Hamburger to X animation */
  .navbar__toggle.is-open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .navbar__toggle.is-open span:nth-child(2) {
    opacity: 0;
  }

  .navbar__toggle.is-open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  /* Product Detail Page - stack on tablet */
  .pdp__container {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .pdp__gallery {
    position: static;
  }
}

/* Mobile: 480px and below */
@media (max-width: 480px) {
  .products__grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 70vh;
    height: 100svh;
  }

  .hero__content {
    padding: var(--space-md);
  }

  .hero__title {
    font-size: 3rem;
  }

  .hero__subtitle {
    font-size: 0.85rem;
    letter-spacing: 0.15em;
  }

  .pdp__thumb {
    width: 64px;
    height: 64px;
  }

  .pdp__size {
    width: 46px;
    height: 46px;
  }

  .pdp__fabric-grid {
    grid-template-columns: 1fr;
  }
}
