/* ==========================================================================
   SinexWix — Public Stylesheet
   Minecraft Bedrock Server Shop
   ========================================================================== */

:root {
  --bg-primary: #120d06;
  --bg-surface: #1e1508;
  --bg-card: #261b0a;
  --bg-card-hover: #2e200c;
  --gold: #f5a623;
  --gold-dark: #c4821a;
  --gold-hover: #e8951a;
  --gold-glow: rgba(245, 166, 35, 0.25);
  --gold-glow-strong: rgba(245, 166, 35, 0.5);
  --text-primary: #f0e8d0;
  --text-muted: #8a7a60;
  --text-dim: #5a4a35;
  --border: #3a2a12;
  --border-gold: rgba(245, 166, 35, 0.4);
  --success: #4caf50;
  --error: #f44336;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow-card: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-glow: 0 0 20px var(--gold-glow);
  --font-pixel: 'Press Start 2P', monospace;
  --font-body: 'Nunito', 'Segoe UI', sans-serif;
  --transition: 0.2s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

img { max-width: 100%; height: auto; display: block; }

/* ==========================================================================
   Layout Utilities
   ========================================================================== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.d-inline { display: inline; }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  background: rgba(18, 13, 6, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0.75rem 0;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.logo {
  text-decoration: none;
  flex-shrink: 0;
}

.logo-text {
  font-family: var(--font-pixel);
  font-size: 0.85rem;
  color: var(--gold);
  text-shadow: 0 0 12px var(--gold-glow);
  letter-spacing: 1px;
}

.main-nav {
  display: flex;
  gap: 0.5rem;
}

.nav-link {
  color: var(--text-muted);
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all var(--transition);
}

.nav-link:hover, .nav-link.active {
  color: var(--gold);
  background: rgba(245, 166, 35, 0.1);
}

.header-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Server Status Widget */
.server-status-widget {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-dot.online {
  background: var(--success);
  box-shadow: 0 0 6px rgba(76, 175, 80, 0.6);
  animation: pulse 2s infinite;
}

.status-dot.offline { background: var(--error); }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.server-ip { color: var(--text-primary); font-weight: 600; }
.player-count { color: var(--gold); font-weight: 700; }
.server-offline { color: var(--error); font-size: 0.75rem; }

/* Language Switcher */
.lang-form { display: flex; gap: 0.25rem; }

.lang-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 0.3rem 0.6rem;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
}

.lang-btn:hover { border-color: var(--gold); color: var(--gold); }
.lang-btn.active { background: var(--gold); color: var(--bg-primary); border-color: var(--gold); }

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: radial-gradient(ellipse at center, #1e1205 0%, #120d06 70%);
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(245, 166, 35, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(245, 166, 35, 0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 2rem 1.5rem;
  max-width: 700px;
}

.hero-title {
  font-family: var(--font-pixel);
  font-size: clamp(1.5rem, 5vw, 3rem);
  color: var(--gold);
  text-shadow: 0 0 40px var(--gold-glow-strong), 0 4px 0 rgba(0,0,0,0.5);
  margin-bottom: 1rem;
  line-height: 1.4;
}

.hero-subtitle {
  font-size: 1.3rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 2rem;
  letter-spacing: 0.05em;
}

.hero-server-info {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.server-info-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 0.75rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 160px;
}

.server-info-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
}

.server-info-value {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-primary);
  cursor: pointer;
}

.server-info-value.text-gold { color: var(--gold); }
.server-info-value.text-muted { color: var(--text-muted); }

.hero-actions { display: flex; justify-content: center; gap: 1rem; }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1.4rem;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--gold);
  color: var(--bg-primary);
  box-shadow: 0 2px 12px rgba(245, 166, 35, 0.3);
}

.btn-primary:hover {
  background: var(--gold-hover);
  color: var(--bg-primary);
  box-shadow: 0 4px 20px rgba(245, 166, 35, 0.5);
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  color: var(--gold);
  border: 1px solid var(--border-gold);
}

.btn-secondary:hover {
  background: rgba(245, 166, 35, 0.1);
  border-color: var(--gold);
  color: var(--gold);
}

.btn-large {
  padding: 0.85rem 2rem;
  font-size: 1rem;
}

.btn-buy {
  background: var(--gold);
  color: var(--bg-primary);
  font-size: 0.85rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  font-weight: 700;
  transition: all var(--transition);
  flex-shrink: 0;
}

.btn-buy:hover {
  background: var(--gold-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(245, 166, 35, 0.4);
}

/* ==========================================================================
   Sections
   ========================================================================== */
.section-title {
  font-family: var(--font-pixel);
  font-size: 1rem;
  color: var(--gold);
  margin-bottom: 2rem;
  text-align: center;
  line-height: 1.6;
}

.section-cta {
  text-align: center;
  margin-top: 2rem;
}

/* Features */
.features-section {
  padding: 4rem 0;
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-align: center;
  transition: all var(--transition);
}

.feature-card:hover {
  border-color: var(--border-gold);
  box-shadow: var(--shadow-glow);
  transform: translateY(-3px);
}

.feature-icon { font-size: 2rem; margin-bottom: 0.75rem; }

.feature-title {
  font-family: var(--font-pixel);
  font-size: 0.55rem;
  color: var(--gold);
  margin-bottom: 0.5rem;
  line-height: 1.8;
}

.feature-desc { color: var(--text-muted); font-size: 0.9rem; }

/* ==========================================================================
   Items Grid
   ========================================================================== */
.items-preview-section {
  padding: 4rem 0;
}

.items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
}

.item-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.25s ease;
  cursor: pointer;
}

.item-card:hover {
  border-color: var(--gold);
  box-shadow: 0 6px 30px var(--gold-glow);
  transform: translateY(-4px);
}

.item-card-image {
  height: 150px;
  background: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.item-card-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.item-card:hover .item-card-image img {
  transform: scale(1.05);
}

.item-placeholder-img {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: var(--text-dim);
}

.item-category-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(18, 13, 6, 0.85);
  border: 1px solid var(--border-gold);
  color: var(--gold);
  font-size: 0.65rem;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-weight: 700;
  backdrop-filter: blur(4px);
}

.item-card-body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.item-name {
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--text-primary);
  line-height: 1.3;
}

.item-desc {
  color: var(--text-muted);
  font-size: 0.8rem;
  line-height: 1.5;
  flex: 1;
}

.item-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.5rem;
  gap: 0.5rem;
}

.item-price {
  font-family: var(--font-pixel);
  font-size: 0.65rem;
  color: var(--gold);
  white-space: nowrap;
}

/* ==========================================================================
   Shop Page
   ========================================================================== */
.shop-section { padding: 2.5rem 0 4rem; }

.shop-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.page-title {
  font-family: var(--font-pixel);
  font-size: 1rem;
  color: var(--gold);
  line-height: 1.6;
}

.shop-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.category-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.cat-tab {
  padding: 0.4rem 0.9rem;
  border-radius: 20px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  transition: all var(--transition);
}

.cat-tab:hover { border-color: var(--border-gold); color: var(--gold); }

.cat-tab.active {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--bg-primary);
}

.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
  font-size: 1.1rem;
}

/* ==========================================================================
   Recent Purchases
   ========================================================================== */
.recent-purchases-section {
  padding: 3rem 0;
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
}

.purchases-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 600px;
  margin: 0 auto;
}

.purchase-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.6rem 1rem;
  font-size: 0.9rem;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(-10px); }
  to { opacity: 1; transform: translateX(0); }
}

.purchase-buyer { font-weight: 700; color: var(--text-primary); }
.purchase-arrow { color: var(--text-dim); }
.purchase-item-name { color: var(--text-muted); flex: 1; }
.purchase-amount { color: var(--gold); font-weight: 700; font-size: 0.85rem; margin-left: auto; }

/* ==========================================================================
   Checkout Modal
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal {
  background: var(--bg-surface);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 2rem;
  width: min(480px, calc(100vw - 2rem));
  position: relative;
  animation: slideUp 0.25s ease;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all var(--transition);
  line-height: 1;
}

.modal-close:hover { background: var(--bg-card); color: var(--text-primary); }

.modal-title {
  font-family: var(--font-pixel);
  font-size: 0.7rem;
  color: var(--gold);
  margin-bottom: 1.25rem;
  line-height: 1.6;
}

.modal-item-info {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
}

.modal-item-info .item-name-modal { font-weight: 700; color: var(--text-primary); }
.modal-item-info .item-price-modal { color: var(--gold); font-weight: 700; }

.form-group { margin-bottom: 1rem; }
.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.65rem 0.875rem;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: border-color var(--transition);
  outline: none;
}

.form-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(245, 166, 35, 0.15);
}

.payment-methods {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.payment-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all var(--transition);
}

.payment-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(245, 166, 35, 0.05);
}

.payment-icon {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.checkout-error {
  background: rgba(244, 67, 54, 0.15);
  border: 1px solid rgba(244, 67, 54, 0.4);
  border-radius: var(--radius);
  padding: 0.6rem 0.875rem;
  color: var(--error);
  font-size: 0.85rem;
  margin-top: 0.75rem;
}

/* ==========================================================================
   Result Pages (success/fail)
   ========================================================================== */
.result-page {
  padding: 5rem 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
}

.result-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  padding: 3rem 2.5rem;
  text-align: center;
  max-width: 480px;
  width: 100%;
}

.result-card.success { border: 1px solid rgba(76, 175, 80, 0.4); }
.result-card.fail { border: 1px solid rgba(244, 67, 54, 0.4); }

.result-icon { font-size: 3rem; margin-bottom: 1.5rem; }

.result-title {
  font-family: var(--font-pixel);
  font-size: 0.8rem;
  margin-bottom: 1rem;
  line-height: 1.8;
}

.result-card.success .result-title { color: var(--success); }
.result-card.fail .result-title { color: var(--error); }

.result-desc {
  color: var(--text-muted);
  margin-bottom: 2rem;
  font-size: 0.95rem;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  margin-top: auto;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-logo {
  font-family: var(--font-pixel);
  font-size: 0.7rem;
  color: var(--gold);
}

.footer-desc { color: var(--text-muted); font-size: 0.85rem; }
.footer-copy { color: var(--text-dim); font-size: 0.75rem; }

/* ==========================================================================
   Main Content Wrapper
   ========================================================================== */
.main-content { flex: 1; }

/* ==========================================================================
   Copy Toast
   ========================================================================== */
.copy-toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  color: var(--gold);
  padding: 0.6rem 1.5rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
  z-index: 9999;
  animation: toastIn 0.3s ease;
}

@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, 20px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 768px) {
  .header-inner { flex-wrap: wrap; gap: 0.75rem; }
  .header-right { width: 100%; justify-content: space-between; }
  .hero-server-info { flex-direction: column; align-items: center; }
  .items-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .payment-methods { grid-template-columns: 1fr; }
  .shop-header { flex-direction: column; align-items: flex-start; }
  .logo-text { font-size: 0.7rem; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 1.2rem; }
  .items-grid { grid-template-columns: 1fr 1fr; gap: 0.75rem; }
  .item-card-image { height: 120px; }
}

/* ==========================================================================
   Cart Badge (nav)
   ========================================================================== */
.nav-cart { position: relative; display: inline-flex; align-items: center; gap: 4px; }

.cart-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--gold);
  color: var(--bg);
  font-size: 0.6rem;
  font-weight: 800;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  padding: 0 4px;
  line-height: 1;
  font-family: var(--font-body);
}

/* ==========================================================================
   Open in Minecraft button
   ========================================================================== */
.btn-mc {
  background: transparent;
  border: 2px solid #5D9F52;
  color: #5D9F52;
  display: inline-flex;
  align-items: center;
}
.btn-mc:hover {
  background: #5D9F52;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(93,159,82,0.35);
}

/* ==========================================================================
   Discount badges
   ========================================================================== */
.discount-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: #e53935;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 3px 7px;
  border-radius: 6px;
  font-family: var(--font-body);
  z-index: 2;
  letter-spacing: 0.03em;
}

.item-price-block {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.item-price-original {
  color: var(--text-dim);
  font-size: 0.78rem;
  text-decoration: line-through;
}

.item-price-sale {
  color: #e53935;
}

/* ==========================================================================
   Cart Page
   ========================================================================== */
.cart-section { padding: 2rem 0 4rem; }

.cart-empty {
  text-align: center;
  padding: 5rem 1rem;
  color: var(--text-muted);
}
.cart-empty-icon { color: var(--text-dim); margin-bottom: 1.5rem; }
.cart-empty h2 { font-size: 1.2rem; color: var(--text); margin-bottom: 0.5rem; }
.cart-empty p { margin-bottom: 2rem; }

.cart-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 2rem;
  align-items: start;
}

/* Cart table */
.cart-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.cart-table thead th {
  text-align: left;
  padding: 0.75rem 1rem;
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-body);
}
.cart-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.cart-row:hover td { background: rgba(245,166,35,0.04); }

.cart-item-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.cart-item-img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border);
}
.cart-item-img-placeholder {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border-radius: 6px;
  border: 1px solid var(--border);
  color: var(--text-dim);
}
.cart-item-name { font-weight: 600; color: var(--text); }

.price-original { color: var(--text-dim); text-decoration: line-through; font-size: 0.8rem; }
.price-current { color: var(--gold); font-weight: 700; }

/* Qty control */
.qty-control {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.1rem 0.4rem;
  width: fit-content;
}
.qty-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--gold);
  font-size: 1.1rem;
  font-weight: 700;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background 0.15s;
}
.qty-btn:hover { background: rgba(245,166,35,0.15); }
.qty-value { min-width: 24px; text-align: center; font-weight: 700; font-size: 0.9rem; }

.line-subtotal { font-weight: 700; color: var(--text); }

.cart-remove-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-dim);
  padding: 4px;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
}
.cart-remove-btn:hover { color: #e53935; background: rgba(229,57,53,0.1); }

.cart-total-row {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 1.5rem;
  padding: 1rem 1rem 0;
  font-size: 1.1rem;
}
.cart-total-label { color: var(--text-muted); }
.cart-total-amount { font-weight: 800; color: var(--gold); font-size: 1.3rem; }

/* Checkout panel */
.checkout-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.75rem;
  position: sticky;
  top: 100px;
}
.checkout-panel-title {
  font-family: var(--font-pixel);
  font-size: 0.65rem;
  color: var(--gold);
  margin-bottom: 1.5rem;
  letter-spacing: 0.05em;
}

/* Payment options (radio cards) */
.payment-methods-cart {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 0.5rem;
}
.payment-option input[type="radio"] { display: none; }
.payment-option-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding: 0.9rem 0.6rem;
  background: var(--bg-surface);
  border: 2px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  text-align: center;
}
.payment-option input:checked + .payment-option-card {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(245,166,35,0.08);
}
.payment-option-card:hover { border-color: var(--gold-hover); color: var(--text); }
.payment-icon { width: 22px; height: 22px; color: inherit; }

.form-hint { font-size: 0.75rem; color: var(--text-dim); margin-top: 0.3rem; }

.checkout-error {
  background: rgba(229,57,53,0.15);
  border: 1px solid rgba(229,57,53,0.4);
  color: #ff7070;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

.btn-checkout-submit {
  width: 100%;
  margin-top: 1rem;
  justify-content: center;
  font-size: 0.85rem;
  padding: 0.85rem;
}

/* Sidebar styles */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.sidebar-overlay.open { opacity: 1; pointer-events: all; }

.site-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  width: 280px;
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  z-index: 201;
  transform: translateX(-100%);
  transition: transform 0.28s cubic-bezier(.4,0,.2,1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.site-sidebar.open { transform: translateX(0); }

.site-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.25rem 1rem;
  border-bottom: 1px solid var(--border);
}
.sidebar-logo-text {
  font-family: var(--font-pixel);
  font-size: 0.6rem;
  color: var(--gold);
}
.sidebar-close-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 4px;
  border-radius: 6px;
  transition: color 0.15s;
}
.sidebar-close-btn:hover { color: var(--text); }

.site-sidebar-nav, .site-sidebar-socials {
  padding: 1rem 1rem 0.5rem;
}
.sidebar-nav-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  margin-bottom: 0.5rem;
  font-family: var(--font-body);
  font-weight: 700;
}
.sidebar-nav-link {
  display: block;
  padding: 0.6rem 0.75rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  border-radius: 8px;
  margin-bottom: 2px;
  transition: background 0.15s, color 0.15s;
}
.sidebar-nav-link:hover { background: rgba(245,166,35,0.1); color: var(--gold); }

.social-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 2px;
  transition: background 0.15s, color 0.15s;
}
.social-link:hover { background: rgba(245,166,35,0.1); color: var(--text); }

.hamburger-btn {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 6px 4px;
  margin-right: 8px;
}
.hamburger-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-muted);
  border-radius: 2px;
  transition: background 0.15s;
}
.hamburger-btn:hover span { background: var(--gold); }

/* Footer socials */
.footer-socials { display: flex; gap: 1rem; justify-content: center; }
.footer-social-link { color: var(--text-dim); font-size: 0.8rem; transition: color 0.15s; }
.footer-social-link:hover { color: var(--gold); }

/* Responsive cart */
@media (max-width: 900px) {
  .cart-layout { grid-template-columns: 1fr; }
  .checkout-panel { position: static; }
}
@media (max-width: 640px) {
  .payment-methods-cart { grid-template-columns: 1fr; }
  .cart-table { font-size: 0.8rem; }
  .cart-table thead { display: none; }
  .cart-table td { display: block; padding: 0.4rem 0.5rem; border-bottom: none; }
  .cart-row { display: block; border-bottom: 1px solid var(--border); margin-bottom: 0.5rem; }
  .col-remove { text-align: right; }
}

/* ==========================================================================
   Floating Cart Button (bottom-right)
   ========================================================================== */
.floating-cart-btn {
  position: fixed;
  bottom: 1.75rem;
  right: 1.75rem;
  z-index: 300;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--bg-primary);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(245, 166, 35, 0.5);
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}
.floating-cart-btn:hover {
  background: var(--gold-hover);
  transform: scale(1.08);
  box-shadow: 0 6px 28px rgba(245, 166, 35, 0.65);
}
.floating-cart-btn .cart-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #e53935;
  color: #fff;
  border: 2px solid var(--bg-primary);
}

/* ==========================================================================
   Cart Overlay
   ========================================================================== */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 400;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.cart-overlay.open {
  opacity: 1;
  pointer-events: all;
}

/* ==========================================================================
   Cart Popup Panel
   ========================================================================== */
.cart-popup {
  position: fixed;
  bottom: 0;
  right: 0;
  z-index: 401;
  width: min(420px, 100vw);
  max-height: 92vh;
  background: var(--bg-surface);
  border: 1px solid var(--border-gold);
  border-bottom: none;
  border-radius: 16px 16px 0 0;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}
.cart-popup.open {
  transform: translateY(0);
}

.cart-popup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.cart-popup-title {
  font-family: var(--font-pixel);
  font-size: 0.65rem;
  color: var(--gold);
  line-height: 1.6;
}
.cart-popup-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 4px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition), background var(--transition);
}
.cart-popup-close:hover {
  color: var(--text-primary);
  background: var(--bg-card);
}

/* Cart popup body (scrollable) */
.cart-popup-body {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.25rem;
  min-height: 120px;
}

/* Loading spinner */
.cart-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 0;
}
.cart-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Empty state */
.cart-popup-empty {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1rem;
  text-align: center;
  color: var(--text-dim);
  gap: 0.75rem;
}
.cart-popup-empty p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Items list */
.cart-popup-items {
  flex-direction: column;
  gap: 0.75rem;
}
.cart-popup-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.65rem 0.75rem;
  transition: border-color var(--transition);
}
.cart-popup-row:hover {
  border-color: var(--border-gold);
}

.cart-popup-img {
  width: 46px;
  height: 46px;
  object-fit: contain;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  flex-shrink: 0;
}
.cart-popup-img-placeholder {
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-dim);
  flex-shrink: 0;
}

.cart-popup-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.cart-popup-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cart-popup-price-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.cart-popup-original {
  color: var(--text-dim);
  font-size: 0.75rem;
  text-decoration: line-through;
}
.cart-popup-price {
  font-family: var(--font-pixel);
  font-size: 0.58rem;
  color: var(--gold);
}
.cart-popup-price.sale {
  color: #e53935;
}

/* Cart popup footer */
.cart-popup-footer {
  border-top: 1px solid var(--border);
  padding: 1rem 1.25rem;
  flex-shrink: 0;
  overflow-y: auto;
  max-height: 55vh;
}
.cart-popup-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  font-size: 1rem;
}
.cart-popup-total > span:first-child {
  color: var(--text-muted);
  font-weight: 600;
}
.cart-popup-total-amount {
  font-family: var(--font-pixel);
  font-size: 0.75rem;
  color: var(--gold);
}

/* Checkout form inside popup */
.cart-checkout-form .form-group { margin-bottom: 0.85rem; }
.cart-checkout-form .form-group label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.cart-payment-methods {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  margin-top: 0.4rem;
}

/* ==========================================================================
   Item Detail Modal extras
   ========================================================================== */
.item-modal {
  max-width: 500px;
  width: calc(100vw - 2rem);
}
.item-modal-image {
  width: 100%;
  max-height: 220px;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  border: 1px solid var(--border);
}
.item-modal-image img {
  width: 100%;
  height: 220px;
  object-fit: contain;
}
.item-modal-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 180px;
  color: var(--text-dim);
}
.item-modal-name {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.6rem;
  line-height: 1.3;
}
.item-modal-price-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.item-modal-original {
  color: var(--text-dim);
  text-decoration: line-through;
  font-size: 0.9rem;
}
.item-modal-price {
  font-family: var(--font-pixel);
  font-size: 0.8rem;
  color: var(--gold);
}
.item-modal-badge {
  position: static;
  display: inline-block;
  font-size: 0.7rem;
}
.item-modal-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.7;
  white-space: pre-wrap;
}

/* ==========================================================================
   Item card — clickable + object-fit contain fix
   ========================================================================== */
.item-card {
  cursor: pointer;
}
.item-card-image img {
  object-fit: contain;
}

/* ==========================================================================
   Mobile hero buttons wrap fix
   ========================================================================== */
.hero-actions {
  flex-wrap: wrap;
  row-gap: 0.75rem;
}

/* ==========================================================================
   Responsive cart popup
   ========================================================================== */
@media (max-width: 480px) {
  .cart-popup { width: 100vw; border-radius: 14px 14px 0 0; }
  .cart-payment-methods { grid-template-columns: 1fr; }
  .floating-cart-btn { bottom: 1.25rem; right: 1.25rem; width: 50px; height: 50px; }
}
