/**
 * RO Shop — Divi module styles.
 *
 * Extends the "Aqua Fresh" storefront design system (assets/css/
 * storefront.css, loaded as a dependency) with the pieces the Divi modules
 * add: split product layout, fixed-column grids, carousel chrome,
 * comparison table, mini cart dropdown, outline button, and the product
 * configurator panel. All colors inherit the store's CSS variables, so
 * Settings → RO Shop → Appearance recolors these modules too.
 *
 * The .ro-divi wrapper replicates the base typography/box-sizing the
 * storefront scopes under .ro-shop, because Divi modules render outside
 * that container.
 */

/* ---------- Base ---------- */
.ro-divi { font-family: var(--ro-font); color: var(--ro-body); font-size: 16px; line-height: 1.6; }
.ro-divi *, .ro-divi *::before, .ro-divi *::after { box-sizing: border-box; }
.ro-divi img { max-width: 100%; height: auto; display: block; }
.ro-divi .ro-product-grid { margin: 0; }
.ro-empty-hint { color: var(--ro-muted); font-size: 13.5px; margin: 6px 0 0; }

/* ---------- Design customization (module "Appearance" settings) ----------
 * Each Divi module can set these custom properties through its design
 * fields (colors, radius, padding, gap). Every fallback matches the
 * storefront design system, so an untouched module renders exactly like
 * the shop page. */
.ro-divi .ro-product-card { background: var(--ro-card-bg, var(--ro-card)); border-radius: var(--ro-card-radius, var(--ro-radius)); }
.ro-divi .ro-card-body { padding: var(--ro-card-padding, 16px); gap: var(--ro-card-gap, 12px); }
.ro-divi .ro-card-title, .ro-divi .ro-card-title a { color: var(--ro-title-color, var(--ro-ink)); }
.ro-divi .ro-card-title a:hover { color: var(--ro-title-color, var(--ro-primary)); }
.ro-divi .ro-price { color: var(--ro-price-color, var(--ro-primary)); }
.ro-divi .ro-product-grid { gap: var(--ro-grid-gap, 22px); }

/* v2.22.0: reference-card module controls — image aspect ratio, title
 * size, description color, card minimum-height floor and the
 * View-Details + Add-to-Cart pair alignment. Empty values fall back to
 * the storefront design system values (4/3, 16px, muted, auto, fill).
 * v2.25.1: the mobile fallback for the ratio is 1/1, matching the
 * storefront's own <=640px card design, so consumers WITHOUT an explicit
 * Image Aspect Ratio setting (the Shop Page module's listing cards,
 * related/cross-sell cards) keep the storefront's square-on-phones
 * step-down that the flat 4/3 fallback had silently overridden since
 * 2.23.0. A module that sets the control keeps its value at every width —
 * the var always beats the fallback. */
.ro-divi .ro-card-media { aspect-ratio: var(--ro-media-ratio, 4 / 3); }
@media (max-width: 640px) {
        .ro-divi .ro-card-media { aspect-ratio: var(--ro-media-ratio, 1 / 1); }
}
.ro-divi .ro-card-title { font-size: var(--ro-title-size, 16px); }
/*
 * v2.25.0: ONE description rule, mirrors the storefront reference card
 * (storefront.css .ro-card-desc). The old v2.0.0 duplicate below (later
 * in the file, same specificity) silently killed the module's
 * Description Color control and re-imposed the split-layout rhythm
 * (8px/12px margins, 560px cap, --ro-body color) — removed.
 */
.ro-divi .ro-card-desc { color: var(--ro-desc-color, var(--ro-muted)); margin: 0; font-size: 14px; line-height: 1.55; max-width: none; }
.ro-divi .ro-product-card { min-height: var(--ro-card-min-height, auto); }
.ro-divi .ro-card-actions { justify-content: var(--ro-actions-align, flex-start); }
.ro-divi .ro-card-actions.ro-card-actions--pair .ro-btn { flex: var(--ro-actions-fill, 1) 1 auto; }

.ro-divi-product-stock { font-size: 14px; font-weight: 600; margin: 0 0 4px; }
.ro-divi-product-stock.is-in-stock { color: var(--ro-success); }
.ro-divi-product-stock.is-oos { color: var(--ro-muted); }

.ro-divi .ro-card-body .ro-divi-product-stock { margin: 6px 0 4px; }

/* ---------- Add to Cart module: alignment ---------- */
.ro-divi-atc { display: block; }
.ro-divi-atc-align-left { text-align: left; }
.ro-divi-atc-align-center { text-align: center; }
.ro-divi-atc-align-right { text-align: right; }

/* ---------- Outline button (Add to Cart module) ---------- */
.ro-btn-outline { background: transparent; color: var(--ro-primary); border: 2px solid var(--ro-primary); padding: 9px 18px; }
.ro-btn-outline:hover:not(:disabled) { background: var(--ro-primary); color: #fff; }

/* ---------- Product module: split layout ---------- */
.ro-divi-product-split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 34px; align-items: center; }
.ro-divi-product-media { position: relative; }
.ro-divi-product-media img { border-radius: var(--ro-radius); box-shadow: var(--ro-shadow); }
.ro-divi-product-media .ro-badge { top: 14px; left: 14px; }
.ro-divi-product-media .ro-card-placeholder { aspect-ratio: 4/3; border-radius: var(--ro-radius); }
.ro-divi-product-title { margin: 0 0 10px; font-size: clamp(24px, 3vw, 34px); font-weight: 700; line-height: 1.2; color: var(--ro-ink); }
.ro-divi-product-title a { color: inherit; text-decoration: none; }
.ro-divi-product-title a:hover { color: var(--ro-primary); }
.ro-divi-product-details {
        background: var(--ro-card-bg, transparent);
        border-radius: var(--ro-card-radius, var(--ro-radius));
        padding: var(--ro-card-padding, 0);
        align-self: start;
}
.ro-divi-product-details .ro-card-price { margin-bottom: 8px; }
.ro-divi-product-desc { margin: 10px 0 18px; max-width: 560px; }

/* ---------- Product Grid: fixed column counts ----------
 * v2.24.0 root-cause fix: the cols-N class sits ON the grid element
 * (Renderer: <div class="ro-product-grid ro-divi-grid-cols-N">), so the
 * selector must be COMPOUND — the previous descendant selectors
 * (.ro-divi-grid-cols-N .ro-product-grid) never matched anything and the
 * Columns setting was silently ignored on every grid. */
.ro-product-grid.ro-divi-grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.ro-product-grid.ro-divi-grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.ro-product-grid.ro-divi-grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

/* ---------- Carousel ---------- */
.ro-divi-carousel-wrapper { position: relative; }
.ro-carousel { position: relative; }
.ro-carousel-viewport {
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding: 4px 2px 8px;
}
.ro-carousel-viewport::-webkit-scrollbar { display: none; }
.ro-carousel-viewport:focus-visible { outline: 2px solid var(--ro-primary); outline-offset: 2px; border-radius: var(--ro-radius-sm); }
.ro-carousel-track { display: flex; gap: var(--ro-grid-gap, 22px); }
.ro-carousel-slide { scroll-snap-align: start; flex-shrink: 0; }
.ro-carousel-slide .ro-product-card { height: 100%; }

.ro-carousel[data-visible="1"] .ro-carousel-slide { flex-basis: calc(100% - 4px); }
.ro-carousel[data-visible="2"] .ro-carousel-slide { flex-basis: calc(50% - (var(--ro-grid-gap, 22px) / 2)); }
.ro-carousel[data-visible="3"] .ro-carousel-slide { flex-basis: calc(33.333% - (var(--ro-grid-gap, 22px) * 0.6667)); }
.ro-carousel[data-visible="4"] .ro-carousel-slide { flex-basis: calc(25% - (var(--ro-grid-gap, 22px) * 0.75)); }

.ro-carousel-arrow {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        width: 44px;
        height: 44px;
        border-radius: 50%;
        border: 1px solid var(--ro-line);
        background: var(--ro-card);
        color: var(--ro-ink);
        font-size: 26px;
        line-height: 1;
        cursor: pointer;
        box-shadow: var(--ro-shadow);
        z-index: 5;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0 0 4px;
        transition: all 0.15s ease;
}
.ro-carousel-arrow:hover { background: var(--ro-primary); border-color: var(--ro-primary); color: #fff; }
.ro-carousel-arrow:disabled { opacity: 0.35; cursor: default; }
.ro-carousel-arrow:disabled:hover { background: var(--ro-card); border-color: var(--ro-line); color: var(--ro-ink); }
.ro-carousel-prev { left: -14px; }
.ro-carousel-next { right: -14px; }

.ro-carousel-dots { display: flex; justify-content: center; gap: 8px; margin-top: 14px; }
.ro-carousel-dot { width: 9px; height: 9px; border-radius: 50%; border: 0; padding: 0; background: var(--ro-line); cursor: pointer; transition: all 0.15s ease; }
.ro-carousel-dot:hover { background: var(--ro-muted); }
.ro-carousel-dot.is-active { background: var(--ro-primary); transform: scale(1.25); }

/* ---------- Comparison table ----------
 * v2.22.0: the BASE table rules moved to storefront.css — the table is a
 * shared surface now (the Divi module AND the shop page's ?ro_compare=
 * view render it), and storefront.css is the stylesheet every context
 * loads (ro-divi depends on it). Only the module var hooks stay here. */
.ro-divi .ro-compare-table { background: var(--ro-table-bg, var(--ro-card)); border-radius: var(--ro-table-radius, var(--ro-radius)); }
.ro-divi .ro-compare-label-col, .ro-divi .ro-compare-table tbody th[scope="row"] { background: var(--ro-table-bg, var(--ro-card)); color: var(--ro-label-color, var(--ro-muted)); }
.ro-divi .ro-compare-table tbody tr:nth-child(even) th[scope="row"] { background: var(--ro-table-bg, var(--ro-bg)); }
.ro-divi .ro-compare-price .ro-price { color: var(--ro-price-color, var(--ro-primary)); }

.ro-divi .screen-reader-text { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }

/* ---------- Mini cart ---------- */
.ro-divi .ro-divi-mini-cart { color: var(--ro-icon-color, inherit); }
.ro-divi .ro-mini-cart-trigger:hover { color: var(--ro-icon-color, var(--ro-primary)); }
.ro-divi .ro-mini-cart-badge { background: var(--ro-badge-bg, var(--ro-danger)); }
.ro-divi .ro-mini-cart-panel { background: var(--ro-panel-bg, var(--ro-card)); border-radius: var(--ro-panel-radius, var(--ro-radius)); }
.ro-divi-mini-cart { position: relative; display: inline-block; font-family: var(--ro-font); }
.ro-mini-cart-trigger {
        position: relative;
        display: inline-flex;
        align-items: center;
        gap: 8px;
        background: transparent;
        border: 0;
        padding: 8px 10px;
        cursor: pointer;
        color: inherit;
        font-family: var(--ro-font);
        font-size: 15px;
        font-weight: 700;
        line-height: 1;
}
.ro-mini-cart-trigger:hover { color: var(--ro-primary); }
.ro-mini-cart-trigger svg { width: 24px; height: 24px; fill: currentColor; }
.ro-mini-cart-label { white-space: nowrap; }
.ro-mini-cart-badge {
        position: absolute;
        top: 0;
        right: -2px;
        min-width: 19px;
        height: 19px;
        padding: 0 5px;
        border-radius: 999px;
        background: var(--ro-danger);
        color: #fff;
        font-size: 11px;
        font-weight: 700;
        line-height: 19px;
        text-align: center;
        box-shadow: 0 0 0 2px var(--ro-card, #fff);
}

.ro-mini-cart-panel {
        position: absolute;
        top: calc(100% + 10px);
        width: 340px;
        max-width: calc(100vw - 32px);
        background: var(--ro-card);
        border: 1px solid var(--ro-line);
        border-radius: var(--ro-radius);
        box-shadow: 0 18px 50px rgba(15, 23, 42, 0.16);
        z-index: 99999;
        font-size: 14px;
        color: var(--ro-body);
        overflow: hidden;
}
.ro-divi-mini-cart-align-left .ro-mini-cart-panel { left: 0; }
.ro-divi-mini-cart-align-right .ro-mini-cart-panel { right: 0; }
.ro-divi-mini-cart-align-center .ro-mini-cart-panel { left: 50%; transform: translateX(-50%); }

.ro-mini-cart-empty { margin: 0; padding: 26px 18px; text-align: center; color: var(--ro-muted); font-style: italic; }
.ro-mini-cart-items { list-style: none; margin: 0; padding: 6px 0; max-height: 284px; overflow-y: auto; }
.ro-mini-cart-item { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--ro-line); }
.ro-mini-cart-item:last-child { border-bottom: 0; }
.ro-mini-cart-thumb { flex: 0 0 46px; }
.ro-mini-cart-thumb img { width: 46px; height: 46px; object-fit: cover; border-radius: 8px; }
.ro-mini-cart-info { flex: 1 1 auto; min-width: 0; }
.ro-mini-cart-name { display: block; color: var(--ro-ink); font-weight: 700; font-size: 13.5px; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ro-mini-cart-name:hover { color: var(--ro-primary); }
.ro-mini-cart-meta { display: block; color: var(--ro-muted); font-size: 12.5px; margin-top: 2px; }
.ro-mini-cart-line { font-weight: 700; font-size: 13.5px; color: var(--ro-ink); white-space: nowrap; }
.ro-mini-cart-remove { flex: 0 0 auto; border: 0; background: none; color: var(--ro-muted); font-size: 19px; line-height: 1; cursor: pointer; padding: 2px 4px; }
.ro-mini-cart-remove:hover { color: var(--ro-danger); }

.ro-mini-cart-ship { margin: 0; padding: 9px 16px; font-size: 12.5px; font-weight: 600; color: var(--ro-warn); background: rgba(217, 119, 6, 0.07); border-top: 1px solid var(--ro-line); }
.ro-mini-cart-ship.is-unlocked { color: var(--ro-success); background: rgba(5, 150, 105, 0.08); }
.ro-mini-cart-subtotal { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 16px; border-top: 1px solid var(--ro-line); font-weight: 600; color: var(--ro-muted); }
.ro-mini-cart-subtotal strong { color: var(--ro-primary); font-size: 18px; font-weight: 700; }
.ro-mini-cart-actions { display: flex; gap: 10px; padding: 12px 16px 16px; border-top: 1px solid var(--ro-line); background: var(--ro-bg); }
.ro-mini-cart-actions .ro-btn { flex: 1 1 0; font-size: 14px; padding: 10px 12px; }

/* ---------- Product Configurator ---------- */
.ro-divi .ro-config-base { background: var(--ro-panel-bg, var(--ro-card)); border-radius: var(--ro-panel-radius, var(--ro-radius)); padding: var(--ro-panel-padding, 18px); }
.ro-divi .ro-config-addon { background: var(--ro-panel-bg, var(--ro-card)); border-radius: var(--ro-panel-radius, var(--ro-radius-sm)); }
.ro-divi .ro-divi-config-title { color: var(--ro-title-color, var(--ro-ink)); }
.ro-divi .ro-config-base-price, .ro-divi .ro-config-addon-price, .ro-divi .ro-config-total strong { color: var(--ro-price-color, var(--ro-primary)); }
.ro-divi-config-title { margin: 0 0 6px; font-size: clamp(22px, 2.6vw, 30px); font-weight: 700; color: var(--ro-ink); line-height: 1.2; }
.ro-divi-config-desc { margin: 0 0 18px; color: var(--ro-body); max-width: 640px; }

.ro-config-base { display: flex; gap: 20px; align-items: flex-start; background: var(--ro-card); border: 1px solid var(--ro-line); border-radius: var(--ro-radius); padding: 18px; }
.ro-config-base-media { flex: 0 0 150px; position: relative; }
.ro-config-base-media img { border-radius: var(--ro-radius-sm); aspect-ratio: 4/3; object-fit: cover; }
.ro-config-base-media .ro-card-placeholder { aspect-ratio: 4/3; border-radius: var(--ro-radius-sm); }
.ro-config-base-info { flex: 1 1 auto; min-width: 0; }
.ro-config-base-title { margin: 0 0 4px; font-size: 19px; font-weight: 700; color: var(--ro-ink); }
.ro-config-base-title a { color: inherit; text-decoration: none; }
.ro-config-base-title a:hover { color: var(--ro-primary); }
.ro-config-base-price { margin: 0 0 12px; color: var(--ro-primary); font-weight: 700; font-size: 21px; }
.ro-config-base-price .ro-price-was { margin-left: 8px; }

.ro-config-addons { margin-top: 16px; }
.ro-config-addons-title { margin: 0 0 10px; font-size: 12.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ro-muted); }
.ro-config-addon { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--ro-line); border-radius: var(--ro-radius-sm); margin-bottom: 8px; cursor: pointer; background: var(--ro-card); transition: all 0.15s ease; }
.ro-config-addon:hover { border-color: var(--ro-primary); }
.ro-config-addon.is-checked { border-color: var(--ro-primary); background: var(--ro-primary-light); }
.ro-config-addon input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--ro-primary); flex: 0 0 auto; cursor: pointer; }
.ro-config-addon-name { flex: 1 1 auto; font-weight: 600; font-size: 14.5px; color: var(--ro-ink); }
.ro-config-addon-oos { color: var(--ro-muted); font-style: normal; font-size: 12.5px; font-weight: 500; }
.ro-config-addon-price { flex: 0 0 auto; font-weight: 700; color: var(--ro-primary); font-size: 14.5px; white-space: nowrap; }
.ro-config-no-addons { margin: 14px 0 0; color: var(--ro-muted); font-style: italic; font-size: 14px; }

.ro-config-footer { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-top: 20px; }
.ro-config-total { display: flex; align-items: baseline; gap: 10px; font-weight: 700; color: var(--ro-muted); font-size: 14px; }
.ro-config-total strong { color: var(--ro-primary); font-size: 26px; font-weight: 700; }
.ro-config-submit { flex-shrink: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
        .ro-divi-product-split { grid-template-columns: 1fr; gap: 22px; }
        .ro-product-grid.ro-divi-grid-cols-3,
        .ro-product-grid.ro-divi-grid-cols-4 { grid-template-columns: repeat(2, 1fr); }
        .ro-carousel[data-visible="2"] .ro-carousel-slide,
        .ro-carousel[data-visible="3"] .ro-carousel-slide,
        .ro-carousel[data-visible="4"] .ro-carousel-slide { flex-basis: calc(50% - 11px); }
        .ro-carousel-prev { left: -6px; }
        .ro-carousel-next { right: -6px; }
        .ro-config-base { flex-direction: column; }
        .ro-config-base-media { flex-basis: auto; width: 180px; }
}
@media (max-width: 640px) {
        .ro-product-grid.ro-divi-grid-cols-2,
        .ro-product-grid.ro-divi-grid-cols-3,
        .ro-product-grid.ro-divi-grid-cols-4 { grid-template-columns: 1fr; }
        .ro-divi .ro-product-grid { gap: min(var(--ro-grid-gap, 22px), 14px); }
        .ro-carousel[data-visible="1"] .ro-carousel-slide { flex-basis: 100%; }
        .ro-carousel[data-visible="2"] .ro-carousel-slide,
        .ro-carousel[data-visible="3"] .ro-carousel-slide,
        .ro-carousel[data-visible="4"] .ro-carousel-slide { flex-basis: 82%; }
        .ro-carousel-arrow { display: none; }
        .ro-config-footer { flex-direction: column; align-items: stretch; }
        .ro-config-submit { width: 100%; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
        .ro-carousel-viewport { scroll-behavior: auto; }
        .ro-carousel-slide, .ro-product-card { transition: none; }
}


/* =============================================================
 * v2.8.0 — Storefront page modules (Shop / Cart / Checkout /
 * Thank-You / Account).
 *
 * Each page module wraps the REAL storefront template output in a
 * .ro-divi-page container. Design controls from the module become CSS
 * custom properties here: variables that the storefront design system
 * already defines (--ro-primary, --ro-ink, …) are re-declared on the
 * wrapper so they cascade into the template untouched; module-only
 * variables (--ro-page-*, --ro-btn-*, --ro-field-*) are consumed by the
 * scoped rules below. Defaults equal the storefront values, so an
 * untouched page module renders exactly like the shortcode page.
 * =========================================================== */

.ro-divi-page {
        background: var(--ro-page-bg, transparent);
        padding: var(--ro-page-padding, 0px);
}
.ro-divi-page .ro-container { max-width: var(--ro-page-width, 1120px); }
.ro-divi-page .ro-shop { font-size: var(--ro-body-size, 16px); }
.ro-divi-page-align-center { text-align: center; }
.ro-divi-page-align-right { text-align: right; }

/*
 * Cards & sections: the storefront product card uses the glass token;
 * an admin-set Card Background overrides BOTH card tokens.
 * v2.25.0: the override actually chains now — module Card Appearance
 * values (--ro-card-bg / --ro-card-radius) win first, then the page
 * module's Card Background Color (--ro-card) and Card Corner Radius
 * (--ro-radius), then the glass token. The old rule hard-pinned
 * --ro-glass, so the Shop Page module's Card Background Color and any
 * module card overrides never reached product cards.
 */
.ro-divi-page .ro-product-card { background: var(--ro-card-bg, var(--ro-card, var(--ro-glass))); border-radius: var(--ro-card-radius, var(--ro-radius, 16px)); }
.ro-divi-page .ro-card-body { padding: var(--ro-card-padding, 16px); }

/* Buttons. */
.ro-divi-page .ro-btn { border-radius: var(--ro-btn-radius, var(--ro-radius-sm)); padding: var(--ro-btn-padding, 11px 20px); }
.ro-divi-page .ro-btn-primary { background: var(--ro-btn-bg, var(--ro-grad)); color: var(--ro-btn-color, #fff); }

/* Form fields (checkout / account / lead forms rendered by the templates). */
.ro-divi-page .ro-field input,
.ro-divi-page .ro-field select,
.ro-divi-page .ro-field textarea {
        border-radius: var(--ro-field-radius, var(--ro-radius-sm));
        background: var(--ro-field-bg, rgba(255, 255, 255, 0.82));
}

/* =============================================================
 * v2.8.0 — Single Product module (.ro-divi-sp).
 * =========================================================== */

.ro-divi-sp { font-family: var(--ro-font); color: var(--ro-sp-body-color, var(--ro-body)); font-size: var(--ro-sp-body-size, 16px); line-height: 1.6; }
.ro-divi-sp *, .ro-divi-sp *::before, .ro-divi-sp *::after { box-sizing: border-box; }
.ro-divi-sp img { max-width: 100%; height: auto; display: block; }

.ro-divi-sp-cols .ro-sp-layout {
        display: grid;
        grid-template-columns: var(--ro-sp-image-width, 50%) minmax(0, 1fr);
        gap: var(--ro-sp-media-gap, 34px);
        align-items: start;
}
.ro-divi-sp-stacked .ro-sp-layout { display: flex; flex-direction: column; gap: var(--ro-sp-media-gap, 34px); }

/* v2.12.0: no margin here — the two-column grid gap (or the stacked
 * flex gap) already separates media from details; a margin-bottom on top
 * of that doubled the effective gap (34px + 34px) in stacked layouts and
 * inflated the layout height in two-column layouts.
 * v2.14.0: min-width 0 — flex/grid children default to a min-content
 * floor; without this, an image-less media column (placeholder) could
 * pin the grid track wider than the viewport on phones. */
.ro-divi-sp-media { margin: 0; min-width: 0; }
.ro-sp-info { min-width: 0; }

/* Gallery + aspect ratios. */
.ro-sp-gallery { display: flex; flex-direction: column; gap: 12px; }
.ro-sp-thumbs-right .ro-sp-gallery { flex-direction: row-reverse; }
.ro-sp-thumbs-left .ro-sp-gallery { flex-direction: row; }
.ro-sp-main { position: relative; flex: 1 1 auto; min-width: 0; }
.ro-sp-main img { border-radius: var(--ro-sp-media-radius, 16px); box-shadow: var(--ro-sp-shadow, var(--ro-shadow)); width: 100%; }
/* v2.14.0: height/min-height must stay OFF here — the shared placeholder
 * base (.ro-card-placeholder height:100% + .ro-placeholder-large
 * min-height:320px) would otherwise let aspect-ratio derive the WIDTH
 * from the height (320 × 4/3 ≈ 427px), overflowing every phone-width
 * container. width:100% + aspect-ratio derives the height instead. */
.ro-sp-main .ro-card-placeholder { aspect-ratio: 4/3; border-radius: var(--ro-sp-media-radius, 16px); min-height: 0; height: auto; }
.ro-sp-ratio-1-1 .ro-sp-main img { aspect-ratio: 1/1; object-fit: cover; }
.ro-sp-ratio-4-3 .ro-sp-main img { aspect-ratio: 4/3; object-fit: cover; }
.ro-sp-ratio-3-2 .ro-sp-main img { aspect-ratio: 3/2; object-fit: cover; }
.ro-sp-ratio-16-9 .ro-sp-main img { aspect-ratio: 16/9; object-fit: cover; }
.ro-sp-main .ro-badge { top: 14px; left: 14px; }

/* v2.26.3: the thumbnail row spans the SAME width as the main image
 * above it and distributes 1-4 thumbnails evenly — a grid with one
 * implicit row and equal 1fr auto-columns: every thumbnail gets an
 * equal share of the .ro-sp-gallery track (which the main image and
 * the Divi module width define), with the fixed gap between them. No
 * hardcoded pixel widths anywhere, so a Divi module width / max-width
 * change flows through: module width → main image width → thumb row
 * width. Square, non-distorting thumbnails (aspect-ratio + cover). */
.ro-sp-thumbs { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 10px; }
/* Left / right rail layouts: the thumbs stack VERTICALLY beside the
 * main image — a flex column of fixed square thumbs (the row-fill
 * rule does not apply to rails). */
.ro-sp-thumbs-left .ro-sp-thumbs, .ro-sp-thumbs-right .ro-sp-thumbs { display: flex; flex-direction: column; flex: 0 0 auto; }
.ro-sp-thumb {
        padding: 0;
        border: 2px solid transparent;
        border-radius: 9px;
        background: none;
        cursor: pointer;
        overflow: hidden;
        line-height: 0;
        transition: border-color 0.15s ease;
        /* Fill the grid track; the 2px borders sit inside the ratio
         * (box-sizing: border-box), so a hovered/active border never
         * shifts the layout. */
        width: 100%;
        aspect-ratio: 1 / 1;
        min-width: 0;
}
.ro-sp-thumb img { width: 100%; height: 100%; object-fit: cover; }
/* Rail layouts keep the classic fixed square thumbs. */
.ro-sp-thumbs-left .ro-sp-thumb, .ro-sp-thumbs-right .ro-sp-thumb { width: 68px; aspect-ratio: auto; }
.ro-sp-thumbs-left .ro-sp-thumb img, .ro-sp-thumbs-right .ro-sp-thumb img { width: 68px; height: 68px; }
.ro-sp-thumb:hover, .ro-sp-thumb.is-active { border-color: var(--ro-primary); }

/* Video (same classes the storefront product template uses). */
.ro-sp-video { margin-top: 16px; }
.ro-sp-video-label { display: block; font-size: 12.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ro-muted); margin-bottom: 8px; }

/* Info column. */
.ro-sp-title {
        margin: 0 0 10px;
        font-family: var(--ro-font-head);
        font-size: var(--ro-sp-title-size, 34px);
        font-weight: 700;
        line-height: 1.2;
        color: var(--ro-sp-heading-color, var(--ro-ink));
}
.ro-sp-price-row { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.ro-sp-price { font-size: var(--ro-sp-price-size, 28px); font-weight: 700; color: var(--ro-sp-price-color, var(--ro-primary)); }
.ro-sp-price-row .ro-price-was { font-size: 16px; }
.ro-sp-stock { font-size: 14px; font-weight: 700; }
.ro-sp-stock.is-in-stock { color: var(--ro-success); }
.ro-sp-stock.is-oos { color: var(--ro-muted); }
.ro-sp-meta { margin: 0 0 6px; font-size: 13.5px; color: var(--ro-muted); }
.ro-sp-meta a { color: var(--ro-sp-link-color, var(--ro-primary)); text-decoration: none; }
.ro-sp-meta a:hover { text-decoration: underline; }
.ro-sp-desc { margin: 12px 0 18px; max-width: 640px; }

/* v2.12.0: Add-to-Cart width defaults to AUTO — the button sizes to its
 * label (flex: 0 1 auto). "Full Width" sets --ro-sp-btn-width to 100% and
 * the button wraps onto its own full row. Alignment is the row's
 * justify-content, so it also positions the quantity selector pair. */
.ro-sp-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 8px 0 18px; justify-content: var(--ro-sp-btn-justify, flex-start); }
.ro-sp-actions .ro-add-to-cart { flex: 0 1 auto; width: var(--ro-sp-btn-width, auto); padding: 14px var(--ro-sp-btn-padx, 26px); }
.ro-sp-qty input, .ro-divi-sp .ro-qty input { font-family: var(--ro-font); }
.ro-divi-sp .ro-qty { background: var(--ro-sp-qty-bg, var(--ro-card)); border-radius: var(--ro-sp-qty-radius, 12px); }

.ro-sp-usp {
        list-style: none;
        padding: var(--ro-sp-panel-padding, 16px 20px);
        margin: 0 0 18px;
        background: var(--ro-sp-panel-bg, rgba(255, 255, 255, 0.55));
        border: 1px solid var(--ro-sp-line-color, var(--ro-glass-border, var(--ro-line)));
        border-radius: var(--ro-sp-panel-radius, var(--ro-radius-sm));
        font-size: 14px;
        color: var(--ro-sp-body-color, var(--ro-body));
}
.ro-sp-usp li { margin: 4px 0; padding-left: 22px; position: relative; }
.ro-sp-usp li::before { content: "\2713"; position: absolute; left: 0; color: var(--ro-success); font-weight: 700; }

/* Cross-sell add-ons (module-scoped twin of the product page's list). */
.ro-sp-addons {
        background: var(--ro-sp-panel-bg, var(--ro-card));
        border: 1px solid var(--ro-sp-line-color, var(--ro-line));
        border-radius: var(--ro-sp-panel-radius, 16px);
        padding: var(--ro-sp-panel-padding, 18px);
}
.ro-sp-addon-list { display: grid; gap: 8px; margin: 10px 0 14px; }
.ro-sp-addon-item {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 10px 12px;
        border: 1px solid var(--ro-sp-line-color, var(--ro-line));
        border-radius: calc(var(--ro-sp-panel-radius, 16px) * 0.7);
        cursor: pointer;
        background: var(--ro-card, #fff);
        transition: border-color 0.15s ease;
}
.ro-sp-addon-item:hover { border-color: var(--ro-primary); }
.ro-sp-addon-item.is-disabled { opacity: 0.6; cursor: default; }
.ro-sp-addon-item input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--ro-primary); flex: 0 0 auto; cursor: pointer; }
.ro-sp-addon-media { flex: 0 0 46px; }
.ro-sp-addon-media img { width: 46px; height: 46px; object-fit: cover; border-radius: 8px; }
.ro-sp-addon-body { flex: 1 1 auto; min-width: 0; display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.ro-sp-addon-name { font-weight: 700; font-size: 14px; color: var(--ro-sp-heading-color, var(--ro-ink)); }
.ro-sp-addon-price { font-weight: 700; color: var(--ro-sp-price-color, var(--ro-primary)); font-size: 14px; white-space: nowrap; }

/* Sections below the fold (details / specs / D&I / related).
 * v2.12.0: flat by default — heading + content separated by the section
 * gap, with NO panel padding/border/background (the old defaults added
 * an invisible 18px padding box that read as dead space). Setting a
 * Section Panel Background opts the sections into the boxed look via
 * the .ro-sp-section--panel modifier the renderer adds. */
.ro-sp-section { margin-top: var(--ro-sp-section-gap, 40px); }
.ro-sp-section--panel {
        background: var(--ro-sp-panel-bg, var(--ro-card));
        border: 1px solid var(--ro-sp-line-color, var(--ro-line));
        border-radius: var(--ro-sp-panel-radius, 16px);
        padding: var(--ro-sp-panel-padding, 18px);
}
.ro-sp-section-title {
        font-family: var(--ro-font-head);
        font-size: 22px;
        font-weight: 700;
        margin: 0 0 14px;
        color: var(--ro-sp-heading-color, var(--ro-ink));
}
.ro-sp-content { max-width: 760px; }
.ro-sp-content p { margin: 0 0 1em; }

/* v2.26.0: the Single Product information tabs (Details | Specifications |
 * Delivery & Installation | Inquire About This Product). Underline-style
 * tab bar in the store's aqua-fresh system; the server renders the first
 * present tab active and the other panels hidden, ro-divi.js switches
 * them (click + arrow keys) without reloading. */
.ro-sp-tabs-nav {
        display: flex;
        align-items: stretch;
        gap: 6px;
        border-bottom: 2px solid var(--ro-sp-line-color, var(--ro-line));
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
}
.ro-sp-tab {
        appearance: none;
        background: none;
        border: none;
        border-bottom: 2px solid transparent;
        margin-bottom: -2px;
        padding: 10px 16px 12px;
        font-family: var(--ro-font);
        font-size: 15px;
        font-weight: 600;
        color: var(--ro-muted);
        cursor: pointer;
        white-space: nowrap;
        transition: color 0.15s ease, border-color 0.15s ease;
}
.ro-sp-tab:hover { color: var(--ro-sp-heading-color, var(--ro-ink)); }
.ro-sp-tab:focus-visible { outline: 2px solid var(--ro-primary); outline-offset: -2px; border-radius: 6px; }
.ro-sp-tab.is-active {
        color: var(--ro-sp-heading-color, var(--ro-ink));
        border-bottom-color: var(--ro-primary);
}
.ro-sp-tab-panels { padding-top: 22px; }
.ro-sp-tab-panel[hidden] { display: none; }
.ro-sp-tab-panel:focus-visible { outline: none; }
/* The inquiry form card keeps its own padding; give it a little air
 * inside the panel instead of doubling the panel rhythm. */
.ro-sp-tab-panel > .ro-lead-form-wrap { margin-top: 2px; }

.ro-sp-spec-list { margin: 0; display: grid; grid-template-columns: minmax(140px, 220px) 1fr; row-gap: 0; column-gap: 18px; }
.ro-sp-spec-row { display: contents; }
.ro-sp-spec-row dt { font-weight: 700; color: var(--ro-sp-heading-color, var(--ro-ink)); padding: 9px 0; border-bottom: 1px solid var(--ro-sp-line-color, var(--ro-line)); }
.ro-sp-spec-row dd { margin: 0; padding: 9px 0; border-bottom: 1px solid var(--ro-sp-line-color, var(--ro-line)); }
.ro-sp-spec-row:last-child dt, .ro-sp-spec-row:last-child dd { border-bottom: 0; }

.ro-sp-dni-list { list-style: none; margin: 0; padding: 0; }
.ro-sp-dni-list li { position: relative; padding: 7px 0 7px 26px; }
.ro-sp-dni-list li::before { content: "\2192"; position: absolute; left: 2px; color: var(--ro-primary); font-weight: 700; }

/* v2.26.4: the related-products section renders its cards through the
 * SAME shared grid system as the RO Product Grid —
 * .ro-product-grid.ro-divi-grid-cols-N (the fixed-column rules above,
 * with the standard 4/3→2→1 responsive step-down) carrying the Card
 * Appearance CSS vars (--ro-grid-gap etc.). The old count-based
 * .ro-sp-related-grid rules are retired with the markup; the section
 * wrapper (.ro-sp-related) and its heading are unchanged. */

/* Single product responsive: stack on phones (980px, same as split layout). */
@media (max-width: 980px) {
        /* minmax(0,·) — a bare 1fr keeps an auto min-content floor that can
         * exceed the viewport (image-less placeholder column). */
        .ro-divi-sp-cols .ro-sp-layout { grid-template-columns: minmax(0, 1fr); gap: 22px; }
}
@media (max-width: 640px) {
        .ro-sp-title { font-size: clamp(24px, 6vw, 34px); }
        /* v2.26.0: tabs scroll horizontally on phones (nowrap labels,
         * thin scrollbar) — the bar never squeezes labels unreadable. */
        .ro-sp-tab { padding: 9px 12px 10px; font-size: 14px; }
        .ro-sp-tab-panels { padding-top: 18px; }
        /* v2.12.0: the actions row keeps its natural wrap — the button stays
         * Auto-width unless the admin explicitly set width/alignment for
         * mobile in the responsive tabs (no forced column stretching). */
        /* v2.26.3: the thumbs grid keeps 1fr auto-columns on phones —
         * 4 thumbs of a ~350px media column are ~80px each, still clean
         * and never overflowing (no scroll, no wrap). */
        .ro-sp-addon-body { flex-direction: column; gap: 2px; }
        .ro-sp-spec-list { grid-template-columns: 1fr; }
        .ro-sp-spec-row { display: block; }
}

/* =============================================================
 * v2.8.0 — Carousel scrolling & animation modes.
 * =========================================================== */

/* Drag / swipe off: navigation through arrows and dots only. */
.ro-carousel[data-drag="off"] .ro-carousel-viewport { pointer-events: none; }

/* Center mode: snaps center + the centered card is highlighted
 * (.is-center is maintained by ro-divi.js on scroll). */
.ro-carousel[data-center="on"] .ro-carousel-slide { scroll-snap-align: center; }
.ro-carousel[data-center="on"] .ro-carousel-slide .ro-product-card {
        opacity: 0.62;
        transform: scale(0.94);
        transition: opacity 0.25s ease, transform 0.25s ease;
}
.ro-carousel[data-center="on"] .ro-carousel-slide.is-center .ro-product-card {
        opacity: 1;
        transform: scale(1);
        box-shadow: 0 2px 6px rgba(12, 31, 51, 0.08), 0 24px 54px -18px rgba(12, 31, 51, 0.3);
}

/* Marquee mode: continuous smooth scrolling (v2.20.0 rework).
 *
 * v2.8.0–v2.15.0 BUG FIX: the track used `width: max-content`, which broke
 * the geometry two ways. (1) Percentage flex-bases resolve against the
 * container's own width, so "33% of the track" cards were sized from the
 * CONTENT-derived max-content width — cards rendered ~1128px wide instead
 * of a third of the viewport. (2) `translateX(-50%)` resolves against the
 * track's border-box width, which diverged from the real content width
 * (3463px vs 13917px measured) — the keyframe traveled 1731px while the
 * seamless distance was 6970px, producing a huge jump/flash every cycle.
 *
 * Now the track keeps the STANDARD carousel sizing (viewport-wide, content
 * overflows right, cards = N per view), and ro-divi.js feeds the keyframe
 * the exact loop distance: `--ro-marquee-shift` = -offsetLeft of the first
 * CLONED slide (one full copy, gaps included — pixel-exact, so the loop
 * point is invisible). JS also pads extra copies when a single copy is
 * narrower than the viewport, so small product counts never show a blank
 * stretch. Without JS the var() falls back to -50% (the old behavior).
 *
 * Pause on hover is pure CSS; reduced motion drops the animation entirely
 * (the row stays scrollable and the duplicated copies are hidden). */
.ro-carousel[data-mode="marquee"] .ro-carousel-viewport { overflow-x: hidden; scroll-snap-type: none; }
.ro-carousel[data-mode="marquee"] .ro-carousel-track {
        will-change: transform;
        animation: ro-marquee 20s linear infinite; /* v2.22.0: matches the Marquee Scroll Duration default; JS sets the real value from data-marquee-speed */
}
.ro-carousel[data-mode="marquee"][data-pause-hover="on"]:hover .ro-carousel-track { animation-play-state: paused; }
@keyframes ro-marquee {
        from { transform: translateX(0); }
        to { transform: translateX(var(--ro-marquee-shift, -50%)); }
}

/* Responsive "products per view" (v2.8.0): per-device values emitted as
 * data attributes; unset values inherit the desktop value. These rules
 * intentionally live AFTER the v1.x responsive block so a device value
 * wins over the desktop value at the same breakpoint. */
@media (max-width: 980px) {
        .ro-carousel[data-visible-tablet="1"] .ro-carousel-slide { flex-basis: calc(100% - 4px); }
        .ro-carousel[data-visible-tablet="2"] .ro-carousel-slide { flex-basis: calc(50% - (var(--ro-grid-gap, 22px) / 2)); }
        .ro-carousel[data-visible-tablet="3"] .ro-carousel-slide { flex-basis: calc(33.333% - (var(--ro-grid-gap, 22px) * 0.6667)); }
        .ro-carousel[data-visible-tablet="4"] .ro-carousel-slide { flex-basis: calc(25% - (var(--ro-grid-gap, 22px) * 0.75)); }
}
@media (max-width: 640px) {
        .ro-carousel[data-visible-mobile="1"] .ro-carousel-slide { flex-basis: 100%; }
        .ro-carousel[data-visible-mobile="2"] .ro-carousel-slide { flex-basis: 82%; }
        .ro-carousel[data-visible-mobile="3"] .ro-carousel-slide,
        .ro-carousel[data-visible-mobile="4"] .ro-carousel-slide { flex-basis: 82%; }
}

/* v2.8.0 reduced motion: marquee falls back to a plain scrollable row
 * and center-mode transitions are dropped. */
@media (prefers-reduced-motion: reduce) {
        .ro-carousel[data-mode="marquee"] .ro-carousel-viewport { overflow-x: auto; }
        .ro-carousel[data-mode="marquee"] .ro-carousel-track { animation: none; width: auto; }
        /* The duplicated marquee copy is pointless without the animation —
         * hide it so reduced-motion visitors see one plain scrollable row. */
        .ro-carousel[data-mode="marquee"] .ro-carousel-slide[aria-hidden="true"] { display: none; }
        .ro-carousel[data-center="on"] .ro-carousel-slide .ro-product-card { transition: none; }
}
