/* =========================================================
   SHOP PAGE
========================================================= */

.section{
  padding-top: 25px;
  padding-bottom: 25px;
}

.shop-page-main {
  flex: 1;
  padding-bottom: 120px;
}

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

.shop-intro-inner {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.shop-title {
  margin: 8px 0 12px;
}

.shop-tagline {
  max-width: 620px;
  margin: 0 auto;
  opacity: 0.85;
}

/* =========================================================
   OFFER BANNER
========================================================= */

.shop-offer-banner {
  max-width: 760px;
  margin: 0 auto;
  padding: 14px 18px;
  text-align: center;

  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* =========================================================
   TABS
========================================================= */

.shop-tabs-section {
  text-align: center;
}

.shop-tabs {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 16px;

  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
}

.shop-tab {
  min-width: 180px;
  padding: 16px 24px;
  border: none;

  background: transparent;
  color: var(--color-text);
  font-family: var(--font-accent);
  font-size: 1.3rem;
  cursor: pointer;
}

.shop-tab.is-active.album {
  background: var(--color-accent-blue);
  color: black;
}

.shop-tab.is-active.art {
  background: var(--color-accent-gold);
  color: black;
}

.shop-tab + .shop-tab {
  border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.shop-tab-description {
  max-width: 620px;
  margin: 0 auto;
  opacity: 0.8;
}

@media (max-width: 500px) {
  .shop-tab {
    min-width: 140px;
    padding: 10px 16px;
    font-size: 1.2rem;
  }
}

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

.shop-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  max-width: 760px;
  margin: 0 auto;
}

.shop-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 65%;
  margin: 0 auto;

  transition: transform 0.2s ease, opacity 0.2s ease, filter 0.2s ease;
}

.shop-card.is-selected .shop-card-image-button img {
  box-shadow: 0 0 10px 10px var(--color-accent-gold);
  filter: brightness(1.06);
}

.shop-card-image-button {
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  max-width: 73%;
  margin: 0 auto;
}

.shop-card-image-button img {
  width: 100%;
  display: block;
  border-radius: 18px;
  aspect-ratio: 5 / 7;
  object-fit: cover;
}

.shop-card-body {
  text-align: center;
}

.shop-card-title {
  margin: 0 0 10px;
  font-size: 1.5rem;
}

.shop-card-price {
  font-family: var(--font-header);
  font-size: 1.05rem;
  letter-spacing: 0.02em;

  opacity: 0.85;
  margin-bottom: 12px;
}

/* =========================================================
   QUANTITY CONTROLS
========================================================= */

.shop-card-controls {
  display: grid;
  grid-template-columns: 52px 88px 52px;
  justify-content: center;
  gap: 10px;
}

.qty-btn,
.qty-display {
  height: 48px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);

  background: rgba(255, 255, 255, 0.05);
  color: var(--color-text);
  font-family: var(--font-header);
  font-size: 1rem;
  cursor: pointer;
}

.qty-btn {
  font-size: 1.4rem;
}

.shop-card.is-selected .qty-display-text {
  font-size: 1.8rem;
}

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

.qty-display-text {
  display: inline-block;
  min-width: 3ch;
  text-align: center;
}

/* =========================================================
   STICKY CART BAR
========================================================= */

.shop-cart-bar {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);

  width: calc(100% - 24px);
  max-width: 760px;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;

  padding: 14px 16px;
  border-radius: 18px;

  /* background: var(--color-bg); */
  background: rgba(79, 41, 73);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  z-index: 200;
}

.shop-cart-summary {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.shop-cart-count,
.shop-cart-discount,
.shop-cart-total {
  font-family: var(--font-header);
  font-size: 0.95rem;
}

.shop-cart-discount {
  opacity: 0.75;
}

.shop-cart-checkout {
  flex-shrink: 0;
}

/* =========================================================
   IMAGE MODAL
========================================================= */

.shop-modal {
  display: none;
}

.shop-modal.is-open {
  display: block;
}

.shop-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  z-index: 300;
}

.shop-modal-content {
  position: fixed;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  width: min(94vw, 760px);

  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;

  z-index: 301;
}

.shop-modal-card-wrap {
  width: min(90vw, 480px);
  max-height: 75vh;

  aspect-ratio: 5 / 7;
}

.shop-modal-image {
  width: 100%;
  height: 100%;

  display: block;
  border-radius: 18px;

  object-fit: cover;
  cursor: pointer;

  transition: transform 0.35s ease, opacity 0.35s ease;
}

.shop-modal-image.is-flipping {
  transform: rotateY(90deg) scale(0.98);
  opacity: 0.4;
}

.shop-modal-hint {
  margin: 0;
  text-align: center;
  font-family: var(--font-body);
  font-size: 0.95rem;
  opacity: 0.75;
}

.shop-modal-close {
  min-width: 140px;
}

@media (max-width: 600px) {
  .shop-modal-content {
    width: 94vw;
    gap: 14px;
  }

  .shop-modal-card-wrap {
    width: 88vw;
  }

  .shop-modal-hint {
    font-size: 0.9rem;
  }
}

@media (min-width: 900px) {
  .shop-modal-card-wrap {
    width: min(50vw, 420px);
    max-height: 70vh;
  }
}

/* =========================================================
   DESKTOP
========================================================= */

@media (min-width: 700px) {
  .shop-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .shop-cart-summary {
    flex-direction: row;
    gap: 20px;
    align-items: center;
  }

  .shop-card {
    max-width: none;
    margin: 0;
  }

  .shop-card-title {
  margin: 0 0 14px;
  font-size: 1.3rem;
  line-height: 1.2;

  display: -webkit-box;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;

  min-height: calc(1.2em * 2);
}

.shop-card-image-button{
    max-width: none;
    margin: 0;
}

}


/* =========================================================
   CHECKOUT OVERLAY
========================================================= */

.shop-checkout-overlay {
  display: none;
}

.shop-checkout-overlay.is-open {
  display: block;
}

.shop-checkout-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  z-index: 400;
}

.shop-checkout-panel {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);

  width: min(94vw, 760px);
  max-height: 88vh;
  overflow-y: auto;

  display: flex;
  flex-direction: column;
  gap: 22px;

  padding: 24px 20px;
  border-radius: 20px;

  background: rgba(58, 31, 53, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  z-index: 401;
}

.shop-checkout-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.shop-checkout-title {
  margin: 0;
}

.shop-checkout-email-section,
.shop-checkout-items-section,
.shop-checkout-totals {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.shop-field-label {
  font-family: var(--font-header);
  font-size: 0.95rem;
}

.shop-field-input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);

  background: rgba(255, 255, 255, 0.05);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 1rem;
}

.shop-checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  opacity: 0.9;
}

.shop-checkout-subtitle {
  margin: 0;
}

.shop-checkout-items {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.shop-checkout-item {
  display: flex;
  justify-content: space-between;
  gap: 16px;

  padding: 12px 14px;
  border-radius: 12px;

  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.shop-checkout-item-name {
  font-family: var(--font-header);
}

.shop-checkout-item-meta {
  opacity: 0.8;
  white-space: nowrap;
}

.shop-checkout-totals {
  padding-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.shop-checkout-line {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-family: var(--font-header);
}

.shop-checkout-line-total {
  font-size: 1.05rem;
}

.shop-checkout-actions {
  display: flex;
  justify-content: flex-end;
}

@media (max-width: 600px) {
  .shop-checkout-panel {
    width: calc(100vw - 20px);
    padding: 20px 16px;
    gap: 18px;
  }

  .shop-checkout-header {
    flex-direction: column;
    align-items: stretch;
  }

  .shop-checkout-actions {
    justify-content: stretch;
  }

  .shop-checkout-actions .button {
    width: 100%;
  }
}