:root {
  --shop-pink: #fae9ec;
  --shop-button: #fae7ed;
  --shop-button-hover: #f3d4df;
  --shop-button-border: #d8a8b9;
  --shop-ivory: #fffcf5;
}

.shop-scenery {
  --cloud-drift: clamp(18px, 2.4vw, 32px);
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background: linear-gradient(#2e92dc, #83c6f5 72%, #add9f7);
}
.shop-theme { isolation: isolate; min-height: 100vh; }
.shop-scenery::before {
  content: '';
  position: absolute;
  inset: 0 calc(0px - var(--cloud-drift));
  margin: auto;
  max-width: 2160px;
  max-height: 1440px;
  background: url('assets/cielo_nubes.webp') center / cover no-repeat;
  animation: shop-clouds 10s ease-in-out -5s infinite alternate;
}
@keyframes shop-clouds {
  from { transform: translateX(calc(0px - var(--cloud-drift))); }
  to { transform: translateX(var(--cloud-drift)); }
}
@media (max-aspect-ratio: 1/1) {
  .shop-scenery::before { background-position-x: 18%; }
}
/* En ventanas grandes, el cielo se funde con el fondo al llegar al tamaño original. */
@media (min-width: 2097px) {
  .shop-scenery::before { mask-image: linear-gradient(to right, transparent, #000 10% 90%, transparent); }
}
@media (min-height: 1441px) {
  .shop-scenery::before {
    mask-image: linear-gradient(to right, transparent, #000 10% 90%, transparent),
      linear-gradient(transparent, #000 10% 90%, transparent);
    mask-composite: intersect;
  }
}
@media (prefers-reduced-motion: reduce) {
  .shop-scenery::before { animation: none; }
}

.shop-header {
  width: 100%;
  margin-top: 6px;
  border-radius: 999px;
  background: #fffcf5f2;
  box-shadow: inset 0 0 0 1px #273d5316, 0 5px 18px #273d5314;
}
.shop-header-inner { display: grid; grid-template-columns: minmax(0, 1fr) 60px 48px; align-items: center; gap: 18px; min-height: 68px; }
.shop-emblem { display: grid; place-items: center; justify-self: center; border-radius: 12px; }
.shop-emblem img { display: block; width: 60px; height: 60px; object-fit: contain; }
.shop-header nav { display: flex; justify-content: center; align-items: center; gap: clamp(12px, 3vw, 42px); flex-wrap: wrap; }
.shop-header nav a { font-size: 14px; font-weight: 600; }
.shop-header nav a:is(:hover, [aria-current]) { text-decoration: underline; text-underline-offset: 6px; }
.shop-menu-toggle { display: none; }
.shop-theme :is(button, .button) { background: var(--shop-button); color: var(--ink); border-color: var(--shop-button-border); }
.shop-theme :is(button, .button):hover { background: var(--shop-button-hover); }
.shop-theme .field input[type=file]::file-selector-button { background: var(--shop-button); color: var(--ink); border-color: var(--shop-button-border); }
.shop-theme .field input[type=file]::file-selector-button:hover { background: var(--shop-button-hover); }
.shop-cart, .icon-button { display: grid; place-items: center; border: 1px solid var(--shop-button-border); width: 44px; height: 44px; border-radius: 50%; cursor: pointer; padding: 0; }
.shop-cart { justify-self: end; }
.icon-button { font-size: 22px; line-height: 1; }
.cart-dialog { width: min(calc(100% - 32px), 400px); border: 1px solid var(--line); border-radius: 22px; background: var(--shop-ivory); padding: 30px; color: var(--ink); }
.cart-dialog::backdrop { background: #273d5360; }
.cart-dialog .icon-button { float: right; }
.cart-dialog h2 { margin-top: 8px; margin-bottom: 12px; }
.cart-dialog p { margin-bottom: 22px; }

.shop-masthead {
  display: grid;
  place-items: center;
  min-height: clamp(100px, 13vw, 179px);
}
.shop-masthead h1 { margin: 0; width: min(660px, calc(100% - 48px)); }
.shop-masthead img {
  display: block;
  width: 100%;
  height: clamp(92px, 12vw, 156px);
  object-fit: cover;
  filter: drop-shadow(0 3px 4px #294b6740);
}
.home-showcase {
  padding-bottom: clamp(28px, 5vw, 70px);
}
.showcase-inner { max-width: 970px; }
.showcase-slide {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  min-height: 310px;
  padding: clamp(20px, 3vw, 38px) clamp(20px, 4vw, 52px);
  border: 1px solid #fffaf0af;
  border-radius: 28px;
  background: radial-gradient(ellipse at 75% 47%, #fae9ec 0%, #fae9ec80 30%, transparent 60%), #fffdf2e9;
  box-shadow: 0 16px 42px #253d5024;
}
.showcase-copy h2 { font-size: clamp(39px, 5.8vw, 70px); line-height: 1.03; margin: 0 0 22px; }
.showcase-photo {
  display: block;
  justify-self: center;
  width: min(100%, var(--showcase-photo-size, clamp(230px, 24vw, 330px)));
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: clamp(12px, 1.8vw, 22px);
}
.showcase-controls { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 14px; }
.showcase-dots { display: flex; padding: 0 6px; border-radius: 30px; background: var(--shop-button); }
.showcase-dots button { width: 28px; min-height: 44px; display: grid; place-items: center; border: 0; border-radius: 50%; cursor: pointer; }
.showcase-dots button::after { content: ''; width: 8px; height: 8px; border: 1px solid #315575; border-radius: 100%; }
.showcase-dots button[aria-current="true"]::after { background: #315575; }

.shop-theme main.wrap, .home-catalog, .home-guide > .wrap, .shop-theme footer {
  background: #fffcf5ef;
  border: 1px solid #fffaf0c9;
  border-radius: 24px;
  padding-inline: clamp(13px, 3.2vw, 48px);
}
.shop-theme main.wrap, .home-catalog, .home-guide, .shop-theme footer {
  margin-block: clamp(14px, 2.6vw, 36px);
}
.home-guide > .wrap { padding-block: clamp(24px, 4.5vw, 58px); background: #fae9ecee; }
.guide-media { width: min(100%, 900px); margin-inline: auto; }
.guide-media video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border-radius: clamp(12px, 1.8vw, 22px);
  background: #151a22;
}
.home-catalog { padding-block: clamp(42px, 6vw, 84px); }
.home-catalog .catalog-toolbar { margin-top: 15px; }
.info-note,
.form-welcome,
.order-window,
.reference-preview img { background: var(--shop-pink); }
.product-image,
.detail-photo { height: auto; padding: 0; background: transparent; border-radius: clamp(12px, 1.8vw, 22px); }
.product-image { display: block; overflow: hidden; }
.detail-photo { overflow: hidden; }
.shop-theme .photo-placeholder { aspect-ratio: 1; background: var(--shop-pink); }
.product-image img,
.detail-photo img {
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: clamp(12px, 1.8vw, 22px);
}
.product-image:hover img { transform: none; }
.product-photo-gallery .photo-outgoing {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.product-photo-gallery { position: relative; isolation: isolate; }
.product-photo-gallery .photo-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  box-shadow: 0 2px 8px #273d5333;
  z-index: 1;
  touch-action: manipulation;
}
.product-photo-gallery .photo-prev { left: 10px; }
.product-photo-gallery .photo-next { right: 10px; }
.accessory-color { margin: 5px 0 10px 27px; }
.accessory-mirror {
  margin: 12px 0;
  padding: 8px 12px;
  background: var(--shop-pink);
  border-radius: 8px;
}
.reference-preview :is(.photo-view, .photo-remove) {
  justify-content: center;
  width: 100%;
  min-height: 44px;
  padding: 7px 9px;
  border-radius: 999px;
  font-size: 12px;
}
.reference-preview .photo-view { margin: 5px 0; }
.reference-dialog { width: min(calc(100% - 32px), 720px); padding: clamp(12px, 4vw, 24px); }
.reference-dialog header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; margin-bottom: 16px; }
.reference-dialog h2 { font-size: clamp(18px, 4vw, 24px); margin: 0; }
.reference-dialog img { display: block; max-width: 100%; max-height: 66vh; margin: auto; object-fit: contain; border-radius: 8px; }
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .product-image img { transition: scale 380ms ease-out; }
  .product-image:hover img { scale: 1.065; }
}
.product { display: flex; flex-direction: column; }
.product .pack-link {
  align-self: flex-start;
  justify-content: center;
  gap: 12px;
  min-height: 44px;
  margin-top: auto;
  padding: 9px 17px;
  border-radius: 999px;
  font-size: 13px;
}
.pack-link::after {
  content: '';
  width: 6px;
  height: 6px;
  border: solid currentColor;
  border-width: 1.5px 1.5px 0 0;
  transform: rotate(45deg);
}
.shop-info { padding-block: clamp(28px, 5vw, 70px); }
.shop-info h1 { font-size: clamp(32px, 5vw, 60px); margin-bottom: 0; }
.shop-policies dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin: 28px 0 0; }
.shop-policies dl > div { background: #fbfdf7; border: 1px solid #273d5316; border-radius: 16px; padding: 20px; }
.shop-policies dt { font-weight: 700; margin-bottom: 4px; }
.shop-policies dd { margin: 0; font-size: 14px; }
.shop-policies dd p { margin: 0 0 10px; }
.shop-policies dd p:last-child { margin-bottom: 0; }
.shop-policies a { text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
.home-faq {
  max-width: 920px;
  margin-block: clamp(26px, 5vw, 64px);
  padding: clamp(20px, 4vw, 46px);
  border: 1px solid #fffaf0c9;
  border-radius: 24px;
  background: #fffcf5f5;
}
.home-faq h2 { margin-bottom: clamp(14px, 3vw, 26px); }
.home-faq details { border-top: 1px solid var(--line); padding-block: 4px; }
.home-faq details:last-child { border-bottom: 1px solid var(--line); }
.home-faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 52px;
  padding: 10px 12px;
  border-radius: 9px;
  background: var(--shop-button);
  cursor: pointer;
  font-weight: 700;
  list-style: none;
}
.home-faq summary::-webkit-details-marker { display: none; }
.home-faq summary:hover { background: var(--shop-button-hover); }
.home-faq summary:focus-visible { outline: 2px solid var(--strong); outline-offset: -2px; }
.home-faq summary::after { content: '+'; color: var(--strong); font-size: 22px; line-height: 1; }
.home-faq details[open] summary::after { content: '−'; }
.home-faq details p { margin: 10px 12px 14px; }
.home-faq a { text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
.shop-theme footer { flex-wrap: wrap; padding-block: 15px; }

@media (min-width: 901px) {
  .shop-header { width: min(1180px, calc(100% - 7vw)); margin-inline: auto; }
  .shop-header-inner { width: calc(100% - 64px); grid-template-columns: 60px minmax(0, 1fr) 48px; }
  .shop-emblem { grid-area: 1 / 1; justify-self: start; }
  .shop-header nav { grid-area: 1 / 2; }
  .shop-cart { grid-area: 1 / 3; }
  .shop-masthead { min-height: clamp(108px, 17vh, 154px); }
  .shop-masthead h1 { width: min(590px, 51vw); }
  .shop-masthead img { height: clamp(105px, 16vh, 148px); }
  .home-showcase { padding-top: clamp(10px, 2vh, 22px); }
  .showcase-inner { max-width: 930px; }
  .showcase-slide { min-height: 0; padding-block: clamp(18px, 3vh, 34px); }
  .showcase-photo { --showcase-photo-size: clamp(178px, 38vh, 330px); }
}

@media (max-width: 900px) {
  .shop-header-inner { grid-template-columns: minmax(0, 1fr) minmax(0, 112px) minmax(0, 1fr); padding-block: 8px; gap: 10px; }
  .shop-emblem { grid-area: 1 / 2; }
  .shop-emblem img { width: 54px; height: 54px; }
  .shop-header .shop-cart { grid-area: 1 / 3; }
  .shop-header nav { grid-row: 2; grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 9px; }
  .shop-header { position: relative; z-index: 2; }
  .shop-header-inner.mobile-menu-ready {
    position: relative;
    min-height: 62px;
  }
  .mobile-menu-ready .shop-menu-toggle {
    grid-area: 1 / 1;
    justify-self: start;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 44px;
    padding: 0 9px;
    border: 1px solid var(--shop-button-border);
    border-radius: 999px;
    background: var(--shop-button);
    color: var(--ink);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
  }
  .mobile-menu-ready .shop-menu-toggle:is(:hover, [aria-expanded="true"]) { background: var(--shop-button-hover); }
  .mobile-menu-ready .shop-menu-toggle[aria-expanded="false"] + nav { display: none; }
  .mobile-menu-ready nav {
    position: absolute;
    grid-area: auto;
    inset: calc(100% + 6px) 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    padding: 8px;
    border: 1px solid #31557535;
    border-radius: 16px;
    box-shadow: 0 12px 28px #273d5326;
    background: var(--shop-ivory);
  }
  .mobile-menu-ready nav a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 8px 12px;
    border-radius: 9px;
    font-size: 14px;
  }
  .mobile-menu-ready nav a:is(:hover, [aria-current]) { background: var(--shop-pink); text-decoration: none; }
  .mobile-menu-ready nav a:focus-visible { outline-offset: -3px; }
}
@media (max-width: 640px) {
  .shop-header-inner { width: calc(100% - 24px); }
  .shop-header nav { gap: 5px 14px; }
  .shop-header nav a { font-size: 12px; padding-block: 4px; }
  .shop-masthead h1 { width: calc(100% - 24px); }
  .shop-masthead img { object-fit: contain; }
  .showcase-slide { grid-template-columns: minmax(0, 1fr); gap: 8px; text-align: center; border-radius: 20px; }
  .showcase-photo { grid-row: 1; --showcase-photo-size: clamp(175px, 56vw, 290px); }
  .showcase-copy h2 { font-size: clamp(30px, 9vw, 45px); margin-bottom: 16px; }
  .showcase-copy .button { padding: 10px 18px; }
  .shop-policies dl { grid-template-columns: minmax(0, 1fr); }
}
