/* ══════════════════════════════════════
   HYBRID — producto.css
   Ghost Energy-inspired Product Detail Page
══════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --blue: #0066CC;
  --blue-light: #147CE5;
  --blue-dark: #004FA3;
  --blue-soft: rgba(0,102,204,0.1);
  --white: #ffffff;
  --off-white: #F5F5F7;
  --surface: #FAFAFA;
  --surface2: #F0F0F2;
  --text: #1d1d1f;
  --text-secondary: #6e6e73;
  --text-tertiary: #a1a1a6;
  --border: rgba(0,0,0,0.08);
  --border-mid: rgba(0,0,0,0.12);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.08);
  --shadow-hover: 0 16px 48px rgba(0,0,0,0.14);
  --font: 'Outfit', sans-serif;
  --radius: 14px;
  --radius-sm: 10px;
  --nav-height: 56px;
  --transition: 0.22s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--white);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font-family: var(--font); }

/* ── Navbar (same as store) ── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nav-height);
  background: rgba(255,255,255,0.9);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--transition);
}
.navbar.scrolled { box-shadow: 0 1px 0 var(--border), 0 4px 20px rgba(0,0,0,0.05); }
.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.nav-logo img {
  height: 60px;
  transform: scale(1.4);
  transform-origin: left center;
}
.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-link {
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition), background var(--transition);
}
.nav-link:hover { color: var(--text); background: var(--off-white); }
.nav-link-highlight { color: var(--blue); background: var(--blue-soft); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.btn-cart {
  position: relative;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--off-white);
  display: flex; align-items: center; justify-content: center;
  color: var(--text);
  transition: background var(--transition);
}
.btn-cart svg { width: 18px; height: 18px; }
.btn-cart:hover { background: var(--surface2); }
.cart-count {
  position: absolute;
  top: -4px; right: -4px;
  min-width: 17px; height: 17px;
  background: var(--blue);
  border-radius: 9px;
  font-size: 0.6rem; font-weight: 700;
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
  border: 2px solid #fff;
}
.btn-menu {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 38px; height: 38px;
  align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--off-white);
}
.btn-menu span { display: block; width: 18px; height: 1.5px; background: var(--text); border-radius: 2px; }

/* ── Breadcrumb ── */
.breadcrumb-bar {
  padding: calc(var(--nav-height) + 20px) 24px 0;
  max-width: 1200px;
  margin: 0 auto;
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-tertiary);
}
.breadcrumb a { color: var(--blue); transition: opacity var(--transition); }
.breadcrumb a:hover { opacity: 0.7; }
.breadcrumb span { opacity: 0.5; }

/* ════════════════════════════════════════
   PRODUCT DETAIL — main 2-col layout
════════════════════════════════════════ */
.product-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 24px 80px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

/* ── LEFT: Gallery ── */
.gallery-col {
  position: sticky;
  top: calc(var(--nav-height) + 20px);
}

.gallery-main {
  width: 100%;
  aspect-ratio: 1;
  background: var(--off-white);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 14px;
}
.gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 24px;
  transition: opacity 0.3s ease;
}
.gallery-main.loading { opacity: 0.4; }

.gallery-main svg {
  width: 140px;
  height: 140px;
  opacity: 0.35;
}

.gallery-thumbs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.gallery-thumb {
  width: 68px; height: 68px;
  background: var(--off-white);
  border: 2px solid transparent;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color var(--transition), box-shadow var(--transition);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.gallery-thumb img {
  width: 100%; height: 100%;
  object-fit: contain;
  padding: 6px;
}
.gallery-thumb.active {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-soft);
}
.gallery-thumb:hover:not(.active) {
  border-color: var(--border-mid);
}

/* ── RIGHT: Info panel ── */
.info-col { padding-top: 4px; }

.product-cat-label {
  display: inline-block;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 12px;
  margin-bottom: 14px;
}

.product-title {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 900;
  letter-spacing: -1px;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 16px;
}

.product-price-block {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 20px;
}
.product-price-main {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text);
}
.product-price-label {
  font-size: 0.8rem;
  color: var(--text-tertiary);
}

.product-description {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 28px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}

/* ── Flavor Selector ── */
.section-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 12px;
}
.selected-flavor-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  margin-left: 8px;
}

.flavor-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}
.flavor-btn {
  padding: 9px 18px;
  border-radius: 30px;
  border: 2px solid var(--border-mid);
  background: var(--white);
  color: var(--text-secondary);
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 600;
  transition: all var(--transition);
}
.flavor-btn:hover:not(:disabled) {
  border-color: var(--blue);
  color: var(--blue);
}
.flavor-btn.active {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
  box-shadow: 0 4px 14px rgba(0,102,204,0.3);
}
.flavor-btn.agotado {
  opacity: 0.4;
  text-decoration: line-through;
  cursor: not-allowed;
}

/* ── Quantity ── */
.qty-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}
.qty-control {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--off-white);
  border-radius: 30px;
  border: 1px solid var(--border-mid);
  overflow: hidden;
}
.qty-btn-pd {
  width: 46px; height: 46px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  color: var(--text);
  background: none;
  transition: background var(--transition);
}
.qty-btn-pd:hover { background: var(--surface2); }
.qty-val {
  min-width: 40px;
  text-align: center;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

/* ── CTA Block ── */
.cta-block {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 28px;
}
.btn-add-pd {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 28px;
  background: var(--blue);
  color: #fff;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 700;
  border-radius: 30px;
  border: none;
  transition: all var(--transition);
  box-shadow: 0 6px 20px rgba(0,102,204,0.3);
}
.btn-add-pd:hover:not(:disabled) {
  background: var(--blue-light);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(0,102,204,0.4);
}
.btn-add-pd:disabled {
  background: var(--surface2);
  color: var(--text-tertiary);
  box-shadow: none;
  cursor: not-allowed;
}
.btn-whatsapp {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  border: 2px solid #25D366;
  color: #25D366;
  background: transparent;
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: 30px;
  transition: all var(--transition);
}
.btn-whatsapp:hover {
  background: #25D366;
  color: #fff;
}

/* ── Trust Badges ── */
.trust-row {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--text-secondary);
}
.trust-item svg { width: 18px; height: 18px; color: var(--blue); flex-shrink: 0; }

/* ════════════════════════════════════════
   CROSS SELLING — "También te puede interesar"
════════════════════════════════════════ */
.cross-section {
  background: var(--off-white);
  padding: 80px 0;
}
.cross-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}
.cross-title {
  font-size: clamp(1.5rem, 2.8vw, 2rem);
  font-weight: 800;
  margin-bottom: 36px;
  letter-spacing: -0.5px;
}
.cross-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

/* mini product cards */
.cross-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
}
.cross-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
  border-color: transparent;
}
.cross-img {
  aspect-ratio: 1;
  background: var(--off-white);
  display: flex; align-items: center; justify-content: center;
  position: relative;
  overflow: hidden;
}
.cross-img img {
  width: 100%; height: 100%; object-fit: contain;
  padding: 20px;
}
.cross-img svg { width: 70px; height: 70px; opacity: 0.3; }
.cross-cat {
  position: absolute;
  top: 10px; left: 10px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 0.62rem; font-weight: 700;
  letter-spacing: 0.5px; text-transform: uppercase;
  padding: 3px 8px; border-radius: 10px;
}
.cross-info { padding: 14px 16px 16px; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.cross-name { font-size: 0.88rem; font-weight: 700; line-height: 1.3; }
.cross-price { font-size: 1.1rem; font-weight: 800; }
.cross-price-label { font-size: 0.68rem; color: var(--text-tertiary); font-weight: 400; display: block; }

/* ── Toast ── */
.pd-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--blue);
  color: #fff;
  padding: 13px 26px;
  border-radius: 12px;
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 600;
  z-index: 9999;
  opacity: 0;
  transition: all 0.3s;
  white-space: nowrap;
  box-shadow: 0 8px 24px rgba(0,102,204,0.4);
  pointer-events: none;
}
.pd-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Cart Sidebar (reuse from store) ── */
.cart-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.25);
  z-index: 1100;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s;
  backdrop-filter: blur(4px);
}
.cart-overlay.active { opacity: 1; pointer-events: all; }
.cart-sidebar {
  position: fixed;
  top: 0; right: -420px;
  width: 420px; height: 100vh;
  background: var(--white);
  border-left: 1px solid var(--border);
  box-shadow: -8px 0 40px rgba(0,0,0,0.1);
  z-index: 1101;
  display: flex; flex-direction: column;
  transition: right 0.35s cubic-bezier(0.25,0.46,0.45,0.94);
}
.cart-sidebar.open { right: 0; }
.cart-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
}
.cart-header h2 { font-size: 1rem; font-weight: 700; }
.cart-close {
  width: 32px; height: 32px;
  border-radius: 50%; background: var(--off-white);
  color: var(--text); font-size: 1.1rem;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--transition);
}
.cart-close:hover { background: var(--surface2); }
.cart-items {
  flex: 1; overflow-y: auto; padding: 14px 22px;
  display: flex; flex-direction: column; gap: 12px;
}
.cart-empty {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 10px; color: var(--text-tertiary); padding: 40px 0;
}
.cart-empty svg { width: 44px; height: 44px; opacity: 0.2; }
.cart-empty p { font-size: 0.88rem; }
.cart-item {
  display: flex; gap: 12px; padding: 14px;
  background: var(--off-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  align-items: center;
}
.cart-item-icon { width: 44px; height: 44px; flex-shrink: 0; }
.cart-item-icon svg { width: 44px; height: 44px; }
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name { font-size: 0.85rem; font-weight: 700; color: var(--text); margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cart-item-flavor { font-size: 0.75rem; color: var(--text-secondary); margin-bottom: 6px; }
.cart-item-controls { display: flex; align-items: center; gap: 8px; }
.qty-btn { width: 26px; height: 26px; border-radius: 50%; background: var(--surface2); color: var(--text); font-size: 0.95rem; display: flex; align-items: center; justify-content: center; transition: background var(--transition); }
.qty-btn:hover { background: var(--border-mid); }
.qty-display { font-size: 0.85rem; font-weight: 700; color: var(--text); min-width: 18px; text-align: center; }
.cart-item-remove { font-size: 0.72rem; color: var(--text-tertiary); background: none; border: none; cursor: pointer; font-family: var(--font); transition: color var(--transition); }
.cart-item-remove:hover { color: #e53e3e; }
.cart-item-price { font-size: 0.92rem; font-weight: 700; color: var(--text); flex-shrink: 0; }
.cart-footer { padding: 18px 22px; border-top: 1px solid var(--border); background: var(--off-white); }
.cart-total { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.cart-total span { font-size: 0.9rem; color: var(--text-secondary); }
.cart-total strong { font-size: 1.2rem; font-weight: 800; color: var(--text); }
.btn-checkout {
  width: 100%; padding: 14px; border-radius: 30px;
  background: var(--blue); color: #fff;
  font-family: var(--font); font-size: 0.95rem; font-weight: 700;
  border: none; cursor: pointer;
  transition: background var(--transition);
  box-shadow: 0 4px 14px rgba(0,102,204,0.3);
}
.btn-checkout:hover { background: var(--blue-light); }
.cart-secure { text-align: center; font-size: 0.72rem; color: var(--text-tertiary); margin-top: 10px; }

/* ── SKELETON LOADER ── */
.skeleton { background: linear-gradient(90deg, var(--off-white) 25%, var(--surface2) 50%, var(--off-white) 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: 8px; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ── SCROLL TOP ── */
.scroll-top {
  position: fixed; bottom: 28px; right: 28px;
  width: 44px; height: 44px;
  background: var(--blue); color: #fff;
  border-radius: 50%; border: none;
  font-size: 1.2rem; cursor: pointer;
  display: none; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(0,102,204,0.3);
  transition: all var(--transition);
  z-index: 999;
}
.scroll-top.visible { display: flex; }
.scroll-top:hover { transform: translateY(-3px); }

/* ══ RESPONSIVE ══ */
@media (max-width: 900px) {
  .product-page { grid-template-columns: 1fr; gap: 32px; }
  .gallery-col { position: static; }
  .gallery-main { max-width: 480px; margin: 0 auto 14px; }
  .cross-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .product-page { padding: 16px 16px 60px; }
  .product-title { font-size: 1.7rem; }
  .product-price-main { font-size: 1.6rem; }
  .cross-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .nav-links { display: none; }
  .btn-menu { display: flex; }
  .nav-links.open {
    display: flex; flex-direction: column;
    position: fixed;
    top: var(--nav-height); left: 0; right: 0;
    background: var(--white);
    padding: 16px;
    border-bottom: 1px solid var(--border);
    z-index: 999;
    gap: 4px;
  }
}
