/*
Theme Name: Rubor
Theme URI: https://rubor.lapgsystems.shop
Author: LAPG Sistemas
Description: Tienda de maquillaje Rubor — tema a medida, réplica del diseño de muestra del portafolio de LAPG Sistemas.
Version: 1.0
Text Domain: rubor
*/


  :root {
    --cream:  #FFF4EE;
    --sand:   #F3E4DA;
    --blush:  #FBD4DC;
    --petal:  #FF6FA0;
    --petal-deep: #F0447E;
    --berry:  #6E2440;
    --berry-soft: #9A5069;
    --gold:   #E7A83C;
    --mint:   #A9E0CB;
    --ink:    #40202E;

    --grad-candy: linear-gradient(120deg, #FF8FB4 0%, #FF6FA0 40%, #F0447E 100%);
    --grad-soft:  linear-gradient(150deg, #FFE3EC 0%, #FFD9C7 100%);

    --font-display: "Fraunces", "Georgia", serif;
    --font-body: "DM Sans", "Segoe UI", system-ui, sans-serif;

    --r-sm: 12px; --r-md: 20px; --r-lg: 30px; --r-pill: 999px;
    --ease: cubic-bezier(.22, 1, .36, 1);
    --wrap: 1180px;
    --shadow-soft: 0 24px 60px -24px rgba(110, 36, 64, .35);
    --shadow-lift: 0 34px 70px -28px rgba(240, 68, 126, .4);
  }

  * { box-sizing: border-box; margin: 0; padding: 0; }

  html { scroll-behavior: smooth; }

  body {
    font-family: var(--font-body);
    color: var(--ink);
    background: var(--cream);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
  }

  h1, h2, h3, .display {
    font-family: var(--font-display);
    font-weight: 500;
    line-height: 1.05;
    letter-spacing: -0.015em;
    color: var(--berry);
    text-wrap: balance;
  }

  a { color: inherit; text-decoration: none; }
  button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
  img, svg { display: block; max-width: 100%; }
  ::selection { background: var(--petal); color: #fff; }

  .wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: clamp(18px, 4vw, 40px); }
  .eyebrow {
    font-size: 12px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase;
    color: var(--petal-deep);
  }

  /* ============ NAV ============ */
  .nav {
    position: sticky; top: 0; z-index: 60;
    background: rgba(255, 244, 238, .82);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(110, 36, 64, .1);
  }
  .nav__in {
    max-width: var(--wrap); margin: 0 auto;
    padding: 14px clamp(18px, 4vw, 40px);
    display: flex; align-items: center; gap: clamp(14px, 3vw, 34px);
  }
  .brand {
    font-family: var(--font-display);
    font-size: 26px; font-weight: 600; letter-spacing: -0.02em;
    color: var(--berry);
    display: flex; align-items: center; gap: 8px;
  }
  .brand::before {
    content: ""; width: 14px; height: 14px; border-radius: 50%;
    background: var(--grad-candy);
    box-shadow: 0 0 0 4px rgba(255, 111, 160, .22);
  }
  .nav__links { display: flex; gap: 4px; margin-left: 8px; }
  .nav__links button {
    padding: 8px 16px; border-radius: var(--r-pill);
    font-size: 14px; font-weight: 600; color: var(--berry-soft);
    transition: color .25s var(--ease), background .25s var(--ease);
  }
  .nav__links button:hover { color: var(--berry); background: rgba(255, 111, 160, .12); }
  .nav__links button[aria-current="true"] { color: #fff; background: var(--petal-deep); }
  .nav__spacer { flex: 1; }
  .cart-btn {
    position: relative;
    display: inline-flex; align-items: center; gap: 8px;
    padding: 9px 16px 9px 14px; border-radius: var(--r-pill);
    background: #fff; border: 1px solid rgba(110, 36, 64, .14);
    font-weight: 600; font-size: 14px; color: var(--berry);
    transition: transform .3s var(--ease), box-shadow .3s var(--ease);
  }
  .cart-btn:hover { box-shadow: var(--shadow-soft); }
  .cart-btn.bump { animation: bump .5s var(--ease); }
  @keyframes bump { 30% { transform: scale(1.14); } 60% { transform: scale(.96); } }
  .cart-btn svg { width: 18px; height: 18px; }
  .cart-count {
    min-width: 20px; height: 20px; padding: 0 5px; border-radius: var(--r-pill);
    background: var(--grad-candy); color: #fff;
    font-size: 12px; font-weight: 700; display: grid; place-items: center;
    font-variant-numeric: tabular-nums;
  }

  @media (max-width: 720px) {
    .brand { font-size: 22px; }
    .nav__links button { padding: 8px 11px; font-size: 13px; }
    .cart-btn span.lbl { display: none; }
  }

  /* ============ VIEWS ============ */
  .view { display: none; }
  .view.active { display: block; animation: viewIn .55s var(--ease); }
  @keyframes viewIn { from { opacity: 0; transform: translateY(14px); } }

  section { padding-block: clamp(48px, 8vw, 96px); }

  /* ============ HERO ============ */
  .hero { position: relative; overflow: hidden; padding-top: clamp(40px, 6vw, 72px); }
  .hero__orb {
    position: absolute; z-index: 0; width: 62vw; max-width: 720px; aspect-ratio: 1;
    right: -14vw; top: -18vw; border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #FFC7DA, #FF6FA0 55%, transparent 72%);
    filter: blur(6px); opacity: .55;
    animation: drift 20s var(--ease) infinite alternate;
  }
  @keyframes drift { to { transform: translate(-40px, 30px) scale(1.08); } }
  .hero__grid {
    position: relative; z-index: 1;
    display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(24px, 5vw, 56px);
    align-items: center;
  }
  .hero h1 { font-size: clamp(44px, 7.6vw, 92px); font-weight: 500; }
  .hero h1 em { font-style: italic; color: var(--petal-deep); }
  .hero__lead { font-size: clamp(16px, 1.6vw, 19px); max-width: 42ch; margin: 22px 0 30px; color: var(--berry-soft); }
  .hero__cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

  .btn {
    display: inline-flex; align-items: center; gap: 9px;
    padding: 15px 26px; border-radius: var(--r-pill);
    font-weight: 700; font-size: 15px;
    transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s var(--ease);
  }
  .btn--pink { background: var(--grad-candy); color: #fff; box-shadow: 0 18px 34px -14px rgba(240, 68, 126, .6); }
  .btn--pink:hover { transform: translateY(-2px) scale(1.02); box-shadow: 0 24px 44px -14px rgba(240, 68, 126, .7); }
  .btn--ghost { background: #fff; color: var(--berry); border: 1px solid rgba(110, 36, 64, .16); }
  .btn--ghost:hover { transform: translateY(-2px); box-shadow: var(--shadow-soft); }
  .btn:active { transform: scale(.96); }
  .btn svg { width: 16px; height: 16px; }

  .hero__note { margin-top: 22px; font-size: 13px; color: var(--berry-soft); display: flex; align-items: center; gap: 8px; }
  .hero__note .dots { display: flex; }
  .hero__note .dots i { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--cream); margin-left: -8px; }

  .hero__stage { position: relative; aspect-ratio: 4 / 5; }
  .hero__card {
    position: absolute; border-radius: var(--r-lg);
    box-shadow: var(--shadow-lift);
    display: grid; place-items: center;
    overflow: hidden;
  }
  .hero__card--a { inset: 0 22% 26% 0; background: var(--grad-soft); animation: floaty 7s var(--ease) infinite; }
  .hero__card--b { width: 46%; right: 0; top: 14%; background: linear-gradient(150deg, #E7C7F0, #C9A7E8); animation: floaty 8s var(--ease) infinite; animation-delay: -2s; }
  .hero__card--c { width: 40%; right: 8%; bottom: 0; background: linear-gradient(150deg, #FFE0B8, #F6C177); animation: floaty 9s var(--ease) infinite; animation-delay: -4s; }
  @keyframes floaty { 50% { transform: translateY(-16px) rotate(-1.5deg); } }
  .hero__card svg { width: 58%; filter: drop-shadow(0 10px 16px rgba(110, 36, 64, .25)); }
  .hero__sparkle { position: absolute; color: var(--gold); animation: twinkle 3s ease-in-out infinite; }
  .hero__sparkle svg { width: 100%; }
  .hero__sparkle--1 { width: 26px; left: -4%; top: 20%; }
  .hero__sparkle--2 { width: 18px; right: 26%; top: -3%; animation-delay: 1s; }
  .hero__sparkle--3 { width: 22px; right: -3%; bottom: 28%; animation-delay: 2s; }
  @keyframes twinkle { 0%, 100% { transform: scale(.7) rotate(0); opacity: .5; } 50% { transform: scale(1.1) rotate(20deg); opacity: 1; } }

  @media (max-width: 860px) {
    .hero__grid { grid-template-columns: 1fr; }
    .hero__stage { max-width: 420px; margin-inline: auto; }
  }

  /* ============ MARQUEE ============ */
  .marquee {
    background: var(--berry); color: var(--cream);
    padding-block: 16px; overflow: hidden;
    border-radius: var(--r-lg); margin-block: clamp(24px, 5vw, 48px);
  }
  .marquee__track { display: flex; gap: 44px; width: max-content; animation: scroll 26s linear infinite; }
  .marquee:hover .marquee__track { animation-play-state: paused; }
  .marquee__track span {
    font-family: var(--font-display); font-size: 20px; font-style: italic;
    display: inline-flex; align-items: center; gap: 44px; white-space: nowrap;
  }
  .marquee__track span::after { content: "â¦"; color: var(--petal); font-style: normal; }
  @keyframes scroll { to { transform: translateX(-50%); } }

  /* ============ SECTION HEAD ============ */
  .shead { text-align: center; max-width: 44ch; margin: 0 auto clamp(28px, 5vw, 44px); }
  .shead h2 { font-size: clamp(30px, 4.6vw, 50px); margin-top: 10px; }
  .shead p { margin-top: 12px; color: var(--berry-soft); }

  /* ============ PRODUCT GRID ============ */
  .grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(14px, 2vw, 22px);
  }
  .grid--edit { grid-template-columns: repeat(4, 1fr); }
  @media (max-width: 980px) { .grid { grid-template-columns: repeat(2, 1fr); } }
  @media (max-width: 520px) { .grid { grid-template-columns: 1fr; } }

  .card {
    position: relative; background: #fff; border-radius: var(--r-md);
    padding: 14px 14px 18px; text-align: left;
    border: 1px solid rgba(110, 36, 64, .08);
    transition: transform .4s var(--ease), box-shadow .4s var(--ease);
  }
  .card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lift); }
  .card__media {
    position: relative; border-radius: var(--r-sm); overflow: hidden;
    aspect-ratio: 1; display: grid; place-items: center; margin-bottom: 14px;
  }
  .card__media svg.prod { width: 52%; transition: transform .5s var(--ease); filter: drop-shadow(0 12px 16px rgba(110, 36, 64, .22)); }
  .card:hover .card__media svg.prod { transform: scale(1.09) rotate(-3deg); }
  .card__media::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, .55) 48%, transparent 62%);
    transform: translateX(-120%); transition: transform .7s var(--ease);
  }
  .card:hover .card__media::after { transform: translateX(120%); }
  .tag {
    position: absolute; top: 10px; left: 10px; z-index: 2;
    font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
    padding: 5px 10px; border-radius: var(--r-pill);
    background: var(--mint); color: var(--berry);
  }
  .tag--gold { background: var(--gold); color: #fff; }
  .card__type { font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--petal-deep); }
  .card__name { font-family: var(--font-display); font-size: 20px; margin: 3px 0 8px; }
  .card__row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }
  .price { font-family: var(--font-display); font-size: 18px; font-weight: 600; color: var(--berry); font-variant-numeric: tabular-nums; }
  .swatches { display: flex; }
  .swatches i { width: 15px; height: 15px; border-radius: 50%; margin-left: -5px; border: 2px solid #fff; }
  .add {
    width: 40px; height: 40px; border-radius: 50%;
    background: var(--grad-candy); color: #fff;
    display: grid; place-items: center;
    transition: transform .25s var(--ease), box-shadow .25s var(--ease);
    box-shadow: 0 12px 22px -10px rgba(240, 68, 126, .7);
  }
  .add:hover { transform: rotate(90deg) scale(1.08); }
  .add:active { transform: scale(.9); }
  .add svg { width: 18px; height: 18px; }
  .card__open { position: absolute; inset: 0; z-index: 1; border-radius: var(--r-md); }

  /* ============ FILTER CHIPS ============ */
  .chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: clamp(24px, 4vw, 38px); }
  .chip {
    padding: 9px 18px; border-radius: var(--r-pill);
    font-size: 13px; font-weight: 600; color: var(--berry-soft);
    background: #fff; border: 1px solid rgba(110, 36, 64, .14);
    transition: all .25s var(--ease);
  }
  .chip:hover { color: var(--berry); border-color: var(--petal); }
  .chip[aria-pressed="true"] { background: var(--berry); color: var(--cream); border-color: var(--berry); }

  /* ============ PRODUCT PAGE ============ */
  .pdp { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: start; }
  @media (max-width: 900px) { .pdp { grid-template-columns: 1fr; } }
  .pdp__media {
    position: relative; border-radius: var(--r-lg); overflow: hidden;
    aspect-ratio: 1; display: grid; place-items: center;
    box-shadow: var(--shadow-lift);
  }
  .pdp__media svg.prod { width: 46%; filter: drop-shadow(0 20px 26px rgba(110, 36, 64, .3)); animation: floaty 8s var(--ease) infinite; }
  .pdp__media::after {
    content: ""; position: absolute; inset: 0;
    background: radial-gradient(circle at 30% 25%, rgba(255, 255, 255, .5), transparent 45%);
    pointer-events: none;
  }
  .pdp__thumbs { display: flex; gap: 10px; margin-top: 14px; }
  .pdp__thumbs button {
    width: 62px; height: 62px; border-radius: 14px; display: grid; place-items: center;
    border: 2px solid transparent; transition: border-color .25s var(--ease);
  }
  .pdp__thumbs button[aria-current="true"] { border-color: var(--petal-deep); }
  .pdp__thumbs svg { width: 60%; }

  .pdp__info h1 { font-size: clamp(32px, 4.4vw, 52px); margin: 8px 0 12px; }
  .pdp__stars { color: var(--gold); letter-spacing: 3px; font-size: 15px; }
  .pdp__stars span { color: var(--berry-soft); font-size: 13px; letter-spacing: 0; margin-left: 8px; }
  .pdp__price { font-family: var(--font-display); font-size: 30px; font-weight: 600; color: var(--berry); margin: 18px 0; }
  .pdp__desc { color: var(--berry-soft); max-width: 46ch; }

  .field-label { font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--berry); margin: 24px 0 10px; }
  .shades { display: flex; flex-wrap: wrap; gap: 12px; }
  .shade {
    width: 38px; height: 38px; border-radius: 50%;
    border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(110, 36, 64, .18);
    transition: transform .25s var(--ease), box-shadow .25s var(--ease);
  }
  .shade:hover { transform: scale(1.1); }
  .shade[aria-pressed="true"] { transform: scale(1.16); box-shadow: 0 0 0 2px var(--cream), 0 0 0 4px var(--berry); }
  .shade-name { margin-top: 10px; font-size: 13px; color: var(--berry-soft); }
  .shade-name b { color: var(--berry); font-family: var(--font-display); font-size: 15px; }

  .buyrow { display: flex; gap: 12px; margin-top: 26px; align-items: stretch; flex-wrap: wrap; }
  .qty {
    display: inline-flex; align-items: center; gap: 4px;
    background: #fff; border: 1px solid rgba(110, 36, 64, .16); border-radius: var(--r-pill);
    padding: 4px;
  }
  .qty button { width: 36px; height: 36px; border-radius: 50%; font-size: 18px; color: var(--berry); transition: background .2s; }
  .qty button:hover { background: rgba(255, 111, 160, .16); }
  .qty span { min-width: 28px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
  .buyrow .btn--pink { flex: 1; justify-content: center; }

  .accordion { margin-top: 30px; border-top: 1px solid rgba(110, 36, 64, .14); }
  .accordion details { border-bottom: 1px solid rgba(110, 36, 64, .14); }
  .accordion summary {
    list-style: none; cursor: pointer; padding: 16px 0;
    display: flex; justify-content: space-between; align-items: center;
    font-family: var(--font-display); font-size: 17px; color: var(--berry);
  }
  .accordion summary::-webkit-details-marker { display: none; }
  .accordion summary .ic { transition: transform .3s var(--ease); font-size: 20px; color: var(--petal-deep); }
  .accordion details[open] summary .ic { transform: rotate(45deg); }
  .accordion .body { padding: 0 0 18px; color: var(--berry-soft); font-size: 14px; }

  /* ============ TESTIMONIAL ============ */
  .quote { text-align: center; }
  .quote blockquote {
    font-family: var(--font-display); font-style: italic;
    font-size: clamp(22px, 3.4vw, 38px); color: var(--berry);
    max-width: 20ch; margin: 14px auto 18px; line-height: 1.2;
  }
  .quote cite { font-style: normal; font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--petal-deep); }

  /* ============ NEWSLETTER ============ */
  .news {
    background: var(--grad-candy); color: #fff; border-radius: var(--r-lg);
    padding: clamp(32px, 6vw, 64px); text-align: center;
  }
  .news h2 { color: #fff; font-size: clamp(26px, 4vw, 44px); }
  .news p { opacity: .92; margin: 10px 0 24px; }
  .news form { display: flex; gap: 10px; max-width: 420px; margin: 0 auto; flex-wrap: wrap; }
  .news input {
    flex: 1; min-width: 200px; padding: 15px 20px; border-radius: var(--r-pill);
    border: 0; font: inherit; color: var(--berry);
  }
  .news input:focus-visible { outline: 3px solid var(--gold); }
  .news button {
    padding: 15px 26px; border-radius: var(--r-pill); background: var(--berry); color: #fff;
    font-weight: 700; transition: transform .2s var(--ease);
  }
  .news button:hover { transform: scale(1.04); }
  .news .ok { margin-top: 14px; font-weight: 600; min-height: 22px; }

  /* ============ FOOTER ============ */
  .foot { background: var(--berry); color: var(--blush); padding-block: clamp(36px, 6vw, 56px); }
  .foot__in { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; }
  .foot .brand { color: var(--cream); }
  .foot small { opacity: .7; font-size: 12px; }
  .foot__demo {
    width: 100%; text-align: center; margin-top: 22px; padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, .16);
    font-size: 12px; opacity: .75;
  }

  /* ============ FLYER + SPARKLES ============ */
  .flyer { position: fixed; z-index: 90; width: 18px; height: 18px; border-radius: 50%; background: var(--grad-candy); pointer-events: none; }
  .spark { position: fixed; z-index: 90; font-size: 14px; pointer-events: none; }

  .toast {
    position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px);
    background: var(--berry); color: var(--cream);
    padding: 12px 22px; border-radius: var(--r-pill);
    font-weight: 600; font-size: 14px;
    opacity: 0; transition: opacity .3s, transform .3s; z-index: 80;
  }
  .toast.show { opacity: 1; transform: translate(-50%, 0); }

  /* ============ SCROLL REVEAL ============ */
  [data-io] { opacity: 0; transform: translateY(28px); }
  [data-io].in { opacity: 1; transform: none; transition: opacity .7s var(--ease), transform .7s var(--ease); }
  .stagger > * { opacity: 0; transform: translateY(20px); }
  .stagger.in > * { opacity: 1; transform: none; transition: opacity .6s var(--ease), transform .6s var(--ease); }
  .stagger.in > *:nth-child(2) { transition-delay: .06s; }
  .stagger.in > *:nth-child(3) { transition-delay: .12s; }
  .stagger.in > *:nth-child(4) { transition-delay: .18s; }
  .stagger.in > *:nth-child(5) { transition-delay: .24s; }
  .stagger.in > *:nth-child(6) { transition-delay: .3s; }
  .stagger.in > *:nth-child(7) { transition-delay: .36s; }
  .stagger.in > *:nth-child(8) { transition-delay: .42s; }

  .load-rise { animation: riseIn .8s var(--ease) backwards; }
  .load-rise[style*="--d"] { animation-delay: calc(var(--d) * 1s); }
  @keyframes riseIn { from { opacity: 0; transform: translateY(26px); } }

  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .001s !important; scroll-behavior: auto; }
    [data-io], .stagger > * { opacity: 1 !important; transform: none !important; }
  }
