/* --- Variables & Reset --- */
:root {
  --bg-dark: #0a0a0a;
  --bg-dark-rgb: 10, 10, 10; /* channels for rgba() overlays of --bg-dark */
  --bg-card: #151515;
  --text-primary: #ffffff;
  --text-secondary: #a0a0a0;
  --border-color: #2a2a2a;
  --tag-color: #ff5b34;
  --star-color: #f1c40f;
  --danger: #ff4444;
  --overlay-scrim: rgba(0, 0, 0, 0.6);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.5;
  scroll-behavior: smooth;
}

/* The hidden attribute must always win, even over display: flex/grid rules */
[hidden] {
  display: none !important;
}

a {
  color: var(--text-primary);
  text-decoration: none;
}
ul {
  list-style: none;
}
button {
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}
img {
  max-width: 100%;
}

/* --- Global Layout --- */
.section-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}
.section-heading {
  text-align: center;
  font-size: clamp(1.6rem, 5vw, 2rem);
  margin-bottom: 3rem;
  letter-spacing: 2px;
}

/* --- Section 1: Nav --- */
.announcement-bar {
  background: var(--text-primary);
  color: var(--bg-dark);
  text-align: center;
  padding: 8px;
  font-size: 0.75rem;
  font-weight: bold;
  letter-spacing: 1px;
}
.navbar {
  position: sticky;
  top: 0;
  background: rgba(var(--bg-dark-rgb), 0.9);
  border-bottom: 1px solid var(--border-color);
  z-index: 100;
}
.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.brand-logo {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 3px;
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}
.cart-trigger {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: bold;
  font-size: 0.9rem;
}
.cart-icon {
  width: 28px;
  height: 28px;
  display: block;
}
.menu-trigger {
  display: flex;
  align-items: center;
}
.menu-icon {
  width: 26px;
  height: 26px;
  display: block;
}

/* --- Nav dropdown menu (used by the menu button) --- */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  min-width: 180px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
  z-index: 200;
}
.nav-dropdown-menu.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
/* Anchor the menu to the right edge for the cart icon */
.nav-dropdown-menu.align-right {
  left: auto;
  right: 0;
}
.nav-section-link {
  padding: 10px 12px;
  font-size: 0.85rem;
  font-weight: bold;
  letter-spacing: 1px;
  color: var(--text-secondary);
  border-radius: 4px;
  transition:
    background 0.2s ease,
    color 0.2s ease;
}
.nav-section-link:hover {
  background: var(--bg-dark);
  color: var(--text-primary);
}

/* --- Section 2: Hero --- */
.hero-section {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background:
    linear-gradient(to bottom, rgba(var(--bg-dark-rgb), 0.3), var(--bg-dark)),
    url("../assets/rcm-hoodie-black-front.jpeg") center/cover no-repeat;
  padding: 40px 20px;
  transition: background-image 1.5s ease-in-out;
}
.hero-title {
  font-size: clamp(2.5rem, 5vw, 5rem);
  font-weight: 900;
  margin-bottom: 10px;
}
.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 30px;
}
.hero-btn {
  display: inline-block;
  background: var(--text-primary);
  color: var(--bg-dark);
  padding: 15px 30px;
  font-weight: bold;
  text-transform: uppercase;
  transition: opacity 0.3s ease;
}
.hero-btn:hover {
  opacity: 0.8;
}
/* Mobile only: stack the hero words on their own lines and drop the dangling dots */
@media (max-width: 600px) {
  .hero-word {
    display: block;
  }
  .hero-dot {
    display: none;
  }
}

/* --- Section 3: Shop catalog grid --- */
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
@media (min-width: 768px) {
  .catalog-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
  }
}

/* 1. Define the angle property for the spinning glow */
@property --a {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

@keyframes spin {
  from {
    --a: 0deg;
  }
  to {
    --a: 360deg;
  }
}

.product-card {
  display: flex;
  flex-direction: column;
  text-align: left;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.2s ease;

  /* Glowing Border Setup */
  border: 1px solid transparent;
  background:
    linear-gradient(var(--bg-card), var(--bg-card)) padding-box,
    var(--border-color) border-box;
}

.product-card:hover {
  transform: translateY(-4px);
  background:
    linear-gradient(var(--bg-card), var(--bg-card)) padding-box,
    conic-gradient(
        from var(--a),
        var(--border-color) 0%,
        rgba(255, 255, 255, 0.8) 25%,
        var(--border-color) 50%,
        rgba(255, 255, 255, 0.8) 75%,
        var(--border-color) 100%
      )
      border-box;
  animation: spin 3s linear infinite;
}
.card-media {
  aspect-ratio: 3 / 4;
  background: var(--bg-dark);
  overflow: hidden;
}
.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.card-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.card-tag {
  color: var(--tag-color);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.card-name {
  font-size: 1rem;
  font-weight: 800;
}
.card-sub {
  color: var(--text-secondary);
  font-size: 0.85rem;
}
.card-price {
  font-weight: 700;
  margin-top: 4px;
}

/* --- Shop product detail / configurator --- */
.back-link {
  display: inline-block;
  margin-bottom: 24px;
  font-weight: bold;
  font-size: 0.85rem;
  letter-spacing: 1px;
  color: var(--text-secondary);
  transition: color 0.2s ease;
}
.back-link:hover {
  color: var(--text-primary);
}

.product-section {
  padding: 80px 20px;
  max-width: 1200px;
  margin: 0 auto;
}
.product-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}
@media (min-width: 768px) {
  .product-grid {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

.product-gallery img {
  width: 100%;
  border-radius: 8px;
  background: var(--bg-card);
  display: block;
}
.angle-toggles {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}
.angle-btn {
  flex: 1;
  padding: 10px;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-weight: bold;
}
.angle-btn.active {
  border-color: var(--text-primary);
  color: var(--text-primary);
}

/* Thumbnail rail (used by the Full Set) */
.gallery-thumbs {
  display: flex;
  gap: 10px;
  margin-top: 15px;
  overflow-x: auto;
}
.thumb {
  flex: 0 0 70px;
  height: 90px;
  padding: 0;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  overflow: hidden;
  opacity: 0.55;
  transition:
    opacity 0.2s ease,
    border-color 0.2s ease;
}
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.thumb:hover {
  opacity: 1;
}
.thumb.active {
  opacity: 1;
  border-color: var(--text-primary);
}

.product-title {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 5px;
}
.product-price {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 30px;
}

.product-description-container {
  margin-bottom: 30px;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  padding: 24px 0;
}
.product-tagline {
  font-weight: 800;
  margin-bottom: 12px;
  color: var(--text-primary);
  letter-spacing: 1px;
}
.product-description {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 20px;
  line-height: 1.6;
}
.product-bullets {
  list-style: disc inside;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.8;
}
.product-bullets li::marker {
  color: var(--text-primary);
}

.selector-group {
  margin-bottom: 30px;
}
.selector-group label {
  display: block;
  margin-bottom: 10px;
  font-weight: bold;
  font-size: 0.85rem;
  letter-spacing: 1px;
}

.swatches {
  display: flex;
  gap: 15px;
}
.swatch-btn {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  border: 2px solid transparent;
  transition: transform 0.2s;
}
.swatch-btn.active {
  border-color: var(--text-primary);
  transform: scale(1.1);
  box-shadow:
    0 0 0 2px var(--bg-dark),
    0 0 0 4px var(--text-primary);
}

.sizes {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.size-btn {
  border: 1px solid var(--border-color);
  padding: 10px 20px;
  font-weight: bold;
  transition: 0.2s;
}
.size-btn.active,
.size-btn:hover {
  background: var(--text-primary);
  color: var(--bg-dark);
}

.action-group {
  display: flex;
  gap: 15px;
  margin-top: 40px;
}
.quantity-picker {
  display: flex;
  align-items: center;
  border: 1px solid var(--border-color);
}
.quantity-picker button {
  padding: 15px 20px;
  font-size: 1.2rem;
}
.quantity-picker span {
  padding: 0 15px;
  font-weight: bold;
}
/* Update your existing .add-btn to ensure the SVG icon aligns nicely */
.add-btn {
  flex: 1;
  background: var(--text-primary);
  color: var(--bg-dark);
  font-weight: bold;
  font-size: 1rem;
  transition: all 0.3s ease;
  /* Add these 3 lines: */
  display: flex;
  align-items: center;
  justify-content: center;
}

/* The temporary success look (Inverts to a sleek dark look) */
.add-btn.success-state {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--text-primary);
}

/* Nav Cart "Bump" Animation */
@keyframes bump {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.15);
  }
  100% {
    transform: scale(1);
  }
}

.cart-bump {
  animation: bump 0.3s ease-out;
}
.add-btn:hover {
  opacity: 0.9;
}

/* --- Full-fit three-panel splits (The Mindset, Craftsmanship) --- */
.split-section {
  padding: 80px 20px 20px; /* Added side padding so cards don't touch screen edges */
  border-top: 1px solid var(--border-color);
}

.split-panels {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 768px) {
  .split-panels {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px; /* Slightly wider gaps on desktop */
  }
}

.split-panel {
  position: relative;
  min-height: 52vh;
  overflow: hidden;
  border-radius: 12px;

  /* Glowing Border Setup */
  border: 1px solid transparent;
  background:
    linear-gradient(var(--bg-dark), var(--bg-dark)) padding-box,
    var(--border-color) border-box;
}
@media (min-width: 768px) {
  .split-panel {
    min-height: 70vh;
  }
}

.split-panel img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* --- Scroll Reveal Animation Classes --- */
.reveal {
  opacity: 0;
  transform: translateY(40px); /* Starts slightly lower */
  transition:
    opacity 0.8s cubic-bezier(0.25, 1, 0.5, 1),
    transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

/* --- PC Hover Interactions for Split Panels --- */
@media (hover: hover) and (pointer: fine) {
  .split-panel.reveal.visible {
    transition:
      transform 0.4s cubic-bezier(0.25, 1, 0.5, 1),
      box-shadow 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  }

  .split-panel.reveal.visible:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8);
    z-index: 2;

    /* The glowing spinner overlay */
    background:
      linear-gradient(var(--bg-dark), var(--bg-dark)) padding-box,
      conic-gradient(
          from var(--a),
          var(--border-color) 0%,
          rgba(255, 255, 255, 0.8) 25%,
          var(--border-color) 50%,
          rgba(255, 255, 255, 0.8) 75%,
          var(--border-color) 100%
        )
        border-box;
    animation: spin 3s linear infinite;
  }
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0); /* Slides up into place */
}

/* Stagger the animation on desktop so they don't all pop in at the exact same millisecond */
@media (min-width: 768px) {
  .split-panel:nth-child(1).reveal {
    transition-delay: 0s;
  }
  .split-panel:nth-child(2).reveal {
    transition-delay: 0.15s;
  }
  .split-panel:nth-child(3).reveal {
    transition-delay: 0.3s;
  }
}
@media (min-width: 768px) {
  .split-panel {
    min-height: 70vh;
  }
}
.split-panel img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.split-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 30px;
  background: linear-gradient(
    to top,
    rgba(var(--bg-dark-rgb), 0.9) 5%,
    rgba(var(--bg-dark-rgb), 0.15) 55%,
    rgba(var(--bg-dark-rgb), 0.35)
  );
}
.split-overlay h3 {
  font-size: clamp(1.6rem, 6vw, 2rem);
  font-weight: 900;
  letter-spacing: 2px;
  margin-bottom: 10px;
}
.split-overlay p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  max-width: 32ch;
}

/* --- Reviews & Trust: cards grids --- */
.social-section,
.trust-section {
  padding: 80px 20px;
  border-top: 1px solid var(--border-color);
}
.cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 768px) {
  .cards-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.review-card {
  padding: 30px;
  background: var(--bg-card);
  border-radius: 8px;
  border: 1px solid var(--border-color);
}
.review-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}
.stars {
  color: var(--star-color);
  margin-bottom: 10px;
  font-size: 1.2rem;
}

/* --- Section 7: Trust Badges --- */
.trust-grid {
  text-align: center;
  font-weight: bold;
  font-size: 0.9rem;
}
.trust-item {
  padding: 20px;
  background: var(--bg-card);
  border-radius: 8px;
}

/* --- Section 8: Footer --- */
.site-footer {
  background: var(--bg-card);
  padding: 60px 20px 20px;
  border-top: 1px solid var(--border-color);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.footer-grid h3,
.footer-grid h4 {
  margin-bottom: 15px;
}
.footer-grid p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 8px;
}
.footer-bottom {
  text-align: center;
  border-top: 1px solid var(--border-color);
  padding-top: 20px;
  color: var(--text-secondary);
  font-size: 0.8rem;
}

/* --- Slide-out Cart Drawer --- */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: var(--overlay-scrim);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  z-index: 999;
}
.cart-overlay.active {
  opacity: 1;
  pointer-events: auto;
}
.cart-drawer {
  position: fixed;
  top: 0;
  right: -100%;
  width: 100%;
  max-width: 400px;
  height: 100vh;
  height: 100dvh;
  background: var(--bg-dark);
  border-left: 1px solid var(--border-color);
  z-index: 1000;
  transition: right 0.3s ease-in-out;
  display: flex;
  flex-direction: column;
}
.cart-drawer.active {
  right: 0;
}
.cart-header {
  flex-shrink: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
}
.close-cart {
  font-size: 1.5rem;
  font-weight: bold;
}
/* Single scroll region between the pinned header and footer */
.cart-scroll {
  flex: 1;
  overflow-y: auto;
}
.cart-items {
  padding: 20px;
}
.cart-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}
.cart-item-img {
  width: 90px;
  height: 110px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
  background: var(--bg-card);
}
.cart-item-details {
  flex: 1;
}
.cart-item-details h4 {
  font-size: 1rem;
  margin-bottom: 5px;
}
.cart-item-details p {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-bottom: 5px;
}
.remove-item {
  color: var(--danger);
  font-size: 0.8rem;
  text-decoration: underline;
}
.cart-footer {
  flex-shrink: 0;
  padding: 20px;
  border-top: 1px solid var(--border-color);
  background: var(--bg-card);
}
.subtotal-row {
  display: flex;
  justify-content: space-between;
  font-weight: bold;
  font-size: 1.2rem;
  margin-bottom: 10px;
}
.checkout-btn {
  width: 100%;
  padding: 15px;
  background: var(--text-primary);
  color: var(--bg-dark);
  font-weight: bold;
  font-size: 1rem;
}
.checkout-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* --- Fulfillment Form Styling --- */
.checkout-form-section {
  padding: 15px 20px;
  border-top: 1px solid var(--border-color);
}
.checkout-form-section h3 {
  font-size: 0.8rem;
  letter-spacing: 1px;
  margin: 15px 0 10px 0;
  color: var(--text-secondary);
}
.shipping-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.radio-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  cursor: pointer;
  background: var(--bg-card);
  padding: 10px;
  border-radius: 4px;
  border: 1px solid var(--border-color);
}
.radio-label input {
  accent-color: var(--text-primary);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.form-group input {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 10px;
  border-radius: 4px;
  /* 16px keeps iOS from auto-zooming when the field is focused */
  font-size: 16px;
}
.form-group input:focus {
  outline: none;
  border-color: var(--text-primary);
}

.shipping-row {
  font-size: 0.9rem;
  color: var(--text-secondary);
}
.total-row {
  font-size: 1.3rem;
  border-top: 1px solid var(--border-color);
  padding-top: 10px;
  margin-top: 10px;
}

/* --- PC Centered Cart Modal Override --- */
@media (min-width: 768px) {
  .cart-drawer {
    /* Reposition to absolute center */
    top: 50%;
    left: 50%;
    right: auto; /* Disconnect from the right edge */

    /* Shape it like a floating card instead of a full-height sidebar */
    width: 100%;
    max-width: 550px;
    height: auto;
    max-height: 85vh; /* Leaves a nice gap at the top and bottom */
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.8);

    /* Starting state for the animation (slightly lower and invisible) */
    transform: translate(-50%, -48%) scale(0.96);
    opacity: 0;
    pointer-events: none;
    transition:
      transform 0.4s cubic-bezier(0.25, 1, 0.5, 1),
      opacity 0.4s ease;
  }

  .cart-drawer.active {
    /* Final resting state when opened */
    right: auto;
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    pointer-events: auto;
  }
}

/* --- Story & About Section --- */
.story-section {
  padding: 100px 20px;
  background: var(--bg-dark);
  text-align: center;
  border-bottom: 1px solid var(--border-color);
}
.story-container {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 50px;
}
.story-subtitle {
  font-size: 0.85rem;
  font-weight: bold;
  letter-spacing: 2px;
  color: var(--text-secondary);
}
.story-title {
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -2px;
  margin: -30px 0 0 0;
}
.story-lead {
  font-size: clamp(1.1rem, 3vw, 1.35rem);
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 650px;
  margin: 0 auto;
}
.story-pillars {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  text-align: left;
  margin-top: 20px;
}
@media (min-width: 768px) {
  .story-pillars {
    grid-template-columns: repeat(3, 1fr);
  }
}
.pillar h3 {
  font-size: 2.2rem;
  font-weight: 900;
  letter-spacing: -1px;
  margin-bottom: 15px;
}
.pillar p {
  color: var(--text-secondary);
  line-height: 1.6;
  font-size: 1.05rem;
}
.story-conclusion {
  margin-top: 40px;
  padding-top: 60px;
  border-top: 1px solid var(--border-color);
}
.story-text {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 700px;
  margin: 20px auto 40px;
}
.story-shop-btn {
  margin-top: 10px;
}

/* --- Social Icons (Squircle Buttons) --- */
.social-icons-group {
  display: flex;
  gap: 15px;
  margin-top: 12px;
}
.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  color: var(--text-secondary);
  transition: all 0.3s ease;
}
.social-btn svg {
  width: 22px;
  height: 22px;
}
.social-btn:hover {
  color: var(--text-primary);
  border-color: var(--text-primary);
  transform: translateY(-4px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
}
