/* ================================================================
   shop.css — membership / e-commerce layer
   Imports style.css base variables (--gold-bright, --dark-bg, etc.)
   ================================================================ */

/* ----- Global resets for shop pages ----- */
*, *::before, *::after { box-sizing: border-box; }

:root {
  --shop-gold: #F5C842;
  --shop-gold-dim: #D4A843;
  --shop-bg: #09090F;
  --shop-surface: #12121c;
  --shop-surface2: #1a1a2e;
  --shop-border: rgba(245,200,66,0.18);
  --shop-text: #1a1a1a;
  --shop-muted: #8888aa;
  --shop-red: #f87171;
  --shop-green: #34d399;
  --radius: 14px;
  --radius-sm: 8px;
}

body {
  margin: 0;
  font-family: 'Noto Sans JP', 'Poppins', sans-serif;
  background: var(--shop-bg);
  color: var(--shop-text);
  min-height: 100vh;
}

a { color: var(--shop-gold); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ----- Site Header ----- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(9,9,15,0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--shop-border);
  padding: 0 40px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-header .logo {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: var(--shop-gold);
  white-space: nowrap;
  text-decoration: none;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 20px;
  border-radius: 40px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  text-decoration: none;
  white-space: nowrap;
}

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--shop-gold);
  color: var(--shop-gold);
}
.btn-outline:hover {
  background: rgba(245,200,66,0.10);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, #F5C842 0%, #D4A843 100%);
  color: #09090F;
}
.btn-primary:hover {
  filter: brightness(1.1);
  text-decoration: none;
}

.btn-danger {
  background: transparent;
  border: 1.5px solid var(--shop-red);
  color: var(--shop-red);
}
.btn-danger:hover { background: rgba(248,113,113,0.10); text-decoration: none; }

.btn-lg {
  padding: 14px 36px;
  font-size: 16px;
  border-radius: 50px;
}

.btn-full { width: 100%; }

#header-user-name {
  font-size: 13px;
  color: var(--shop-muted);
}

/* ----- Hero / FV ----- */
.shop-hero {
  position: relative;
  min-height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 40px;
  overflow: hidden;
}

.shop-hero-bg {
  position: absolute;
  inset: 0;
  /* background:
    linear-gradient(135deg, rgba(9,9,15,0.88) 0%, rgba(14,8,24,0.88) 40%, rgba(9,15,18,0.88) 100%),
    url('img/thumbnail.png') center/cover no-repeat; */
  z-index: 0;
}

.shop-hero-content {
  position: relative;
  z-index: 1;
  max-width: 780px;
}

.hero-badge {
  display: inline-block;
  background: linear-gradient(90deg, #F5C842, #D4A843);
  color: #09090F;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 20px;
  letter-spacing: 0.05em;
  margin-bottom: 20px;
}

.shop-hero h1 {
  font-family: 'Shippori Mincho', serif;
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 16px;
  background: linear-gradient(135deg, #ffffff 0%, #F5C842 60%, #D4A843 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.shop-hero p {
  font-size: 17px;
  color: rgba(232,232,240,0.80);
  margin: 0 0 36px;
  line-height: 1.7;
}

/* ----- Section ----- */
.shop-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 64px 40px;
}

.shop-section-title {
  font-family: 'Shippori Mincho', serif;
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 8px;
  color: #ffffff;
}

.shop-section-sub {
  font-size: 15px;
  color: var(--shop-muted);
  margin: 0 0 40px;
}

/* ----- Product Grid ----- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 28px;
}

/* ----- Product Card ----- */
.product-card {
  background: var(--shop-surface);
  border: 1px solid var(--shop-border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.5), 0 0 0 1px var(--shop-gold);
  border-color: var(--shop-gold);
}

.product-card-thumb {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--shop-surface2);
}

.product-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}
.product-card:hover .product-card-thumb img { transform: scale(1.04); }

.product-card-lock {
  position: absolute;
  inset: 0;
  background: rgba(9,9,15,0.70);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  backdrop-filter: blur(2px);
  transition: opacity 0.3s;
}
.product-card.unlocked .product-card-lock { opacity: 0; pointer-events: none; }

.product-card-body {
  padding: 20px 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.product-card-title {
  font-family: 'Shippori Mincho', serif;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.5;
  color: #fff;
  margin: 0;
}

.product-card-desc {
  font-size: 13px;
  color: var(--shop-muted);
  line-height: 1.65;
  margin: 0;
}

.product-card-price {
  font-family: 'Poppins', sans-serif;
  margin: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.product-card-price small {
  font-size: 13px;
  font-weight: 400;
  color: var(--shop-muted);
}
.price-regular {
  font-size: 15px;
  font-weight: 500;
  color: var(--shop-muted);
  text-decoration: line-through;
}
.price-campaign {
  font-size: 24px;
  font-weight: 700;
  color: var(--shop-gold);
}
.price-badge {
  font-size: 11px;
  font-weight: 700;
  color: #09090F;
  background: var(--shop-gold);
  padding: 2px 8px;
  border-radius: 20px;
  letter-spacing: 0.5px;
}

.product-card-footer {
  margin-top: auto;
}

/* State badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: 0.04em;
}
.badge-purchased {
  background: rgba(52,211,153,0.15);
  color: var(--shop-green);
  border: 1px solid rgba(52,211,153,0.30);
}
.badge-locked {
  background: rgba(136,136,170,0.12);
  color: var(--shop-muted);
  border: 1px solid rgba(136,136,170,0.20);
}

/* ----- Auth Forms ----- */
.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  background: radial-gradient(ellipse at top, #1a1030 0%, var(--shop-bg) 60%);
}

.auth-card {
  background: var(--shop-surface);
  border: 1px solid var(--shop-border);
  border-radius: var(--radius);
  padding: 44px 48px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.5);
}

.auth-logo {
  display: block;
  text-align: center;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 20px;
  color: var(--shop-gold);
  margin-bottom: 32px;
  text-decoration: none;
}

.auth-title {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 6px;
  text-align: center;
}

.auth-sub {
  font-size: 14px;
  color: var(--shop-muted);
  text-align: center;
  margin: 0 0 32px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
}

.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--shop-text);
}

.form-group input {
  background: var(--shop-surface2);
  border: 1.5px solid rgba(136,136,170,0.25);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 15px;
  color: var(--shop-text);
  outline: none;
  transition: border-color 0.2s;
  font-family: inherit;
}
.form-group input:focus {
  border-color: var(--shop-gold);
  box-shadow: 0 0 0 3px rgba(245,200,66,0.12);
}
.form-group input::placeholder { color: var(--shop-muted); }

.form-msg {
  font-size: 13px;
  min-height: 18px;
  margin-bottom: 12px;
  text-align: center;
}
.form-msg.error { color: var(--shop-red); }
.form-msg.success { color: var(--shop-green); }

.auth-footer {
  text-align: center;
  margin-top: 22px;
  font-size: 13px;
  color: var(--shop-muted);
}

/* ----- Toast ----- */
.toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--shop-surface2);
  border: 1px solid var(--shop-border);
  border-radius: 40px;
  padding: 12px 28px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
  z-index: 9999;
  white-space: nowrap;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.toast.toast-success { color: var(--shop-green); border-color: rgba(52,211,153,0.30); }
.toast.toast-error { color: var(--shop-red); border-color: rgba(248,113,113,0.30); }

/* ----- Loading spinner ----- */
.spinner {
  width: 20px; height: 20px;
  border: 2px solid rgba(245,200,66,0.2);
  border-top-color: var(--shop-gold);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ----- Modal ----- */
.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  z-index: 500;
  align-items: center;
  justify-content: center;
}
.modal-backdrop.open { display: flex; }

.modal {
  background: var(--shop-surface);
  border: 1px solid var(--shop-border);
  border-radius: var(--radius);
  padding: 40px 44px;
  max-width: 460px;
  width: calc(100% - 40px);
  box-shadow: 0 24px 64px rgba(0,0,0,0.6);
}

.modal h2 {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 700;
}

.modal p {
  font-size: 14px;
  color: var(--shop-muted);
  margin: 0 0 24px;
  line-height: 1.65;
}

.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

/* ----- Footer ----- */
.site-footer {
  border-top: 1px solid var(--shop-border);
  padding: 32px 40px;
  text-align: center;
  font-size: 13px;
  color: var(--shop-muted);
}

/* ----- Responsive ----- */
@media (max-width: 640px) {
  .site-header { padding: 0 20px; }
  .shop-section { padding: 40px 20px; }
  .auth-card { padding: 32px 24px; }
  .shop-hero { padding: 60px 20px; }
}
