/* ═══════════════════════════════════════
   V SIGNATURE — main.css  v8 (final)
   Fixed: horizontal scroll after Add to Cart + Quick View modal
   ═══════════════════════════════════════ */

/* ── Reset & Base ───────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
  font-size: 16px;
}
body {
  font-family: 'Jost', sans-serif;
  color: #333;
  background: white;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}
a {
  text-decoration: none;
  color: inherit;
}

/* ── Typography ─────────────────────── */
.serif {
  font-family: 'Cormorant Garamond', Georgia, serif;
}
h1, h2, h3 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 400;
}

/* ── Marquee ────────────────────────── */
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.marquee-wrap {
  overflow: hidden;
}
.marquee-inner {
  animation: marquee 28s linear infinite;
  width: max-content;
}

/* ── Scroll reveal ──────────────────── */
.rv {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.rv.show {
  opacity: 1;
  transform: none;
}
.sg > * {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s, transform 0.5s;
}
.sg > *:nth-child(1) { transition-delay: 0.05s; }
.sg > *:nth-child(2) { transition-delay: 0.15s; }
.sg > *:nth-child(3) { transition-delay: 0.25s; }
.sg > *:nth-child(4) { transition-delay: 0.35s; }
.sg.show > * {
  opacity: 1;
  transform: none;
}

/* ── Horizontal product scroll (FIXED) ── */
.scroll-x {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 6px;
  -webkit-overflow-scrolling: touch;
}
.scroll-x::-webkit-scrollbar {
  display: none;
}
.scroll-x {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.scroll-item {
  min-width: 180px;
  max-width: 200px;
  flex: 0 0 auto;
  scroll-snap-align: start;
}
@media (min-width: 640px) {
  .scroll-item {
    min-width: 220px;
  }
}

/* Arrow Buttons – HIGH Z-INDEX to stay above cart drawer */
.arrow-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1000; /* Was 5 → now above cart drawer (z-index 500) */
  transition: all 0.2s ease;
  font-size: 1.2rem;
  user-select: none;
}
.arrow-btn:hover {
  background: #d4637a;
  color: white;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2);
}
.arrow-left {
  left: 0;
}
.arrow-right {
  right: 0;
}

/* Safety: ensure scroll container stays scrollable when body is locked */
body.cart-open .scroll-x {
  overflow-x: auto !important;
}

/* ── Cart drawer (z-index: 500) ─────── */
#cart-drawer {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: none;
}
#cart-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
}
#cart-panel {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 100%;
  max-width: 400px;
  background: white;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  overflow: hidden;
}

/* ── Quick View Modal (FIXED) ───────── */
#qv-modal {
  position: fixed;
  inset: 0;
  z-index: 2000; /* Above cart and everything */
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  padding: 16px;
  transition: all 0.2s ease;
}
#qv-modal.open {
  display: flex !important;
}
#qv-sheet {
  background: white;
  width: min(920px, 95vw);
  max-height: 90vh;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.22);
  display: flex;
  flex-direction: column;
  transform: translateY(0);
  transition: transform 0.25s, opacity 0.25s;
}
/* Quick view inner layout */
#qv-content {
  display: flex;
  flex: 1;
  overflow: hidden;
  min-height: 0;
}
@media (max-width: 640px) {
  #qv-content {
    flex-direction: column;
  }
  #qv-sheet {
    max-height: 85vh;
  }
}
/* Loading spinner inside quick view */
#qv-content .loader {
  width: 36px;
  height: 36px;
  border: 3px solid #f5e0e4;
  border-top-color: #d4637a;
  border-radius: 50%;
  animation: qv-spin 0.8s linear infinite;
  margin: 0 auto 12px;
}
@keyframes qv-spin {
  to { transform: rotate(360deg); }
}

/* ── Full-width hero ────────────────── */
.hero-banner {
  width: 100%;
  position: relative;
  overflow: hidden;
  background: #f5ede8;
}
.hero-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Product grid (archive/shop) ────── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}
@media (max-width: 900px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 480px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.product-card {
  position: relative;
  cursor: pointer;
  background: white;
}
.product-card-img {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3/4;
  background: #f9f5f0;
}
.product-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.product-card:hover .product-card-img img {
  transform: scale(1.05);
}

.quick-shop-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: #d4637a;
  color: white;
  text-align: center;
  padding: 13px;
  font-size: 12px;
  letter-spacing: 2px;
  font-weight: 500;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  cursor: pointer;
  font-family: 'Jost', sans-serif;
  border: none;
  width: 100%;
}
.product-card:hover .quick-shop-bar {
  transform: translateY(0);
}

.sale-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: #d4637a;
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 10px;
  letter-spacing: 0.5px;
  font-family: 'Jost', sans-serif;
  text-transform: uppercase;
  z-index: 5;
}
.new-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: #333;
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 10px;
  letter-spacing: 0.5px;
  font-family: 'Jost', sans-serif;
  z-index: 5;
}

.product-card-info {
  padding: 14px 12px 20px;
}
.product-name {
  font-size: 13px;
  color: #333;
  margin-bottom: 6px;
  line-height: 1.4;
  font-family: 'Jost', sans-serif;
  font-weight: 400;
}
.product-prices {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.price-sale {
  font-size: 14px;
  font-weight: 600;
  color: #333;
}
.price-orig {
  font-size: 12px;
  color: #aaa;
  text-decoration: line-through;
}
.price-save {
  font-size: 12px;
  color: #d4637a;
  font-weight: 500;
}

/* Stars */
.stars {
  display: flex;
  gap: 2px;
  margin-top: 4px;
}
.star {
  color: #f59e0b;
  font-size: 11px;
}
.star-empty {
  color: #e0e0e0;
  font-size: 11px;
}
.review-count {
  font-size: 11px;
  color: #999;
  margin-left: 4px;
}

/* ── Collections grid ───────────────── */
.collections-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}
@media (max-width: 768px) {
  .collections-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
.collection-item {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}
.collection-item img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  transition: transform 0.6s ease;
  display: block;
}
.collection-item:hover img {
  transform: scale(1.04);
}
.collection-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: #d4637a;
  color: white;
  text-align: center;
  padding: 14px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  font-family: 'Jost', sans-serif;
}

/* ── Section headings ───────────────── */
.section-title {
  text-align: center;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 400;
  color: #333;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 32px;
}
.section-subtitle {
  text-align: center;
  font-family: 'Jost', sans-serif;
  font-size: 11px;
  letter-spacing: 3px;
  color: #999;
  text-transform: uppercase;
  margin-bottom: 12px;
}

/* ── Buttons ────────────────────────── */
.btn-primary {
  display: inline-block;
  background: #d4637a;
  color: white;
  border: none;
  padding: 14px 36px;
  font-family: 'Jost', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.25s;
  text-align: center;
  text-decoration: none;
}
.btn-primary:hover {
  background: #b84f66;
}
.btn-outline {
  display: inline-block;
  background: white;
  color: #333;
  border: 1px solid #333;
  padding: 13px 36px;
  font-family: 'Jost', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.25s;
  text-align: center;
  text-decoration: none;
}
.btn-outline:hover {
  background: #333;
  color: white;
}
.btn-dark {
  display: inline-block;
  background: #333;
  color: white;
  border: none;
  padding: 14px 36px;
  font-family: 'Jost', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.25s;
}
.btn-dark:hover {
  background: #d4637a;
}

/* ── Form inputs ────────────────────── */
.inp {
  width: 100%;
  border: 1px solid #ddd;
  padding: 11px 14px;
  font-family: 'Jost', sans-serif;
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s;
  background: white;
}
.inp:focus {
  border-color: #d4637a;
}
.inp-label {
  display: block;
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #888;
  margin-bottom: 6px;
  font-weight: 500;
}

/* ── Size / Color selectors ─────────── */
.sz-btn {
  border: 1px solid #ddd;
  padding: 8px 16px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Jost', sans-serif;
  background: white;
  letter-spacing: 0.5px;
}
.sz-btn:hover,
.sz-btn.active {
  border-color: #333;
  color: #333;
}
.sz-btn.sel {
  background: #333;
  color: white;
  border-color: #333;
}
.cl-btn {
  padding: 7px 16px;
  border: 1px solid #ddd;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Jost', sans-serif;
  background: white;
}
.cl-btn:hover,
.cl-btn.sel {
  border-color: #333;
  background: #333;
  color: white;
}

/* ── Accordion ──────────────────────── */
.acc-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}
.acc-body.open {
  max-height: 600px;
}

/* ── Pagination ─────────────────────── */
.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid #ddd;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Jost', sans-serif;
  text-decoration: none;
  color: #333;
}
.page-btn:hover,
.page-btn.active {
  background: #333;
  color: white;
  border-color: #333;
}

/* ── Status badges ──────────────────── */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-family: 'Jost', sans-serif;
}

/* ── Responsive utilities ───────────── */
@media (max-width: 768px) {
  .hide-mobile {
    display: none !important;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr !important;
  }
  .nav-icon-desktop {
    display: none !important;
  }
  .mob-only {
    display: flex !important;
  }
  #desktop-nav {
    display: none !important;
  }
  .section-title {
    font-size: 1.4rem;
  }
}
@media (min-width: 769px) {
  .mob-only {
    display: none !important;
  }
  .nav-icon-desktop {
    display: flex !important;
  }
  #mob-menu {
    display: none !important;
  }
}
@media (max-width: 480px) {
  .footer-grid {
    grid-template-columns: 1fr !important;
  }
}

/* ── Scrollbar ──────────────────────── */
::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}
::-webkit-scrollbar-thumb {
  background: #ddd;
  border-radius: 2px;
}
::-webkit-scrollbar-thumb:hover {
  background: #d4637a;
}

/* ── Wishlist heart ─────────────────── */
.wished svg {
  fill: #d4637a;
  stroke: #d4637a;
}

/* ── Admin ──────────────────────────── */
.admin-table th {
  background: #f8f8f8;
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 12px 16px;
  text-align: left;
  border-bottom: 2px solid #eee;
  white-space: nowrap;
  color: #666;
  font-family: 'Jost', sans-serif;
}
.admin-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #f5f5f5;
  font-size: 13px;
  vertical-align: middle;
  font-family: 'Jost', sans-serif;
}
.btn-admin {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-family: 'Jost', sans-serif;
  font-weight: 500;
  letter-spacing: 1px;
  font-size: 11px;
  text-transform: uppercase;
  transition: all 0.2s;
  padding: 8px 16px;
  border: none;
  border-radius: 2px;
}
.btn-admin-primary {
  background: #d4637a;
  color: white;
}
.btn-admin-primary:hover {
  background: #b84f66;
}
.btn-admin-secondary {
  background: #f0f0f0;
  color: #555;
}
.btn-admin-secondary:hover {
  background: #e0e0e0;
}
.btn-admin-danger {
  background: #fee2e2;
  color: #dc2626;
}
.btn-admin-danger:hover {
  background: #fecaca;
}

/* ── Additional product card overlay (for quick actions) ── */
.card-overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.product-card:hover .card-overlay,
.card-item:active .card-overlay {
  opacity: 1;
  pointer-events: auto;
}