/* Responsive product gallery and wishlist controls. */
#product-6434 .esp-product-gallery .woocommerce-product-gallery__image a > img.wp-post-image {
  max-width: min(84.5%, 500px);
  margin-inline: auto;
}
.esp-pack-gallery { width: 100%; min-width: 0; }
.esp-pack-gallery__stage { position: relative; aspect-ratio: var(--esp-gallery-ratio, 1); overflow: hidden; border-radius: 16px; background: #f3ebde; touch-action:pan-y pinch-zoom; }
.esp-pack-gallery__photo { position: absolute; inset: 0; display: block; }
.esp-pack-gallery__photo[hidden],
.esp-pack-gallery__thumb[hidden],
.esp-device-wishlist[hidden],
.esp-product-summary .product_meta [hidden] { display: none !important; }
.esp-pack-gallery__photo img { display: block; width: 100%; height: 100%; object-fit: contain; }
.esp-pack-gallery__unavailable:not([hidden]) {
  position:absolute; inset:0; display:grid; align-content:center; justify-items:center; gap:8px;
  padding:24px 54px; color:#675747; text-align:center;
}
.esp-pack-gallery__unavailable::before {
  content:''; width:48px; height:48px; margin-bottom:6px; border:1px solid #897864;
  border-radius:50%; background:var(--esp-swatch-body);
}
.esp-pack-gallery__unavailable strong { color:#30251c; font-weight:500; }
#main .esp-pack-gallery .esp-pack-gallery__photo > img,
#main .esp-pack-gallery .esp-pack-gallery__thumb > img {
  position: absolute; inset: 0; width: 100%; height: 100%; max-height: none;
  margin: 0; object-fit: contain; object-position: center;
}
#main .esp-pack-gallery .esp-pack-gallery__thumb--scene > img { object-fit: cover; }
/* Keep a full studio box in view. Match the background at its edge and taper to the gallery cream. */
.esp-pack-gallery [data-photo-role="box"][href*="/Empress-Sheba-El-Septimo-Cigars-Box-28"] {
  background: linear-gradient(to bottom, #f3ebde, #fbeddf 14%, #fbeddf 86%, #f3ebde);
}
.esp-pack-gallery [data-photo-role="box"][href*="/andrew-catalog/bomba-orange-"] {
  --esp-box-top: #f1e4db;
  --esp-box-bottom: #f4e8e1;
}
.esp-pack-gallery [data-photo-role="box"][href*="/andrew-catalog/mi-familia-01-"] {
  --esp-box-top: #f3e2d8;
  --esp-box-bottom: #f7e7df;
}
.esp-pack-gallery [data-photo-role="box"][href*="/andrew-catalog/mi-familia-02-"] {
  --esp-box-top: #faebe2;
  --esp-box-bottom: #fbeee5;
}
.esp-pack-gallery [data-photo-role="box"]:is([href*="/andrew-catalog/bomba-orange-"], [href*="/andrew-catalog/mi-familia-"]) {
  background-image: linear-gradient(to right, #f3ebde, transparent 9%, transparent 91%, #f3ebde),
                    linear-gradient(to bottom, var(--esp-box-top), var(--esp-box-bottom));
}
.esp-pack-gallery__pack-note:not([hidden]) {
  position:absolute; inset:auto auto 12px 12px; padding:5px 10px;
  border-radius:6px; background:rgba(251,248,243,.95); color:#504234;
  font-size:12px; line-height:1.4; pointer-events:none;
}
.esp-pack-gallery__load-status:not([hidden]) { position:absolute; left:50%; bottom:12px; transform:translateX(-50%); padding:6px 10px; border-radius:6px; background:#fbf8f3; color:#4f4134; font-size:13px; white-space:nowrap; }
.esp-pack-gallery__arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; min-width:44px; min-height:44px; margin:0; padding: 0; border: 0; border-radius: 50%; background: #fbf8f3; color: #8c6a2c; font-size: 0; line-height:0; cursor: pointer; }
.esp-pack-gallery__arrow::before { content: ""; position:absolute; inset:0; width:18px; height:18px; margin:auto; background: url('../images/figma-commerce-v2/gallery-next-v50.svg') center/contain no-repeat; }
.esp-pack-gallery__arrow[data-step="-1"] { left: 24px; }
.esp-pack-gallery__arrow[data-step="-1"]::before { transform: rotate(180deg); }
.esp-pack-gallery__arrow[data-step="1"] { right: 24px; }
.esp-pack-gallery__arrow:disabled { opacity: .5; cursor: default; }
.esp-pack-gallery__thumbs { display: flex; align-items: center; gap: 14px; margin-top: 14px; overflow-x: auto; padding: 1px; }
.esp-pack-gallery__thumb { position: relative; flex: 0 0 auto; height: 90px; width:auto; min-width:0; aspect-ratio:1; border-radius: 12px; background: #f3ebde; overflow: hidden; }
.esp-pack-gallery__thumb img { display: block; }
.esp-pack-gallery__thumb[aria-current="true"]::after { content: ""; position: absolute; inset: 0; border: 1px solid #9b742e; border-radius: inherit; pointer-events: none; }
.esp-pack-gallery__thumb:focus-visible { outline: 2px solid #513a1a; outline-offset: -2px; }
.esp-product-photo-dialog { padding: 0; border: 0; border-radius: 14px; background: #f3ebdd; overflow: hidden; }
.esp-product-photo-dialog::backdrop { background: rgba(26, 20, 15, .78); }
.esp-product-photo-dialog img { display: block; max-width: calc(90vw / var(--esp-desktop-scale, 1)); max-height: calc(90vh / var(--esp-desktop-scale, 1)); object-fit: contain; }
.esp-product-photo-dialog button { position: absolute; top: 12px; right: 12px; border: 0; border-radius: 50%; background: white; color: #241d17; cursor: pointer; font-size: 22px; width: 42px; height: 42px; }
.esp-device-heart { display: inline-grid; place-items: center; border: 0; cursor: pointer; }
@media (max-width: 767.98px) {
  body.esp-redesign.esp-figma-product #main .esp-specs__row.esp-specs__row--pack {
    grid-template-columns: fit-content(40%) minmax(0, 1fr);
  }
  body.esp-redesign.esp-figma-product #main .esp-specs__row--pack dt { min-width: 0; overflow-wrap: anywhere; }
}
.esp-device-heart .esp-action__icon, .esp-device-heart svg { width: 18px; height: 18px; display: block; }
.esp-device-heart[aria-pressed="true"] svg { fill: currentColor; }
body.esp-redesign #main .esp-product-summary .esp-device-heart { min-height: 64px; min-width: 82px; padding: 0; border-radius: 12px; background: #b8924a; color: white; }
body.esp-redesign #main .esp-product-wishlist-v50 button.yith-wcwl-add-to-wishlist-button:has(svg) {
  position: relative; display: inline-grid; place-items: center; width: 82px; min-height: 64px;
  padding: 0; margin: 0; border: 0; border-radius: 12px; background: #b8924a; color: #fff;
}
body.esp-redesign #main .esp-product-wishlist-v50 .yith-wcwl-icon-svg__wrapper { display: inline-flex; color: inherit; }
body.esp-redesign #main .esp-product-wishlist-v50 .yith-wcwl-icon-svg__wrapper svg { width: 18px; height: 18px; }
body.esp-redesign #main .esp-product-wishlist-v50 button:has(svg) .yith-wcwl-add-to-wishlist-button__label {
  position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
@media (max-width: 1023.98px) {
  body.esp-redesign #main .esp-product-wishlist-v50 button.yith-wcwl-add-to-wishlist-button:has(svg) { width: 48px; min-height: 48px; }
}
body.esp-redesign #main li.product .esp-device-heart { width: 42px; height: 42px; padding: 0; border-radius: 8px; background: #fbf8f3; color: #8c6a2c; }
.esp-device-heart:focus-visible, .esp-pack-gallery__arrow:focus-visible { outline: 2px solid #513a1a; outline-offset: 2px; }
body.esp-redesign #main .esp-pack-only-summary .esp-pack-clear-v50 { display: none; }
/* The gallery is in the first HTML, before its script marks the summary. */
body.esp-redesign #main .esp-product-gallery:has(.esp-pack-gallery) + .esp-product-summary .esp-pack-clear-v50 { display: none; }
@media (min-width: 1024px) {
  body.esp-redesign #main .summary.esp-pack-only-summary { height: auto; align-self: start; }
  /* A native metadata row containing only the theme-hidden SKU has no visible content. */
  body.esp-redesign #main .esp-product-gallery:has(.esp-pack-gallery) + .esp-product-summary:not(.esp-pack-only-summary) > .product_meta:not(:has(> :not(.sku_wrapper))),
  body.esp-redesign #main .esp-pack-only-summary > .esp-pdp-empty-row { margin-block: -24px 0 !important; }
  body.esp-redesign #main .esp-pdp-related .esp-product-card__media { position: relative; }
  body.esp-redesign #main .esp-pdp-related .esp-pc-catalog-wishlist { position: absolute; z-index: 3; inset: 12px 12px auto auto; }
}
.esp-device-wishlist-status { position: fixed; z-index: 10000; bottom: 24px; left: 50%; max-width: 90vw; transform: translateX(-50%); opacity: 0; pointer-events: none; padding: 12px 20px; border-radius: 10px; color: white; background: #201a15; font: 500 14px/1.5 var(--esp-font-body, sans-serif); }
.esp-device-wishlist-status.is-visible { opacity: 1; }
.esp-device-wishlist { max-width: 900px; margin: 0 auto 3rem; }
.esp-device-wishlist ul { padding: 0; }
.esp-device-wishlist li { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 10px; padding: 14px 20px; background: #fff; border-radius: 12px; list-style: none; }
.esp-device-wishlist li a { display: flex; align-items: center; gap: 16px; }
.esp-device-wishlist li img { width: 68px; height: 68px; object-fit: contain; border-radius: 8px; }
.esp-device-wishlist li button { border: 0; padding: 8px; background: transparent; color: #765622; text-decoration: underline; cursor: pointer; }
@media (max-width: 480px) {
  body.esp-redesign .esp-device-wishlist > ul { margin-inline: 0; padding-inline-start: 0; }
  .esp-device-wishlist li {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 0 12px;
    padding: 12px 16px;
  }
  .esp-device-wishlist li a {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 12px;
    overflow-wrap: anywhere;
  }
  .esp-device-wishlist li a span { grid-column: 2; }
  .esp-device-wishlist li img { width: 56px; height: 56px; }
  .esp-device-wishlist li button {
    grid-column: 2;
    justify-self: start;
    min-height: 44px;
    padding-inline: 0;
  }
  .esp-device-wishlist li a > span:only-child,
  .esp-device-wishlist li:has(a > span:only-child) button { grid-column: 1 / -1; }
}
body.esp-has-device-wishlist .wishlist_table:has(.wishlist-empty) { display: none; }
.esp-wishlist-shop { display: none; margin: 1rem auto 0; text-align: center; }
body:not(.esp-has-device-wishlist) main:has(.yith-wcwl-form .wishlist-empty) .esp-wishlist-shop { display: block; }
.esp-wishlist-shop span[lang]:not([lang="en"]),
html:is(:lang(fr), :lang(es)) .esp-wishlist-shop span[lang="en"] { display: none; }
html:lang(fr) .esp-wishlist-shop span[lang="fr"],
html:lang(es) .esp-wishlist-shop span[lang="es"] { display: inline; }
