/* Final PDP layer: compact, readable and isolated from catalog-card rules. */
body:not(.admin-shell) .product-breadcrumbs {
    width: min(1180px, calc(100% - 40px));
    padding-top: 12px;
}

body:not(.admin-shell) .product-breadcrumbs a {
    min-height: 38px;
}

body:not(.admin-shell) .product-detail.product-conversion.section {
    width: min(1180px, calc(100% - 40px));
    grid-template-columns: minmax(280px, 350px) minmax(0, 1fr);
    gap: clamp(36px, 6vw, 78px);
    align-items: start;
    padding-block: 20px 56px;
}

body:not(.admin-shell) .product-gallery-shell {
    position: sticky;
    top: 90px;
    width: min(100%, 330px);
    justify-self: center;
}

body:not(.admin-shell) .product-gallery-shell .product-gallery {
    width: 100%;
    min-height: 0;
    aspect-ratio: 9 / 16;
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--border), transparent 20%);
    border-radius: 10px;
    background: color-mix(in srgb, var(--surface), transparent 6%);
    box-shadow: 0 18px 44px color-mix(in srgb, #000, transparent 86%);
}

body:not(.admin-shell) .product-gallery-shell .product-gallery > img[data-gallery-main] {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: none;
}

body:not(.admin-shell) .gallery-badge {
    top: 12px;
    left: 12px;
    max-width: calc(100% - 24px);
    padding: 7px 10px;
    border-radius: 6px;
    background: color-mix(in srgb, var(--bg), transparent 10%);
    backdrop-filter: blur(10px);
}

body:not(.admin-shell) .product-gallery-shell .gallery-thumbnails {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 7px;
    margin-top: 10px;
}

body:not(.admin-shell) .product-gallery-shell .gallery-thumbnail {
    width: 100%;
    min-width: 0;
    min-height: 58px;
    aspect-ratio: 9 / 16;
    padding: 3px;
    overflow: hidden;
    border-radius: 6px;
    background: var(--surface);
}

body:not(.admin-shell) .product-gallery-shell .gallery-thumbnail img {
    width: 100%;
    height: 100%;
    border-radius: 4px;
    object-fit: cover;
}

body:not(.admin-shell) .product-info {
    min-width: 0;
    max-width: 720px;
    padding-top: 4px;
}

body:not(.admin-shell) .product-kicker {
    margin-bottom: 10px;
    letter-spacing: .08em;
}

body:not(.admin-shell) .product-info h1 {
    max-width: 760px;
    margin: 0 0 10px;
    font-size: clamp(2.65rem, 5vw, 4.75rem);
    line-height: .98;
    letter-spacing: 0;
    overflow-wrap: anywhere;
    text-wrap: balance;
}

body:not(.admin-shell) .product-byline {
    gap: 5px 9px;
    margin-bottom: 10px;
    font-size: .74rem;
}

body:not(.admin-shell) .product-sku {
    margin-left: 0;
    padding-left: 10px;
    border-left: 1px solid var(--border);
}

body:not(.admin-shell) .product-rating {
    display: inline-flex;
    min-height: 40px;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 12px;
    color: var(--text);
}

body:not(.admin-shell) .product-rating > span {
    color: var(--gold);
    font-size: .82rem;
    letter-spacing: .04em;
}

body:not(.admin-shell) .product-rating small {
    color: var(--muted);
    text-decoration: underline;
    text-underline-offset: 3px;
}

body:not(.admin-shell) .product-rating-empty {
    flex-direction: row;
    align-items: center;
}

body:not(.admin-shell) .product-rating-empty strong {
    font-size: .76rem;
}

body:not(.admin-shell) .product-info .product-overview {
    display: grid;
    gap: 6px;
    margin: 0 0 14px;
    padding: 13px 15px !important;
    border: 1px solid color-mix(in srgb, var(--border), transparent 26%);
    border-left: 3px solid color-mix(in srgb, var(--accent), transparent 25%);
    border-radius: 7px;
    background: color-mix(in srgb, var(--surface), transparent 30%);
}

body:not(.admin-shell) .product-overview p {
    max-width: 70ch;
    color: color-mix(in srgb, var(--text), var(--muted) 24%);
    font-size: .9rem;
    line-height: 1.62;
}

body:not(.admin-shell) .product-conversion .spec-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin: 0 0 14px;
    border: 0;
}

body:not(.admin-shell) .product-conversion .spec-row > div {
    min-width: 0;
    min-height: 72px;
    align-content: center;
    gap: 4px;
    padding: 11px 12px;
    border: 1px solid color-mix(in srgb, var(--border), transparent 16%);
    border-radius: 8px;
    background: color-mix(in srgb, var(--surface), transparent 18%);
}

body:not(.admin-shell) .product-conversion .spec-row dt {
    color: var(--muted);
    font-size: .61rem;
    font-weight: 750;
    letter-spacing: .04em;
    text-transform: uppercase;
}

body:not(.admin-shell) .product-conversion .spec-row dd {
    margin: 0;
    font-size: .88rem;
    font-weight: 800;
    line-height: 1.3;
}

body:not(.admin-shell) .product-conversion .buy-box {
    gap: 13px;
    padding: 18px;
    border: 1px solid color-mix(in srgb, var(--border), transparent 5%);
    border-radius: 10px;
    background: color-mix(in srgb, var(--surface), transparent 4%);
    box-shadow: 0 14px 34px color-mix(in srgb, #000, transparent 91%);
}

body:not(.admin-shell) .buy-box-heading {
    gap: 14px;
    align-items: flex-start;
}

body:not(.admin-shell) .buy-price {
    font-size: clamp(1.8rem, 4vw, 2.35rem);
}

body:not(.admin-shell) .stock-status {
    flex: 0 0 auto;
    border-radius: 6px;
}

body:not(.admin-shell) .variant-field select,
body:not(.admin-shell) .quantity-field input {
    min-height: 50px;
    border-radius: 7px;
}

body:not(.admin-shell) .buy-controls {
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 10px;
}

body:not(.admin-shell) .add-to-bag {
    min-height: 54px;
    border-radius: 7px;
}

body:not(.admin-shell) .purchase-assurances {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    padding-top: 12px;
}

body:not(.admin-shell) .purchase-assurances span {
    min-width: 0;
    min-height: 36px;
    justify-content: center;
    padding-inline: 8px;
    border-right: 1px solid var(--border);
    color: var(--muted);
    text-align: center;
}

body:not(.admin-shell) .purchase-assurances span:last-child {
    border-right: 0;
}

body:not(.admin-shell) .purchase-assurances b {
    color: var(--accent);
}

body:not(.admin-shell) .strain-snapshot {
    border-color: color-mix(in srgb, var(--border), transparent 28%);
    background: color-mix(in srgb, var(--surface), transparent 42%);
}

body:not(.admin-shell) .strain-snapshot-grid {
    width: min(1180px, calc(100% - 40px));
}

body:not(.admin-shell) .strain-snapshot-grid > a {
    min-height: 108px;
    padding: 18px 24px !important;
}

body:not(.admin-shell) .strain-details,
body:not(.admin-shell) .sensory-profile-enhanced,
body:not(.admin-shell) .product-story,
body:not(.admin-shell) .related-genetics,
body:not(.admin-shell) .reviews-section {
    width: min(1180px, calc(100% - 40px));
}

body:not(.admin-shell) .strain-details,
body:not(.admin-shell) .sensory-profile-enhanced,
body:not(.admin-shell) .reviews-section {
    padding-block: clamp(44px, 6vw, 72px);
}

body:not(.admin-shell) .strain-details .section-heading h2,
body:not(.admin-shell) .sensory-profile-enhanced .section-heading h2,
body:not(.admin-shell) .reviews-section .section-heading h2 {
    font-size: clamp(2rem, 4vw, 3.5rem);
}

body:not(.admin-shell) .strain-detail-card,
body:not(.admin-shell) .sensory-card,
body:not(.admin-shell) .review-grid article {
    border-color: color-mix(in srgb, var(--border), transparent 12%);
    background: color-mix(in srgb, var(--surface), transparent 12%);
    box-shadow: none;
}

body:not(.admin-shell) .sensory-description {
    display: block;
    min-height: 0;
    max-height: none;
    overflow: visible;
    -webkit-line-clamp: unset;
}

body:not(.admin-shell) .product-story {
    grid-template-columns: minmax(0, 1fr);
    max-width: 980px;
    gap: 22px;
    padding-block: clamp(46px, 6vw, 76px);
}

body:not(.admin-shell) .product-story > header {
    max-width: 800px;
}

body:not(.admin-shell) .product-story > header h2 {
    font-size: clamp(2rem, 4.2vw, 3.65rem);
}

body:not(.admin-shell) .product-story-body {
    max-width: 860px;
    padding-top: 22px;
}

body:not(.admin-shell) .product-story-body :where(p, li) {
    font-size: clamp(.98rem, 1.25vw, 1.08rem);
    line-height: 1.78;
}

html[data-theme="light"] body:not(.admin-shell) .product-gallery-shell .product-gallery,
html[data-theme="light"] body:not(.admin-shell) .product-info .product-overview,
html[data-theme="light"] body:not(.admin-shell) .product-conversion .spec-row > div,
html[data-theme="light"] body:not(.admin-shell) .product-conversion .buy-box,
html[data-theme="light"] body:not(.admin-shell) .strain-detail-card,
html[data-theme="light"] body:not(.admin-shell) .sensory-card,
html[data-theme="light"] body:not(.admin-shell) .review-grid article {
    background: #fff;
    border-color: #dbe1d7;
}

html[data-theme="light"] body:not(.admin-shell) .product-gallery-shell .product-gallery,
html[data-theme="light"] body:not(.admin-shell) .product-conversion .buy-box {
    box-shadow: 0 14px 34px rgba(35, 52, 31, .08);
}

@media (max-width: 900px) {
    body:not(.admin-shell) .product-detail.product-conversion.section {
        grid-template-columns: minmax(0, 1fr);
        gap: 28px;
    }

    body:not(.admin-shell) .product-gallery-shell {
        position: static;
        width: min(72vw, 300px);
    }

    body:not(.admin-shell) .product-info {
        max-width: 760px;
        margin-inline: auto;
    }
}

@media (max-width: 600px) {
    body:not(.admin-shell) .product-breadcrumbs,
    body:not(.admin-shell) .product-detail.product-conversion.section,
    body:not(.admin-shell) .strain-snapshot-grid,
    body:not(.admin-shell) .strain-details,
    body:not(.admin-shell) .sensory-profile-enhanced,
    body:not(.admin-shell) .product-story,
    body:not(.admin-shell) .related-genetics,
    body:not(.admin-shell) .reviews-section {
        width: min(100% - 28px, 1180px);
    }

    body:not(.admin-shell) .product-breadcrumbs {
        padding-top: 4px;
    }

    body:not(.admin-shell) .product-breadcrumbs li:nth-child(2),
    body:not(.admin-shell) .product-breadcrumbs li:nth-child(3) {
        display: none;
    }

    body:not(.admin-shell) .product-detail.product-conversion.section {
        gap: 22px;
        padding-block: 8px 34px;
    }

    body:not(.admin-shell) .product-gallery-shell {
        width: min(68vw, 270px);
    }

    body:not(.admin-shell) .product-gallery-shell .gallery-thumbnails {
        display: flex;
        max-width: 100%;
        overflow-x: auto;
        padding: 2px 1px 6px;
        overscroll-behavior-inline: contain;
        scrollbar-width: thin;
    }

    body:not(.admin-shell) .product-gallery-shell .gallery-thumbnail {
        flex: 0 0 46px;
        min-height: 76px;
    }

    body:not(.admin-shell) .product-info h1 {
        font-size: clamp(2.15rem, 11.5vw, 3.25rem);
    }

    body:not(.admin-shell) .product-sku {
        width: 100%;
        padding-left: 0;
        border-left: 0;
    }

    body:not(.admin-shell) .product-rating {
        width: 100%;
    }

    body:not(.admin-shell) .product-info .product-overview {
        padding: 12px 13px !important;
    }

    body:not(.admin-shell) .product-conversion .spec-row {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        margin-bottom: 14px;
    }

    body:not(.admin-shell) .product-conversion .spec-row > div {
        min-height: 70px;
        padding: 11px 12px;
        border: 1px solid color-mix(in srgb, var(--border), transparent 12%);
        border-radius: 8px;
    }

    body:not(.admin-shell) .product-conversion .buy-box {
        padding: 15px;
    }

    body:not(.admin-shell) .purchase-assurances {
        grid-template-columns: minmax(0, 1fr);
    }

    body:not(.admin-shell) .purchase-assurances span {
        justify-content: flex-start;
        min-height: 38px;
        padding-inline: 0;
        border-right: 0;
        border-bottom: 1px solid var(--border);
        text-align: left;
    }

    body:not(.admin-shell) .purchase-assurances span:last-child {
        border-bottom: 0;
    }

    body:not(.admin-shell) .strain-snapshot-grid > a {
        min-height: 0;
        padding: 16px 0 !important;
    }

    body:not(.admin-shell) .strain-details .section-heading,
    body:not(.admin-shell) .sensory-profile-enhanced .section-heading {
        gap: 10px;
        margin-bottom: 20px;
    }

    body:not(.admin-shell) .strain-details .section-heading h2,
    body:not(.admin-shell) .sensory-profile-enhanced .section-heading h2,
    body:not(.admin-shell) .reviews-section .section-heading h2 {
        font-size: clamp(1.85rem, 9vw, 2.65rem);
    }

    body:not(.admin-shell) .strain-detail-card,
    body:not(.admin-shell) .sensory-card,
    body:not(.admin-shell) .review-grid article {
        padding: 16px !important;
    }

    body:not(.admin-shell) .product-story > header h2 {
        font-size: clamp(1.8rem, 9vw, 2.6rem);
    }

    body:not(.admin-shell) .product-story-body {
        padding-top: 18px;
    }
}

@media (max-width: 420px) {
    body:not(.admin-shell) .product-gallery-shell {
        width: min(72vw, 252px);
    }

    body:not(.admin-shell) .buy-controls {
        grid-template-columns: minmax(0, 1fr);
    }

    body:not(.admin-shell) .buy-box-heading {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
    }

    body:not(.admin-shell) .stock-status {
        justify-self: start;
    }
}

@media (hover: none) {
    body:not(.admin-shell) .product-gallery-shell .gallery-thumbnail:hover {
        transform: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    body:not(.admin-shell) .product-gallery-shell .gallery-thumbnail {
        transition: none;
    }
}
