/* Product gallery and full-screen viewer; kept separate from editable theme.css. */
.single-product .product-entry-wrapper {
  grid-template-columns: minmax(0, 1.04fr) minmax(0, .96fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
  align-items: start;
}
.single-product .product { text-align: left; }
.single-product .catalog-product-gallery { min-width: 0; }
.single-product .ct-product-gallery-container { position: relative; display: grid; grid-template-columns: 76px minmax(0, 1fr); grid-template-rows: auto; gap: .75rem; }
.product-gallery-stage { position: relative; grid-column: 2; grid-row: 1; width: 100%; min-width: 0; aspect-ratio: 1 / 1; }
.product-gallery-open { position: absolute; inset: 0; display: grid; place-items: center; width: 100%; height: 100%; min-width: 0; padding: 0; overflow: hidden; border: 0; background: #f4f6f7; cursor: zoom-in; }
.product-gallery-open:hover, .product-gallery-open:focus-visible { outline: 2px solid var(--theme-palette-color-1); outline-offset: 2px; }
.product-gallery-main-image { display: block; width: 100%; height: 100%; max-width: none; object-fit: contain; }
.product-gallery-zoom-icon { position: absolute; top: .75rem; right: .75rem; display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: 50%; background: rgba(255,255,255,.95); color: var(--theme-palette-color-4); font-size: 1.45rem; line-height: 1; }
.product-gallery-sale { position: absolute; z-index: 3; top: .75rem; left: 5.5rem; min-width: 3.25rem; padding: .35rem .55rem; background: var(--theme-palette-color-4); color: #fff; font-size: .85rem; font-weight: 700; text-align: center; }
.flexy-pills { grid-column: 1; grid-row: 1; min-width: 0; align-self: stretch; }
.flexy-pills.has-thumb-scroll { display: grid; grid-template-rows: 2rem minmax(0, 1fr) 2rem; gap: .35rem; min-height: 0; }
.flexy-pills ol { display: flex; flex-direction: column; gap: .55rem; min-height: 0; max-height: calc(5 * 76px + 4 * .55rem); overflow: hidden; padding: 0 2px 0 0; margin: 0; list-style: none; overscroll-behavior: contain; }
.flexy-pills li { flex: 0 0 auto; }
.flexy-pills button { display: block; width: 100%; aspect-ratio: 1 / 1; padding: 0; overflow: hidden; border: 1px solid var(--theme-border-color); background: #fff; cursor: pointer; opacity: .72; }
.flexy-pills button.active, .flexy-pills button:hover, .flexy-pills button:focus-visible { border: 2px solid var(--theme-palette-color-1); opacity: 1; }
.flexy-pills img { display: block; width: 100%; height: 100%; object-fit: contain; }
.flexy-pills > button.product-thumbs-control { display: grid; place-items: center; justify-self: center; width: 2rem; min-height: 2rem; aspect-ratio: 1; padding: 0; border: 1px solid var(--theme-border-color); border-radius: 50%; background: #fff; color: var(--theme-palette-color-4); opacity: 1; cursor: pointer; }
.product-thumbs-control span, .single-product .flexy-arrow-prev span, .single-product .flexy-arrow-next span { display: block; width: .45rem; height: .45rem; border: solid currentColor; border-width: 0 2px 2px 0; }
.product-thumbs-prev span { transform: rotate(225deg); }
.product-thumbs-next span { transform: rotate(45deg); }
.flexy-pills > button.product-thumbs-control:hover, .flexy-pills > button.product-thumbs-control:focus-visible { border-color: var(--theme-palette-color-1); background: var(--theme-palette-color-1); color: #fff; }
.flexy-pills > button.product-thumbs-control[hidden] { display: none !important; }
.flexy-pills > button.product-thumbs-control:disabled { opacity: .38; cursor: default; }
.single-product .flexy-arrow-prev, .single-product .flexy-arrow-next { position: absolute; top: 50%; z-index: 2; display: grid; place-items: center; width: 2.6rem; height: 2.6rem; padding: 0; transform: translateY(-50%); border: 0; border-radius: 50%; background: rgba(255,255,255,.96); color: var(--theme-palette-color-4); font-size: 0; line-height: 0; box-shadow: 0 2px 12px rgba(0,0,0,.15); cursor: pointer; }
.single-product .flexy-arrow-prev span, .single-product .flexy-arrow-next span { width: .55rem; height: .55rem; }
.single-product .flexy-arrow-prev span { transform: rotate(135deg); }
.single-product .flexy-arrow-next span { transform: rotate(-45deg); }
.single-product .flexy-arrow-prev { left: .75rem; }
.single-product .flexy-arrow-next { right: .75rem; }
.single-product .flexy-arrow-prev:not(:disabled):hover, .single-product .flexy-arrow-next:not(:disabled):hover, .single-product .flexy-arrow-prev:not(:disabled):focus-visible, .single-product .flexy-arrow-next:not(:disabled):focus-visible { background: var(--theme-palette-color-1); color: #fff; }
.single-product .flexy-arrow-prev:disabled, .single-product .flexy-arrow-next:disabled { opacity: .38; cursor: default; }
.summary.entry-summary { position: sticky; top: 2rem; align-self: start; text-align: left; }
.summary .product_title { margin: 0 0 1rem; font-size: clamp(1.75rem, 3vw, 2.5rem); line-height: 1.25; }
.catalog-product-details__short-description { margin-bottom: 1.25rem; line-height: 1.65; }
.ct-product-add-to-cart { margin: 1.25rem 0 1.5rem; }
.ct-product-add-to-cart .cart { margin: 0; }
.ct-product-add-to-cart .button { min-height: 3.25rem; padding: .8rem 1.4rem; font-weight: 700; text-align: center; }
.single-product .product_meta { gap: .65rem; }
.single-product .product_meta { display: flex; flex-direction: column; align-items: flex-start; gap: .45rem; color: #40546b; font-size: .86rem; font-weight: 400; letter-spacing: .025em; text-transform: uppercase; }
.single-product .product_meta strong { font-weight: 700; }
.single-product .product_meta a { color: #0786c8; font-weight: 400; text-decoration: none; }
.single-product .product_meta a:hover, .single-product .product_meta a:focus-visible { text-decoration: underline; }
.single-product .catalog-tabs { margin-top: 1rem; text-align: left; }
.single-product .wc-tabs { justify-content: center; }
.single-product .catalog-tabs article { width: 100%; }
.single-product .catalog-tabs-panel { width: 100%; max-width: none; margin-inline: 0; padding-top: 1.5rem; text-align: left; }
.single-product .cegg-list-card { position: relative; }
.cegg5-container { margin-block: 2rem; }
.cegg-list-card { display: block; border: 1px solid var(--theme-border-color); background: #fff; }
.offer-card-link { position: relative; color: inherit; text-decoration: none; transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.merchant-offers .cegg-list { overflow: hidden; border: 1px solid #d4d4d4; border-radius: .5rem; background: #fff; box-shadow: 0 8px 20px rgba(25,42,61,.08); }
.merchant-offers .offer-card-link { overflow: hidden; border: 0; border-radius: 0; box-shadow: none; }
.merchant-offers .offer-card-link + .offer-card-link { border-top: 1px solid #d4d4d4; }
.offer-card-link:hover, .offer-card-link:focus-visible { z-index: 1; color: inherit; border-color: #bfc4c9; box-shadow: 0 8px 16px rgba(0,0,0,.2); }
.merchant-offer-row { display: grid !important; grid-template-columns: minmax(118px, 140px) minmax(0, 1fr) minmax(180px, 200px); align-items: center; gap: 1.25rem; margin: 0 !important; padding: 1.1rem 1.5rem !important; }
.merchant-offer-row > * { width: auto !important; max-width: none !important; padding: 0 !important; }
.merchant-brand { display: grid; place-items: center; min-width: 0; min-height: 4.5rem; text-align: center; }
.merchant-logo-frame { display: grid; place-items: center; width: 100%; max-width: 130px; margin-inline: auto; }
.cegg-merhant-logo { display: block; width: min(100%, 128px); max-height: 64px; object-fit: contain; }
.merchant-wordmark { display: inline-block; max-width: 100%; color: #202b3a; font-size: 1.05rem; font-weight: 700; letter-spacing: -.025em; line-height: 1.15; overflow-wrap: anywhere; }
.merchant-offer-copy { display: flex; min-width: 0; flex-direction: column; align-items: flex-start; gap: .45rem; }
.merchant-offer-badge { display: inline-flex; align-items: center; gap: .35rem; width: fit-content; margin-bottom: .35rem; padding: .24rem .55rem; background: #e73546; color: #fff; font-size: .88rem; font-weight: 700; line-height: 1.25; }
.merchant-offer-badge::before { content: '✓'; display: inline-grid; place-items: center; width: 1.1em; height: 1.1em; border: 1px solid currentColor; border-radius: 50%; font-size: .78em; line-height: 1; }
.offer-card-link .card-title { display: inline-block; width: fit-content; max-width: 100%; color: #343a40; font-size: 1rem; font-weight: 400; line-height: 1.4; text-decoration: none !important; border-bottom: 0; }
.offer-card-link:hover .card-title, .offer-card-link:focus-visible .card-title { color: #343a40; text-decoration: underline !important; text-underline-offset: .25em; text-decoration-color: rgba(221,51,51,.5); }
.offer-card-link .card-subtitle { display: block; max-width: 100%; color: #6c7074; font-size: 1rem; line-height: 1.45; }
.merchant-offer-action { display: flex; min-width: 0; flex-direction: column; align-items: stretch; gap: .45rem; text-align: center; }
.merchant-offers .offer-card-link .cegg-click { display: block; width: 100%; min-height: 0; padding: .375rem .75rem; pointer-events: none; border: 1px solid transparent !important; border-radius: .25rem; background: #ffc107 !important; color: #000 !important; font-size: 1rem; font-weight: 400; line-height: 1.5; transition: box-shadow .18s ease; }
.merchant-offers .offer-card-link:hover .cegg-click, .merchant-offers .offer-card-link:focus-visible .cegg-click { box-shadow: none; background: #ffca2c !important; border-color: #ffc107 !important; color: #000 !important; }
.cegg-merchant { display: block; margin-top: 0; color: #777; font-size: .92rem; line-height: 1.25; }
.offer-card-link .card-title { -webkit-line-clamp: 2; line-clamp: 2; }
@media (max-width: 767.98px) {
  .merchant-offer-row { grid-template-columns: minmax(76px, 112px) minmax(0, 1fr); gap: .75rem 1rem; padding: .9rem 1rem !important; }
  .merchant-offer-action { grid-column: 1 / -1; width: 100%; }
  .merchant-brand { min-height: 3.5rem; }
  .merchant-logo-frame { max-width: 104px; }
  .cegg-merhant-logo { width: min(100%, 96px); max-height: 52px; }
}
dialog.product-lightbox { position: fixed !important; inset: 0 !important; z-index: 2147483000; box-sizing: border-box; width: 100vw !important; max-width: none !important; height: 100vh !important; height: 100dvh !important; max-height: none !important; margin: 0 !important; padding: 0 !important; overflow: hidden; border: 0 !important; border-radius: 0 !important; background: #0a0e12 !important; color: #fff !important; }
dialog.product-lightbox::backdrop { background: rgba(10,14,18,.97); }
dialog.product-lightbox[open] { display: grid !important; grid-template-columns: 4rem minmax(0, 1fr) 4rem; grid-template-rows: 4.25rem minmax(0, 1fr); align-items: center; }
.product-lightbox-toolbar { grid-column: 1 / -1; grid-row: 1; display: flex; align-items: center; justify-content: flex-end; gap: .65rem; padding: .55rem 1rem; }
.product-lightbox-counter { margin-right: auto; padding-inline: .5rem; color: #fff; font-size: .95rem; }
dialog.product-lightbox button { display: grid; place-items: center; width: 2.8rem; height: 2.8rem; min-height: 0; padding: 0; border: 0; border-radius: 50%; background: rgba(255,255,255,.12); color: #fff; font-size: 1.6rem; line-height: 1; cursor: pointer; }
dialog.product-lightbox button:hover, dialog.product-lightbox button:focus-visible { background: rgba(255,255,255,.28); color: #fff; }
.product-lightbox-stage { grid-column: 2; grid-row: 2; display: grid; place-items: center; width: 100%; height: 100%; margin: 0; overflow: auto; }
.product-lightbox-stage img { display: block; max-width: 100%; max-height: calc(100vh - 5.5rem); max-height: calc(100dvh - 5.5rem); object-fit: contain; cursor: zoom-in; transition: transform .18s ease; }
.product-lightbox-stage img.is-zoomed { max-width: none; max-height: none; transform: scale(1.8); cursor: zoom-out; }
.product-lightbox-prev { grid-column: 1; grid-row: 2; justify-self: center; }
.product-lightbox-next { grid-column: 3; grid-row: 2; justify-self: center; }
dialog.product-lightbox button[hidden] { display: none !important; }
@media (max-width: 900px) {
  .single-product .product-entry-wrapper { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
  .single-product .catalog-product-gallery { width: min(100%, 760px); margin-inline: auto; }
  .single-product .ct-product-gallery-container { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto; }
  .product-gallery-stage { grid-column: 1; grid-row: 1; }
  .flexy-pills { grid-column: 1; grid-row: 2; }
  .flexy-pills ol { flex-direction: row; max-height: none; overflow-x: hidden; overflow-y: hidden; padding: .15rem .1rem .35rem; }
  .flexy-pills li { flex: 0 0 68px; }
  .flexy-pills.has-thumb-scroll { grid-template-columns: 2rem minmax(0, 1fr) 2rem; grid-template-rows: minmax(0, auto); align-items: center; }
  .flexy-pills.has-thumb-scroll ol { grid-column: 2; grid-row: 1; }
  .flexy-pills > button.product-thumbs-prev { grid-column: 1; grid-row: 1; }
  .flexy-pills > button.product-thumbs-next { grid-column: 3; grid-row: 1; }
  .flexy-pills > button.product-thumbs-prev span { transform: rotate(135deg); }
  .flexy-pills > button.product-thumbs-next span { transform: rotate(-45deg); }
  .product-gallery-sale { left: .75rem; }
  .summary.entry-summary { position: static; width: min(100%, 760px); margin-inline: auto; }
}
@media (max-width: 480px) {
  dialog.product-lightbox[open] { grid-template-columns: 2.8rem minmax(0, 1fr) 2.8rem; grid-template-rows: 3.5rem minmax(0, 1fr); }
  .product-lightbox-toolbar { gap: .3rem; padding-inline: .45rem; }
  dialog.product-lightbox button { width: 2.35rem; height: 2.35rem; }
  .product-lightbox-stage img { max-height: calc(100vh - 4.5rem); max-height: calc(100dvh - 4.5rem); }
}
