/* =============================================
   GOALS Store Page CSS
   Extends style.css — does not override locked design
   ============================================= */

/* ── Screen-reader only ── */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ── Store page body offset ── */
.store-page { background: var(--dark); }

/* ============================
   STORE HERO
   ============================ */
.store-hero {
  padding: 160px 0 80px;
  background: var(--dark);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  position: relative;
  overflow: hidden;
}
.store-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 80% at 50% 0%, rgba(34,197,94,0.06) 0%, transparent 70%);
  pointer-events: none;
}
.store-hero-inner { max-width: 700px; }
.store-hero h1 {
  font-size: clamp(2.4rem, 5vw, 4.5rem);
  font-weight: 800;
  margin-bottom: 1rem;
  line-height: 1.05;
}
.store-hero-sub {
  font-size: 1.1rem;
  color: var(--gray-4);
  max-width: 480px;
}

/* ============================
   STORE TABS
   ============================ */
.store-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 56px 0 40px;
}
.store-tab {
  background: var(--dark-3);
  color: var(--gray-4);
  border: 1px solid rgba(255,255,255,0.08);
  padding: 10px 22px;
  border-radius: 100px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  font-family: var(--font-body);
}
.store-tab:hover { color: var(--white); border-color: rgba(255,255,255,0.2); }
.store-tab.active {
  background: var(--green);
  color: var(--black);
  border-color: var(--green);
}

/* ============================
   PRODUCT GRID
   ============================ */
.store-main { padding-bottom: 120px; }

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* Hidden filtered items */
.product-card.hidden {
  display: none;
}

/* ============================
   PRODUCT CARD
   ============================ */
.product-card {
  background: var(--dark-3);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.06);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, border-color 0.3s ease;
}
.product-card:hover {
  transform: translateY(-5px);
  border-color: rgba(34,197,94,0.22);
}

/* Product image wrap */
.product-img-wrap {
  position: relative;
  padding-bottom: 80%; /* 5:4 */
  background: #0d0d0d;
  overflow: hidden;
  flex-shrink: 0;
}

/* Badge */
.product-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  background: var(--green);
  color: var(--black);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 100px;
  z-index: 2;
}
.product-badge.new { background: #f59e0b; }

/* Base product image placeholder */
.product-img {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Book Cover Placeholder ── */
.book-cover {
  background: linear-gradient(160deg, #0a0a0a 0%, #111 100%);
  border-bottom: 4px solid var(--green);
}
.book-cover-inner {
  text-align: center;
  padding: 24px;
}
.book-cover-title {
  font-family: var(--font-disp);
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--white);
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 8px;
}
.book-cover-sub {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--green);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 24px;
  line-height: 1.4;
}
.book-cover-author {
  font-size: 0.9rem;
  color: var(--gray-4);
  font-style: italic;
}

/* ── T-Shirt Placeholder ── */
.tshirt-preview {
  background: #111;
  flex-direction: column;
}
.tshirt-charcoal { background: #2a2a2a; }
.tshirt-green    { background: #0d2010; }
.tshirt-inner    { text-align: center; padding: 24px; }
.tshirt-text {
  font-family: var(--font-disp);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--white);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.tshirt-brand {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--green);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* ── Hat Placeholder ── */
.hat-preview {
  background: #111;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.hat-green { background: #0d2010; }
.hat-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}
.hat-crown {
  width: 120px;
  height: 70px;
  background: #1a1a1a;
  border-radius: 60px 60px 0 0;
  border: 2px solid rgba(255,255,255,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
}
.hat-crown-green { background: #1a3020; border-color: rgba(34,197,94,0.3); }
.hat-brim {
  width: 160px;
  height: 14px;
  background: #222;
  border-radius: 0 0 6px 6px;
  margin-top: -2px;
  z-index: 1;
  border: 1px solid rgba(255,255,255,0.08);
}
.hat-logo {
  font-family: var(--font-disp);
  font-size: 1rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: 0.04em;
}

/* ── Mug Placeholder ── */
.mug-preview {
  background: #111;
}
.mug-white    { background: #f5f5f2; }
.mug-charcoal { background: #2a2a2a; }
.mug-inner {
  display: flex;
  align-items: center;
  gap: 0;
  width: 100%;
  height: 100%;
  justify-content: center;
  position: relative;
}
.mug-body {
  width: 110px;
  height: 100px;
  background: #1a1a1a;
  border-radius: 0 0 14px 14px;
  border: 1.5px solid rgba(255,255,255,0.12);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px;
  text-align: center;
}
.mug-body-white   { background: var(--white); border-color: rgba(0,0,0,0.1); }
.mug-body-charcoal { background: #333; border-color: rgba(255,255,255,0.1); }
.mug-handle {
  width: 24px;
  height: 50px;
  border: 2.5px solid rgba(255,255,255,0.18);
  border-left: none;
  border-radius: 0 20px 20px 0;
  margin-left: -2px;
  margin-top: 16px;
}
.mug-handle-dark { border-color: rgba(0,0,0,0.2); }
.mug-quote {
  font-size: 0.52rem;
  font-style: italic;
  color: var(--green);
  line-height: 1.4;
  margin-bottom: 4px;
}
.mug-quote-dark { color: #1a1a1a; }
.mug-brand {
  font-size: 0.44rem;
  font-weight: 800;
  color: var(--gray-4);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.mug-brand-dark { color: #555; }

/* Product body */
.product-info {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.product-category-tag {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 8px;
}
.product-name {
  font-size: 1.05rem;
  font-weight: 700;
  font-family: var(--font-disp);
  color: var(--white);
  margin-bottom: 10px;
  line-height: 1.3;
}
.product-desc {
  font-size: 0.86rem;
  color: var(--gray-4);
  line-height: 1.65;
  margin-bottom: 16px;
  flex: 1;
}

/* Variants */
.product-variants {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.variant-select {
  flex: 1;
  min-width: 120px;
  background: var(--dark-2);
  color: var(--white);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  font-size: 0.84rem;
  font-family: var(--font-body);
  cursor: pointer;
  transition: border-color 0.2s;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23888' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}
.variant-select:focus { border-color: var(--green); outline: none; }

/* Product footer */
.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.product-price {
  font-size: 1.3rem;
  font-weight: 800;
  font-family: var(--font-disp);
  color: var(--white);
}
.product-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.btn-add-cart {
  background: rgba(34,197,94,0.12);
  color: var(--green);
  border: 1px solid rgba(34,197,94,0.3);
  padding: 10px 16px;
  border-radius: 100px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font-body);
  transition: background 0.2s, color 0.2s, transform 0.2s;
  white-space: nowrap;
}
.btn-add-cart:hover {
  background: var(--green);
  color: var(--black);
  transform: translateY(-1px);
}
.btn-quick-buy {
  background: var(--white);
  color: var(--black);
  border: none;
  padding: 10px 16px;
  border-radius: 100px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font-body);
  transition: background 0.2s, transform 0.2s;
  white-space: nowrap;
}
.btn-quick-buy:hover {
  background: var(--off-white, #f5f5f2);
  transform: translateY(-1px);
}

/* ============================
   CART SIDEBAR
   ============================ */
.cart-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 380px;
  max-width: 95vw;
  background: var(--dark-2);
  border-left: 1px solid rgba(255,255,255,0.08);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
  box-shadow: -20px 0 60px rgba(0,0,0,0.5);
}
.cart-sidebar.open {
  transform: translateX(0);
}
.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}
.cart-header h2 {
  font-size: 1.2rem;
  font-weight: 700;
}
.cart-close {
  background: none;
  border: none;
  color: var(--gray-4);
  font-size: 1.8rem;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s;
  padding: 0 4px;
}
.cart-close:hover { color: var(--white); }
.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
  -webkit-overflow-scrolling: touch;
}
.cart-empty {
  color: var(--gray-4);
  font-size: 0.9rem;
  text-align: center;
  padding: 40px 0;
}
.cart-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.cart-item-info { flex: 1; }
.cart-item-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 4px;
  line-height: 1.3;
}
.cart-item-variant {
  font-size: 0.78rem;
  color: var(--gray-4);
  margin-bottom: 8px;
}
.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 8px;
}
.qty-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.12);
  background: var(--dark-3);
  color: var(--white);
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  font-family: var(--font-body);
}
.qty-btn:hover { background: var(--gray-1); }
.qty-val {
  font-size: 0.88rem;
  font-weight: 600;
  min-width: 20px;
  text-align: center;
}
.cart-item-price {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--white);
  white-space: nowrap;
  padding-top: 2px;
}
.cart-item-remove {
  background: none;
  border: none;
  color: var(--gray-3);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 2px 4px;
  transition: color 0.2s;
  line-height: 1;
}
.cart-item-remove:hover { color: #ef4444; }

.cart-footer {
  padding: 20px 24px;
  border-top: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}
.cart-subtotal {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  font-size: 1rem;
  font-weight: 600;
}
.btn-checkout {
  width: 100%;
  background: var(--green);
  color: var(--black);
  border: none;
  padding: 16px;
  border-radius: 100px;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  font-family: var(--font-body);
  transition: background 0.2s, transform 0.2s;
  margin-bottom: 12px;
}
.btn-checkout:hover:not(:disabled) {
  background: var(--green-lt, #86efac);
  transform: translateY(-1px);
}
.btn-checkout:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.cart-secure {
  font-size: 0.76rem;
  color: var(--gray-4);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* Cart overlay */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 1999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.cart-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

/* Floating cart button */
.cart-float-btn {
  position: fixed;
  bottom: 32px;
  right: 28px;
  width: 56px;
  height: 56px;
  background: var(--green);
  color: var(--black);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1500;
  box-shadow: 0 8px 30px rgba(34,197,94,0.35);
  transition: transform 0.2s, background 0.2s;
}
.cart-float-btn:hover {
  transform: scale(1.08);
  background: var(--green-lt, #86efac);
}
.cart-count {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 22px;
  height: 22px;
  background: var(--white);
  color: var(--black);
  border-radius: 50%;
  font-size: 0.7rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* ============================
   CHECKOUT MODAL
   ============================ */
.checkout-modal {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.checkout-modal.open {
  opacity: 1;
  pointer-events: auto;
}
.checkout-modal-inner {
  background: var(--dark-2);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255,255,255,0.1);
  max-width: 820px;
  width: 100%;
  max-height: 92vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  box-shadow: 0 30px 80px rgba(0,0,0,0.8);
  transform: translateY(20px);
  transition: transform 0.35s cubic-bezier(0.34,1.3,0.64,1);
}
.checkout-modal.open .checkout-modal-inner {
  transform: translateY(0);
}
.checkout-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 32px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.checkout-modal-header h2 { font-size: 1.3rem; font-weight: 700; }
.checkout-close {
  background: none;
  border: none;
  color: var(--gray-4);
  font-size: 1.8rem;
  cursor: pointer;
  transition: color 0.2s;
  line-height: 1;
  padding: 0 4px;
}
.checkout-close:hover { color: var(--white); }

.checkout-modal-body {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 0;
}

/* Order summary */
.checkout-summary {
  padding: 28px 28px 28px 32px;
  border-right: 1px solid rgba(255,255,255,0.08);
}
.checkout-summary h3 {
  font-size: 0.88rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gray-5);
  margin-bottom: 20px;
}
.checkout-item-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  font-size: 0.88rem;
}
.checkout-item-name { color: var(--white); flex: 1; line-height: 1.4; }
.checkout-item-qty  { color: var(--gray-4); white-space: nowrap; }
.checkout-item-price { font-weight: 600; white-space: nowrap; }
.checkout-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0 0;
  font-size: 1rem;
}
.checkout-total-row span  { color: var(--gray-4); }
.checkout-total-row strong { font-size: 1.3rem; font-weight: 800; color: var(--green); }

/* Form */
.checkout-form-wrap { padding: 28px 32px; }
.checkout-form-wrap h3 {
  font-size: 0.88rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gray-5);
  margin-bottom: 20px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.form-row .form-group-sm { max-width: 100px; }
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}
.form-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gray-5);
}
.form-group label span { color: var(--green); }
.form-group input {
  background: var(--dark-3);
  color: var(--white);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 0.9rem;
  font-family: var(--font-body);
  transition: border-color 0.2s;
  width: 100%;
}
.form-group input:focus {
  border-color: var(--green);
  outline: none;
}
.form-group input::placeholder { color: var(--gray-3); }
.form-group input:invalid:not(:placeholder-shown) { border-color: #ef4444; }

/* Square card container */
.sq-card-container {
  background: var(--dark-3);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-sm);
  padding: 14px;
  min-height: 44px;
  transition: border-color 0.2s;
}
.sq-card-container:focus-within { border-color: var(--green); }

/* Payment status */
.payment-status {
  font-size: 0.84rem;
  margin: 10px 0;
  min-height: 20px;
}
.payment-status.error   { color: #ef4444; }
.payment-status.success { color: var(--green); }

/* Pay button */
.btn-pay {
  width: 100%;
  background: var(--green);
  color: var(--black);
  border: none;
  padding: 16px;
  border-radius: 100px;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  font-family: var(--font-body);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.2s, transform 0.2s, opacity 0.2s;
  margin-top: 8px;
  margin-bottom: 12px;
}
.btn-pay:hover:not(:disabled) {
  background: var(--green-lt, #86efac);
  transform: translateY(-1px);
}
.btn-pay:disabled { opacity: 0.5; cursor: not-allowed; }

.checkout-disclaimer {
  font-size: 0.74rem;
  color: var(--gray-3);
  line-height: 1.6;
  text-align: center;
}
.checkout-disclaimer strong { color: var(--gray-5); }

/* Checkout overlay */
.checkout-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  z-index: 2999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.checkout-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

/* ============================
   RESPONSIVE
   ============================ */
@media (max-width: 1024px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .checkout-modal-body { grid-template-columns: 1fr; }
  .checkout-summary { border-right: none; border-bottom: 1px solid rgba(255,255,255,0.08); }
}
@media (max-width: 768px) {
  .product-grid { grid-template-columns: 1fr; }
  .store-hero   { padding: 130px 0 60px; }
  .cart-sidebar { width: 100%; }
  .checkout-modal-inner { border-radius: var(--radius); }
  .form-row { grid-template-columns: 1fr; }
  .form-row .form-group-sm { max-width: 100%; }
}
@media (max-width: 480px) {
  .store-tabs  { gap: 6px; }
  .store-tab   { padding: 8px 16px; font-size: 0.82rem; }
  .product-footer { flex-direction: column; align-items: flex-start; }
}
