/* PRODUCT CATALOGUE
   Reusable classes use a product- prefix to avoid framework conflicts. */

/* Match the wide three-card presentation used on the home page. */
.catalogue-shell {
    position: relative;
    left: 50%;
    width: min(1720px, 90vw);
    transform: translateX(-50%);
}

/* Responsive product grid. */
.product-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(24px, 2.2vw, 38px);
}

/* Places the product name and price on one line. */
.product-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

/* Border-free product presentation matching the home page. */
.product-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    background: transparent;
}

/* Rounded image container with p-4 spacing. */
.product-card__image-link {
    display: block;
    position: relative;
    aspect-ratio: 1 / 1.05;
    overflow: hidden;
    border-radius: 12px;
    background: #e4e3dd;
}

/* Product image fills the available image container. */
.product-card__image {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 12px;
    object-fit: cover;
    transition: transform 0.2s;
}

.product-card:hover .product-card__image {
    transform: scale(1.05);
}

.product-card__body {
    padding: 22px 0 6px;
}

.product-eyebrow {
    margin: 0;
    color: #687165;
    font-size: 11px;
    letter-spacing: 1.8px;
    text-transform: uppercase;
}

.product-card__heading {
    align-items: baseline;
    gap: 12px;
    margin-top: 8px;
}

.product-card__title {
    min-width: 0;
    margin: 0;
    font: 400 clamp(19px, 1.8vw, 24px)/1.25 Georgia, "Times New Roman", serif;
    overflow-wrap: anywhere;
}

.product-card__title a {
    color: #173f35;
    text-decoration: none;
}

.product-card__price {
    flex-shrink: 0;
    margin: 0;
    color: #173f35;
    font-size: 24px;
    font-weight: 600;
    white-space: nowrap;
}

/* Tablet layout. */
@media (max-width: 1000px) {
    .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Phone layout. */
@media (max-width: 620px) {
    .catalogue-shell {
        width: calc(100vw - 32px);
    }

    .product-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 22px;
    }

    .product-card__title {
        font-size: 23px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .product-card__image {
        transition: none;
    }
}

/* PRODUCT DETAIL
   Uses the same reusable product-row, product-eyebrow, stock-pill and green
   action colours as the catalogue cards. */
/* One reusable pill shape; modifiers provide status colours. */
.stock-pill {
    flex-shrink: 0;
    padding: 10px 20px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
}

.product-eyebrow{
    font-size: 16px
}

.stock-pill--available {
    background: #bce8c3;
    color: #245c37;
}

.stock-pill--unavailable {
    background: #dfb9b0;
    color: #854033;
}

.product-detail-shell {
    width: min(1320px, calc(100% - 48px));
    margin-inline: auto;
}

.product-back-link {
    text-align: center;
    border: 1px solid currentColor;
    padding: 16px 16px;
    min-width: 235px;
    display: inline-flex;
    align-items: center;
    gap: 36px;
    font-size: 14px;
    transition: background .2s, color .2s;
    margin-bottom: 30px;
}

.product-back-link:hover {
    background: #173f35;
    color: #fffdf4;

}

/* Main product presentation: image on the left, purchase details on the right. */
.product-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(360px, .95fr);
    gap: clamp(48px, 7vw, 110px);
    align-items: center;
}

.product-detail-media {
    display: grid;
    min-width: 0;
    min-height: 620px;
    place-items: center;
    overflow: hidden;
    border-radius: 12px;
    background: #f1efe8;
}

.product-detail-image {
    display: block;
    width: 100%;
    height: 100%;
    max-height: 720px;
    object-fit: cover;
}

.product-detail-image:hover {
    display: block;
    width: 100%;
    height: 100%;
    max-height: 720px;
    object-fit: cover;
    transition: transform 0.2s;
    transform: scale(1.2);
}

.product-detail-summary {
    min-width: 0;
}

.product-detail-summary h1 {
    margin: 12px 0 24px;
    color: #173f35;
    font: 400 clamp(38px, 4vw, 62px)/1.08 Georgia, "Times New Roman", serif;
    overflow-wrap: anywhere;
}

.product-detail-meta {
    align-items: center;
    margin-bottom: 22px;
}

.product-detail-price {
    margin: 0;
    color: #173f35;
    font-size: 28px;
    font-weight: 700;
}

.product-detail-intro {
    margin-bottom: 28px;
    color: #46534b;
    font-size: 17px;
    line-height: 1.7;
}

.product-detail-cart {
    display: block;
    width: 100%;
    padding: 16px 24px;
    border-radius: 999px;
    /* Brand green so the primary action matches the nav, footer and auth CTA. */
    background: #173f35;
    color: #fff;
    text-align: center;
    text-decoration: none;
    transition: background .2s;
}

.product-detail-cart:hover {
    background: #1c3027;
    color: #fff;
}

/* Expandable information rows use native details/summary functionality. */
.product-information {
    width: min(820px, 100%);
    margin: 90px auto 0;
    border-top: 1px solid #d8d8d0;
}

.product-disclosure {
    border-bottom: 1px solid #d8d8d0;
}

.product-disclosure summary {
    position: relative;
    padding: 20px 46px 20px 0;
    color: #17251f;
    font-weight: 700;
    list-style: none;
    cursor: pointer;
}

.product-disclosure summary::-webkit-details-marker {
    display: none;
}

/* The plus becomes a minus while its information row is expanded. */
.product-disclosure summary::before,
.product-disclosure summary::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 8px;
    width: 16px;
    height: 1px;
    background: currentColor;
}

.product-disclosure summary::after {
    transform: rotate(90deg);
    transition: transform .2s;
}

.product-disclosure[open] summary::after {
    transform: rotate(0);
}

.product-disclosure__content {
    padding: 0 46px 24px 0;
    color: #566159;
    line-height: 1.7;
}

.product-tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.product-tag {
    padding: 12px 18px;
    border-radius: 999px;
    background: #bee5c2;
    color: #2b5a52;
    font-size: 12px;
}

.product-routine-list {
    margin: 0;
    padding-left: 20px;
}

.product-routine-list li {
    margin-bottom: 14px;
}

.product-routine-list span {
    display: block;
}

.product-admin {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 60px;
    padding: 20px;
    border-top: 1px solid #d8d8d0;
}

.product-admin strong {
    width: 100%;
}

/* Stack product details before the two columns become cramped. */
@media (max-width: 900px) {
    .product-detail-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 42px;
    }

    .product-detail-media {
        min-height: 0;
        aspect-ratio: 1 / .85;
    }

    .product-detail-summary {
        width: min(680px, 100%);
        margin-inline: auto;
    }

    .product-information {
        margin-top: 65px;
    }
}

@media (max-width: 620px) {
    .product-detail-shell {
        width: min(100% - 32px, 1320px);
    }

    .product-detail-summary h1 {
        font-size: 38px;
    }

    .product-assurances {
        grid-template-columns: minmax(0, 1fr);
    }

    .product-disclosure__content {
        padding-right: 0;
    }
}
