/* Herbalson Product Page — hero layout over the theme's card. */

.hsp-layout {
    --hsp-tint: #eef3ec;
    --hsp-tint-strong: #e2ebdf;
    --hsp-accent: var(--color-accent, #4a9a4a);
    --hsp-accent-hover: var(--color-accent-hover, #3d8240);
    --hsp-ink: var(--color-text, #0a0a0a);
    --hsp-muted: var(--color-text-light, #6b7280);
    --hsp-line: var(--color-border, #e5e7eb);
    display: flex !important;
    flex-direction: column;
    align-items: stretch !important;
    gap: 0;
}

.hsp-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    gap: 0 56px;
    align-items: start;
    order: 0;
    padding-bottom: 48px;
}

/* Desktop: photos on the left across both rows, title and purchase stacked on the right. */
.hsp-hero > .hsp-media { grid-column: 1; grid-row: 1 / span 2; }
.hsp-hero > .hsp-buy { grid-column: 2; grid-row: 1; }
.hsp-hero > .hsp-purchase { grid-column: 2; grid-row: 2; }

/* ---------- Media column ---------- */

.hsp-media {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.hsp-stage {
    position: relative;
    background: var(--hsp-tint);
    border-radius: 28px;
    padding: 72px 32px 32px 112px;
    min-height: 560px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hsp-stage .sp-badge-discount { top: 24px; left: 24px; }
.hsp-stage .sp-gallery-actions { top: 24px; right: 24px; }

.hsp-photo { width: 100%; max-width: 440px; }
.hsp-photo .sp-main-image {
    background: transparent;
    aspect-ratio: 3 / 4;
}
.hsp-photo .sp-main-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    mix-blend-mode: multiply;
}

.hsp-trust {
    position: absolute;
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 22px;
    margin: 0;
    padding: 0;
    list-style: none;
    width: 72px;
}
.hsp-trust li {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
    font-size: .625rem;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--hsp-ink);
}
.hsp-trust svg {
    box-sizing: content-box;
    width: 22px;
    height: 22px;
    padding: 13px;
    border-radius: 50%;
    background: #fff;
    color: var(--hsp-accent);
    box-shadow: 0 2px 10px rgba(16, 24, 16, .06);
}

.hsp-thumbs {
    display: flex;
    align-items: center;
    gap: 10px;
}
.hsp-thumbs .sp-thumbnails {
    flex: 1;
    min-width: 0;
    margin-top: 0;
    gap: 10px;
    scroll-behavior: smooth;
    scrollbar-width: none;
}
.hsp-thumbs .sp-thumbnails::-webkit-scrollbar { display: none; }
.hsp-thumbs .sp-thumb {
    width: 88px;
    height: 88px;
    border-radius: 14px;
    background: var(--hsp-tint);
}
.hsp-thumbs .sp-thumb img { width: 100%; height: 100%; object-fit: cover; }
.hsp-thumbs-nav {
    flex: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--hsp-line);
    background: #fff;
    color: var(--hsp-ink);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color var(--transition, .2s ease);
}
.hsp-thumbs-nav:hover { border-color: var(--hsp-ink); }
.hsp-thumbs-nav[hidden] { display: none; }

.hsp-proof {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 18px 22px;
    border-radius: 20px;
    background: #fff;
    border: 1px solid var(--hsp-line);
    color: var(--hsp-ink);
    text-decoration: none;
}
.hsp-faces { display: flex; flex: none; }
.hsp-face {
    width: 44px;
    height: 44px;
    margin-left: -10px;
    border-radius: 50%;
    border: 3px solid #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    color: #fff;
}
.hsp-face:first-child { margin-left: 0; }
.hsp-face--0 { background: #4a9a4a; }
.hsp-face--1 { background: #2f6f3a; }
.hsp-face--2 { background: #8fb98a; }
.hsp-face--3 { background: #1f2a1f; }
.hsp-proof-text { display: flex; flex-direction: column; gap: 2px; font-size: .875rem; color: var(--hsp-muted); }
.hsp-proof-text strong { color: var(--hsp-ink); font-size: .9375rem; }
.hsp-proof-stars .hsb-stars { margin-bottom: 2px; }

/* ---------- Buy column ---------- */

.hsp-buy { min-width: 0; }

.hsp-purchase { min-width: 0; }

.hsp-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    font-size: .8125rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--hsp-ink);
}
.hsp-eyebrow svg { color: var(--hsp-accent); }

.hsp-buy .sp-title {
    text-transform: none;
    font-size: clamp(2rem, 3vw, 2.875rem);
    font-weight: 800;
    letter-spacing: -.03em;
    line-height: 1.05;
    margin: 0 0 12px;
}
.hsp-title-main { display: block; }
.hsp-title-sub {
    display: block;
    margin-top: 8px;
    font-size: .5em;
    font-weight: 700;
    letter-spacing: -.01em;
    line-height: 1.25;
    color: var(--hsp-accent);
}

.hsp-buy .hsb-rating { margin: 4px 0 16px; }
.hsp-buy .sp-subtitle {
    font-size: 1.0625rem;
    line-height: 1.55;
    color: #374151;
    margin: 0 0 22px;
    white-space: normal;
}

.hsp-benefits {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 28px;
    margin: 0 0 28px;
    padding: 0;
    list-style: none;
}
.hsp-benefits li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 0;
    border-bottom: 1px solid var(--hsp-line);
    font-size: .875rem;
    font-weight: 600;
    line-height: 1.4;
}
.hsp-tick {
    flex: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--hsp-accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hsp-tick svg { width: 13px; height: 13px; stroke-width: 3; }

.hsp-label {
    margin: 0 0 16px;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.hsp-packs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}
.hsp-pack {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    padding: 12px 6px 14px;
    border: 1.5px solid var(--hsp-line);
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    text-align: center;
    transition: border-color var(--transition, .2s ease), box-shadow var(--transition, .2s ease);
}
.hsp-pack:hover { border-color: #c7d3c4; }
.hsp-pack.is-active {
    border: 2px solid var(--hsp-accent);
    box-shadow: 0 6px 16px rgba(74, 154, 74, .14);
}
.hsp-pack input { position: absolute; opacity: 0; pointer-events: none; }
.hsp-pack:has(input:focus-visible) { outline: 2px solid var(--hsp-accent); outline-offset: 2px; }
.hsp-pack-tag {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
    white-space: nowrap;
    padding: 2px 8px;
    border-radius: 5px;
    background: var(--hsp-accent);
    color: #fff;
    font-size: .5625rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.hsp-pack-tag--soft { background: var(--hsp-tint-strong); color: #2f6f3a; }
.hsp-pack-name { font-size: .8125rem; font-weight: 800; text-transform: uppercase; letter-spacing: .01em; line-height: 1.3; }
.hsp-pack-supply { font-size: .6875rem; color: var(--hsp-muted); line-height: 1.3; }
.hsp-pack-price {
    margin-top: 6px;
    font-family: 'Sora', var(--font-family, sans-serif);
    font-size: 1.0625rem;
    font-weight: 800;
    letter-spacing: -.02em;
    line-height: 1.25;
}
.hsp-pack-each { font-size: .6875rem; color: var(--hsp-muted); line-height: 1.3; }
.hsp-pack-save {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translate(-50%, 50%);
    white-space: nowrap;
    padding: 2px 8px;
    border-radius: 5px;
    background: var(--hsp-ink);
    color: #fff;
    font-size: .5625rem;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
}
.hsp-pack-save .amount, .hsp-pack-save bdi { color: inherit; }

.hsp-plans { display: flex; flex-direction: column; gap: 10px; margin: 22px 0 16px; }
.hsp-plan {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    border: 1.5px solid var(--hsp-line);
    border-radius: 14px;
    cursor: pointer;
    transition: border-color var(--transition, .2s ease), background var(--transition, .2s ease);
}
.hsp-plan.is-active { border: 2px solid var(--hsp-accent); background: #f8fbf7; }
.hsp-plan input { position: absolute; opacity: 0; pointer-events: none; }
.hsp-plan:has(input:focus-visible) { outline: 2px solid var(--hsp-accent); outline-offset: 2px; }
.hsp-plan-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1.5px solid #c4c9c2;
    background: #fff;
}
.hsp-plan.is-active .hsp-plan-dot { border: 6px solid var(--hsp-accent); }
.hsp-plan-text { display: flex; flex-direction: column; gap: 2px; font-size: .8125rem; color: var(--hsp-muted); }
.hsp-plan-text strong { font-size: .9375rem; color: var(--hsp-ink); }
.hsp-plan-price { display: flex; align-items: baseline; gap: 8px; font-weight: 800; font-size: 1.0625rem; white-space: nowrap; }
.hsp-plan-price del { font-weight: 400; font-size: .875rem; color: var(--hsp-muted); }
.hsp-plan-price del:empty { display: none; }

.hsp-buy-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px 28px;
    border: 0;
    border-radius: 14px;
    background: var(--hsp-accent);
    color: #fff;
    font-family: inherit;
    font-size: 1.0625rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background var(--transition, .2s ease);
}
.hsp-buy-btn:hover { background: var(--hsp-accent-hover); }
.hsp-buy-label { margin-left: auto; }
.hsp-buy-sep { width: 1px; height: 20px; background: rgba(255, 255, 255, .5); }
.hsp-buy-price .amount, .hsp-buy-price bdi { color: inherit; }
.hsp-buy-btn svg { margin-left: auto; width: 22px; height: 22px; }

.hsp-cart-btn {
    width: 100%;
    margin-top: 10px;
    padding: 15px 20px;
    border: 1.5px solid var(--hsp-line);
    border-radius: 14px;
    background: #fff;
    color: var(--hsp-ink);
    font-family: inherit;
    font-size: .9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color var(--transition, .2s ease);
}
.hsp-cart-btn:hover { border-color: var(--hsp-ink); }

.hsp-guarantee {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 22px;
    margin-top: 18px;
    font-size: .8125rem;
    color: var(--hsp-muted);
}
.hsp-guarantee-item { display: inline-flex; align-items: center; gap: 6px; }
.hsp-guarantee-item svg { width: 16px; height: 16px; color: var(--hsp-accent); }
.hsp-guarantee-item strong { color: var(--hsp-ink); font-weight: 600; }

.hsp-fallback .sp-price-card { padding: 0; border: 0; background: none; box-shadow: none; }
.hsp-fallback .sp-price-row { margin-bottom: 16px; }

/* Specs card next to "How to take". */
.hsp-intro { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.hsp-specs-card .sp-specs { margin: 0; padding: 0; border: 0; }
.hsp-specs-card .sp-specs-table td { padding: 10px 0; border-bottom: 1px solid var(--hsp-line); font-size: .875rem; vertical-align: top; }
.hsp-specs-card .sp-specs-table tr:last-child td { border-bottom: 0; }

/* ---------- Responsive ---------- */

@media (max-width: 1200px) {
    .hsp-hero { gap: 36px; }
    .hsp-stage { padding: 64px 24px 24px 96px; min-height: 480px; }
    .hsp-trust { left: 16px; }
}

@media (max-width: 1024px) {
    /*
     * Mobile: name and rating, photos, the buy buttons right under them, then
     * the description and benefits. .hsp-buy is unwrapped so its title can
     * move above the photos.
     */
    .hsp-hero { display: flex; flex-direction: column; gap: 16px; }
    .hsp-hero > .hsp-buy { display: contents; }
    .hsp-hero > .hsp-media, .hsp-hero > .hsp-purchase { width: 100%; max-width: 100%; min-width: 0; }
    .hsp-buy > .hsp-eyebrow { order: -3; }
    .hsp-buy > .sp-title { order: -2; margin: 0; }
    .hsp-buy > .hsb-rating { order: -1; margin: 0; }
    .hsp-hero > .hsp-media { order: 0; }
    .hsp-hero > .hsp-purchase { order: 1; }
    .hsp-buy > .sp-subtitle { order: 3; }
    .hsp-buy > .hsp-benefits { order: 4; }
    .hsp-intro { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .hsp-hero { padding-bottom: 32px; }
    /* Trust icons go under the photo instead of covering a third of it. */
    .hsp-stage { border-radius: 20px; min-height: 0; padding: 52px 16px 16px; flex-direction: column; }
    .hsp-stage .hsp-photo { order: 1; }
    .hsp-trust { position: static; transform: none; order: 2; flex-direction: row; justify-content: space-around; gap: 8px; width: 100%; margin-top: 12px; }
    .hsp-trust li { flex: 1 1 0; }
    .hsp-trust li { font-size: .5625rem; }
    .hsp-trust svg { width: 18px; height: 18px; padding: 10px; }
    .hsp-thumbs .sp-thumb { width: 64px; height: 64px; border-radius: 10px; }
    .hsp-thumbs-nav { display: none; }
    .hsp-proof { padding: 14px 16px; gap: 12px; }
    .hsp-face { width: 36px; height: 36px; font-size: .875rem; }
    .hsp-buy .sp-title { font-size: 1.75rem; }
    .hsp-benefits { grid-template-columns: 1fr; }
    .hsp-packs { gap: 6px; }
    .hsp-pack { padding: 12px 2px 14px; }
    .hsp-pack-name { font-size: .75rem; }
    .hsp-pack-price { font-size: 1rem; }
    .hsp-plan { padding: 14px; gap: 10px; }
    .hsp-buy-btn { padding: 18px 20px; font-size: .9375rem; }
}
