/* Merchandise Store, Shopping Basket & Order Modal Styles (SOW 2.4) */

.merch-store-container {
  max-width: var(--page-max-width, 1280px);
  margin: 0 auto;
}

.merch-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 24px;
}

.merch-head__meta {
  max-width: 680px;
}

.merch-title {
  font-family: var(--font-display, 'Orbitron', sans-serif);
  font-size: 42px;
  font-weight: 900;
  color: #FFFFFF;
  margin: 4px 0 12px;
  letter-spacing: 0.04em;
}

.merch-head__actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.merch-basket-toggle {
  background: linear-gradient(135deg, #FF3366 0%, #D81B60 100%);
  border-color: #FF3366;
  color: #fff;
  font-weight: 800;
  box-shadow: 0 4px 16px rgba(255, 51, 102, 0.4);
}

/* Products Grid */
.merch-products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

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

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

.merch-card {
  background: linear-gradient(160deg, rgba(20, 16, 26, 0.9) 0%, rgba(10, 8, 14, 0.95) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.merch-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 215, 0, 0.4);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.7);
}

.merch-card__art {
  height: 220px;
  background: radial-gradient(circle at 50% 40%, rgba(255, 255, 255, 0.06) 0%, rgba(0, 0, 0, 0.5) 100%);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.merch-img {
  max-height: 160px;
  max-width: 80%;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.merch-card:hover .merch-img {
  transform: scale(1.06);
}

.merch-cat-pill {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #eee;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 4px;
  text-transform: uppercase;
}

.merch-card__body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.merch-price-tag {
  font-family: var(--font-display, 'Orbitron', sans-serif);
  font-size: 24px;
  font-weight: 900;
  color: #FFD700;
  margin-bottom: 8px;
}

.merch-price-tag small {
  font-size: 13px;
  color: #888;
}

.merch-card__title {
  font-family: var(--font-display, 'Orbitron', sans-serif);
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  margin: 0 0 8px;
}

.merch-card__desc {
  font-size: 13px;
  color: #aaa;
  line-height: 1.5;
  margin: 0 0 16px;
  flex: 1;
}

.merch-card__options {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.merch-size-select-wrap, .merch-qty-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  color: #888;
}

.merch-size-select-wrap {
  flex: 1;
}

.merch-size-select, .merch-qty-input {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 13px;
  outline: none;
}

.merch-qty-input {
  width: 60px;
}

.add-to-basket-btn {
  width: 100%;
}

/* Slide-out Basket Drawer (SOW 2.4.a) */
.basket-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.basket-drawer-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.basket-drawer {
  position: absolute;
  top: 0;
  right: 0;
  width: 440px;
  max-width: 90vw;
  height: 100%;
  background: #0D0A12;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.9);
}

.basket-drawer-overlay.active .basket-drawer {
  transform: translateX(0);
}

.basket-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.basket-drawer__head h2 {
  font-family: var(--font-display, 'Orbitron', sans-serif);
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  margin: 0;
}

.basket-close-btn, .order-close-btn {
  background: transparent;
  border: none;
  color: #888;
  font-size: 20px;
  cursor: pointer;
  padding: 4px 8px;
  transition: color 0.2s ease;
}

.basket-close-btn:hover, .order-close-btn:hover {
  color: #fff;
}

.basket-drawer__body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.basket-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #888;
  text-align: center;
}

.empty-icon {
  font-size: 44px;
  margin-bottom: 12px;
  opacity: 0.5;
}

.basket-item-row {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 12px;
}

.basket-item-thumb {
  width: 50px;
  height: 50px;
  object-fit: contain;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 6px;
  padding: 4px;
}

.basket-item-info {
  flex: 1;
}

.basket-item-info h4 {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 2px;
}

.b-meta {
  font-size: 12px;
  color: #aaa;
}

.b-qty-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.b-qty-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  width: 22px;
  height: 22px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.b-qty-num {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

.b-remove-btn {
  background: transparent;
  border: none;
  color: #FF5A8D;
  font-size: 11px;
  cursor: pointer;
  margin-left: 8px;
}

.basket-item-subtotal {
  font-family: var(--font-display, 'Orbitron', sans-serif);
  font-size: 16px;
  font-weight: 800;
  color: #FFD700;
}

.basket-drawer__foot {
  padding: 20px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: #08060B;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.basket-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 800;
}

.basket-total-val {
  font-family: var(--font-display, 'Orbitron', sans-serif);
  font-size: 22px;
  color: #FFD700;
}

.basket-notice {
  font-size: 11px;
  color: #888;
  margin: 0;
  line-height: 1.4;
}

/* Order Placement Modal (SOW 2.4.b) */
.order-modal-overlay, .order-receipt-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 20px;
}

.order-modal-overlay.active, .order-receipt-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.order-modal-card, .order-receipt-card {
  background: linear-gradient(150deg, #16121C 0%, #0B0811 100%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  max-width: 580px;
  width: 100%;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.9);
  overflow: hidden;
}

.order-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.order-modal-head h2 {
  font-family: var(--font-display, 'Orbitron', sans-serif);
  font-size: 20px;
  color: #fff;
  margin: 0;
}

.order-modal-body {
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.order-summary-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 215, 0, 0.08);
  border: 1px solid rgba(255, 215, 0, 0.3);
  padding: 12px 18px;
  border-radius: 8px;
}

.order-sum-label {
  font-size: 14px;
  color: #eee;
  font-weight: 600;
}

.order-sum-total {
  font-family: var(--font-display, 'Orbitron', sans-serif);
  font-size: 20px;
  font-weight: 800;
  color: #FFD700;
}

.order-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.order-payment-notice {
  font-size: 12px;
  color: #aaa;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 10px 14px;
  border-radius: 6px;
  line-height: 1.4;
}

.order-payment-notice b {
  color: #FF5A8D;
}

/* Receipt Card */
.order-receipt-card {
  padding: 36px 32px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.receipt-icon {
  width: 56px;
  height: 56px;
  background: #22C55E;
  color: #000;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 900;
  box-shadow: 0 0 20px rgba(34, 197, 94, 0.5);
}

.receipt-title {
  font-family: var(--font-display, 'Orbitron', sans-serif);
  font-size: 26px;
  color: #fff;
  margin: 0;
}

.receipt-ref b {
  font-family: var(--font-display, 'Orbitron', sans-serif);
  color: #FFD700;
  font-size: 18px;
}

.receipt-note {
  font-size: 13px;
  color: #aaa;
  max-width: 460px;
  line-height: 1.5;
  margin: 0;
}

.receipt-summary-box {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 14px 20px;
  width: 100%;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 8px 0;
}

.r-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: #ccc;
}

.r-row b {
  color: #fff;
}

/* checkout: required-field feedback */
.field-err { display: block; color: #ff6b6b; font-size: 12px; font-weight: 600; min-height: 0; margin-top: 4px; }
.field-err:empty { display: none; }
.order-form .form-input[aria-invalid="true"] { border-color: #ff6b6b; box-shadow: 0 0 0 3px rgba(255,107,107,.18); }
.order-ack { display: flex; gap: 10px; align-items: flex-start; margin: 14px 0; font-size: 13px; line-height: 1.45; color: var(--text-2, #cbb); cursor: pointer; }
.order-ack input { margin-top: 3px; width: 18px; height: 18px; flex: none; }
.order-required-note { font-size: 12px; color: var(--text-3, #998); margin: 0 0 12px; }
