/* ═══════════════════════════════════════════
   ORO MONTE — Joyería en oro 18K
   🎨 Verde militar + Negro
   ═══════════════════════════════════════════ */

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

:root {
  --green: #5B7044;
  --green-light: #8BA86E;
  --green-dark: #3D4F2A;
  --green-glow: rgba(91, 112, 68, 0.25);
  --bg: #0F0F0F;
  --bg-2: #1A1A1A;
  --bg-3: #242424;
  --bg-4: #2E2E2E;
  --surface: #1E1E1E;
  --border: #333333;
  --border-accent: rgba(91, 112, 68, 0.25);
  --text: #E8E8E8;
  --text-secondary: #9E9E9E;
  --text-muted: #6B6B6B;
  --white: #FFFFFF;
  --danger: #DC2626;
  --danger-bg: rgba(220, 38, 38, 0.1);
  --success: #4CAF50;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.5);
  --radius: 12px;
  --radius-sm: 8px;
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--green); color: var(--white); }

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; }

/* ── Header ── */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(15, 15, 15, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-accent);
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  display: flex;
  align-items: baseline;
  gap: 2px;
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
}
.logo-oro { color: var(--green-light); }
.logo-monte { color: var(--white); }
.logo-18k {
  font-size: 0.65rem;
  font-weight: 400;
  color: var(--green-light);
  margin-left: 2px;
  vertical-align: super;
}

.nav { display: flex; align-items: center; gap: 32px; }
.nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition);
  position: relative;
}
.nav-link:hover, .nav-link.active { color: var(--green-light); }
.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--green);
  border-radius: 1px;
}

.cart-link { display: flex; align-items: center; gap: 6px; }
.cart-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: var(--green);
  color: var(--white);
  font-size: 0.7rem;
  font-weight: 600;
  transition: transform var(--transition);
}
.cart-badge.pulse { animation: pulse 0.4s ease; }

/* Floating cart (always visible on mobile) */
.cart-float {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--green);
  color: var(--white);
  position: relative;
  transition: all var(--transition);
  flex-shrink: 0;
}
.cart-float:hover {
  background: var(--green-light);
  transform: scale(1.05);
}
.cart-float-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--white);
  color: var(--green-dark);
  font-size: 0.6rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  transition: transform var(--transition);
}
.cart-float-badge.pulse { animation: pulse 0.4s ease; }
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.3); }
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 4px;
}
.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}
.menu-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ── Hero ── */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 60%, rgba(91, 112, 68, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 20%, rgba(15, 15, 15, 0.5) 0%, transparent 50%),
    linear-gradient(160deg, #0A0A0A 0%, #151515 40%, #1A1A1A 100%);
}
.hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 40px,
      rgba(91, 112, 68, 0.03) 40px,
      rgba(91, 112, 68, 0.03) 41px
    );
}
.hero-overlay {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 40%;
  background: linear-gradient(135deg, var(--green-dark), var(--green), var(--green-light));
  clip-path: polygon(20% 0, 100% 0, 100% 100%, 0% 100%);
  opacity: 0.08;
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}
.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--white);
  max-width: 600px;
}
.hero-subtitle {
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  color: var(--text-secondary);
  max-width: 480px;
  margin-top: 20px;
  line-height: 1.8;
}
.btn-hero {
  display: inline-block;
  margin-top: 32px;
  padding: 14px 36px;
  background: var(--green);
  color: var(--white);
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all var(--transition);
  border: none;
}
.btn-hero:hover {
  background: var(--green-light);
  color: var(--bg);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--green-glow);
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  padding: 8px 16px;
  background: rgba(91, 112, 68, 0.12);
  border: 1px solid var(--border-accent);
  border-radius: 50px;
  font-size: 0.85rem;
  color: var(--green-light);
  font-weight: 500;
}
.badge-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--green);
  color: var(--white);
  font-size: 0.7rem;
}

/* ── Catalog ── */
.catalog {
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 24px 60px;
}
.catalog-header {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 40px;
}
.section-title {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  color: var(--white);
}
.category-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.cat-tab {
  padding: 8px 20px;
  border: 1.5px solid var(--bg-4);
  background: transparent;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition);
}
.cat-tab:hover {
  border-color: var(--green);
  color: var(--green-light);
}
.cat-tab.active {
  background: var(--green);
  border-color: var(--green);
  color: var(--white);
}

/* ── Product Grid ── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}
.product-card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  border: 1px solid var(--border);
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--green);
}
.product-img {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  background: var(--bg-2);
  display: block;
  transition: transform 0.6s ease;
}
.product-card:hover .product-img {
  transform: scale(1.03);
}
.product-body {
  padding: 20px;
}
.product-category {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--green-light);
  background: rgba(91, 112, 68, 0.1);
  padding: 3px 10px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.product-sku {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-left: 8px;
}
.product-title {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 600;
  margin: 10px 0 6px;
  color: var(--white);
}
.product-price {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--green-light);
}
.product-stock {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
}
.product-stock.low { color: #EAB308; }
.product-stock.out { color: var(--danger); }
.product-actions {
  margin-top: 16px;
  display: flex;
  gap: 8px;
}
.btn-add {
  flex: 1;
  padding: 10px 20px;
  background: var(--green);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.85rem;
  transition: all var(--transition);
}
.btn-add:hover {
  background: var(--green-light);
  color: var(--bg);
}
.btn-add:disabled {
  background: var(--bg-4);
  color: var(--text-muted);
  cursor: not-allowed;
  opacity: 0.6;
}
.btn-add.added {
  background: var(--success);
}

/* ── Cart Page ── */
.cart-section {
  max-width: 800px;
  margin: 0 auto;
  padding: 120px 24px 60px;
}
.cart-empty {
  text-align: center;
  padding: 80px 20px;
}
.cart-empty-icon {
  color: var(--bg-4);
  margin-bottom: 20px;
}
.cart-empty p {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
}
.btn-outline {
  display: inline-block;
  padding: 12px 28px;
  border: 2px solid var(--green);
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--green-light);
  transition: all var(--transition);
}
.btn-outline:hover {
  background: var(--green);
  color: var(--white);
}

.cart-list { display: flex; flex-direction: column; gap: 16px; }
.cart-item {
  display: flex;
  gap: 16px;
  padding: 16px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}
.cart-item-img {
  width: 100px;
  height: 100px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--bg-2);
  flex-shrink: 0;
}
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--white);
}
.cart-item-sku { font-size: 0.75rem; color: var(--text-muted); }
.cart-item-price { font-size: 1.1rem; font-weight: 700; color: var(--green-light); margin-top: 4px; }
.cart-item-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}
.qty-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--bg-4);
  background: var(--bg-3);
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  transition: all var(--transition);
}
.qty-btn:hover { border-color: var(--green); background: rgba(91, 112, 68, 0.1); }
.qty-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.qty-value {
  font-size: 1rem;
  font-weight: 600;
  min-width: 24px;
  text-align: center;
  color: var(--white);
}
.btn-remove {
  padding: 6px 14px;
  border: none;
  background: var(--danger-bg);
  color: var(--danger);
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  margin-left: auto;
  transition: all var(--transition);
}
.btn-remove:hover { background: rgba(220,38,38,0.2); }

.cart-summary {
  margin-top: 24px;
  padding: 24px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}
.cart-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  font-size: 0.95rem;
  color: var(--text-secondary);
}
.cart-summary-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0 0;
  margin-top: 12px;
  border-top: 2px solid var(--green);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--white);
}
.cart-summary-total .price { color: var(--green-light); }
.btn-primary {
  width: 100%;
  margin-top: 20px;
  padding: 14px;
  background: var(--green);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 600;
  transition: all var(--transition);
}
.btn-primary:hover {
  background: var(--green-light);
  color: var(--bg);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px var(--green-glow);
}

/* ── Checkout Modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(0,0,0,0.75);
  display: none;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}
.modal-overlay.show { display: flex; }
.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 8px 40px rgba(0,0,0,0.6);
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 1.1rem; font-weight: 600; color: var(--white); }
.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all var(--transition);
  cursor: pointer;
}
.modal-close:hover { background: var(--bg-3); color: var(--text); }
.modal-body { padding: 24px; }

.checkout-summary {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 20px;
}
.checkout-summary-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
}
.checkout-summary-total {
  display: flex;
  justify-content: space-between;
  padding: 10px 0 0;
  margin-top: 8px;
  border-top: 2px solid var(--green);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--white);
}
.checkout-summary-total .price { color: var(--green-light); }

.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.form-group input, .form-group textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  color: var(--text);
  font-size: 0.95rem;
  transition: border-color var(--transition);
  font-family: var(--font-sans);
}
.form-group input:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px var(--green-glow);
}

/* ── Toast ── */
.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  z-index: 200;
  padding: 12px 24px;
  background: var(--bg-3);
  color: var(--white);
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 500;
  opacity: 0;
  transition: all 0.4s ease;
  pointer-events: none;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--green);
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Page Routing ── */
.page { display: none; }
.page.active { display: block; }

/* ── Footer ── */
.footer {
  border-top: 1px solid var(--border);
  padding: 32px 24px;
  text-align: center;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
}
.footer p {
  font-size: 0.85rem;
  color: var(--text-muted);
}
.footer p:first-child {
  font-family: var(--font-serif);
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

/* ── Image Placeholder (fallback) ── */
.img-placeholder {
  width: 100%;
  aspect-ratio: 1/1;
  background: linear-gradient(135deg, var(--bg-2), var(--bg-3));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green-light);
  font-family: var(--font-serif);
  font-size: 3rem;
  font-weight: 600;
}

/* ═══════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════ */
@media (max-width: 768px) {
  .nav {
    position: fixed;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--bg);
    flex-direction: column;
    padding: 16px 24px 24px;
    gap: 16px;
    border-bottom: 1px solid var(--border-accent);
    transform: translateY(-100%);
    opacity: 0;
    transition: all var(--transition);
    pointer-events: none;
    box-shadow: var(--shadow-md);
  }
  .nav.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .menu-toggle { display: flex; }
  .cart-float { display: flex; }
  .cart-link .cart-badge { display: none; }

  .hero { min-height: 500px; }
  .hero-overlay { display: none; }
  .hero-content { text-align: center; }
  .hero-title, .hero-subtitle { max-width: 100%; }
  .hero-badge { margin-left: auto; margin-right: auto; }

  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
  }

  .cart-item { flex-direction: column; }
  .cart-item-img { width: 100%; height: auto; aspect-ratio: 1/1; max-height: 180px; }
}

@media (max-width: 480px) {
  .product-grid { grid-template-columns: 1fr; }
  .header-inner { padding: 0 16px; }
  .catalog { padding: 40px 16px 40px; }
  .cart-section { padding: 100px 16px 40px; }
  .toast {
    font-size: 1rem;
    padding: 14px 24px;
    border-width: 2px;
    bottom: 80px;
    min-width: 280px;
    text-align: center;
  }
}
