@font-face {
  font-family: "Junction";
  src: url("assets/fonts/junction-light.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Junction";
  src: url("assets/fonts/junction-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Junction";
  src: url("assets/fonts/junction-bold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* =========================
   BASE / BODY
   ========================= */

:root {
  --font-main: monospace, sans-serif;
}

* {
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}

body {
  background: #111;
  color: white;
  font-family: var(--font-main);
  margin: 0;
  padding-top: 108px;
  position: relative;
  overflow-x: hidden;
}

/* =========================
   BACKGROUND LAYER
   ========================= */

.bg-layer {
  position: fixed;
  top: -5%;
  left: -5%;
  width: 110%;
  height: 110%;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  contain: strict;
}

.bg-layer img {
  position: absolute;
  top: 0;
  left: 50%;
  width: 100%;
  height: 200%;
  object-fit: cover;
  object-position: top center;
  transform: translate3d(-50%, 0, 0);
  will-change: transform;
  backface-visibility: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .bg-layer img {
    transform: translate3d(-50%, 0, 0) !important;
    will-change: auto;
  }
}

/* =========================
   NAVBAR SHELL
   ========================= */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.85),
    rgba(0, 0, 0, 0.65),
    rgba(0, 0, 0, 0)
  );
  backdrop-filter: blur(6px);
  overflow: visible;
}

/* =========================
   ROW 1 — BRAND
   ========================= */

.nav-brand-row {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0.6rem 2rem 0.5rem;
  overflow: visible;
  position: relative;
}

.nav-brand-row .nav-bag-button {
  position: absolute;
  right: 2rem;
}

.nav-brand {
  background: none;
  border: none;
  color: inherit;
  font-size: 0.85rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0.65;
  cursor: pointer;
  position: relative;
}

/* =========================
   ROW 2 — CONTROLS
   ========================= */

/* ==========================================
   IMPROVED NAVBAR LAYOUT (NEW)
   To revert: replace this section with the code in the comment block below
   ========================================== */

.nav-controls-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  padding: 0.75rem 2rem 0.85rem;
  overflow: visible;
}

.nav-audience-group {
  display: flex;
  gap: 1.5rem;
  padding-right: 1.5rem;
  border-right: 1px solid rgba(255, 255, 255, 0.15);
}

.nav-category-group {
  display: flex;
  gap: 1.25rem;
  padding-right: 1.5rem;
  border-right: 1px solid rgba(255, 255, 255, 0.15);
}

.nav-sort-group {
  padding-right: 1.5rem;
  border-right: 1px solid rgba(255, 255, 255, 0.15);
}


/* ==========================================
   ORIGINAL NAVBAR LAYOUT (BACKUP - DO NOT DELETE)
   To restore: uncomment and replace the section above

.nav-controls-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3rem;
  padding: 0.75rem 2rem 0.85rem;
  overflow: visible;
}

.nav-audience-group {
  display: flex;
  gap: 2rem;
}

.nav-category-group {
  display: flex;
  gap: 1.25rem;
}
   ========================================== */

/* =========================
   BUTTON BASE
   ========================= */

button {
  font-family: inherit;
}

.navbar button {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  position: relative;
  padding: 0.6em 1.2em;
  overflow: visible;

  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.6),
    0 0 6px rgba(0, 0, 0, 0.4);

  animation: idle-drift 14s ease-in-out infinite;

  transition:
    transform 0.8s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.6s ease,
    filter 0.6s ease,
    text-shadow 0.8s ease,
    letter-spacing 0.8s ease;
}

.nav-toggle {
  font-size: 1.05rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.nav-category {
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.85;
}

/* =========================
   UNIVERSAL AURA (ALWAYS PRESENT)
   ========================= */

.navbar button::before,
.nav-brand::before {
  content: "";
  position: absolute;
  inset: -1.8em;
  z-index: -1;

  background: radial-gradient(
    circle,
    rgba(90, 40, 40, 0.5) 0%,
    rgba(57, 30, 30, 0.32) 35%,
    rgba(37, 22, 22, 0.12) 55%,
    rgba(90, 40, 40, 0) 72%
  );

  filter: blur(20px);
  opacity: 0;
  transform: scale(0.6);
  pointer-events: none;

  transition:
    opacity 1.1s ease,
    transform 1.4s cubic-bezier(0.22, 1, 0.36, 1);
}

/* =========================
   IDLE MOTION
   ========================= */

@keyframes idle-drift {
  0% { transform: translate(0, 0); }
  25% { transform: translate(0.6px, -0.4px); }
  50% { transform: translate(-0.6px, 0.3px); }
  75% { transform: translate(0.4px, -0.2px); }
  100% { transform: translate(0, 0); }
}

/* =========================
   HOVER - Only on devices that can actually hover
   ========================= */

@media (hover: hover) {
  .navbar button:hover {
    opacity: 1;
    filter: blur(0);
    transform: translateY(-1px) scale(1.02);
    transition-duration: 0.35s, 0.25s, 0.25s, 0.35s, 0.35s;

    text-shadow:
      0 2px 6px rgba(0, 0, 0, 0.95),
      0 0 16px rgba(255, 255, 255, 0.3);
  }
}

/* =========================
   ACTIVE STATE
   ========================= */

.is-active {
  text-decoration: none !important;
  border-bottom: none !important;
}

.navbar button.is-active {
  opacity: 1;
  filter: none;
  font-weight: 600;
  letter-spacing: 0.18em;
  transform: scale(1.12);

  text-shadow:
    0 2px 10px rgba(0, 0, 0, 0.95),
    0 0 26px rgba(0, 0, 0, 0.75);

  animation: alive 6.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.navbar button.is-active::before {
  opacity: 0.85;
  transform: scale(1.15);
}

/* =========================
   BRAND RESET STATE
   ========================= */

.nav-brand.is-reset-available {
  opacity: 1;
  animation: brand-alive 6s ease-in-out infinite;

  text-shadow:
    0 2px 8px rgba(0, 0, 0, 0.9),
    0 0 22px rgba(255, 255, 255, 0.35);
}

.nav-brand.is-reset-available::before {
  opacity: 0.7;
  transform: scale(1.05);
}

/* =========================
   SORT DROPDOWN
   ========================= */

.nav-sort-group {
  position: relative;
  display: flex;
  align-items: center;
}

.nav-sort-trigger {
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.6em 1.2em;

  display: flex;
  align-items: center;
  gap: 0.5em;
}

.nav-sort-trigger .sort-icon {
  opacity: 0.5;
  font-size: 0.7em;
  transition: opacity 0.4s ease;
}

.nav-sort-trigger .sort-label {
  opacity: 1;
  transition: opacity 0.4s ease;
}

.nav-sort-trigger .sort-value {
  opacity: 1;
  font-weight: 600;
  transition: opacity 0.4s ease;
}

.nav-sort-group.is-open .sort-icon {
  opacity: 0;
}

.nav-sort-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: auto;
  margin-top: 0.75rem;

  display: flex;
  flex-direction: column;
  gap: 0.15rem;

  background: rgba(25, 23, 23, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 0.5rem;

  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.4),
    0 12px 40px rgba(0, 0, 0, 0.5),
    0 24px 80px rgba(0, 0, 0, 0.4);

  opacity: 0;
  visibility: hidden;
  transform: translateX(0.75rem) translateY(-8px) scale(0.98);

  transition:
    opacity 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0.4s ease;

  z-index: 1001;
}

.nav-sort-group.is-open .nav-sort-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(0.75rem) translateY(0) scale(1);
}

.nav-sort-option {
  position: relative;
  overflow: visible;

  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  font-family: inherit;
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: left;

  padding: 1em 1.5em;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;

  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.5);

  transition:
    color 0.5s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
    text-shadow 0.5s cubic-bezier(0.22, 1, 0.36, 1),
    background 0.4s ease;
}

.nav-sort-option::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: 6px;
  
  background: radial-gradient(
    ellipse at center,
    rgba(120, 50, 50, 0.5) 0%,
    rgba(90, 40, 40, 0.3) 40%,
    rgba(60, 30, 30, 0) 70%
  );
  
  opacity: 0;
  pointer-events: none;
  
  transition:
    opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.nav-sort-option:hover {
  color: rgba(255, 255, 255, 0.85);
  transform: translateX(2px);
  background: rgba(255, 255, 255, 0.05);
}

.nav-sort-option.is-active {
  color: rgba(255, 255, 255, 1);
  font-weight: 600;
  background: rgba(255, 255, 255, 0.03);
  
  text-shadow:
    0 1px 4px rgba(0, 0, 0, 0.8),
    0 0 12px rgba(255, 200, 200, 0.2);
}

.nav-sort-option.is-active::before {
  opacity: 1;
}

/* =========================
   ANIMATIONS
   ========================= */

@keyframes alive {
  0% { transform: scale(1.08); }
  50% { transform: scale(1.14); }
  100% { transform: scale(1.08); }
}

@keyframes brand-alive {
  0% { transform: scale(1); }
  50% { transform: scale(1.04); }
  100% { transform: scale(1); }
}

/* =========================
   INACTIVE
   ========================= */

.navbar button:not(.is-active) {
  opacity: 0.75;
  filter: blur(0.2px);
}

/* =========================
   CATALOG / PRODUCT GRID
   ========================= */

.catalog {
  padding: 3rem 2.5rem 12rem;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 3rem;
}

/* =========================
   PRODUCT CARD
   ========================= */

.product-card {
  position: relative;
  cursor: pointer;
  opacity: 1;
  will-change: transform, opacity;
  
  transition:
    transform 0.6s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.5s ease;
}

.product-card:hover {
  transform: translateY(-6px);
}

.product-bg {
  position: absolute;
  inset: 0;
  z-index: 0;

  background: radial-gradient(
    ellipse at center,
    rgba(255, 255, 255, 0.08),
    rgba(255, 255, 255, 0.03) 45%,
    rgba(255, 255, 255, 0.01) 65%,
    rgba(255, 255, 255, 0) 85%
  );

  backdrop-filter: blur(2px);
  opacity: 0.75;

  transition:
    opacity 0.9s ease,
    transform 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.product-card:hover .product-bg {
  opacity: 0.95;
  transform: scale(1.02);
}

.product-card,
.product-content,
.product-image img {
  filter: drop-shadow(0 10px 28px rgba(0,0,0,0.28));
}

.product-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding: 1rem;
}

.product-image {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 10px;
}

.product-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;

  transition:
    opacity 0.9s ease,
    transform 1.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.img-primary {
  opacity: 1;
  transform: scale(1);
}

.img-secondary {
  opacity: 0;
  transform: scale(1.04);
}

.product-card:hover .img-primary {
  opacity: 0;
}

.product-card:hover .img-secondary {
  opacity: 1;
  transform: scale(1);
}

.product-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0 0.25rem;
}

.product-name {
  font-size: 1rem;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.95);
  text-shadow:
    0 1px 3px rgba(0, 0, 0, 0.8),
    0 2px 8px rgba(0, 0, 0, 0.6);
}

.product-price {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.75);
  text-shadow:
    0 1px 3px rgba(0, 0, 0, 0.8),
    0 2px 8px rgba(0, 0, 0, 0.6);
}

/* =========================
   MODAL OVERLAY
   ========================= */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 5000;

  background: rgba(10, 10, 10, 0.35);
  backdrop-filter: blur(10px);              /* reduced blur */
  -webkit-backdrop-filter: blur(10px);

  display: flex;
  align-items: center;
  justify-content: center;

  opacity: 0;
  pointer-events: none;

  transition: opacity 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.modal-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}


/* =========================
   MODAL SUBJECT
   ========================= */

.modal-subject {
  position: relative;

  max-width: min(94vw, 620px);
  width: 100%;

  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(6px);

  padding: 2.2rem 2.2rem 2.6rem;
  border-radius: 14px;

  transform: translateY(40px) scale(0.96);
  opacity: 0;

  box-shadow:
    0 0 0 1px rgba(255,255,255,0.04),
    0 22px 70px rgba(0,0,0,0.60),
    inset 0 0 44px rgba(255,255,255,0.04);

  transition:
    transform 1.4s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 1.2s ease;

  /* CRITICAL: preserve 3D for children */
  transform-style: preserve-3d;
}


/* "blurred edges" vignette layer */
/* Move vignette to a wrapper that doesn't interfere with 3D */
.modal-subject::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;

  background: radial-gradient(
    ellipse at center,
    rgba(255,255,255,0.03) 0%,
    rgba(255,255,255,0.02) 55%,
    rgba(0,0,0,0.18) 82%,
    rgba(0,0,0,0.28) 100%
  );

  filter: blur(10px);
  opacity: 0.9;
  mix-blend-mode: soft-light;

  /* CRITICAL: place behind 3D content */
  z-index: -1;
  transform: translateZ(-1px);
}


.modal-overlay.is-open .modal-subject {
  transform: translateY(0) scale(1);
  opacity: 1;
}

body.modal-open {
  overflow: hidden;
}

/* =========================
   MODAL CLOSE BUTTON
   ========================= */

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 200;

  width: 44px;
  height: 44px;

  display: flex;
  align-items: center;
  justify-content: center;

  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;

  color: rgba(255, 255, 255, 0.7);
  font-size: 1.5rem;
  line-height: 1;

  cursor: pointer;

  transition:
    background 0.3s ease,
    border-color 0.3s ease,
    color 0.3s ease,
    transform 0.3s ease;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
  color: rgba(255, 255, 255, 1);
  transform: scale(1.08);
}

.modal-close:active {
  transform: scale(0.95);
}

/* =========================
   GALLERY ZOOM BUTTON
   ========================= */

.gallery-zoom-button {
  position: absolute;
  bottom: 0.7rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;

  width: 44px;
  height: 44px;

  display: flex;
  align-items: center;
  justify-content: center;

  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;

  color: rgba(255, 255, 255, 0.7);
  font-size: 1.8rem;
  line-height: 1;
  font-weight: 300;

  cursor: pointer;

  opacity: 0;
  pointer-events: none;

  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);

  transition:
    background 0.3s ease,
    border-color 0.3s ease,
    color 0.3s ease,
    transform 0.3s ease,
    opacity 0.3s ease,
    box-shadow 0.3s ease;
}

.gallery-zoom-button.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.gallery-zoom-button:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
  color: rgba(255, 255, 255, 1);
  transform: translateX(-50%) scale(1.08);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
}

.gallery-zoom-button:active {
  transform: translateX(-50%) scale(0.95);
}

/* =========================
   ZOOM OVERLAY
   ========================= */

.zoom-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;

  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);

  display: flex;
  align-items: center;
  justify-content: center;

  opacity: 0;
  pointer-events: none;

  transition: opacity 0.3s ease;
}

.zoom-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.zoom-image-container {
  position: relative;
  width: 90vw;
  height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.zoom-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

/* =========================
   MODAL SHELL (if you add one)
   ========================= */

.modal-shell {
  position: relative;
  transform-style: preserve-3d;
  overflow: visible;
}

/* =========================
   MODAL INFO - ensure it's above gallery
   ========================= */

.modal-info {
  position: relative;
  z-index: 10;
}


/* =========================
   MODAL TEXT
   ========================= */

.modal-title-row {
  display: flex;
  align-items: baseline;
  gap: 1.5rem;
  flex-wrap: wrap;
}

#modalTitle {
  margin: 0;
  flex-shrink: 0;
}

.modal-price {
  font-size: 1.3rem;
  font-weight: 400;
  opacity: 0.85;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.9);
}

.modal-description {
  margin-top: 1.2rem;
  font-size: 0.9rem;
  line-height: 1.6;
  opacity: 0.75;
  max-width: 44ch;
}

/* subtle shadow pass for modal content */
.modal-info,
.modal-description,
.modal-sizes,
.modal-actions {
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.42));
}

/* =========================
   MODAL SIZES
   ========================= */

.modal-sizes {
  display: flex;
  gap: 0.6rem;
  margin-top: 0;
}

.size-option {
  min-width: 48px;
  min-height: 48px;
  padding: 0.65em 1.1em;
  
  display: flex;
  align-items: center;
  justify-content: center;
  
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: transparent;
  color: inherit;
  font-size: 0.9rem;
  
  cursor: pointer;
  opacity: 0.6;
  border-radius: 10px;
  
  box-shadow: 0 8px 22px rgba(0,0,0,0.25);
  
  transition: all 0.4s ease;
}

.size-option:hover {
  opacity: 0.9;
  border-color: rgba(255, 255, 255, 0.4);
}

.size-option.is-selected {
  opacity: 1;
  border-color: rgba(255, 255, 255, 0.7);
  box-shadow: 0 12px 28px rgba(0,0,0,0.35);
}

/* =========================
   PRODUCT GALLERY (ARIYA COVERFLOW)
   ========================= */

.gallery-mask {
  position: relative;
  width: calc(100% + 4.4rem);
  margin-left: -2.2rem;
  margin-right: -2.2rem;
  margin-top: -2.2rem;
  margin-bottom: 1.6rem;
  padding-top: 2.2rem;
  overflow: hidden;

  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 18%,
    black 82%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 18%,
    black 82%,
    transparent 100%
  );
}

.product-gallery {
  position: relative;
  width: 100%;
  padding-top: 20px;
  padding-bottom: 40px;

  display: flex;
  justify-content: center;

  overflow: visible;

  cursor: grab;
  user-select: none;

  perspective: 900px;
  perspective-origin: 50% 50%;

  transform-style: preserve-3d;
}

.product-gallery:active {
  cursor: grabbing;
}

.gallery-track {
  position: relative;
  width: 100%;
  height: 400px;

  margin: 0 auto;

  transform-style: preserve-3d;
  touch-action: none;

  overflow: visible;
}

.gallery-track img {
  position: absolute;
  top: 0;
  left: 0;

  width: clamp(200px, 60vw, 300px);
  height: clamp(260px, 58vw, 360px);

  object-fit: cover;
  border-radius: 14px;

  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;

  will-change: transform, opacity;
  transform-origin: 50% 50%;

  backface-visibility: hidden;
  transform-style: preserve-3d;

  pointer-events: none;

  box-shadow:
    0 8px 24px rgba(0,0,0,0.4),
    0 4px 12px rgba(0,0,0,0.3);
}

/* =========================
   SIZE + ACTION ROW
   ========================= */

.modal-sizes-actions {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  margin-top: 1.6rem;
}

/* keep sizes exactly as-is */
.modal-sizes {
  margin-top: 0;
}

/* action buttons column */
.modal-actions {
  display: flex;
  gap: 0.8rem;
  transform: translateY(2px);
}

/* =========================
   ACTION BUTTONS — NAVBAR AURA STYLE
   ========================= */

.buy-button,
.bag-button {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: inherit;

  position: relative;
  overflow: visible;

  padding: 0.85em 1.85em;
  font-size: 0.92rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;

  cursor: pointer;
  border-radius: 12px;

  text-shadow:
    0 2px 6px rgba(0, 0, 0, 0.85),
    0 0 14px rgba(0, 0, 0, 0.35);

  filter: drop-shadow(0 10px 26px rgba(0,0,0,0.35));

  transition:
    transform 0.8s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.6s ease,
    filter 0.6s ease,
    text-shadow 0.8s ease,
    letter-spacing 0.8s ease,
    border-color 0.4s ease,
    background 0.4s ease;
}

.buy-button {
  font-weight: 600;
  opacity: 0.85;
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.05);
}

.bag-button {
  font-weight: 600;
  opacity: 0.85;
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.05);
}

.buy-button::before,
.bag-button::before {
  content: "";
  position: absolute;
  inset: -1.8em;
  z-index: -1;

  background: radial-gradient(
    circle,
    rgba(90, 40, 40, 0.55) 0%,
    rgba(57, 30, 30, 0.34) 35%,
    rgba(37, 22, 22, 0.14) 55%,
    rgba(90, 40, 40, 0) 72%
  );

  filter: blur(22px);
  opacity: 0;
  transform: scale(0.6);
  pointer-events: none;

  transition:
    opacity 1.1s ease,
    transform 1.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.buy-button:hover,
.bag-button:hover {
  opacity: 1;
  filter: blur(0);
  transform: translateY(-1px) scale(1.04);
  transition-duration: 0.35s, 0.25s, 0.25s, 0.35s, 0.35s;
  border-color: rgba(255, 255, 255, 0.45);

  text-shadow:
    0 2px 6px rgba(0, 0, 0, 0.95),
    0 0 16px rgba(255, 255, 255, 0.18);
}

.buy-button:hover {
  background: rgba(255, 255, 255, 0.1);
}

.buy-button:hover::before,
.bag-button:hover::before {
  opacity: 0.85;
  transform: scale(1.1);
}

/* =========================
   DISABLED ACTION STATE
   ========================= */

.buy-button:disabled,
.bag-button:disabled {
  opacity: 0.3;
  cursor: default;
  pointer-events: none;
  transform: none;
  filter: none;
  border-color: rgba(255, 255, 255, 0.08);
  background: transparent;
}

.buy-button:disabled::before,
.bag-button:disabled::before {
  opacity: 0;
  transform: scale(0.6);
}

/* =========================
   CART BUTTON IN NAVBAR
   ========================= */

.nav-bag-button {
  position: relative;
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.85;

  display: flex;
  align-items: center;
  gap: 0.6em;
}

.nav-bag-button .label::before {
  content: '';
  display: inline-block;
  width: 1em;
  height: 1em;
  background-image: url("assets/icons/bag.svg");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  filter: invert(1);
  margin-right: 0.5em;
  vertical-align: middle;
}

.bag-icon {
  opacity: 0.7;
  font-size: 1em;
}

.bag-badge {
  display: flex;
  align-items: center;
  justify-content: center;

  min-width: 24px;
  height: 24px;
  padding: 0 8px;

  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;

  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;

  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

/* =========================
   CART OVERLAY
   ========================= */

.bag-overlay {
  position: fixed;
  inset: 0;
  z-index: 4000;

  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);

  opacity: 0;
  pointer-events: none;

  transition: opacity 0.4s ease;
}

.bag-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

/* =========================
   CART PANEL
   ========================= */

.bag-panel {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 5000;

  width: min(420px, 90vw);
  height: 100vh;

  background: rgba(18, 18, 18, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);

  border-left: 1px solid rgba(255, 255, 255, 0.1);

  display: flex;
  flex-direction: column;

  transform: translateX(100%);

  box-shadow:
    -4px 0 24px rgba(0, 0, 0, 0.5),
    -12px 0 48px rgba(0, 0, 0, 0.3);

  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);

  visibility: hidden;
}

.bag-panel.is-open {
  transform: translateX(0);
  visibility: visible;
}

/* =========================
   CART HEADER
   ========================= */

.bag-header {
  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 1.8rem 2rem 1.4rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.bag-header h2 {
  font-size: 1.1rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0;
  opacity: 0.9;
}

.bag-close {
  width: 36px;
  height: 36px;

  display: flex;
  align-items: center;
  justify-content: center;

  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;

  color: rgba(255, 255, 255, 0.6);
  font-size: 1.5rem;
  line-height: 1;

  cursor: pointer;

  transition: all 0.3s ease;
}

.bag-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 1);
  border-color: rgba(255, 255, 255, 0.25);
  transform: scale(1.08);
}

/* =========================
   CART ITEMS
   ========================= */

.bag-items {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem 2rem;

  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.cart-item {
  display: flex;
  gap: 1rem;

  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 1rem;

  transition: background 0.3s ease, border-color 0.3s ease;
}

.cart-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

.cart-item-image {
  width: 70px;
  height: 90px;
  flex-shrink: 0;

  border-radius: 6px;
  overflow: hidden;
}

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

.cart-item-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.cart-item-name {
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  opacity: 0.95;
}

.cart-item-meta {
  font-size: 0.75rem;
  opacity: 0.6;
  letter-spacing: 0.05em;
}

.cart-item-actions {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-top: auto;
}

.cart-item-quantity {
  display: flex;
  align-items: center;
  gap: 0.5rem;

  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 0.3rem 0.5rem;
}

.qty-btn {
  background: none;
  border: none;
  color: inherit;

  width: 24px;
  height: 24px;

  display: flex;
  align-items: center;
  justify-content: center;

  cursor: pointer;
  opacity: 0.6;

  font-size: 1rem;
  line-height: 1;

  transition: opacity 0.2s ease;
}

.qty-btn:hover {
  opacity: 1;
}

.qty-value {
  font-size: 0.85rem;
  min-width: 20px;
  text-align: center;
}

.cart-item-price {
  font-size: 0.9rem;
  font-weight: 600;
  opacity: 0.85;
}

.cart-item-remove {
  background: none;
  border: none;
  color: rgba(255, 100, 100, 0.7);

  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;

  cursor: pointer;
  padding: 0.4em 0.6em;

  transition: color 0.3s ease;
}

.cart-item-remove:hover {
  color: rgba(255, 100, 100, 1);
}

.cart-empty {
  text-align: center;
  padding: 3rem 2rem;
  opacity: 0.5;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
}

/* =========================
   CART FOOTER
   ========================= */

.bag-footer {
  padding: 1.5rem 2rem 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);

  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.bag-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;

  font-size: 1.1rem;
  letter-spacing: 0.06em;
}

.total-label {
  opacity: 0.7;
  text-transform: uppercase;
  font-size: 0.85rem;
}

.total-value {
  font-weight: 600;
  font-size: 1.3rem;
}

.checkout-button {
  width: 100%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: inherit;

  padding: 1em;
  font-size: 0.9rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;

  cursor: pointer;
  border-radius: 10px;

  transition: all 0.4s ease;
}

.checkout-button:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.35);
  transform: translateY(-2px);
}

.checkout-button:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  transform: none;
}

/* =========================
   BACKDROP FILTER OPTIMIZATION
   ========================= */

/* Disable navbar blur when modals are open to prevent stacked backdrop-filter */
body.modal-open .navbar {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

body.bag-open .navbar {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

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

/* Mobile Portrait (Phones only - exclude tablets) */
@media (max-aspect-ratio: 3/4) and (max-width: 900px) {
  /* Adjust body padding for larger navbar */
  body {
    padding-top: 120px;
  }

  /* Remove 300ms click delay on mobile */
  .navbar button,
  .product-card,
  .size-option,
  .buy-button,
  .bag-button,
  .modal-close,
  .bag-close,
  .qty-btn,
  .cart-item-remove,
  .checkout-button,
  .nav-sort-option {
    touch-action: manipulation;
  }

  /* Prevent all gesture interference on navbar - no scrolling, no zoom, no context menu */
  .navbar,
  .navbar * {
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
  }

  /* But allow manipulation on navbar buttons specifically */
  .navbar button {
    touch-action: manipulation;
  }

  /* Critical fix: Ensure button pseudo-elements don't block touches */
  .navbar button::before,
  .navbar button::after {
    pointer-events: none;
  }

  /* Navbar adjustments - smooth gradient */
  .navbar {
    background: linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0.92),
      rgba(0, 0, 0, 0.88),
      rgba(0, 0, 0, 0.82),
      rgba(0, 0, 0, 0.72),
      rgba(0, 0, 0, 0.58),
      rgba(0, 0, 0, 0.4),
      rgba(0, 0, 0, 0.2),
      rgba(0, 0, 0, 0)
    );
    padding-bottom: 0.5rem;
    width: 100vw;
    left: 0;
    right: 0;
  }

  .nav-brand-row {
    padding: 0.5rem 0.75rem 0.4rem;
  }

  .nav-brand-row .nav-bag-button {
    right: 0rem;
  }

  .nav-brand {
    font-size: 0.85rem;
    letter-spacing: 0.25em;
  }

  /* Reorganize navigation for mobile - 2 rows with more spacing */
  .nav-controls-row {
    flex-wrap: wrap;
    gap: 0.25rem;
    padding: 0.4rem 0.5rem 0.8rem;
  }

  /* Remove dividers on mobile */
  .nav-audience-group,
  .nav-category-group,
  .nav-sort-group {
    border-right: none;
    padding-right: 0;
  }

  /* Row 1: SORT MEN WOMEN CART */
  .nav-sort-group {
    order: 1;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .nav-audience-group {
    order: 2;
    gap: 0.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .nav-bag-button {
    order: 3;
    white-space: nowrap;
    flex-shrink: 0;
    padding-right: 0;
  }

  .nav-bag-button .label {
    display: none;
  }

  .nav-bag-button::after {
    content: '';
    display: inline-block;
    width: 1.2em;
    height: 1.2em;
    background-image: url("assets/icons/bag.svg");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    filter: invert(1);
    order: -1;
  }

  /* Row 2: Categories centered - force new line */
  .nav-category-group {
    order: 4;
    gap: 0.4rem;
    flex-wrap: nowrap;
    justify-content: center;
    width: 100%;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .nav-toggle {
    font-size: 0.82rem;
    padding: 0.7em 1.2em;
    -webkit-user-select: none;
    user-select: none;
  }

  .navbar button.is-active {
    transform: scale(1);
    letter-spacing: 0.14em;
  }

  .nav-category {
    font-size: 0.8rem;
    padding: 0.65em 1em;
    -webkit-user-select: none;
    user-select: none;
  }

  .nav-sort-trigger {
    font-size: 0.8rem;
    padding: 0.7em 1.2em;
    -webkit-user-select: none;
    user-select: none;
  }

  .nav-bag-button {
    font-size: 0.8rem;
    padding: 0.7em 1.2em;
    -webkit-user-select: none;
    user-select: none;
  }

  /* Sort dropdown menu - larger on mobile */
  .nav-sort-dropdown {
    left: 0;
    right: auto;
    transform: translateX(0.75rem) translateY(-8px) scale(0.98);
  }

  .nav-sort-group.is-open .nav-sort-dropdown {
    transform: translateX(0.75rem) translateY(0) scale(1);
  }

  .nav-sort-option {
    font-size: 1rem;
    padding: 1.2em 1.8em;
  }

  /* Product grid - 2 columns on mobile */
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem 1rem;
    padding: 1rem;
    margin: 0;
    max-width: 100%;
    box-sizing: border-box;
  }

  .catalog {
    padding: 1.5rem 1rem 12rem;
  }

  .product-card {
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-direction: column;
  }

  .product-content {
    padding: 0.5rem;
    gap: 0.5rem;
  }

  .product-image {
    flex-shrink: 0;
  }

  .product-name {
    font-size: 0.9rem;
    letter-spacing: 0.08em;
  }

  .product-price {
    font-size: 0.95rem;
  }

  /* Modal adjustments */
  .modal-subject {
    width: 95vw;
    max-width: 95vw;
    padding: 1rem;
  }

  .modal-close {
    top: 0.5rem;
    right: 0.5rem;
    width: 32px;
    height: 32px;
    font-size: 1.2rem;
  }

  .modal-shell {
    flex-direction: column;
    gap: 1.5rem;
  }

  .gallery-mask {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    height: 50vh;
    max-height: 400px;
  }

  .product-gallery {
    padding-left: 0;
    padding-right: 0;
  }

  .gallery-track {
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .modal-info {
    width: 100%;
    padding: 0;
  }

  #modalTitle {
    font-size: 1rem;
  }

  .modal-description {
    font-size: 0.8rem;
  }

  .modal-sizes {
    gap: 0.5rem;
  }

  .size-option {
    padding: 0.6em 1em;
    font-size: 0.8rem;
  }

  .modal-actions {
    flex-direction: column;
    gap: 0.8rem;
  }

  .buy-button,
  .bag-button {
    width: 100%;
    padding: 0.9em;
    font-size: 0.85rem;
  }

  /* Cart panel - full width on mobile */
  .bag-panel {
    width: 100vw;
  }

  .bag-header {
    padding: 1.2rem 1.5rem 1rem;
  }

  .bag-header h2 {
    font-size: 1rem;
  }

  .bag-items {
    padding: 1rem 1.5rem;
  }

  .cart-item {
    padding: 0.8rem;
  }

  .cart-item-image {
    width: 60px;
    height: 80px;
  }

  .cart-item-name {
    font-size: 0.85rem;
  }

  .cart-item-meta {
    font-size: 0.7rem;
  }

  .bag-footer {
    padding: 1.2rem 1.5rem calc(10rem + env(safe-area-inset-bottom));
  }

  .total-value {
    font-size: 1.2rem;
  }
}

/* =========================
   MOBILE LANDSCAPE
   ========================= */

@media (orientation: landscape) and (max-height: 500px) {

  body {
    padding-top: 60px;
  }

  .navbar {
    padding-bottom: 0.25rem;
  }

  .nav-brand-row {
    padding: 0.3rem 0.75rem 0.2rem;
  }

  .nav-brand {
    font-size: 0.7rem;
  }

  .nav-controls-row {
    gap: 0.5rem;
    padding: 0.25rem 0.5rem 0.4rem;
  }

  .nav-toggle {
    font-size: 0.7rem;
    padding: 0.4em 0.8em;
  }

  .nav-category {
    font-size: 0.65rem;
    padding: 0.4em 0.7em;
  }

  .nav-sort-trigger {
    font-size: 0.65rem;
    padding: 0.4em 0.8em;
  }

  .nav-bag-button {
    font-size: 0.7rem;
    padding: 0.4em 0.8em;
  }


  .nav-sort-option {
    font-size: 0.8rem;
    padding: 0.6em 1em;
  }

  .product-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    padding: 0.75rem;
  }

  .catalog {
    padding: 1rem 0.75rem 2rem;
  }

  .product-name {
    font-size: 0.8rem;
  }

  .product-price {
    font-size: 0.85rem;
  }

  /* Modal adjustments for landscape */
  .modal-subject {
    max-height: 90vh;
    overflow-y: auto;
    padding: 1rem;
  }

  .gallery-mask {
    height: 35vh;
    max-height: 200px;
  }

  .modal-close {
    width: 28px;
    height: 28px;
    font-size: 1rem;
  }
}

/* =========================
   SMALL DEVICES (iPhone SE, Galaxy Z Fold, etc)
   ========================= */

@media (max-width: 400px) {
  /* Sort dropdown - right-aligned with left shift */
  .nav-sort-dropdown {
    left: 0;
    right: auto;
    transform: translateX(0.75rem) translateY(-8px) scale(0.98);
  }

  .nav-sort-group.is-open .nav-sort-dropdown {
    transform: translateX(0.75rem) translateY(0) scale(1);
  }

  .modal-subject {
    width: 96vw;
    max-width: 96vw;
    padding: 2vw;
  }

  .modal-info {
    padding: 0;
  }

  .modal-actions {
    flex-direction: column;
    gap: 2vw;
    width: 100%;
  }

  .modal-sizes-actions {
    flex-direction: column;
    gap: 1.5rem;
  }

  .modal-actions {
    flex-direction: row;
    gap: 1vw;
    width: 100%;
  }

  .buy-button,
  .bag-button {
    flex: 1;
    min-width: 45%;
    padding: 1em 0.8em;
    font-size: clamp(0.7rem, 2.5vw, 0.9rem);
    letter-spacing: 0.12em;
  }

  .modal-sizes {
    gap: 1vw;
    flex-wrap: nowrap;
    justify-content: flex-start;
  }

  .size-option {
    flex-shrink: 0;
  }

  .size-option {
    padding: 0.5em 0.8em;
    font-size: clamp(0.65rem, 2.2vw, 0.8rem);
  }


  #modalTitle {
    font-size: clamp(0.85rem, 3vw, 1rem);
  }

  .modal-description {
    font-size: clamp(0.7rem, 2.3vw, 0.85rem);
  }

  .modal-subject {
    max-height: 95vh;
    overflow-y: auto;
    overflow-x: hidden;
    box-sizing: border-box;
  }

  .gallery-mask {
    height: 55vh;
    max-height: 450px;
  }

  .modal-actions {
    padding-bottom: 1.5rem;
  }

  .modal-shell {
    overflow: visible;
  }

  .modal-info {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
}
