.product-modal[hidden] { display: none; }

/* La ficha funciona como una pequeña galería: la foto manda y los datos se leen
   como una única columna, sin usar el rosa como superficie estructural. */
.product-modal { position: fixed; z-index: 90; inset: 0; display: grid; place-items: center; padding: clamp(.75rem, 2vw, 2rem); }
.product-modal-backdrop { position: absolute; inset: 0; background: rgba(21, 18, 21, .78); backdrop-filter: blur(8px); }
.product-modal-sheet { position: relative; display: grid; grid-template-columns: minmax(340px, .92fr) minmax(440px, 1.08fr); width: min(100%, 1120px); height: min(720px, calc(100svh - 4rem)); max-height: calc(100svh - 4rem); overflow: hidden; border-radius: 18px; background: #fff; box-shadow: 0 32px 100px rgba(0, 0, 0, .42); animation: productModalIn .32s cubic-bezier(.2,.8,.2,1) both; }
.product-modal-close { position: absolute; z-index: 3; top: 1rem; right: 1rem; display: grid; width: 2.5rem; height: 2.5rem; place-items: center; border: 1px solid rgba(21, 18, 21, .1); border-radius: 50%; background: rgba(255,255,255,.94); color: var(--ink); cursor: pointer; font-size: 1.45rem; line-height: 1; transition: background .2s ease, color .2s ease, transform .2s ease; }
.product-modal-close:hover { background: var(--ink); color: #fff; transform: rotate(90deg); }
.product-modal-close:focus-visible { outline: 3px solid var(--pink); outline-offset: 3px; }
.product-modal-image { display: grid; min-height: 0; place-items: center; overflow: hidden; padding: clamp(1rem, 2.5vw, 2rem); background: #f7f3f0; color: var(--muted); }
.product-modal-image img { width: 100%; height: 100%; border-radius: 10px; object-fit: contain; filter: saturate(.98); box-shadow: 0 12px 34px rgba(40, 26, 29, .1); animation: productImageIn .45s .08s both; }
.product-modal-image i { font-size: 1.5rem; }
.product-modal-image i[hidden] { display: none; }
.product-modal-info { display: flex; overflow: auto; flex-direction: column; padding: clamp(1.5rem, 4.2vh, 3.35rem) clamp(1.5rem, 4vw, 4rem) clamp(1.35rem, 3vh, 2.25rem); scrollbar-width: thin; }
.product-modal-info h2 { max-width: 13ch; margin: 0; font: 600 clamp(2.25rem, 3.6vw, 3.55rem)/.94 var(--serif); letter-spacing: -.06em; }
.product-modal-info > .eyebrow { margin-bottom: .75rem; color: #bd4e85; font-size: .61rem; }
.product-modal-info > p:not(.eyebrow) { max-width: 48ch; margin: .85rem 0 1.6rem; color: var(--muted); font-size: .88rem; line-height: 1.55; }
.product-modal-options { display: grid; gap: .85rem; }
.product-modal-options fieldset { margin: 0; border: 0; border-top: 1px solid #eee9e8; padding: .95rem 0 0; }
.product-modal-options legend, .product-modal-add label { color: #6d6267; font-size: .64rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.product-modal-choices { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .6rem; }
.product-modal-choice { min-height: 2.35rem; border: 1px solid #ded7d6; border-radius: 99px; background: #fff; padding: .4rem .8rem; color: var(--ink); cursor: pointer; font: 600 .73rem var(--sans); transition: border-color .18s ease, background .18s ease, color .18s ease, transform .18s ease; }
.product-modal-choice:hover, .product-modal-choice:focus-visible { border-color: var(--ink); transform:translateY(-1px); }
.product-modal-choice.is-selected { border-color: var(--ink); background: var(--ink); color: #fff; }
.product-modal-choice:disabled { cursor: not-allowed; opacity: .35; text-decoration: line-through; }
.product-modal-choice.is-color { position: relative; width: 2.45rem; min-height: 2.45rem; border: 0; border-radius: 50%; padding: 0; background: var(--swatch-color); box-shadow: inset 0 0 0 1px rgba(21,18,21,.18); }
.product-modal-choice.is-color::after { position: absolute; inset: .32rem; border: 1px solid rgba(255, 255, 255, .9); border-radius: inherit; content: ''; }
.product-modal-choice.is-color.is-selected { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--ink); }
.product-modal-choice.is-color:focus-visible { outline: 3px solid var(--pink); outline-offset: 3px; }
.product-modal-info [data-product-modal-price] { display: block; min-width: 0; max-width: 100%; margin: 1.4rem 0 1.1rem; color: var(--ink); font-family: var(--sans); font-size: clamp(2.25rem, 3.2vw, 2.5rem); font-weight: 700; font-variant-numeric: lining-nums tabular-nums; line-height: 1.15; letter-spacing: -.025em; white-space: normal; overflow-wrap: anywhere; }
.product-modal-add { display: grid; grid-template-columns: 5.3rem minmax(0,1fr); align-items: end; gap: .75rem; padding-top: .9rem; border-top: 1px solid #eee9e8; }
.product-modal-add label { display: grid; gap: .45rem; }
.product-modal-add input { width: 100%; min-height: 3.15rem; border: 1px solid #ded7d6; border-radius: 10px; padding: .45rem .65rem; background: #fff; color: var(--ink); font: 600 .85rem var(--sans); }
.product-modal-add input:focus { outline: 2px solid var(--pink); outline-offset: 2px; }
.product-modal-add .cta-button { min-height: 3.15rem; border-radius: 10px; padding: .7rem 1rem; font-size: .76rem; }
.product-modal-add .cta-button:disabled { cursor: not-allowed; opacity: .45; transform: none; }
.product-modal-open { overflow: hidden; }

@keyframes productModalIn { from { opacity: 0; transform: translateY(16px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes productImageIn { from { opacity: 0; transform: scale(.975); } to { opacity: 1; transform: none; } }

@media (max-width: 800px) {
  .product-modal { padding: 0; }
  .product-modal-sheet { grid-template-columns: 1fr; width: 100%; height: 100svh; max-height: 100svh; border-radius: 0; overflow: auto; }
  .product-modal-image { height: min(34svh, 280px); padding: .85rem; }
  .product-modal-info { overflow: visible; padding: 1.5rem 1.25rem 1.4rem; }
  .product-modal-info h2 { font-size: clamp(2.2rem, 10vw, 3rem); }
  .product-modal-info > p:not(.eyebrow) { margin-bottom: 1.35rem; }
  .product-modal-info [data-product-modal-price] { margin: 1.3rem 0 .95rem; font-size: clamp(1.875rem, 4.5vw, 2rem); line-height: 1.2; }
  .product-modal-add { margin-top: .35rem; padding-top: 1rem; }

  .site-header nav .nav-link-button {
    padding: .8rem 0;
    text-align: left;
  }

  .nav-link-button::after {
    display: none;
  }

  .category-list .category-modal-trigger {
    min-height: 230px;
    border-right: 0;
    border-bottom: 1px solid var(--ink);
  }

  .category-list .category-modal-trigger:last-child {
    border-bottom: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .product-modal-sheet, .product-modal-image img { animation: none; }
  .product-modal-close, .product-modal-choice { transition: none; }
}
