/* =========================================================
   JELLY TRADERS — PREMIUM PRODUCT DETAILS
   File: assets/css/product.css

   Keep the existing PHP markup unchanged.
   Load this file after standalone.css and ecommerce.css.
   ========================================================= */

/* ---------------------------------------------------------
   1. Product-page variables
---------------------------------------------------------- */
:root {
    --pd-primary: var(--primary-color, #07883f);
    --pd-primary-dark: #05672f;
    --pd-primary-deep: #064a27;
    --pd-primary-soft: #edf8f1;
    --pd-primary-faint: #f7fcf9;

    --pd-page: #f8faf9;
    --pd-card: #ffffff;
    --pd-card-soft: #fbfcfb;
    --pd-heading: #102018;
    --pd-text: #4f6057;
    --pd-muted: #78857e;

    --pd-border: #e2e9e5;
    --pd-border-strong: #d2ddd6;
    --pd-danger: #b42318;
    --pd-danger-soft: #fff1ef;

    --pd-radius-sm: 12px;
    --pd-radius-md: 17px;
    --pd-radius-lg: 23px;
    --pd-radius-xl: 30px;

    --pd-shadow-xs: 0 3px 10px rgba(16, 32, 24, 0.04);
    --pd-shadow-sm: 0 14px 36px rgba(16, 32, 24, 0.065);
    --pd-shadow-md: 0 24px 60px rgba(16, 32, 24, 0.09);
    --pd-shadow-lg: 0 34px 90px rgba(16, 32, 24, 0.13);

    --pd-transition: 180ms ease;
}

/* ---------------------------------------------------------
   2. Product-page shell
---------------------------------------------------------- */
.product-detail {
    position: relative;
    overflow: hidden;
    padding: 24px 0 12px;
    background:
        radial-gradient(
            circle at 96% 12%,
            rgba(7, 136, 63, 0.065),
            transparent 28rem
        ),
        radial-gradient(
            circle at 1% 65%,
            rgba(7, 136, 63, 0.03),
            transparent 24rem
        ),
        var(--pd-page);
}

.product-detail::before {
    position: absolute;
    top: 80px;
    right: -180px;
    width: 430px;
    height: 430px;
    border: 1px solid rgba(7, 136, 63, 0.055);
    border-radius: 50%;
    content: "";
    pointer-events: none;
}

.product-detail-container {
    position: relative;
    z-index: 1;
}

/* ---------------------------------------------------------
   3. Breadcrumb
---------------------------------------------------------- */
.product-breadcrumb {
    display: flex;
    min-height: 42px;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 22px;
    color: var(--pd-muted);
    font-size: 11px;
    font-weight: 700;
}

.product-breadcrumb a,
.product-breadcrumb > span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.product-breadcrumb a {
    color: #5a6860;
}

.product-breadcrumb a:hover {
    color: var(--pd-primary);
}

.product-breadcrumb > i {
    color: #a6b0aa;
    font-size: 8px;
}

.product-breadcrumb [aria-current="page"] {
    max-width: 430px;
    overflow: hidden;
    color: var(--pd-primary);
    font-weight: 850;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ---------------------------------------------------------
   4. Main two-column layout
---------------------------------------------------------- */
.product-detail-grid {
    display: grid;
    grid-template-columns:
        minmax(430px, 0.98fr)
        minmax(520px, 1.02fr);
    align-items: start;
    gap: clamp(40px, 5vw, 74px);
}

/* ---------------------------------------------------------
   5. Product media card
---------------------------------------------------------- */
.product-detail-media-column {
    min-width: 0;
}

.product-gallery {
    position: sticky;
    top: 108px;
    display: grid;
    gap: 18px;
}

.product-detail-media {
    position: relative;
    display: grid;
    min-height: clamp(570px, 57vw, 690px);
    overflow: hidden;
    border: 1px solid var(--pd-border);
    border-radius: var(--pd-radius-xl);
    place-items: center;
    background:
        radial-gradient(
            circle at 50% 42%,
            rgba(7, 136, 63, 0.055),
            transparent 52%
        ),
        linear-gradient(145deg, #ffffff 0%, #f6faf7 100%);
    box-shadow: var(--pd-shadow-md);
    isolation: isolate;
}

.product-detail-media::before {
    position: absolute;
    inset: 22px;
    z-index: -1;
    border: 1px solid rgba(7, 136, 63, 0.08);
    border-radius: 22px;
    content: "";
}

.product-detail-media::after {
    position: absolute;
    right: -74px;
    bottom: -85px;
    z-index: -1;
    width: 250px;
    height: 250px;
    border-radius: 50%;
    background: rgba(7, 136, 63, 0.035);
    content: "";
}

.product-detail-media img {
    width: 100%;
    max-width: 640px;
    height: auto;
    max-height: 650px;
    padding: clamp(38px, 5vw, 68px);
    object-fit: contain;
    object-position: center;
    filter: drop-shadow(0 24px 34px rgba(16, 32, 24, 0.12));
    transition:
        transform 320ms ease,
        filter 320ms ease;
}

.product-detail-media:hover img {
    transform: scale(1.018);
    filter: drop-shadow(0 28px 42px rgba(16, 32, 24, 0.15));
}

.product-gallery-thumbs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(84px, 112px));
    gap: 13px;
    align-items: center;
    justify-content: center;
}

.product-gallery-thumb {
    display: grid;
    aspect-ratio: 1;
    width: 100%;
    overflow: hidden;
    place-items: center;
    border: 1px solid var(--pd-border);
    border-radius: 14px;
    background: #ffffff;
    box-shadow: var(--pd-shadow-xs);
    cursor: pointer;
    opacity: 0.72;
    transition:
        border-color 180ms ease,
        box-shadow 180ms ease,
        opacity 180ms ease,
        transform 180ms ease;
}

.product-gallery-thumb img {
    width: 100%;
    height: 100%;
    padding: 8px;
    object-fit: contain;
}

.product-gallery-thumb:hover,
.product-gallery-thumb.is-active {
    border-color: color-mix(in srgb, var(--pd-primary) 42%, #ffffff);
    box-shadow: 0 12px 28px rgba(16, 32, 24, 0.12);
    opacity: 1;
    transform: translateY(-1px);
}

.product-detail-badge {
    position: absolute;
    z-index: 2;
    top: 24px;
    left: 24px;
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    padding: 0 14px;
    border: 1px solid #bfe2cd;
    border-radius: 999px;
    color: var(--pd-primary);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--pd-shadow-xs);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.065em;
    text-transform: uppercase;
    backdrop-filter: blur(10px);
}

/* ---------------------------------------------------------
   6. Product copy
---------------------------------------------------------- */
.product-detail-copy {
    min-width: 0;
    padding-top: 5px;
}

.product-detail-category {
    position: relative;
    display: inline-flex;
    min-height: 29px;
    align-items: center;
    padding: 0 12px 0 28px;
    border-radius: 999px;
    color: var(--pd-primary);
    background: var(--pd-primary-soft);
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0.10em;
    text-transform: uppercase;
}

.product-detail-category::before {
    position: absolute;
    left: 10px;
    color: var(--pd-primary);
    content: "\f3f2";
    font-family: "bootstrap-icons";
    font-size: 11px;
}

.product-detail-copy h1 {
    max-width: 790px;
    margin: 15px 0 13px;
    color: var(--pd-heading);
    font-size: clamp(39px, 4vw, 61px);
    font-weight: 900;
    line-height: 1.04;
    letter-spacing: -0.052em;
    text-wrap: balance;
}

.product-summary {
    max-width: 790px;
    margin: 0;
    color: var(--pd-text);
    font-size: clamp(14px, 1.2vw, 16px);
    line-height: 1.82;
}

.product-price {
    display: inline-flex;
    margin: 21px 0 20px;
    color: var(--pd-primary);
    font-family: "Plus Jakarta Sans", "Inter", sans-serif;
    font-size: clamp(34px, 3.4vw, 48px);
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.045em;
}

/* ---------------------------------------------------------
   7. Product metadata
---------------------------------------------------------- */
.product-meta-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 22px;
    padding: 15px 0;
    border-top: 1px solid var(--pd-border);
    border-bottom: 1px solid var(--pd-border);
}

.product-meta-item {
    position: relative;
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 3px 16px;
}

.product-meta-item:first-child {
    padding-left: 0;
}

.product-meta-item:last-child {
    padding-right: 0;
}

.product-meta-item + .product-meta-item::before {
    position: absolute;
    top: 5px;
    bottom: 5px;
    left: 0;
    width: 1px;
    background: var(--pd-border);
    content: "";
}

.product-meta-icon {
    display: grid;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    place-items: center;
    color: var(--pd-primary);
    background: var(--pd-primary-soft);
    font-size: 14px;
}

.product-meta-icon.is-empty {
    color: var(--pd-danger);
    background: var(--pd-danger-soft);
}

.product-meta-item > div {
    display: grid;
    min-width: 0;
    gap: 2px;
}

.product-meta-item small {
    overflow: hidden;
    color: var(--pd-muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.035em;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.product-meta-item strong {
    overflow: hidden;
    color: var(--pd-heading);
    font-size: 11px;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-meta-item .stock-available {
    color: var(--pd-primary);
}

.product-meta-item .stock-empty {
    color: var(--pd-danger);
}

/* ---------------------------------------------------------
   8. Purchase card layout

   The aside uses display:contents so its buttons remain in
   the top purchase card while information sections span the
   full right column below.
---------------------------------------------------------- */
.product-purchase-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 224px;
    grid-auto-rows: auto;
    column-gap: 0;
    overflow: visible;
}

.product-purchase-form {
    grid-column: 1;
    grid-row: 1 / span 2;
    min-width: 0;
    padding: 24px;
    border: 1px solid var(--pd-border);
    border-right: 0;
    border-radius: var(--pd-radius-lg) 0 0 var(--pd-radius-lg);
    background: var(--pd-card);
    box-shadow: var(--pd-shadow-sm);
}

.product-action-panel {
    display: contents;
}

.product-action-panel > form {
    grid-column: 2;
    grid-row: 1;
    margin: 0;
    padding: 24px 24px 7px;
    border-top: 1px solid var(--pd-border);
    border-right: 1px solid var(--pd-border);
    border-radius: 0 var(--pd-radius-lg) 0 0;
    background: var(--pd-card);
    box-shadow: 12px 0 26px rgba(16, 32, 24, 0.025);
}

.product-back-button {
    grid-column: 2;
    grid-row: 2;
    align-self: stretch;
    margin: 0;
    padding: 7px 24px 24px;
    border-right: 1px solid var(--pd-border);
    border-bottom: 1px solid var(--pd-border);
    border-radius: 0 0 var(--pd-radius-lg) 0;
    background: var(--pd-card);
    box-shadow: 12px 12px 26px rgba(16, 32, 24, 0.025);
}

/* ---------------------------------------------------------
   9. Purchase fields
---------------------------------------------------------- */
.product-purchase-fields {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 150px;
    gap: 14px;
    margin-bottom: 15px;
}

.product-field {
    display: grid;
    min-width: 0;
    gap: 8px;
}

.product-field > span {
    color: var(--pd-heading);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.01em;
}

.product-select-wrapper {
    position: relative;
    min-width: 0;
}

.product-select-wrapper select,
.product-quantity-field input {
    width: 100%;
    height: 50px;
    border: 1px solid var(--pd-border-strong);
    border-radius: var(--pd-radius-sm);
    outline: none;
    color: var(--pd-heading);
    background: #ffffff;
    font-size: 12px;
    font-weight: 800;
    transition:
        border-color var(--pd-transition),
        box-shadow var(--pd-transition),
        background-color var(--pd-transition);
}

.product-select-wrapper select {
    cursor: pointer;
    padding: 0 42px 0 14px;
    appearance: none;
    -webkit-appearance: none;
}

.product-select-wrapper i {
    position: absolute;
    top: 50%;
    right: 15px;
    color: var(--pd-muted);
    font-size: 11px;
    pointer-events: none;
    transform: translateY(-50%);
}

.product-quantity-field input {
    padding: 0 10px;
    text-align: center;
}

.product-select-wrapper select:hover,
.product-quantity-field input:hover {
    border-color: #b9c8c0;
}

.product-select-wrapper select:focus,
.product-quantity-field input:focus {
    border-color: var(--pd-primary);
    box-shadow: 0 0 0 4px rgba(7, 136, 63, 0.10);
}

.product-select-wrapper select:disabled,
.product-quantity-field input:disabled {
    cursor: not-allowed;
    color: #8b9690;
    background: #f1f4f2;
}

/* ---------------------------------------------------------
   10. Purchase buttons
---------------------------------------------------------- */
.product-add-cart-button,
.product-wishlist-button,
.product-back-button {
    font-family: "Inter", sans-serif;
}

.product-add-cart-button {
    display: inline-flex;
    width: 100%;
    min-height: 54px;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    border: 1px solid var(--pd-primary);
    border-radius: 13px;
    color: #ffffff;
    background:
        linear-gradient(
            135deg,
            var(--pd-primary),
            var(--pd-primary-dark)
        );
    box-shadow: 0 13px 25px rgba(7, 136, 63, 0.18);
    font-size: 13px;
    font-weight: 900;
}

.product-add-cart-button i {
    font-size: 16px;
}

.product-add-cart-button:hover:not(:disabled) {
    box-shadow: 0 18px 31px rgba(7, 136, 63, 0.24);
    transform: translateY(-2px);
}

.product-add-cart-button:active:not(:disabled) {
    transform: translateY(0);
}

.product-add-cart-button:disabled {
    cursor: not-allowed;
    color: #86918b;
    border-color: #d6ded9;
    background: #e9eeeb;
    box-shadow: none;
}

.product-wishlist-button,
.product-back-button {
    display: inline-flex;
    width: 100%;
    min-height: 49px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    cursor: pointer;
    border: 1px solid var(--pd-border-strong);
    border-radius: 12px;
    color: var(--pd-heading);
    background: #ffffff;
    font-size: 11px;
    font-weight: 850;
}

.product-wishlist-button {
    color: var(--pd-primary);
    border-color: #b9ddc7;
}

.product-wishlist-button:hover,
.product-wishlist-button.is-active {
    color: #ffffff;
    border-color: var(--pd-primary);
    background: var(--pd-primary);
    box-shadow: 0 10px 22px rgba(7, 136, 63, 0.16);
}

.product-back-button:hover {
    color: var(--pd-primary);
    border-color: #b9ddc7;
    background: var(--pd-primary-faint);
}

/* ---------------------------------------------------------
   11. Accordion sections
---------------------------------------------------------- */
.available-sizes {
    grid-column: 1 / -1;
    width: 100%;
    margin-top: 10px;
    overflow: hidden;
    border: 1px solid var(--pd-border);
    border-radius: 14px;
    background: var(--pd-card);
    box-shadow: var(--pd-shadow-xs);
}

/* Non-JS fallback: information remains fully visible. */
.available-sizes > h2 {
    margin: 0;
    padding: 17px 20px 12px;
    color: var(--pd-heading);
    font-size: 13px;
    font-weight: 900;
}

.available-sizes > ul,
.available-sizes > p,
.available-sizes > ol {
    margin-right: 20px;
    margin-left: 20px;
}

.available-sizes > ul,
.available-sizes > ol {
    margin-bottom: 18px;
}

.available-sizes > p:last-child {
    margin-bottom: 18px;
}

/* Enhanced accordion created by product-accordion.js */
.product-accordion-item {
    overflow: hidden;
}

.product-accordion-trigger {
    display: grid;
    width: 100%;
    min-height: 58px;
    grid-template-columns: 36px minmax(0, 1fr) auto 20px;
    align-items: center;
    gap: 11px;
    padding: 10px 16px;
    cursor: pointer;
    border: 0;
    color: var(--pd-heading);
    background: var(--pd-card);
    text-align: left;
}

.product-accordion-trigger:hover {
    background: var(--pd-primary-faint);
}

.product-accordion-icon {
    display: grid;
    width: 36px;
    height: 36px;
    border-radius: 11px;
    place-items: center;
    color: var(--pd-primary);
    background: var(--pd-primary-soft);
    font-size: 14px;
}

.product-accordion-title {
    min-width: 0;
    font-size: 12px;
    font-weight: 900;
}

.product-accordion-summary {
    color: var(--pd-primary);
    font-size: 10px;
    font-weight: 800;
    white-space: nowrap;
}

.product-accordion-chevron {
    color: var(--pd-muted);
    font-size: 11px;
    transition: transform 220ms ease;
}

.product-accordion-trigger[aria-expanded="true"] {
    border-bottom: 1px solid var(--pd-border);
    background: var(--pd-primary-faint);
}

.product-accordion-trigger[aria-expanded="true"]
.product-accordion-chevron {
    transform: rotate(180deg);
}

.product-accordion-panel {
    display: grid;
    grid-template-rows: 0fr;
    opacity: 0;
    transition:
        grid-template-rows 260ms ease,
        opacity 180ms ease;
}

.product-accordion-panel > div {
    min-height: 0;
    overflow: hidden;
}

.product-accordion-item.is-open .product-accordion-panel {
    grid-template-rows: 1fr;
    opacity: 1;
}

.product-accordion-content {
    padding: 18px 20px 20px;
}

/* Remove old fallback spacing after JS enhancement. */
.product-accordion-item > h2,
.product-accordion-item > ul,
.product-accordion-item > p,
.product-accordion-item > ol {
    margin: 0;
}

/* ---------------------------------------------------------
   12. Accordion content styling
---------------------------------------------------------- */
.product-accordion-content ul {
    display: grid;
    gap: 9px;
}

.product-accordion-content ul li {
    position: relative;
    display: flex;
    min-height: 35px;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-left: 17px;
    color: var(--pd-text);
    font-size: 11px;
}

.product-accordion-content ul li::before {
    position: absolute;
    left: 0;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--pd-primary);
    content: "";
}

.product-accordion-content ul li strong {
    color: var(--pd-heading);
    font-size: 11px;
    font-weight: 900;
    white-space: nowrap;
}

.product-accordion-content p {
    margin: 0;
    color: var(--pd-text);
    font-size: 11px;
    line-height: 1.85;
}

.product-accordion-content p + p {
    margin-top: 12px;
}

.product-accordion-content p strong {
    color: var(--pd-heading);
    font-weight: 900;
}

.product-accordion-content ol {
    display: grid;
    gap: 10px;
    margin-top: 14px;
    counter-reset: pd-step;
}

.product-accordion-content ol li {
    position: relative;
    min-height: 31px;
    padding-left: 38px;
    color: var(--pd-text);
    font-size: 11px;
    line-height: 1.75;
    counter-increment: pd-step;
}

.product-accordion-content ol li::before {
    position: absolute;
    top: 0;
    left: 0;
    display: grid;
    width: 27px;
    height: 27px;
    border: 1px solid #c6e3d1;
    border-radius: 50%;
    place-items: center;
    color: var(--pd-primary);
    background: var(--pd-primary-soft);
    content: counter(pd-step);
    font-size: 9px;
    font-weight: 900;
}

/* ---------------------------------------------------------
   13. Service/trust strip
---------------------------------------------------------- */
.product-service-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: clamp(38px, 5vw, 64px);
    overflow: hidden;
    border: 1px solid var(--pd-border);
    border-radius: var(--pd-radius-lg);
    background:
        linear-gradient(
            135deg,
            rgba(237, 248, 241, 0.74),
            rgba(255, 255, 255, 0.95)
        );
    box-shadow: var(--pd-shadow-sm);
}

.product-service-item {
    position: relative;
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    align-items: center;
    gap: 13px;
    min-width: 0;
    padding: 22px;
}

.product-service-item + .product-service-item::before {
    position: absolute;
    top: 20px;
    bottom: 20px;
    left: 0;
    width: 1px;
    background: var(--pd-border);
    content: "";
}

.product-service-item > span {
    display: grid;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    place-items: center;
    color: var(--pd-primary);
    background: #dff4e7;
    font-size: 18px;
}

.product-service-item > div {
    display: grid;
    min-width: 0;
    gap: 3px;
}

.product-service-item strong {
    overflow: hidden;
    color: var(--pd-heading);
    font-size: 12px;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-service-item small {
    color: var(--pd-muted);
    font-size: 9px;
    line-height: 1.5;
}

/* ---------------------------------------------------------
   14. Focus styles
---------------------------------------------------------- */
.product-add-cart-button:focus-visible,
.product-wishlist-button:focus-visible,
.product-back-button:focus-visible,
.product-accordion-trigger:focus-visible,
.product-select-wrapper select:focus-visible,
.product-quantity-field input:focus-visible {
    outline: 3px solid rgba(7, 136, 63, 0.22);
    outline-offset: 3px;
}

/* ---------------------------------------------------------
   15. Medium desktop
---------------------------------------------------------- */
@media (max-width: 1180px) {
    .product-detail-grid {
        grid-template-columns:
            minmax(390px, 0.9fr)
            minmax(470px, 1.1fr);
        gap: 38px;
    }

    .product-purchase-card {
        grid-template-columns: minmax(0, 1fr) 205px;
    }

    .product-purchase-form,
    .product-action-panel > form,
    .product-back-button {
        padding-right: 19px;
        padding-left: 19px;
    }

    .product-purchase-fields {
        grid-template-columns: 1fr 128px;
    }
}

/* ---------------------------------------------------------
   16. Tablet
---------------------------------------------------------- */
@media (max-width: 960px) {
    .product-detail {
        padding-top: 18px;
    }

    .product-detail-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .product-detail-media {
        position: relative;
        top: auto;
        min-height: min(76vw, 640px);
    }

    .product-detail-copy h1 {
        font-size: clamp(38px, 7vw, 56px);
    }

    .product-summary {
        max-width: 820px;
    }

    .product-service-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .product-service-item:nth-child(3)::before {
        display: none;
    }

    .product-service-item:nth-child(n + 3) {
        border-top: 1px solid var(--pd-border);
    }
}

/* ---------------------------------------------------------
   17. Mobile
---------------------------------------------------------- */
@media (max-width: 680px) {
    .product-detail {
        padding-top: 12px;
    }

    .product-breadcrumb {
        min-height: 34px;
        gap: 6px;
        margin-bottom: 14px;
        font-size: 9px;
    }

    .product-breadcrumb [aria-current="page"] {
        max-width: 170px;
    }

    .product-detail-grid {
        gap: 22px;
    }

    .product-detail-media {
        min-height: min(92vw, 470px);
        border-radius: 22px;
    }

    .product-detail-media::before {
        inset: 14px;
        border-radius: 16px;
    }

    .product-detail-media img {
        max-height: 430px;
        padding: 32px 22px;
    }

    .product-detail-badge {
        top: 15px;
        left: 15px;
        min-height: 30px;
        padding: 0 11px;
        font-size: 8px;
    }

    .product-detail-copy h1 {
        margin-top: 12px;
        font-size: clamp(31px, 10vw, 43px);
    }

    .product-summary {
        font-size: 13px;
        line-height: 1.78;
    }

    .product-price {
        margin: 18px 0;
        font-size: 36px;
    }

    .product-meta-row {
        grid-template-columns: 1fr;
        padding: 0;
        border: 1px solid var(--pd-border);
        border-radius: 16px;
        background: #ffffff;
    }

    .product-meta-item {
        min-height: 65px;
        padding: 11px 14px;
    }

    .product-meta-item:first-child,
    .product-meta-item:last-child {
        padding: 11px 14px;
    }

    .product-meta-item + .product-meta-item::before {
        top: 0;
        right: 14px;
        bottom: auto;
        left: 14px;
        width: auto;
        height: 1px;
    }

    .product-purchase-card {
        grid-template-columns: 1fr;
    }

    .product-purchase-form {
        grid-column: 1;
        grid-row: 1;
        padding: 19px;
        border-right: 1px solid var(--pd-border);
        border-radius: 19px 19px 0 0;
    }

    .product-action-panel > form {
        grid-column: 1;
        grid-row: 2;
        padding: 14px 19px 7px;
        border-top: 0;
        border-left: 1px solid var(--pd-border);
        border-radius: 0;
        box-shadow: none;
    }

    .product-back-button {
        grid-column: 1;
        grid-row: 3;
        padding: 7px 19px 19px;
        border-left: 1px solid var(--pd-border);
        border-radius: 0 0 19px 19px;
        box-shadow: var(--pd-shadow-sm);
    }

    .available-sizes {
        grid-column: 1;
    }

    .product-purchase-fields {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .product-accordion-trigger {
        grid-template-columns: 34px minmax(0, 1fr) 18px;
        min-height: 56px;
        padding: 9px 13px;
    }

    .product-accordion-summary {
        display: none;
    }

    .product-service-strip {
        grid-template-columns: 1fr;
        border-radius: 19px;
    }

    .product-service-item {
        min-height: 80px;
        padding: 16px 18px;
    }

    .product-service-item + .product-service-item::before {
        top: 0;
        right: 18px;
        bottom: auto;
        left: 18px;
        width: auto;
        height: 1px;
    }

    .product-service-item:nth-child(n + 3) {
        border-top: 0;
    }
}

/* ---------------------------------------------------------
   18. Very small mobile
---------------------------------------------------------- */
@media (max-width: 390px) {
    .product-detail-media {
        min-height: 380px;
    }

    .product-detail-media img {
        max-height: 365px;
        padding-inline: 17px;
    }

    .product-detail-copy h1 {
        font-size: 29px;
    }

    .product-purchase-form,
    .product-action-panel > form,
    .product-back-button {
        padding-right: 16px;
        padding-left: 16px;
    }

    .product-accordion-content {
        padding: 16px;
    }
}

/* ---------------------------------------------------------
   19. Reduced motion
---------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    .product-detail-media img,
    .product-add-cart-button,
    .product-wishlist-button,
    .product-back-button,
    .product-accordion-panel,
    .product-accordion-chevron {
        transition: none !important;
    }
}

/* ---------------------------------------------------------
   20. Print
---------------------------------------------------------- */
@media print {
    .product-detail {
        padding: 0;
        background: #ffffff;
    }

    .product-breadcrumb,
    .product-purchase-card,
    .product-service-strip {
        display: none !important;
    }

    .product-detail-grid {
        grid-template-columns: 42% 58%;
        gap: 28px;
    }

    .product-detail-media {
        position: static;
        min-height: 0;
        box-shadow: none;
    }

    .product-detail-media img {
        max-height: 420px;
        padding: 24px;
        filter: none;
    }
}

/* ---------------------------------------------------------
   21. Route-scoped production overrides

   These rules intentionally sit last so product.css wins over
   standalone.css/ecommerce.css container, form, and button styles.
---------------------------------------------------------- */
.organify-standalone .product-detail {
    padding: clamp(24px, 3vw, 42px) 0 clamp(50px, 6vw, 86px);
}

.organify-standalone .product-detail .product-detail-container {
    width: min(calc(100% - 48px), 1360px);
    max-width: 1360px;
    margin-inline: auto;
}

.organify-standalone .product-detail-grid {
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1fr);
    gap: clamp(28px, 3.5vw, 56px);
    align-items: start;
}

.organify-standalone .product-detail-media {
    width: 100%;
    max-width: 100%;
    min-height: clamp(440px, 36vw, 600px);
    padding: clamp(18px, 2vw, 28px);
}

.organify-standalone .product-detail-media img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 620px;
    padding: clamp(28px, 4vw, 58px);
    object-fit: contain;
}

.organify-standalone .product-detail-media-column,
.organify-standalone .product-gallery {
    min-width: 0;
    max-width: 100%;
}

.organify-standalone .product-detail-copy {
    position: relative;
    z-index: 2;
    display: grid;
    align-content: start;
    gap: 14px;
    width: 100%;
    min-width: 0;
    overflow-wrap: anywhere;
}

.organify-standalone .product-detail-copy h1 {
    max-width: 760px;
    margin: 0;
    font-size: clamp(44px, 4.2vw, 58px);
    letter-spacing: 0;
}

.organify-standalone .product-summary {
    max-width: 720px;
    margin: 0;
    font-size: clamp(15px, 1.1vw, 17px);
}

.organify-standalone .product-price {
    font-size: clamp(38px, 3.5vw, 48px);
    letter-spacing: 0;
}

.organify-standalone .product-meta-row {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.organify-standalone .product-meta-item strong {
    white-space: normal;
}

.organify-standalone .product-purchase-card {
    display: block;
    width: 100%;
    max-width: 760px;
    margin-top: 6px;
    padding: clamp(18px, 2.4vw, 26px);
    border: 1px solid var(--pd-border);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--pd-shadow-sm);
}

.organify-standalone .product-purchase-card form,
.organify-standalone .product-purchase-card button,
.organify-standalone .product-purchase-card input,
.organify-standalone .product-purchase-card select {
    font: inherit;
}

.organify-standalone .product-purchase-form {
    display: block;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.organify-standalone .product-purchase-fields {
    grid-template-columns: minmax(0, 1fr) minmax(120px, 150px);
    align-items: end;
    margin-bottom: 16px;
}

.organify-standalone .product-action-panel {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 14px;
    padding-top: 16px;
    border-top: 1px solid var(--pd-border);
}

.organify-standalone .product-action-panel > form {
    grid-column: auto;
    grid-row: auto;
    display: block;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.organify-standalone .product-back-button {
    grid-column: auto;
    grid-row: auto;
    align-self: stretch;
    margin: 0;
    padding: 0 18px;
    border: 1px solid var(--pd-border-strong);
    border-radius: 14px;
    background: #ffffff;
    box-shadow: none;
}

.organify-standalone .product-action-panel .available-sizes {
    grid-column: 1 / -1;
    margin-top: 0;
}

.organify-standalone .product-add-cart-button.is-loading,
.organify-standalone .product-wishlist-button.is-loading {
    cursor: wait;
    opacity: 0.88;
}

.organify-standalone .product-add-cart-button.is-loading i,
.organify-standalone .product-wishlist-button.is-loading i {
    animation: product-button-spin 760ms linear infinite;
}

.organify-standalone .product-accordion-content > h2 {
    display: none;
}

.organify-standalone .product-accordion-trigger {
    grid-template-columns: 42px minmax(0, 1fr) 22px;
    grid-template-rows: auto auto;
    min-height: 72px;
    padding: 13px 16px;
}

.organify-standalone .product-accordion-icon {
    grid-column: 1;
    grid-row: 1 / span 2;
}

.organify-standalone .product-accordion-title {
    grid-column: 2;
    grid-row: 1;
    align-self: end;
}

.organify-standalone .product-accordion-summary {
    grid-column: 2;
    grid-row: 2;
    align-self: start;
    overflow: hidden;
    color: var(--pd-muted);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.organify-standalone .product-accordion-chevron {
    grid-column: 3;
    grid-row: 1 / span 2;
}

.organify-standalone .product-accordion-trigger[aria-expanded="true"] .product-accordion-chevron {
    transform: rotate(180deg);
}

@keyframes product-button-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (min-width: 1181px) {
    .organify-standalone .product-gallery {
        position: sticky;
        top: 108px;
    }

    .organify-standalone .product-detail-media {
        position: relative;
        top: auto;
    }
}

@media (min-width: 961px) {
    .organify-standalone .product-detail-copy {
        grid-column: 2;
    }

    .organify-standalone .product-detail-media-column {
        grid-column: 1;
    }

    .organify-standalone .product-purchase-card {
        max-width: 760px;
        margin-top: 6px;
    }

    .organify-standalone .product-action-panel {
        margin-top: 16px;
        padding-top: 18px;
        border-top: 1px solid var(--pd-border);
    }
}

@media (max-width: 960px) {
    .organify-standalone .product-detail .product-detail-container {
        width: min(calc(100% - 36px), 820px);
    }

    .organify-standalone .product-detail-grid {
        grid-template-columns: 1fr;
    }

    .organify-standalone .product-detail-copy {
        display: block;
    }

    .organify-standalone .product-detail-media {
        min-height: min(78vw, 640px);
    }

    .organify-standalone .product-gallery {
        position: static;
    }
}

@media (max-width: 680px) {
    .organify-standalone .product-detail .product-detail-container {
        width: min(calc(100% - 24px), 100%);
    }

    .organify-standalone .product-detail-copy h1 {
        font-size: clamp(29px, 9.5vw, 38px);
    }

    .organify-standalone .product-meta-row,
    .organify-standalone .product-purchase-fields,
    .organify-standalone .product-action-panel {
        grid-template-columns: 1fr;
    }

    .organify-standalone .product-purchase-card {
        padding: 16px;
        border-radius: 20px;
    }

    .organify-standalone .product-add-cart-button,
    .organify-standalone .product-wishlist-button,
    .organify-standalone .product-back-button {
        min-height: 54px;
    }

    .organify-standalone .product-accordion-trigger {
        grid-template-columns: 38px minmax(0, 1fr) 20px;
        min-height: 64px;
        padding: 11px 13px;
    }

    .organify-standalone .product-accordion-summary {
        display: block;
        font-size: 9px;
    }
}
