/* glow · estilos de componentes */

/* ── Tienda pública: image-slot solo lectura ────────────────────────────────
   Solo el panel admin (admin.html) tiene el shim de omelette que habilita
   drag & drop. En la tienda todos los slots son display-only. */
image-slot {
  pointer-events: none;
  cursor: default;
}

/* ---------- Header ---------- */
.gl-header {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px clamp(20px, 5vw, 64px);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.gl-logo {
  font-family: var(--font-display); font-weight: 600; font-size: 30px;
  letter-spacing: .04em; line-height: 1; display: flex; align-items: center; gap: 10px;
}
/* Logo PNG: tamaño en el header */
.gl-logo image-slot { height: 44px; width: 140px; flex-shrink: 0; }
/* Ocultar el slot cuando no hay imagen cargada */
.gl-logo image-slot:not([data-filled]) { display: none !important; }
/* Ocultar el texto cuando hay imagen */
.gl-logo image-slot[data-filled] ~ .gl-logo-wordmark { display: none; }
/* Wordmark de texto (fallback) */
.gl-logo-wordmark { display: flex; align-items: baseline; gap: 8px; }
.gl-logo .dot { color: var(--accent); }
.gl-logo .sub {
  font-family: var(--font-body); font-weight: 300; font-size: 10px;
  letter-spacing: .42em; text-transform: uppercase; color: var(--ink-soft);
}
.gl-nav { display: flex; gap: 30px; }
.gl-nav button {
  font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft);
  position: relative; padding: 4px 0; transition: color .25s;
}
.gl-nav button::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 1px; width: 0;
  background: var(--accent); transition: width .3s ease;
}
.gl-nav button:hover { color: var(--ink); }
.gl-nav button:hover::after { width: 100%; }
.gl-cart-btn {
  position: relative; display: flex; align-items: center; gap: 9px;
  padding: 10px 18px; border: 1px solid var(--ink); border-radius: 999px;
  font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  transition: background .25s, color .25s;
}
.gl-cart-btn:hover { background: var(--ink); color: var(--bg); }
.gl-cart-count {
  min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px;
  background: var(--accent); color: #fff; font-size: 11px; font-weight: 500;
  display: inline-flex; align-items: center; justify-content: center; letter-spacing: 0;
}
@media (max-width: 760px) { .gl-nav { display: none; } }

/* ---------- Hero ---------- */
.gl-hero {
  display: grid; grid-template-columns: 1.05fr .95fr; align-items: stretch;
  gap: clamp(24px, 4vw, 56px); padding: clamp(36px, 6vw, 80px) clamp(20px, 5vw, 64px);
  max-width: 1320px; margin: 0 auto;
}
.gl-hero-copy { display: flex; flex-direction: column; justify-content: center; }
.gl-eyebrow {
  font-size: 12px; letter-spacing: .34em; text-transform: uppercase; color: var(--accent-2);
  margin-bottom: 22px;
}
.gl-hero h1 {
  font-family: var(--font-display); font-weight: 500; line-height: .98;
  font-size: clamp(46px, 7vw, 86px); margin: 0; letter-spacing: -.01em;
}
.gl-hero h1 em { font-style: italic; color: var(--accent); }
.gl-hero p {
  font-size: 16px; color: var(--ink-soft); max-width: 40ch; margin: 24px 0 36px;
  text-wrap: pretty;
}
.gl-hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.gl-btn-primary {
  padding: 15px 32px; background: var(--ink); color: var(--bg); border-radius: 999px;
  font-size: 13px; letter-spacing: .14em; text-transform: uppercase;
  transition: transform .25s, box-shadow .25s; box-shadow: 0 8px 24px -12px rgba(0,0,0,.4);
}
.gl-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -14px rgba(0,0,0,.45); }
.gl-btn-ghost {
  padding: 15px 30px; border-radius: 999px; border: 1px solid var(--line);
  font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink);
  transition: border-color .25s, color .25s;
}
.gl-btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.gl-hero-art { position: relative; min-height: 420px; }
.gl-hero-art image-slot {
  width: 100%; height: 100%; min-height: 420px;
  border-radius: calc(var(--radius) * 2.4);
}
.gl-hero-badge {
  position: absolute; left: -18px; bottom: 34px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 999px; padding: 12px 22px;
  font-family: var(--font-display); font-size: 19px; font-style: italic; color: var(--ink);
  white-space: nowrap;
  box-shadow: 0 18px 40px -22px rgba(0,0,0,.4);
}
.gl-hero-badge b { font-family: var(--font-body); font-weight: 500; font-style: normal; color: var(--accent); }
@media (max-width: 860px) {
  .gl-hero { grid-template-columns: 1fr; }
  .gl-hero-art { min-height: 320px; order: -1; }
  .gl-hero-art image-slot { min-height: 320px; }
}
@media (max-width: 560px) {
  .gl-header { padding: 14px 18px; }
  .gl-logo { font-size: 25px; }
  .gl-logo .sub { display: none; }
  .gl-cart-btn { padding: 9px 15px; font-size: 11px; }
  .gl-hero { padding: 22px 18px 8px; gap: 22px; }
  .gl-hero-art, .gl-hero-art image-slot { min-height: 260px; }
  .gl-hero .gl-eyebrow { margin-bottom: 14px; font-size: 11px; letter-spacing: .26em; }
  .gl-hero p { font-size: 15px; margin: 18px 0 26px; }
  .gl-hero-badge { left: auto; right: 14px; bottom: 14px; font-size: 16px; padding: 9px 16px; }
  .gl-hero-actions { gap: 10px; }
  .gl-btn-primary, .gl-btn-ghost { flex: 1; text-align: center; padding: 15px 18px; }
}

/* ---------- Catalog ---------- */
.gl-catalog { max-width: 1320px; margin: 0 auto; padding: clamp(48px, 6vw, 88px) clamp(20px, 5vw, 64px) 40px; }
.gl-sec-head { text-align: center; margin-bottom: 38px; }
.gl-sec-head .gl-eyebrow { margin-bottom: 12px; }
.gl-sec-head h2 {
  font-family: var(--font-display); font-weight: 500; font-size: clamp(34px, 5vw, 54px);
  margin: 0; letter-spacing: -.01em;
}
.gl-filters { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 44px; }
.gl-chip {
  padding: 10px 22px; border-radius: 999px; border: 1px solid var(--line); background: var(--chip-bg);
  font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft);
  transition: all .22s ease;
}
.gl-chip:hover { color: var(--ink); border-color: var(--accent); }
.gl-chip.active { background: var(--ink); color: var(--bg); border-color: var(--ink); }

.gl-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(16px, 2vw, 28px); }
@media (max-width: 1040px) { .gl-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 720px)  { .gl-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 440px)  { .gl-grid { grid-template-columns: 1fr; } }
.gl-card.hidden { display: none; }

.gl-card { display: flex; flex-direction: column; }
.gl-card-media { position: relative; overflow: hidden; border-radius: var(--radius); transition: box-shadow .4s ease; }
.gl-card-media image-slot {
  width: 100%; aspect-ratio: 4 / 5; border-radius: var(--radius);
  transition: transform .55s cubic-bezier(.2,.7,.2,1);
}
.gl-card:hover .gl-card-media { box-shadow: 0 22px 40px -22px rgba(60,40,30,.5); }
.gl-card:hover .gl-card-media image-slot { transform: scale(1.05); }
.gl-card-tag {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(4px);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 5px 12px; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent);
}
.gl-add {
  position: absolute; right: 12px; bottom: 12px; z-index: 2;
  width: 44px; height: 44px; border-radius: 999px; background: var(--ink); color: var(--bg);
  font-size: 22px; line-height: 1; display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: translateY(8px) scale(.9); transition: all .3s ease;
  box-shadow: 0 10px 22px -10px rgba(0,0,0,.5);
}
.gl-card:hover .gl-add { opacity: 1; transform: translateY(0) scale(1); }
.gl-add:hover { background: var(--accent); transform: scale(1.08); }
.gl-add:active { transform: scale(.92); }
.gl-add.added { background: var(--accent); animation: gl-pop .4s ease; }
@keyframes gl-pop { 0% { transform: scale(1); } 40% { transform: scale(1.25); } 100% { transform: scale(1); } }
.gl-add:disabled { opacity: .35; cursor: not-allowed; background: var(--ink-soft); }
.gl-card.sold .gl-card-media image-slot { opacity: .5; filter: grayscale(.4); }
.gl-card-tag.soldtag { color: var(--ink-soft); letter-spacing: .14em; }
.gl-low { color: var(--accent); }
.gl-card-body { padding: 16px 2px 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.gl-card-name { font-size: 15px; font-weight: 400; transition: color .25s; }
.gl-card:hover .gl-card-name { color: var(--accent); }
.gl-card-cat { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); margin-top: 4px; }
.gl-card-price { font-family: var(--font-display); font-size: 24px; font-weight: 600; white-space: nowrap; }
/* touch: always show add btn */
@media (hover: none) { .gl-add { opacity: 1; transform: none; } }

/* ---------- Cart drawer ---------- */
.gl-overlay {
  position: fixed; inset: 0; z-index: 60; background: rgba(40,30,26,.36);
  backdrop-filter: blur(3px); opacity: 0; pointer-events: none; transition: opacity .35s ease;
}
.gl-overlay.open { opacity: 1; pointer-events: auto; }
.gl-drawer {
  position: fixed; top: 0; right: 0; z-index: 61; height: 100%; width: min(420px, 92vw);
  background: var(--bg); border-left: 1px solid var(--line);
  transform: translateX(100%); transition: transform .42s cubic-bezier(.5,.05,.2,1);
  display: flex; flex-direction: column; box-shadow: -30px 0 60px -30px rgba(0,0,0,.4);
}
.gl-drawer.open { transform: translateX(0); }
.gl-drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 24px 26px; border-bottom: 1px solid var(--line);
}
.gl-drawer-head h3 { font-family: var(--font-display); font-weight: 500; font-size: 28px; margin: 0; }
.gl-close { font-size: 22px; color: var(--ink-soft); width: 36px; height: 36px; border-radius: 999px; transition: background .2s; }
.gl-close:hover { background: var(--bg-soft); }
.gl-drawer-body { flex: 1; overflow-y: auto; padding: 14px 26px; }
.gl-empty { text-align: center; color: var(--ink-soft); padding: 70px 20px; }
.gl-empty .em { font-family: var(--font-display); font-style: italic; font-size: 24px; color: var(--ink); display: block; margin-bottom: 8px; }

.gl-line { display: flex; gap: 14px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.gl-line image-slot { width: 66px; height: 80px; border-radius: 8px; flex: none; }
.gl-line-info { flex: 1; min-width: 0; }
.gl-line-name { font-size: 14px; }
.gl-line-price { font-size: 12px; color: var(--ink-soft); margin-top: 2px; }
.gl-qty { display: inline-flex; align-items: center; gap: 0; margin-top: 10px; border: 1px solid var(--line); border-radius: 999px; }
.gl-qty button { width: 28px; height: 28px; font-size: 16px; color: var(--ink); display: flex; align-items: center; justify-content: center; }
.gl-qty span { min-width: 26px; text-align: center; font-size: 13px; }
.gl-line-sub { font-family: var(--font-display); font-size: 19px; font-weight: 600; }
.gl-line-remove { display: block; margin-top: 8px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); transition: color .2s; }
.gl-line-remove:hover { color: var(--accent); }

.gl-drawer-foot { padding: 22px 26px calc(22px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.gl-total-row { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 6px; }
.gl-total-row .lbl { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); }
.gl-total-row .val { font-family: var(--font-display); font-size: 34px; font-weight: 600; }
.gl-foot-note { font-size: 12px; color: var(--ink-soft); margin: 0 0 16px; }
.gl-wa {
  width: 100%; padding: 17px; border-radius: 999px; background: #25D366; color: #fff;
  font-size: 14px; letter-spacing: .06em; font-weight: 500; display: flex; align-items: center;
  justify-content: center; gap: 10px; transition: transform .2s, filter .2s;
}
.gl-wa:hover { transform: translateY(-2px); filter: brightness(1.04); }
.gl-wa:disabled { opacity: .4; cursor: not-allowed; transform: none; }
.gl-wa svg { width: 20px; height: 20px; }

/* ---------- Footer ---------- */
.gl-footer {
  background: var(--bg-soft); border-top: 1px solid var(--line);
  padding: clamp(48px, 6vw, 80px) clamp(20px, 5vw, 64px) 40px; margin-top: 60px;
}
.gl-footer-inner { max-width: 1320px; margin: 0 auto; display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.gl-footer h4 { font-family: var(--font-display); font-weight: 500; font-size: 40px; margin: 0 0 12px; }
.gl-footer p { color: var(--ink-soft); max-width: 32ch; }
.gl-footer-links { display: flex; gap: 60px; flex-wrap: wrap; }
.gl-footer-col h5 { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--accent-2); margin: 0 0 16px; }
.gl-footer-col a, .gl-footer-col div { display: block; color: var(--ink-soft); margin-bottom: 9px; font-size: 14px; transition: color .2s; }
.gl-footer-col a:hover { color: var(--ink); }
.gl-copy { max-width: 1320px; margin: 48px auto 0; padding-top: 24px; border-top: 1px solid var(--line); font-size: 12px; color: var(--ink-soft); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.gl-admin-link { transition: color .2s; }
.gl-admin-link:hover { color: var(--accent); }
@media (max-width: 560px) {
  .gl-footer { margin-top: 36px; padding-top: 44px; }
  .gl-footer-inner { gap: 30px; }
  .gl-footer h4 { font-size: 34px; }
  .gl-footer-links { gap: 36px; }
  .gl-copy { margin-top: 34px; }
}

/* ---------- Product detail modal ---------- */
.gl-detail {
  position: fixed; top: 50%; left: 50%; z-index: 61;
  transform: translate(-50%, -50%);
  width: min(880px, 92vw); max-height: 88vh;
  background: var(--bg); border-radius: calc(var(--radius) * 1.6);
  display: grid; grid-template-columns: 1fr 1fr;
  overflow: hidden;
  box-shadow: 0 40px 80px -30px rgba(0,0,0,.55);
  animation: gl-detail-in .32s cubic-bezier(.2,.7,.2,1);
}
@keyframes gl-detail-in {
  from { opacity: 0; transform: translate(-50%, calc(-50% + 18px)); }
  to   { opacity: 1; transform: translate(-50%, -50%); }
}

.gl-detail-close {
  position: absolute; top: 16px; right: 16px; z-index: 3;
  width: 36px; height: 36px; border-radius: 999px;
  background: color-mix(in srgb, var(--bg) 75%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  font-size: 16px; color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  transition: background .2s;
  border: 1px solid var(--line);
}
.gl-detail-close:hover { background: var(--bg-soft); }

.gl-detail-media {
  position: relative; overflow: hidden;
  background: var(--bg-soft);
}
.gl-detail-media image-slot {
  width: 100%; height: 100%; min-height: 380px;
  border-radius: 0;
  transition: transform .6s cubic-bezier(.2,.7,.2,1);
}
.gl-detail-media image-slot:hover { transform: scale(1.04); }
.gl-detail-media .gl-card-tag { top: 18px; left: 18px; }

.gl-detail-info {
  padding: clamp(28px, 4vw, 48px);
  display: flex; flex-direction: column; gap: 18px;
  overflow-y: auto;
}

.gl-detail-cat {
  font-size: 11px; letter-spacing: .28em; text-transform: uppercase; color: var(--accent-2);
}
.gl-detail-name {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(26px, 4vw, 40px); margin: 0; line-height: 1.1;
  letter-spacing: -.01em;
}
.gl-detail-price {
  font-family: var(--font-display); font-size: clamp(30px, 4vw, 46px);
  font-weight: 600; line-height: 1;
}
.gl-detail-stock-row { font-size: 13px; }
.gl-detail-avail { color: #1F8A5B; }
.gl-detail-unavail { color: var(--ink-soft); }
.gl-detail-desc {
  font-size: 14px; color: var(--ink-soft); line-height: 1.7; margin: 0;
  border-top: 1px solid var(--line); padding-top: 18px;
}
.gl-detail-add {
  margin-top: auto; width: 100%; text-align: center;
  box-sizing: border-box;
}
.gl-detail-add.disabled,
.gl-detail-add:disabled { opacity: .4; cursor: not-allowed; transform: none !important; box-shadow: none !important; }

@media (max-width: 640px) {
  .gl-detail {
    grid-template-columns: 1fr;
    top: auto; bottom: 0; left: 0; right: 0;
    transform: none; width: 100%; max-height: 92vh;
    border-radius: calc(var(--radius) * 1.6) calc(var(--radius) * 1.6) 0 0;
    animation: gl-detail-up .32s cubic-bezier(.2,.7,.2,1);
  }
  @keyframes gl-detail-up {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: none; }
  }
  .gl-detail-media image-slot { min-height: 260px; }
  .gl-detail-info { gap: 14px; padding: 22px 22px 30px; }
}

/* card: cursor pointer para indicar que es clickeable */
.gl-card { cursor: pointer; }
.gl-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: var(--radius); }

/* ---------- Toast ---------- */
.gl-toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: var(--bg); padding: 13px 24px; border-radius: 999px;
  font-size: 13px; letter-spacing: .04em; z-index: 80; opacity: 0; pointer-events: none;
  transition: opacity .3s, transform .3s; box-shadow: 0 18px 40px -18px rgba(0,0,0,.5);
}
.gl-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* fade-up entrance */
@keyframes gl-up { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
.gl-reveal { animation: gl-up .7s cubic-bezier(.2,.7,.2,1) both; }

/* ---------- Scroll reveal ---------- */
.gl-r {
  opacity: 0; transform: translateY(28px);
  transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1);
  transition-delay: var(--d, 0ms);
  will-change: opacity, transform;
}
.gl-r.in { opacity: 1; transform: none; }
.gl-r.fade { transform: none; }            /* solo opacidad */
.gl-r.left { transform: translateX(-40px); }
.gl-r.left.in { transform: none; }
.gl-r.scale { transform: scale(.94); }
.gl-r.scale.in { transform: none; }

/* hero: entrada suave en cascada al cargar */
@keyframes gl-hero-in { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
.gl-hero-copy > * { animation: gl-hero-in .9s cubic-bezier(.2,.7,.2,1) both; }
.gl-hero-copy > *:nth-child(1) { animation-delay: .05s; }
.gl-hero-copy > *:nth-child(2) { animation-delay: .15s; }
.gl-hero-copy > *:nth-child(3) { animation-delay: .25s; }
.gl-hero-copy > *:nth-child(4) { animation-delay: .35s; }
.gl-hero-art { animation: gl-hero-in 1s cubic-bezier(.2,.7,.2,1) both; animation-delay: .2s; }
@keyframes gl-float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
.gl-hero-badge { animation: gl-hero-in .8s cubic-bezier(.2,.7,.2,1) .6s both, gl-float 5s ease-in-out 1.4s infinite; }

/* título: el acento se "ilumina" */
@keyframes gl-shimmer { 0% { background-position: 200% center; } 100% { background-position: -200% center; } }
.gl-hero h1 em {
  background: linear-gradient(100deg, var(--accent) 30%, var(--accent-2) 45%, #fff 50%, var(--accent-2) 55%, var(--accent) 70%);
  background-size: 200% auto; -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gl-shimmer 6s linear 1.2s infinite;
}

@media (prefers-reduced-motion: reduce) {
  .gl-reveal, .gl-r, .gl-hero-copy > *, .gl-hero-art, .gl-hero-badge { animation: none !important; opacity: 1 !important; transform: none !important; }
  .gl-hero h1 em { animation: none; -webkit-text-fill-color: var(--accent); color: var(--accent); }
}
