/* ============================================================
   shop.css — Shop Page Styles
   aharsh.com | Sprint 5
   ============================================================ */


/* ============================================================
   PAGE HERO — redeclared (same as gallery.css pattern)
   ============================================================ */

.page-hero {
  position: relative;
  width: 100%;
  height: 80vh;
  min-height: 500px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding-bottom: clamp(48px, 6vw, 80px);
}

.page-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(135deg, #1f1d16, #2a2218);
}

.page-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  will-change: transform;
}

.page-hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(to top, rgba(15, 15, 13, 0.92) 0%, rgba(15, 15, 13, 0.35) 60%, rgba(15, 15, 13, 0.55) 100%);
}

.page-hero-content {
  position: relative;
  z-index: 2;
  padding: 0 var(--page-h);
  width: 100%;
}

.page-hero-eyebrow {
  display: block;
  font-family: var(--font-sans);
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
  opacity: 0;
}

.page-hero-title {
  font-family: var(--font-serif);
  font-size: clamp(64px, 10vw, 130px);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 0.9;
  color: var(--text-primary);
  overflow: hidden;
}

.page-hero-title .char {
  display: inline-block;
  will-change: transform;
}


/* ============================================================
   SHOP INTRO
   ============================================================ */

.shop-intro {
  padding: clamp(48px, 6vw, 80px) 0 clamp(32px, 4vw, 56px);
}

.shop-intro-text {
  font-family: var(--font-serif);
  font-size: clamp(18px, 2.2vw, 26px);
  font-weight: 300;
  font-style: italic;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 680px;
  margin-bottom: clamp(32px, 4vw, 52px);
}

.shop-intro-rule {
  width: 48px;
  height: 1px;
  background: var(--accent);
  opacity: 0.5;
}


/* ============================================================
   SECTION STRUCTURE
   ============================================================ */

.shop-section {
  padding: clamp(56px, 7vw, 100px) 0;
}

.shop-section + .shop-divider + .shop-section {
  padding-top: clamp(56px, 7vw, 100px);
}

.shop-divider {
  padding: 0;
}

.shop-section-header {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 24px;
  row-gap: 8px;
  align-items: start;
  margin-bottom: clamp(40px, 5vw, 72px);
}

.shop-section-label {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.2em;
  color: var(--accent);
  grid-row: 1;
  padding-top: 6px;
}

.shop-section-title {
  font-family: var(--font-serif);
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 300;
  color: var(--text-primary);
  grid-row: 1;
  line-height: 1.05;
}

.shop-section-sub {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 300;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  grid-column: 2;
  grid-row: 2;
}

.shop-note {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 300;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  line-height: 1.7;
  margin-top: clamp(28px, 3vw, 44px);
  max-width: 600px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}


/* ============================================================
   PRODUCT CARDS — PAINTINGS
   ============================================================ */

.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 2.5vw, 36px);
}

.product-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: border-color 0.3s var(--ease-smooth);
  position: relative;
}

.product-card:hover {
  border-color: rgba(201, 168, 76, 0.2);
}

/* Sold state */
.product-card[data-sold="true"] {
  opacity: 0.65;
  pointer-events: none; /* disable hover + click */
}

/* ── Image wrapper ── */
.product-img-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 4; /* portrait orientation for paintings */
  background: var(--bg-secondary);
}

.product-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.7s var(--ease-expo);
}

.product-card:hover .product-img-wrap img {
  transform: scale(1.04);
}

/* Sold overlay — appears when data-sold="true" */
.product-sold-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 15, 13, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
}

.product-card[data-sold="true"] .product-sold-overlay {
  opacity: 1;
}

.product-sold-overlay span {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-secondary);
  border: 1px solid rgba(154, 144, 128, 0.4);
  padding: 10px 24px;
}

/* ── Info section ── */
.product-info {
  padding: clamp(20px, 2vw, 28px);
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 10px;
}

.product-meta-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.product-medium {
  font-family: var(--font-sans);
  font-size: 9.5px;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.product-dims {
  font-family: var(--font-sans);
  font-size: 9.5px;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.product-dims::before {
  content: '·';
  margin-right: 10px;
  color: var(--border);
}

.product-title {
  font-family: var(--font-serif);
  font-size: clamp(20px, 2vw, 26px);
  font-weight: 400;
  color: var(--text-primary);
  line-height: 1.15;
}

.product-desc {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 300;
  line-height: 1.7;
  color: var(--text-secondary);
  flex: 1;
}

/* ── Footer: price + button ── */
.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  margin-top: 4px;
}

.product-price {
  font-family: var(--font-serif);
  font-size: clamp(20px, 2vw, 26px);
  font-weight: 400;
  color: var(--accent);
  letter-spacing: -0.01em;
}


/* ============================================================
   BUY / ENROL BUTTON
   ============================================================ */

.btn-buy {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--accent);
  padding: 12px 22px;
  border: 1px solid var(--accent);
  cursor: pointer;
  transition:
    background    0.3s var(--ease-smooth),
    color         0.3s var(--ease-smooth),
    border-color  0.3s var(--ease-smooth),
    letter-spacing 0.3s var(--ease-smooth);
  white-space: nowrap;
}

.btn-buy:hover {
  background: transparent;
  color: var(--accent);
  letter-spacing: 0.26em;
}

/* Disabled / sold state */
.btn-buy:disabled,
.product-card[data-sold="true"] .btn-buy {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border);
  cursor: not-allowed;
  letter-spacing: 0.2em;
  pointer-events: none;
}


/* ============================================================
   COURSE CARDS
   ============================================================ */

.courses-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 2.5vw, 36px);
}

.course-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  background: var(--bg-card);
  transition: border-color 0.3s var(--ease-smooth);
}

.course-card:hover {
  border-color: rgba(201, 168, 76, 0.2);
}

/* Course image */
.course-img-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  /* Dark gradient fallback shown when image hasn't loaded */
  background: linear-gradient(135deg, #1c1b14, #252318);
}

.course-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.7s var(--ease-expo);
}

.course-card:hover .course-img-wrap img {
  transform: scale(1.04);
}

.course-img-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 15, 13, 0.5) 0%, transparent 60%);
  pointer-events: none;
}

/* Course info */
.course-info {
  padding: clamp(20px, 2vw, 28px);
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 10px;
}

.course-tag {
  font-family: var(--font-sans);
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}

.course-title {
  font-family: var(--font-serif);
  font-size: clamp(20px, 2vw, 26px);
  font-weight: 400;
  color: var(--text-primary);
  line-height: 1.15;
}

.course-desc {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 300;
  line-height: 1.75;
  color: var(--text-secondary);
  flex: 1;
}

.course-details {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.course-details span {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-sans);
  font-size: 10.5px;
  font-weight: 300;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.course-details svg {
  flex-shrink: 0;
  opacity: 0.6;
}


/* ============================================================
   CONTACT NUDGE
   ============================================================ */

.shop-contact-nudge {
  padding: clamp(56px, 7vw, 100px) 0;
  border-top: 1px solid var(--border);
}

.nudge-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}

.nudge-text {
  font-family: var(--font-serif);
  font-size: clamp(22px, 3vw, 38px);
  font-weight: 300;
  font-style: italic;
  color: var(--text-primary);
  line-height: 1.2;
}


/* ============================================================
   PAYMENT SUCCESS MODAL
   ============================================================ */

.success-backdrop {
  position: fixed;
  inset: 0;
  z-index: 8900;
  background: rgba(10, 10, 8, 0.88);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s var(--ease-smooth);
}

.success-backdrop.active {
  opacity: 1;
  pointer-events: all;
}

.success-modal {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  padding: 24px;
}

.success-modal.active {
  pointer-events: all;
}

.success-modal-inner {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  padding: clamp(40px, 5vw, 64px);
  max-width: 480px;
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  opacity: 0;
  transform: translateY(16px) scale(0.97);
  transition:
    opacity   0.4s var(--ease-expo),
    transform 0.4s var(--ease-expo);
}

.success-modal.active .success-modal-inner {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.success-icon {
  margin-bottom: 8px;
}

.success-title {
  font-family: var(--font-serif);
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 400;
  color: var(--text-primary);
}

.success-body {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 300;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 360px;
}

.success-ref {
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--text-muted);
}

.success-ref code {
  font-family: 'Courier New', monospace;
  color: var(--accent);
  font-size: 11px;
  letter-spacing: 0.05em;
}

.success-hint {
  font-family: var(--font-sans);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  margin-top: -8px;
}

.success-close {
  margin-top: 8px;
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--accent);
  border: 1px solid var(--accent);
  padding: 13px 36px;
  cursor: pointer;
  transition:
    background   0.3s var(--ease-smooth),
    color        0.3s var(--ease-smooth);
}

.success-close:hover {
  background: transparent;
  color: var(--accent);
}


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

@media (max-width: 960px) {
  .products-grid,
  .courses-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .shop-section-header {
    grid-template-columns: auto 1fr;
  }
}

@media (max-width: 600px) {
  .products-grid,
  .courses-grid {
    grid-template-columns: 1fr;
  }

  .shop-section-header {
    grid-template-columns: 1fr;
  }

  .shop-section-label {
    grid-row: auto;
  }

  .shop-section-sub {
    grid-column: 1;
    grid-row: auto;
  }

  .nudge-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .product-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .btn-buy {
    width: 100%;
    text-align: center;
    justify-content: center;
  }
}
