/* =========================================================================
   FLORISTERÍA PEÑA SACRA — Sistema de diseño (sitio PHP a medida)
   -------------------------------------------------------------------------
   1. Tokens
   2. Base
   3. Botones
   4. Componentes de marca (anuncio, badges, tarjetas, flotantes)
   5. Header y footer
   6. Catálogo (tienda / producto)
   7. Movimiento (reveal + micro-interacciones)
   8. Accesibilidad
   ========================================================================= */

/* 1. TOKENS ============================================================== */
:root {
  --ps-verde:        #3a5a40;
  --ps-verde-dark:    #26301f;
  --ps-verde-soft:    #2f4a35;
  --ps-crema:         #f4efe4;
  --ps-crema-2:       #e9e3d3;
  --ps-oro:           #e9c46a;
  --ps-oro-dk:        #d9ad48;
  --ps-tinta:         #262a20;
  --ps-tinta-soft:    #6f6857;
  --ps-borde:         #e3dcc9;

  --ps-serif: 'Spectral', Georgia, 'Times New Roman', serif;

  --ps-fs-display: clamp(2.5rem, 5vw, 4rem);
  --ps-fs-h1:      clamp(2rem, 4vw, 3rem);
  --ps-fs-h2:      clamp(1.7rem, 3.6vw, 2.6rem);
  --ps-fs-h3:      clamp(1.2rem, 2vw, 1.5rem);
  --ps-fs-body:    1.09375rem;

  --ps-space-md: 2rem;
  --ps-space-lg: 4rem;
  --ps-space-xl: 6rem;
  --ps-container: 1280px;

  --ps-radius-sm: 10px;
  --ps-radius:    18px;
  --ps-radius-lg: 26px;
  --ps-radius-pill: 999px;
  --ps-shadow-sm: 0 4px 14px -8px rgba(38, 48, 31, .35);
  --ps-shadow:    0 18px 40px -24px rgba(38, 48, 31, .45);
  --ps-shadow-lg: 0 36px 80px -44px rgba(38, 48, 31, .6);

  --ps-ease:      cubic-bezier(.22, .61, .36, 1);
  --ps-ease-out:  cubic-bezier(.16, 1, .3, 1);
  --ps-dur-fast:  .25s;
  --ps-dur:       .45s;
  --ps-dur-slow:  .8s;
}

/* 2. BASE ================================================================ */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--ps-serif);
  font-size: var(--ps-fs-body);
  line-height: 1.65;
  color: var(--ps-tinta);
  background: var(--ps-crema);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: var(--ps-verde); color: #fff; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font-family: inherit; }
h1, h2, h3, h4 { margin: 0; font-family: var(--ps-serif); font-weight: 700; line-height: 1.08; letter-spacing: -.01em; }
h1 { font-size: var(--ps-fs-h1); }
h2 { font-size: var(--ps-fs-h2); }
h3 { font-size: var(--ps-fs-h3); }
.serif { font-family: var(--ps-serif); font-weight: 600; letter-spacing: -.01em; }

.fps-u { position: relative; }
.fps-u::after {
  content: ""; position: absolute; left: 0; bottom: -3px; width: 0; height: 1.5px;
  background: currentColor; transition: width .3s ease;
}
.fps-u:hover::after { width: 100%; }

.ps-container { max-width: var(--ps-container); margin-inline: auto; padding-inline: 24px; }
.ps-eyebrow { font-size: .75rem; letter-spacing: .2em; text-transform: uppercase; font-weight: 800; color: #a98a4b; }
.ps-muted { color: var(--ps-tinta-soft); }

/* 3. BOTONES ============================================================= */
.ps-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-weight: 800; font-size: .97rem; line-height: 1;
  padding: 16px 30px; border-radius: var(--ps-radius-pill); border: 1.5px solid transparent;
  cursor: pointer; text-align: center; white-space: nowrap;
  transition: transform var(--ps-dur-fast) var(--ps-ease), background var(--ps-dur-fast) var(--ps-ease),
              border-color var(--ps-dur-fast) var(--ps-ease), box-shadow var(--ps-dur-fast) var(--ps-ease);
}
.ps-btn:active { transform: translateY(1px) scale(.99); }
.ps-btn--primary { background: var(--ps-oro); color: #3a3120; box-shadow: 0 14px 30px -12px rgba(233,196,106,.8); }
.ps-btn--primary:hover { background: var(--ps-oro-dk); transform: translateY(-2px); }
.ps-btn--dark { background: var(--ps-verde); color: var(--ps-crema); }
.ps-btn--dark:hover { background: var(--ps-verde-soft); transform: translateY(-2px); }
.ps-btn--ghost { background: transparent; border-color: rgba(58,90,64,.3); color: var(--ps-verde); }
.ps-btn--ghost:hover { border-color: var(--ps-verde); background: rgba(58,90,64,.06); }

/* 4. COMPONENTES DE MARCA ================================================ */

/* Barra de anuncio superior */
.psh-announce { background: var(--ps-verde); color: #e7ecdf; font-size: .8125rem; letter-spacing: .03em; }
.psh-announce__row {
  max-width: var(--ps-container); margin-inline: auto; padding: 8px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.psh-announce__star { color: var(--ps-oro); }
.psh-announce__right { display: flex; align-items: center; gap: 18px; }
.psh-announce__phone { display: flex; align-items: center; gap: 6px; font-weight: 700; }
.psh-announce__hours { opacity: .65; }
@media (max-width: 700px) { .psh-announce__hours { display: none; } }

/* Skip link */
.psh-skip {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--ps-verde); color: #fff; padding: 12px 18px; border-radius: 0 0 8px 0;
}
.psh-skip:focus { left: 0; }

/* Badges de confianza */
.ps-badge { display: inline-flex; align-items: center; gap: .45rem; font-size: .8rem; font-weight: 700; color: var(--ps-tinta-soft); }
.ps-badge::before { content: "✓"; color: var(--ps-verde); font-weight: 800; }

/* Tarjeta genérica (producto, ocasión...) */
.ps-card {
  background: #fff; border: 1px solid var(--ps-borde); border-radius: var(--ps-radius);
  overflow: hidden; box-shadow: var(--ps-shadow-sm);
  transition: transform var(--ps-dur) var(--ps-ease-out), box-shadow var(--ps-dur) var(--ps-ease-out);
}
.ps-card:hover { transform: translateY(-6px); box-shadow: var(--ps-shadow); }
.ps-card__media { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: var(--ps-crema-2); }
.ps-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform var(--ps-dur-slow) var(--ps-ease-out); }
.ps-card:hover .ps-card__media img { transform: scale(1.06); }
.ps-card__body { padding: 1.1rem 1.2rem 1.3rem; }
.ps-card__price { font-weight: 700; color: var(--ps-verde); }

.ps-tag {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  background: rgba(255,255,255,.92); color: var(--ps-verde);
  font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  padding: 5px 10px; border-radius: var(--ps-radius-pill);
}

.ps-section { padding-block: clamp(3rem, 7vw, var(--ps-space-xl)); }
.ps-section--cream { background: var(--ps-crema); }
.ps-section--dark { background: var(--ps-verde); color: var(--ps-crema); }
.ps-section--dark h1, .ps-section--dark h2, .ps-section--dark h3 { color: var(--ps-crema); }
.ps-section--dark p { color: #d3d8c4; }

/* Botones flotantes (asistente + WhatsApp) */
.psh-float {
  position: fixed; right: 22px; z-index: 70;
  display: flex; align-items: center; gap: 9px;
  padding: 13px 18px 13px 15px; border-radius: var(--ps-radius-pill);
  font-weight: 800; font-size: 14px; transition: background var(--ps-dur-fast) var(--ps-ease);
}
.psh-float--assistant { bottom: 82px; background: var(--ps-verde); color: var(--ps-crema); box-shadow: 0 14px 30px -10px rgba(58,90,64,.7); }
.psh-float--assistant:hover { background: var(--ps-verde-soft); }
.psh-float--whatsapp {
  bottom: 22px; background: #25d366; color: #fff;
  box-shadow: 0 14px 30px -10px rgba(37,211,102,.7);
  animation: fps-pulse 2.8s infinite;
}
.psh-float--whatsapp:hover { background: #1fbe5a; }
@keyframes fps-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(37,211,102,.5); } 70% { box-shadow: 0 0 0 16px rgba(37,211,102,0); } }
@media (max-width: 600px) { .psh-float span[data-watext] { display: none; } }

/* 5. HEADER Y FOOTER ====================================================== */
.psh-header {
  position: sticky; top: 0; z-index: 90;
  background: rgba(244,239,228,.9);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--ps-borde);
  transition: box-shadow var(--ps-dur) var(--ps-ease);
}
.psh-header.is-scrolled { box-shadow: var(--ps-shadow-sm); }
.psh-header__row {
  max-width: var(--ps-container); margin-inline: auto; padding: 12px 24px;
  display: flex; align-items: center; gap: 28px; position: relative;
}
.psh-header__burger {
  display: none; flex-direction: column; gap: 4.5px; padding: 8px; margin-left: -8px;
}
.psh-header__burger span { width: 22px; height: 2px; background: var(--ps-verde); border-radius: 2px; }
.psh-header__burger span:last-child { width: 15px; }
.psh-header__brand { display: flex; align-items: center; gap: 12px; margin-right: auto; }
.psh-header__logo { height: 44px; width: auto; }
.psh-header__brandtext { display: flex; flex-direction: column; line-height: 1.02; }
.psh-header__name { font-size: 23px; font-weight: 700; letter-spacing: .01em; color: var(--ps-tinta); }
.psh-header__tag { font-size: 9px; letter-spacing: .24em; text-transform: uppercase; color: #a98a4b; font-weight: 800; }
.psh-header__nav { display: flex; align-items: center; gap: 24px; font-size: 16px; font-weight: 700; }
.psh-header__nav a { padding-block: 4px; }
.psh-header__nav a:hover { color: var(--ps-verde); }
.psh-header__actions { display: flex; align-items: center; gap: 6px; }
.psh-header__iconbtn {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; color: var(--ps-verde);
  transition: background var(--ps-dur-fast) var(--ps-ease);
}
.psh-header__iconbtn:hover { background: #e7ecdf; }
.psh-header__cart {
  position: relative; display: flex; align-items: center; gap: 8px;
  padding: 10px 17px 10px 14px; border-radius: var(--ps-radius-pill);
  background: var(--ps-verde); color: var(--ps-crema); font-size: 13.5px; font-weight: 800;
  transition: background var(--ps-dur-fast) var(--ps-ease);
}
.psh-header__cart:hover { background: var(--ps-verde-soft); }
.psh-header__cartbadge {
  min-width: 20px; height: 20px; padding: 0 5px; display: grid; place-items: center;
  border-radius: var(--ps-radius-pill); background: var(--ps-oro); color: #3a3120;
  font-size: 11.5px; font-weight: 900;
}

@media (max-width: 980px) {
  .psh-header__nav { display: none; }
  .psh-header__nav.is-open {
    display: flex; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0; background: var(--ps-crema);
    border-bottom: 1px solid var(--ps-borde); padding: 8px 24px 16px;
  }
  .psh-header__nav.is-open a { padding-block: 12px; border-bottom: 1px solid var(--ps-borde); }
  .psh-header__burger { display: flex; }
}
@media (max-width: 600px) {
  .psh-header__cart span[data-cartlbl] { display: none; }
}

/* Footer */
.psh-footer { background: var(--ps-verde); color: #cfc8b4; }
.psh-footer__grid {
  max-width: var(--ps-container); margin-inline: auto; padding: 60px 24px 28px;
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 42px;
}
.psh-footer__brand { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.psh-footer__logo { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.psh-footer__name { font-size: 23px; font-weight: 700; color: var(--ps-crema); }
.psh-footer__tag { font-size: 14px; line-height: 1.65; color: #9fa087; margin: 0 0 18px; max-width: 34ch; }
.psh-footer__social { display: flex; gap: 10px; }
.psh-footer__social a {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.16); font-weight: 900; color: #cfc8b4;
  transition: background var(--ps-dur-fast) var(--ps-ease);
}
.psh-footer__social a:hover { background: rgba(255,255,255,.08); }
.psh-footer__h3 { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--ps-oro); font-weight: 800; margin: 0 0 16px; }
.psh-footer__list, .psh-footer__contact { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 11px; font-size: 14px; }
.psh-footer__list a, .psh-footer__contact a { color: #bdb6a1; }
.psh-footer__list a:hover, .psh-footer__contact a:hover { color: var(--ps-oro); }
.psh-footer__contact li { display: flex; gap: 10px; color: #bdb6a1; }
.psh-footer__contact svg { flex-shrink: 0; margin-top: 3px; }
.psh-footer__bottom { border-top: 1px solid rgba(255,255,255,.1); }
.psh-footer__bottom-row {
  max-width: var(--ps-container); margin-inline: auto; padding: 20px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: 12.5px; color: #aba48e;
}
.psh-footer__bottom-links { display: flex; gap: 18px; flex-wrap: wrap; }
.psh-footer__bottom-links a { color: #aba48e; }
.psh-footer__bottom-links a:hover { color: var(--ps-oro); }

@media (max-width: 980px) { .psh-footer__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .psh-footer__grid { grid-template-columns: 1fr; } }

/* 6. CATÁLOGO (tienda / producto) ======================================== */
.ps-prodgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1.8rem; }
.ps-product-card__title { font-weight: 700; color: var(--ps-tinta); }
.ps-product-card__title:hover { color: var(--ps-verde); }
.ps-pdp { display: grid; grid-template-columns: 1.1fr 1fr; gap: 3rem; align-items: flex-start; }
.ps-pdp__media { border-radius: var(--ps-radius-lg); overflow: hidden; background: var(--ps-crema-2); aspect-ratio: 4/5; }
.ps-pdp__media img { width: 100%; height: 100%; object-fit: cover; }
.ps-pdp__price { font-size: 1.8rem; font-weight: 700; color: var(--ps-verde); }
@media (max-width: 900px) { .ps-pdp { grid-template-columns: 1fr; } }

/* 7. MOVIMIENTO =========================================================== */
@keyframes fps-fade { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: translateY(0); } }
/* Solo se oculta para revelar si el JS está activo (html.js). Sin JS, todo visible. */
.js [data-reveal] {
  opacity: 0; transform: translateY(22px);
  transition: opacity var(--ps-dur-slow) var(--ps-ease-out), transform var(--ps-dur-slow) var(--ps-ease-out);
  transition-delay: var(--d, 0s); will-change: opacity, transform;
}
.js [data-reveal="left"]  { transform: translateX(-28px); }
.js [data-reveal="right"] { transform: translateX(28px); }
.js [data-reveal="zoom"]  { transform: scale(.96); }
.js [data-reveal].is-visible { opacity: 1; transform: none; }

@keyframes ps-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.ps-marquee { overflow: hidden; border-block: 1px solid var(--ps-borde); background: #fbf8f0; padding-block: 18px; }
.ps-marquee__track { display: flex; width: max-content; animation: ps-marquee 32s linear infinite; }
.ps-marquee__item { font-size: 26px; font-style: italic; color: var(--ps-verde); padding-inline: 30px; white-space: nowrap; display: inline-flex; align-items: center; gap: 30px; }
.ps-marquee__item .ps-accent { color: var(--ps-oro); font-style: normal; }

/* 8. ACCESIBILIDAD ======================================================== */
:focus-visible { outline: 2.5px solid var(--ps-verde); outline-offset: 2px; border-radius: 4px; }

@media (prefers-reduced-motion: reduce) {
  *, [data-reveal], .ps-card, .ps-card__media img, .ps-marquee__track {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
}
