/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #f9f9f7;
  --white: #ffffff;
  --text: #1a1a1a;
  --muted: #6b7280;
  --accent: #2563eb;
  --accent-dark: #1d4ed8;
  --border: #e5e7eb;
  --gray-bg: #f3f4f6;
  --success: #16a34a;
  --radius: 10px;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== HEADER ===== */
header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.3px;
}

nav a {
  color: var(--muted);
  text-decoration: none;
  margin-left: 24px;
  font-size: 0.9rem;
  transition: color 0.2s;
}

nav a:hover { color: var(--text); }

.cart-icon {
  cursor: pointer;
  font-size: 1.1rem;
  background: var(--gray-bg);
  padding: 8px 14px;
  border-radius: 999px;
  transition: background 0.2s;
}

.cart-icon:hover { background: var(--border); }

/* ===== HERO ===== */
.hero {
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
  color: white;
  padding: 100px 0;
  text-align: center;
}

.hero h1 {
  font-size: 2.8rem;
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 16px;
}

.hero p {
  font-size: 1.05rem;
  opacity: 0.85;
  margin-bottom: 32px;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-block;
  background: var(--accent);
  color: white;
  padding: 12px 24px;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  width: 100%;
  text-align: center;
}

.btn:hover { background: var(--accent-dark); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--accent);
  color: var(--accent);
}

.btn-outline:hover { background: var(--accent); color: white; }

/* ===== SECTIONS ===== */
.section { padding: 80px 0; }
.section-gray { background: var(--gray-bg); }

.section h2 {
  font-size: 1.8rem;
  font-weight: 600;
  margin-bottom: 40px;
  text-align: center;
}

/* ===== PRODUCTS GRID ===== */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px;
}

.product-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: box-shadow 0.2s;
}

.product-card:hover { box-shadow: var(--shadow); }

.product-icon {
  font-size: 2.5rem;
  text-align: center;
}

.product-name {
  font-weight: 600;
  font-size: 1rem;
}

.product-desc {
  color: var(--muted);
  font-size: 0.85rem;
  flex: 1;
}

.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
}

.product-price {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--accent);
}

.add-btn {
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  transition: background 0.2s;
  width: auto;
}

.add-btn:hover { background: var(--accent-dark); }

/* ===== CART SIDEBAR ===== */
.cart-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 200;
}

.cart-overlay.active { display: block; }

.cart-sidebar {
  position: fixed;
  top: 0;
  right: -420px;
  width: 380px;
  max-width: 100vw;
  height: 100vh;
  background: var(--white);
  z-index: 201;
  display: flex;
  flex-direction: column;
  transition: right 0.3s ease;
  box-shadow: -4px 0 24px rgba(0,0,0,0.12);
}

.cart-sidebar.active { right: 0; }

.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}

.cart-header h3 { font-size: 1.1rem; font-weight: 600; }
.cart-header button { background: none; border: none; font-size: 1.2rem; cursor: pointer; }

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 16px 24px;
}

.empty-cart { color: var(--muted); text-align: center; padding: 40px 0; }

.cart-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.cart-item-name { flex: 1; font-size: 0.9rem; font-weight: 500; }
.cart-item-qty { display: flex; align-items: center; gap: 8px; }
.cart-item-qty button { background: var(--gray-bg); border: none; border-radius: 4px; width: 26px; height: 26px; cursor: pointer; font-size: 1rem; }
.cart-item-price { font-weight: 600; font-size: 0.9rem; min-width: 60px; text-align: right; }

.cart-footer {
  padding: 20px 24px;
  border-top: 1px solid var(--border);
}

.cart-total {
  font-size: 1rem;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
}

/* ===== MODAL ===== */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 300;
  align-items: center;
  justify-content: center;
}

.modal-overlay.active { display: flex; }

.modal {
  background: var(--white);
  border-radius: 16px;
  width: 480px;
  max-width: 95vw;
  max-height: 90vh;
  overflow-y: auto;
  padding: 0;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: white;
  z-index: 1;
}

.modal-header h3 { font-size: 1.1rem; font-weight: 600; }
.modal-header button { background: none; border: none; font-size: 1.2rem; cursor: pointer; }

.step { padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.step.hidden { display: none; }

.step h4 { font-weight: 600; font-size: 0.95rem; color: var(--muted); text-transform: uppercase; font-size: 0.8rem; letter-spacing: 0.5px; }

.step input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.2s;
}

.step input:focus { outline: none; border-color: var(--accent); }

/* ===== INPOST ===== */
.selected-locker {
  background: var(--gray-bg);
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: 0.9rem;
  color: var(--muted);
  min-height: 44px;
  display: flex;
  align-items: center;
}

/* ===== CRYPTO ===== */
.crypto-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.crypto-option {
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.crypto-option:hover { border-color: var(--accent); background: #eff6ff; }
.crypto-option.selected { border-color: var(--accent); background: #eff6ff; }

.crypto-option img { width: 36px; height: 36px; object-fit: contain; }
.crypto-option span { font-size: 0.85rem; font-weight: 500; }

.payment-info {
  background: var(--gray-bg);
  border-radius: var(--radius);
  padding: 16px;
  font-size: 0.9rem;
  line-height: 1.7;
}

.payment-info.hidden { display: none; }

.wallet-address {
  font-family: monospace;
  font-size: 0.8rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px;
  word-break: break-all;
  margin: 8px 0;
  cursor: pointer;
}

.wallet-address:hover { background: #eff6ff; }

.info-text { color: var(--muted); font-size: 0.9rem; }
.small-text { color: var(--muted); font-size: 0.8rem; }

/* ===== SUCCESS ===== */
.success-screen {
  text-align: center;
  padding: 40px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.success-icon {
  width: 72px;
  height: 72px;
  background: var(--success);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}

.success-screen h4 { font-size: 1.3rem; font-weight: 600; }
.success-screen p { color: var(--muted); }

/* ===== STEPS ===== */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
}

.step-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
  border: 1px solid var(--border);
}

.step-num {
  width: 40px;
  height: 40px;
  background: var(--accent);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  margin: 0 auto 16px;
}

.step-card h4 { font-weight: 600; margin-bottom: 8px; }
.step-card p { color: var(--muted); font-size: 0.9rem; }

/* ===== CONTACT ===== */
.contact-box { text-align: center; }
.contact-box p { color: var(--muted); margin-bottom: 24px; }
.contact-box .btn { width: auto; }

/* ===== FOOTER ===== */
footer {
  background: var(--text);
  color: rgba(255,255,255,0.6);
  text-align: center;
  padding: 32px 20px;
  font-size: 0.85rem;
  line-height: 2;
}

footer a { color: rgba(255,255,255,0.6); text-decoration: none; }
footer a:hover { color: white; }

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
  .hero h1 { font-size: 2rem; }
  nav { display: none; }
  .steps-grid { grid-template-columns: 1fr 1fr; }
}
