/**
 * Product page – physical products (woocommerce/content-single-product.php,
 * template-parts/single-product/*). Service products use their own template
 * and are untouched: everything is scoped to .kr-pdp.
 *
 * Calm and white like the shop: photos on the card ground, black price, one
 * blue button. Loaded after style.css and product-card.css, split by area:
 *   single-product.css          page shell, details, product rows (this file)
 *   single-product-gallery.css  photos + thumbnails
 *   single-product-buy.css      buy box, assurance list, mobile sticky bar
 *   single-product-options.css  variation buttons, quantity, add to cart
 *
 * Sections:
 *   1. Page shell
 *   2. Details (description, specs, accordions)
 *   3. Product rows
 *
 * @package KauplusRattapood
 */

/* =========================================================================
   1. Page shell
   ========================================================================= */
/* .woocommerce prefix: beats the generic `.woocommerce .product` card box in style.css */
.woocommerce .kr-pdp,
.woocommerce .kr-pdp:hover {
    max-width: 1280px;
    margin: 0 auto !important;
    padding: 0 40px 24px;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
    transition: none;
}

.woocommerce .kr-pdp .woocommerce-product-gallery img {
    margin: 0;
    border-radius: 0;
}

.kr-pdp .kr-crumbs {
    padding: 16px 0 20px;
}

.kr-pdp-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    gap: 56px;
    align-items: start;
}

.kr-pdp-h2 {
    margin: 0 0 12px;
    font-size: 18px;
    font-weight: var(--font-weight-semibold);
    letter-spacing: -0.01em;
    color: var(--color-black);
}

/* =========================================================================
   2. Details
   ========================================================================= */
.kr-pdp-details {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    gap: 56px;
    margin-top: 64px;
    padding-top: 40px;
    border-top: 1px solid var(--color-gray-200);
}

.kr-pdp-details.is-specs-only .kr-pdp-details__side {
    grid-column: 2;
}

.kr-pdp-details__desc {
    font-size: 15px;
    line-height: 1.65;
    color: var(--color-gray-700);
}

.kr-pdp-details__desc p,
.kr-pdp-details__desc ul {
    max-width: 62ch;
    margin: 0 0 12px;
}

.kr-pdp-details__desc img {
    height: auto;
    border-radius: 8px;
}

.kr-pdp .shop_attributes {
    width: 100%;
    margin: 0;
    border: 0;
    border-collapse: collapse;
    font-size: 14px;
}

.kr-pdp .shop_attributes th,
.kr-pdp .shop_attributes td {
    padding: 9px 0;
    border: 0;
    border-bottom: 1px solid var(--color-gray-200);
    background: none;
    text-align: left;
    vertical-align: top;
}

.kr-pdp .shop_attributes th {
    width: 44%;
    padding-right: 12px;
    font-weight: var(--font-weight-normal);
    color: var(--color-gray-500);
}

.kr-pdp .shop_attributes td {
    color: var(--color-black);
}

.kr-pdp .shop_attributes td p {
    margin: 0;
}

.kr-pdp .shop_attributes a {
    color: inherit;
}

.kr-pdp-acc {
    margin-top: 28px;
    border-top: 1px solid var(--color-gray-200);
}

.kr-pdp-acc details {
    border-bottom: 1px solid var(--color-gray-200);
}

.kr-pdp-acc summary {
    display: flex;
    justify-content: space-between;
    padding: 13px 0;
    font-weight: var(--font-weight-medium);
    color: var(--color-black);
    list-style: none;
    cursor: pointer;
}

.kr-pdp-acc summary::-webkit-details-marker {
    display: none;
}

.kr-pdp-acc summary::after {
    content: "+";
    font-weight: var(--font-weight-normal);
    color: var(--color-gray-500);
}

.kr-pdp-acc details[open] summary::after {
    content: "−";
}

.kr-pdp-acc__panel {
    padding: 0 0 16px;
    font-size: 14px;
    color: var(--color-gray-700);
}

.kr-pdp-acc__panel p {
    margin: 0 0 8px;
}

/* =========================================================================
   3. Product rows (cards: css/product-card.css)
   ========================================================================= */
.kr-pdp-row {
    margin-top: 64px;
}

.kr-pdp-row__head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 16px;
}

.kr-pdp-row__head .kr-pdp-h2 {
    margin: 0;
}

.kr-pdp-row__head a {
    font-size: 14px;
    font-weight: var(--font-weight-medium);
    color: var(--color-black);
    text-decoration: none;
    border-bottom: 1px solid currentColor;
    white-space: nowrap;
}

.kr-pdp-row ul.products {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.kr-pdp-row ul.products li.product {
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
}

.kr-pdp .kr-shop-trust {
    margin-top: 64px;
}

/* =========================================================================
   Responsive
   ========================================================================= */
@media (max-width: 968px) {
    .woocommerce .kr-pdp,
    .woocommerce .kr-pdp:hover {
        padding: 0 16px 88px; /* room for the sticky bar */
    }

    .kr-pdp .kr-crumbs {
        padding: 12px 0 14px;
    }

    .kr-pdp-grid,
    .kr-pdp-details {
        grid-template-columns: minmax(0, 1fr);
        gap: 28px;
    }

    .kr-pdp-details {
        margin-top: 40px;
        padding-top: 28px;
    }

    .kr-pdp-details.is-specs-only .kr-pdp-details__side {
        grid-column: auto;
    }

    .kr-pdp-row {
        margin-top: 40px;
    }

    .kr-pdp-row ul.products {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px 12px;
    }
}
