/* ============================================================
   Stitchylizard redesign — product page.
   Loaded ONLY on catalog_product_view. Design tokens (--ink,
   --lime, ...) come from the site-wide bundle
   (web/css/breeze/_default.less :root block).

   The page is a two-panel spread: the gallery sits on a cream
   field and stays put, while the buying column scrolls through
   price, options, artwork and the buy button.
   ============================================================ */

.sl-pdp .page-main,
.sl-pdp .columns,
.sl-pdp .column.main {
    max-width: none;
    padding: 0;
    margin: 0;
    min-height: 0;
}

.sl-pdp .product-info-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: start;
}

/* ---- Gallery ----
   The cream field runs the full height of the spread while the gallery itself
   sticks, so the garment stays in view as the buying column scrolls. */
.sl-pdp .product.media {
    background: var(--cream);
    padding: 40px 40px 48px;
    align-self: stretch;
    width: auto;
    float: none;
}

.sl-pdp .breeze-gallery {
    position: sticky;
    top: 84px;
    background: transparent;
    border-radius: 10px;
}

.sl-pdp .breeze-gallery.default .stage,
.sl-pdp .breeze-gallery .stage {
    background: #efe9de;
    border-radius: 10px;
    overflow: hidden;
}

.sl-pdp .breeze-gallery .main-image img,
.sl-pdp .breeze-gallery .main-image picture {
    mix-blend-mode: multiply;
}

.sl-pdp .breeze-gallery .thumbnails {
    gap: 10px;
    margin-top: 14px;
}

.sl-pdp .breeze-gallery .thumbnails img {
    border-radius: 6px;
    border: 2px solid transparent;
    opacity: .62;
    transition: border-color .2s, opacity .2s;
}

.sl-pdp .breeze-gallery .thumbnails .active img,
.sl-pdp .breeze-gallery .thumbnails img:hover {
    border-color: var(--lime);
    opacity: 1;
}

/* ---- Buying column ---- */
.sl-pdp .product-info-main {
    width: auto;
    float: none;
    padding: 44px 56px 52px 44px;
}

.sl-pdp .product-info-main .page-title-wrapper { margin: 0 0 6px; }

.sl-pdp .product-info-main .page-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(30px, 3.4vw, 46px);
    font-weight: 400;
    letter-spacing: .02em;
    line-height: 1.05;
    color: var(--ink);
    margin: 0;
    text-wrap: balance;
}

.sl-pdp .product-info-price {
    display: block;
    border: none;
    padding: 0;
    margin: 0 0 22px;
}

.sl-pdp .product-info-stock-sku {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0;
    margin: 0 0 4px;
    font-size: 12px;
    color: var(--muted);
    text-align: left;
    float: none;
}

.sl-pdp .product-info-stock-sku .stock.available span {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--green-ink);
}

.sl-pdp .product.attribute.sku {
    display: flex;
    gap: 5px;
    font-size: 12px;
    color: var(--muted);
}

.sl-pdp .product.attribute.sku .type { font-weight: 600; }
.sl-pdp .product.attribute.sku .value { display: inline; }

.sl-pdp .product-reviews-summary { margin: 6px 0 0; }

.sl-pdp .product-reviews-summary .action.add {
    font-size: 12px;
    color: var(--muted);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Magento's own price box reads $0.00 for calculator products: the volume
   ladder below is the real answer, so the box is hidden and the quote-only
   line the Itoris box renders is kept. */
.sl-pdp .product-info-price > .price-box { display: none; }

/* The live calculator sits under the ladder as a running total: quiet while it
   is only prompting for a quantity, prominent once it has a number. */
.sl-pdp .price-box-itoris { margin-top: 12px; }

.sl-pdp .price-box-itoris .itoris-price-placeholder {
    font-family: 'Barlow', sans-serif;
    font-size: 13px !important;
    font-weight: 500 !important;
    color: var(--muted);
}

.sl-pdp .price-box-itoris .itoris-price {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 36px !important;
    font-weight: 400 !important;
    letter-spacing: .02em;
    color: var(--ink);
}

/* ---- Volume pricing ladder ---- */
.sl-pricing { margin: 0 0 24px; }

.sl-pricing-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--slate);
    margin-bottom: 12px;
}

.sl-pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
    gap: 8px;
}

.sl-tier {
    display: block;
    background: var(--cream);
    border: 1.5px solid var(--border);
    border-radius: 8px;
    padding: 14px 10px;
    text-align: center;
    font-family: 'Barlow', sans-serif;
    cursor: pointer;
    transition: border-color .2s, background .2s;
}

.sl-tier:hover,
.sl-tier.is-active {
    border-color: var(--lime);
    background: rgba(110, 197, 177, .1);
}

.sl-tier-qty,
.sl-tier-val,
.sl-tier-unit { display: block; }

.sl-tier-qty {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--muted);
}

.sl-tier-val {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 26px;
    line-height: 1.1;
    margin-top: 4px;
    color: var(--ink);
}

.sl-tier-unit {
    font-size: 10px;
    font-weight: 500;
    color: var(--muted);
}

.sl-pricing-note {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    margin: 12px 0 0;
    font-size: 12px;
    line-height: 1.5;
    font-weight: 500;
    color: var(--green-ink);
}

.sl-pricing-note svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    margin-top: 2px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ---- Additional charges ---- */
.sl-charges {
    background: var(--cream);
    border: 1.5px solid var(--border);
    border-radius: 10px;
    padding: 20px 24px;
    margin: 0 0 24px;
}

.sl-charges-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--slate);
    margin-bottom: 12px;
}

.sl-charge-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
}

.sl-charge-row:last-child { border-bottom: none; }
.sl-charge-name { color: var(--slate); font-weight: 500; }
.sl-charge-price { color: var(--ink); font-weight: 700; white-space: nowrap; }

/* ---- Options ---- */
.sl-pdp .product-options-wrapper .fieldset { margin: 0; }

.sl-pdp .product-options-wrapper .field {
    margin: 0 0 22px;
    padding: 0;
    border: none;
}

.sl-pdp .product-options-wrapper .field > .label {
    display: block;
    margin: 0 0 10px;
    padding: 0;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--slate);
    text-align: left;
    float: none;
    width: auto;
}

.sl-pdp .product-options-wrapper .field > .control {
    width: auto;
    float: none;
}

/* MageWorx image swatches: colour choices are pictures of the garment, so
   they are shown large enough to actually judge the colour. */
.sl-pdp .swatch-attribute-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sl-pdp .mageworx-swatch-container { margin: 0; }

.sl-pdp .mageworx-swatch-option.image {
    width: 44px !important;
    height: 44px !important;
    border-radius: 50%;
    border: 2.5px solid transparent;
    background-size: cover !important;
    background-position: center !important;
    cursor: pointer;
    position: relative;
    transition: border-color .2s, transform .15s var(--ease-out);
}

.sl-pdp .mageworx-swatch-option.image:hover { transform: scale(1.1); }

.sl-pdp .mageworx-swatch-option.image.selected,
.sl-pdp .mageworx-swatch-option.image.active {
    border-color: var(--ink);
}

.sl-pdp .mageworx-swatch-option.image.selected::after,
.sl-pdp .mageworx-swatch-option.image.active::after {
    content: '';
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    border: 1.5px solid var(--lime);
    pointer-events: none;
}

/* Text and select inputs */
.sl-pdp .product-options-wrapper input[type="text"],
.sl-pdp .product-options-wrapper input[type="number"],
.sl-pdp .product-options-wrapper textarea,
.sl-pdp .product-options-wrapper select {
    font-family: 'Barlow', sans-serif;
    font-size: 14px;
    color: var(--ink);
    background: transparent;
    border: 1.5px solid var(--border);
    border-radius: 6px;
    padding: 11px 14px;
    height: auto;
    transition: border-color .2s, box-shadow .2s;
}

.sl-pdp .product-options-wrapper input[type="text"]:focus,
.sl-pdp .product-options-wrapper input[type="number"]:focus,
.sl-pdp .product-options-wrapper textarea:focus,
.sl-pdp .product-options-wrapper select:focus {
    outline: none;
    border-color: var(--lime);
    box-shadow: 0 0 0 3px rgba(110, 197, 177, .22);
}

/* ---- SL-32 single-location products ----
   These carry their own drag & drop upload area and a quote notice. Both ship
   with a palette of their own, so the redesign only re-points it: the dropzone
   exposes custom properties, and the notice is restyled here rather than in the
   CMS block so the current live theme keeps the block as authored. */
.sl-pdp .sl32-dropzone {
    --sl32-accent: var(--lime);
    --sl32-border: rgba(26, 26, 24, .18);
    --sl32-bg: transparent;
    max-width: none;
    margin: 0;
}

.sl-pdp .sl32-dropzone__zone:hover,
.sl-pdp .sl32-dropzone__zone:focus,
.sl-pdp .sl32-dropzone__zone.is-dragover {
    background: rgba(110, 197, 177, .06);
}

.sl-pdp .sl32-single-location-notice {
    margin: 0 0 22px;
    padding: 14px 18px;
    background: var(--cream);
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.6;
    color: var(--slate);
}

/* Artwork upload */
.sl-pdp .field.file.upload-design > .control {
    border: 2px dashed var(--border);
    border-radius: 10px;
    padding: 22px;
    text-align: center;
    transition: border-color .2s, background .2s;
}

.sl-pdp .field.file.upload-design > .control:hover {
    border-color: var(--lime);
    background: rgba(110, 197, 177, .05);
}

.sl-pdp .field.file.upload-design .note {
    font-size: 12px;
    color: var(--muted);
    margin-top: 8px;
}

/* ---- Quantity and buy ---- */
.sl-pdp .product-options-bottom,
.sl-pdp .box-tocart { margin: 0; }

.sl-pdp .box-tocart .fieldset {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    flex-wrap: wrap;
    margin: 0;
}

.sl-pdp .box-tocart .field.qty { margin: 0; }

.sl-pdp .box-tocart .field.qty > .label {
    display: block;
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--slate);
}

.sl-pdp .box-tocart input.qty {
    width: 96px;
    height: 52px;
    font-family: 'Barlow', sans-serif;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    color: var(--ink);
    background: transparent;
    border: 1.5px solid var(--border);
    border-radius: 6px;
}

.sl-pdp .box-tocart input.qty:focus {
    outline: none;
    border-color: var(--lime);
    box-shadow: 0 0 0 3px rgba(110, 197, 177, .22);
}

.sl-pdp .box-tocart .actions {
    flex: 1 1 240px;
    margin: 0;
    padding: 0;
}

.sl-pdp .action.primary.tocart {
    width: 100%;
    height: 52px;
    background: var(--lime);
    border: none;
    border-radius: 6px;
    color: var(--ink);
    font-family: 'Barlow', sans-serif;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background .2s, transform 160ms var(--ease-out);
}

.sl-pdp .action.primary.tocart:hover:not([disabled]) { background: var(--lime-d); }
.sl-pdp .action.primary.tocart:active:not([disabled]) { transform: scale(.98); }

.sl-pdp .action.primary.tocart[disabled] {
    background: var(--cream);
    color: var(--muted);
    cursor: not-allowed;
}

.sl-quote-instead {
    display: block;
    margin-top: 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--slate);
    text-align: center;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.sl-quote-instead:hover { color: var(--ink); }

/* ---- Trust strip ---- */
.sl-trust {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.sl-trust-card { text-align: center; padding: 8px; }

.sl-trust-card svg {
    width: 22px;
    height: 22px;
    margin-bottom: 8px;
    fill: none;
    stroke: var(--lime);
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.sl-trust-title,
.sl-trust-text { display: block; }

.sl-trust-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--ink);
}

.sl-trust-text {
    margin-top: 2px;
    font-size: 11px;
    line-height: 1.4;
    color: var(--muted);
}

.sl-pdp .product-social-links { display: none; }

/* ---- Detail sections ---- */
.sl-pdp .product.info.detailed {
    background: var(--cream);
    padding: 64px var(--sl-gutter);
    margin: 0;
}

.sl-pdp .product.data.items {
    max-width: 1100px;
    margin: 0 auto;
    border: none;
}

.sl-pdp .product.data.items > .item.title {
    margin: 0;
    border: none;
    background: transparent;
}

.sl-pdp .product.data.items > .item.title > .switch {
    display: inline-block;
    padding: 14px 26px;
    border: none;
    border-bottom: 2px solid transparent;
    background: transparent;
    font-family: 'Barlow', sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--muted);
    height: auto;
    transition: color .2s, border-color .2s;
}

.sl-pdp .product.data.items > .item.title > .switch:hover { color: var(--ink); }

.sl-pdp .product.data.items > .item.title.active > .switch {
    color: var(--ink);
    border-bottom-color: var(--lime);
    background: transparent;
}

.sl-pdp .product.data.items > .item.content {
    border: none;
    background: transparent;
    padding: 32px 0 0;
    margin: 0;
}

.sl-pdp .product.data.items > .item.content h2,
.sl-pdp .product.data.items > .item.content h3 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 28px;
    font-weight: 400;
    letter-spacing: .02em;
    color: var(--ink);
    margin: 0 0 14px;
}

.sl-pdp .product.data.items > .item.content p,
.sl-pdp .product.data.items > .item.content li {
    font-size: 14px;
    line-height: 1.8;
    color: var(--slate);
}

.sl-pdp .product.data.items > .item.content ul { padding-left: 20px; margin-bottom: 16px; }

.sl-pdp .product-disclaimer {
    max-width: 1100px;
    margin: 24px auto 0;
    padding: 20px 0 0;
    border-top: 1px solid var(--border);
    font-size: 13px;
    line-height: 1.7;
    color: var(--muted);
}

/* ---- Pricing debug panel (dev only, config-gated) ---- */
.sl-pdp .stitchylizard-pricing-debug,
.sl-pdp [class*="pricing-debug"] {
    font-size: 11px;
    border-radius: 8px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1280px) {
    .sl-pdp .product.media { padding: 32px var(--sl-gutter); }
    .sl-pdp .product-info-main { padding: 36px var(--sl-gutter) 44px; }
    .sl-pdp .product.info.detailed { padding: 56px var(--sl-gutter); }
}

@media (max-width: 900px) {
    .sl-pdp .product-info-wrapper { grid-template-columns: 1fr; }

    .sl-pdp .product.media {
        position: static;
        padding: 20px var(--sl-gutter) 24px;
    }

    /* Breeze switches the buying column to `display: contents` at this width so
       the title can rise above the gallery. That drops the column's own
       padding, so the gutter moves onto its children. */
    .sl-pdp .product-info-main { padding: 0; }
    .sl-pdp .product-info-main > * { margin-left: var(--sl-gutter); margin-right: var(--sl-gutter); }
    .sl-pdp .product-info-main > .page-title-wrapper { margin-top: 22px; }
    .sl-pdp .product-info-main > :last-child { margin-bottom: 40px; }

    .sl-pdp .product.info.detailed { padding: 40px var(--sl-gutter); }
    .sl-trust { grid-template-columns: 1fr; gap: 4px; }
    .sl-trust-card { display: flex; align-items: center; gap: 12px; text-align: left; padding: 8px 0; }
    .sl-trust-card svg { margin: 0; flex-shrink: 0; }
}

@media (max-width: 480px) {
    .sl-pricing-grid { grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); }
    .sl-tier-val { font-size: 22px; }
    .sl-pdp .box-tocart .fieldset { gap: 12px; }
    .sl-pdp .box-tocart input.qty { width: 80px; }
}

@media (prefers-reduced-motion: reduce) {
    .sl-tier,
    .sl-pdp .mageworx-swatch-option.image,
    .sl-pdp .action.primary.tocart { transition: none; }

    .sl-pdp .mageworx-swatch-option.image:hover { transform: none; }
}
