/* ==========================================================================
   8. PURCHASE INFORMATION PAGES
   Body markers: data-page="originals" and data-page="shop"
   ========================================================================== */

body[data-page="originals"],
body[data-page="shop"] {
    --purchase-background: #f5f5f3;
    --purchase-panel: #ffffff;
    --purchase-text: #222222;
    --purchase-muted: #666666;
    --purchase-primary: #225975;
    --purchase-primary-hover: #193f54;
    --purchase-border: #ddddda;
    --purchase-shadow: 0 10px 30px rgb(0 0 0 / 7%);

    margin: 0;
    background: var(--purchase-background);
    color: var(--purchase-text);
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.65;
}

body[data-page="originals"] .purchase-info-page,
body[data-page="shop"] .purchase-info-page {
    width: min(1000px, calc(100% - 32px));
    margin: 36px auto 56px;
}

body[data-page="shop"] .shop-local-pickup-callout {
    width: min(900px, calc(100% - 32px));
    margin: 24px auto 0;
    padding: 14px 18px;
    background: #eef6fb;
    border: 1px solid #bfd5e2;
    border-radius: 10px;
    color: #33424c;
    font-size: 0.95rem;
    line-height: 1.5;
    text-align: center;
}

body[data-page="shop"] .shop-local-pickup-callout strong {
    color: var(--purchase-primary);
    font-weight: 700;
}

body[data-page="shop"] .shop-local-pickup-callout span {
    margin-left: 4px;
}

body[data-page="originals"] .purchase-info-card,
body[data-page="shop"] .purchase-info-card {
    overflow: hidden;
    background: var(--purchase-panel);
    border: 1px solid var(--purchase-border);
    border-radius: 14px;
    box-shadow: var(--purchase-shadow);
}

body[data-page="originals"] .purchase-info-section,
body[data-page="shop"] .purchase-info-section {
    padding: 48px 54px;
    text-align: center;
}

body[data-page="originals"] .purchase-info-section + .purchase-info-section,
body[data-page="shop"] .purchase-info-section + .purchase-info-section {
    border-top: 1px solid var(--purchase-border);
}

body[data-page="originals"] .purchase-info-section h2,
body[data-page="shop"] .purchase-info-section h2 {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: normal;
    line-height: 1.15;
}

body[data-page="originals"] .purchase-info-section-intro,
body[data-page="shop"] .purchase-info-section-intro {
    max-width: 720px;
    margin: 15px auto 0;
    color: var(--purchase-muted);
}

body[data-page="originals"] .purchase-info-copy,
body[data-page="shop"] .purchase-info-copy {
    max-width: 760px;
    margin: 24px auto 0;
    text-align: left;
    font-size: 1.04rem;
}

body[data-page="originals"] .purchase-info-copy p,
body[data-page="shop"] .purchase-info-copy p {
    margin: 0 0 18px;
}

body[data-page="originals"] .purchase-info-copy p:last-child,
body[data-page="shop"] .purchase-info-copy p:last-child {
    margin-bottom: 0;
}

body[data-page="originals"] .purchase-info-button-row,
body[data-page="shop"] .purchase-info-button-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
    margin-top: 28px;
}

body[data-page="originals"] .purchase-info-button,
body[data-page="shop"] .purchase-info-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 58px;
    padding: 14px 28px;
    border-radius: 8px;
    font-size: 1.02rem;
    font-weight: 700;
    text-decoration: none;
    transition: transform 140ms ease, background 140ms ease, border-color 140ms ease;
}

body[data-page="originals"] .purchase-info-button-primary,
body[data-page="shop"] .purchase-info-button-primary {
    background: var(--purchase-primary);
    color: #ffffff;
    box-shadow: 0 7px 18px rgb(34 89 117 / 18%);
}

body[data-page="originals"] .purchase-info-button-primary:hover,
body[data-page="shop"] .purchase-info-button-primary:hover {
    transform: translateY(-2px);
    background: var(--purchase-primary-hover);
}

body[data-page="originals"] .purchase-info-button-secondary,
body[data-page="shop"] .purchase-info-button-secondary {
    background: #ffffff;
    border: 1px solid #aac3d1;
    color: var(--purchase-primary);
}

body[data-page="originals"] .purchase-info-button-secondary:hover,
body[data-page="shop"] .purchase-info-button-secondary:hover {
    transform: translateY(-2px);
    background: #eef5f8;
    border-color: #8eafc0;
}

/* Shop tab product information */

body[data-page="shop"] .shop-tab-product-info {
    max-width: 820px;
    margin: 22px auto 0;
}

body[data-page="shop"] .shop-product-detail-card {
    padding: 18px;
    background: #ffffff;
    border: 1px solid var(--purchase-border);
    border-radius: 10px;
}

body[data-page="shop"] .shop-product-detail-copy {
    max-width: 760px;
    margin: 0 auto;
    text-align: center;
}

body[data-page="shop"] .shop-product-detail-copy h3 {
    margin: 0;
    color: var(--purchase-primary);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.35rem;
    font-weight: normal;
}

body[data-page="shop"] .shop-product-detail-copy p {
    max-width: 680px;
    margin: 8px auto 0;
    color: #555555;
    font-size: 0.95rem;
}

body[data-page="shop"] .shop-product-price {
    color: #222222 !important;
    font-size: 1.05rem;
    font-weight: 700;
}

body[data-page="shop"] .shop-product-price span {
    color: var(--purchase-muted);
    font-weight: 600;
}

body[data-page="shop"] .shop-sample-card {
    overflow: hidden;
    margin: 16px auto 0;
    background: #fafbfc;
    border: 1px solid var(--purchase-border);
    border-radius: 9px;
}

body[data-page="shop"] .shop-sample-card img {
    display: block;
    width: 100%;
    max-height: 240px;
    object-fit: contain;
    background: #fafbfc;
}

/*
   The print example is the direct sample card inside its product card.
   Let the figure shrink to the rendered image width so the border and
   caption align with the image instead of spanning the full card width.
*/
body[data-page="shop"] .shop-product-detail-card > .shop-sample-card {
    width: fit-content;
    max-width: min(420px, 100%);
}

body[data-page="shop"] .shop-product-detail-card > .shop-sample-card img {
    width: auto;
    max-width: 100%;
    height: auto;
}

body[data-page="shop"] .shop-sample-card figcaption {
    padding: 10px 12px;
    border-top: 1px solid var(--purchase-border);
    color: #5d6770;
    font-size: 0.82rem;
    text-align: center;
}

body[data-page="shop"] .shop-sample-placeholder {
    padding: 48px 18px;
    border: 2px dashed #cfd8e3;
    color: #718096;
    text-align: center;
    overflow-wrap: anywhere;
}

body[data-page="shop"] .shop-card-sample-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    max-width: 620px;
    margin: 16px auto 0;
}

body[data-page="shop"] .shop-card-sample-grid .shop-sample-card {
    margin-top: 0;
}

/* Products inventory */



body[data-page="shop"] .products-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-width: 820px;
    margin: 28px auto 0;
    overflow: hidden;
    border: 1px solid #aac3d1;
    border-radius: 8px;
    background: #ffffff;
}

body[data-page="shop"] .products-tab {
    min-height: 54px;
    padding: 12px 14px;
    border: 0;
    border-right: 1px solid #aac3d1;
    background: #ffffff;
    color: var(--purchase-primary);
    font: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 140ms ease, color 140ms ease;
}

body[data-page="shop"] .products-tab:last-child {
    border-right: 0;
}

body[data-page="shop"] .products-tab:hover {
    background: #eef5f8;
}

body[data-page="shop"] .products-tab.is-active {
    background: var(--purchase-primary);
    color: #ffffff;
}

body[data-page="shop"] .products-tab:focus-visible {
    position: relative;
    z-index: 1;
    outline: 3px solid #4f9ac2;
    outline-offset: -3px;
}

body[data-page="shop"] .products-tab-count {
    font-weight: 600;
}

body[data-page="shop"] .products-status-message {
    max-width: 760px;
    margin: 28px auto 0;
    color: var(--purchase-muted);
}

body[data-page="shop"] .products-status-error {
    padding: 14px 16px;
    border: 1px solid #d7a6a6;
    border-radius: 8px;
    background: #fff4f4;
    color: #8a2424;
}

body[data-page="shop"] .products-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin-top: 30px;
    text-align: left;
}

body[data-page="shop"] .products-card {
    overflow: hidden;
    background: #ffffff;
    border: 1px solid var(--purchase-border);
    border-radius: 10px;
}

body[data-page="shop"] .products-card.is-requested {
    border: 2px solid var(--purchase-primary);
    box-shadow: 0 8px 22px rgb(34 89 117 / 16%);
}

body[data-page="shop"] .products-image-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 240px;
    padding: 14px;
    background: #fafbfc;
    border-bottom: 1px solid var(--purchase-border);
}

body[data-page="shop"] .products-image-link img {
    display: block;
    width: 100%;
    max-height: 280px;
    object-fit: contain;
}

body[data-page="shop"] .products-card-content {
    padding: 18px;
}

body[data-page="shop"] .products-card-content h3 {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.28rem;
    font-weight: normal;
    line-height: 1.25;
}

body[data-page="shop"] .products-card-content h3 a {
    color: var(--purchase-primary);
}

body[data-page="shop"] .products-catalog-number {
    margin: 4px 0 14px;
    color: #777777;
    font-size: 0.86rem;
}

body[data-page="shop"] .products-inventory {
    display: grid;
    gap: 12px;
}

body[data-page="shop"] .products-inventory-row {
    display: grid;
    gap: 2px;
}

body[data-page="shop"] .products-inventory-label {
    color: #555555;
    font-size: 0.88rem;
    line-height: 1.4;
}

body[data-page="shop"] .products-inventory-price {
    color: #333333;
    font-size: 0.86rem;
    font-weight: 700;
}

body[data-page="shop"] .products-inventory-count {
    color: #333333;
    font-size: 0.8rem;
}

body[data-page="shop"] .products-inventory-count.is-low-stock {
    color: #c62828;
}

body[data-page="shop"] .products-original-row {
    display: grid;
    gap: 2px;
}

body[data-page="shop"] .products-original-price {
    color: #222222;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.35rem;
    line-height: 1.25;
}

body[data-page="shop"] .products-add-to-cart[hidden] {
    display: none !important;
}

body[data-page="shop"] .products-add-to-cart {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    margin-top: 16px;
    padding: 8px 14px;
    border: 1px solid var(--purchase-primary);
    border-radius: 6px;
    background: var(--purchase-primary);
    color: #ffffff;
    font: inherit;
    font-size: 0.86rem;
    font-weight: 700;
    cursor: pointer;
}

body[data-page="shop"] .products-add-to-cart:hover {
    background: var(--purchase-primary-hover);
}

body[data-page="shop"] .products-quantity-controls[hidden] {
    display: none;
}

body[data-page="shop"] .products-quantity-controls {
    display: inline-grid;
    grid-template-columns: 34px 40px 34px;
    align-items: center;
    margin-top: 16px;
    overflow: hidden;
    border: 1px solid #b9c8d1;
    border-radius: 7px;
    background: #ffffff;
    vertical-align: middle;
}

body[data-page="shop"] .products-quantity-button {
    height: 34px;
    padding: 0;
    border: 0;
    background: #f5f8fa;
    color: var(--purchase-primary);
    font: inherit;
    font-size: 1.1rem;
    cursor: pointer;
}

body[data-page="shop"] .products-quantity-button:disabled {
    color: #aeb8be;
    cursor: default;
}

body[data-page="shop"] .products-quantity-value {
    color: #333333;
    font-size: 0.86rem;
    font-weight: 700;
    text-align: center;
}

body[data-page="shop"] .products-cart-count {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    margin-top: 16px;
    margin-left: 8px;
    vertical-align: top;
    color: #245c32;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.2;
}

body[data-page="shop"] .products-cart-count.is-max {
    color: #6b5a22;
}

body[data-page="shop"] .products-remove-original[hidden] {
    display: none !important;
}

body[data-page="shop"] .products-remove-original {
    display: block;
    width: fit-content;
    margin-top: 3px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #7d4a4a;
    font: inherit;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.3;
    text-decoration: none;
    cursor: pointer;
}

body[data-page="shop"] .products-remove-original:hover {
    color: #9b2c2c;
}

body[data-page="shop"] .products-cart-count:has(+ .products-remove-original:not([hidden])) {
    display: block;
    width: fit-content;
    margin-left: 0;
}

body[data-page="shop"] .products-cart-feedback {
    display: block;
    width: fit-content;
    margin-top: 8px;
    padding: 5px 8px;
    border-radius: 5px;
    background: #fff1f1;
    color: #842929;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.3;
}

body[data-page="shop"] .shop-floating-cart {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 900;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 18px;
    border: 1px solid #173f55;
    border-radius: 999px;
    background: var(--purchase-primary);
    box-shadow: 0 4px 12px rgb(0 0 0 / 18%);
    color: #ffffff;
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
}

body[data-page="shop"] .shop-floating-cart:hover {
    background: var(--purchase-primary-hover);
}

body[data-page="shop"] .shop-floating-cart:focus-visible {
    outline: 3px solid #4f9ac2;
    outline-offset: 3px;
}

@media (max-width: 820px) {
    body[data-page="shop"] .shop-card-sample-grid {
        grid-template-columns: 1fr;
        max-width: 420px;
        margin-left: auto;
        margin-right: auto;
    }

    body[data-page="shop"] .products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    body[data-page="shop"] .shop-local-pickup-callout {
        width: calc(100% - 24px);
        margin-top: 18px;
        padding: 13px 15px;
        font-size: 0.9rem;
        text-align: left;
    }

    body[data-page="shop"] .shop-local-pickup-callout span {
        display: block;
        margin: 3px 0 0;
    }

    body[data-page="originals"] .purchase-info-page,
    body[data-page="shop"] .purchase-info-page {
        margin-top: 22px;
    }

    body[data-page="originals"] .purchase-info-section,
    body[data-page="shop"] .purchase-info-section {
        padding: 40px 24px;
    }

    body[data-page="originals"] .purchase-info-button,
    body[data-page="shop"] .purchase-info-button {
        width: 100%;
        max-width: 360px;
    }
}

@media (max-width: 560px) {
    body[data-page="shop"] .shop-floating-cart {
        right: 12px;
        bottom: 12px;
        min-height: 42px;
        padding: 9px 15px;
        font-size: 0.84rem;
    }

    body[data-page="shop"] .products-tabs {
        grid-template-columns: 1fr;
        border-radius: 8px;
    }

    body[data-page="shop"] .products-tab {
        min-height: 48px;
        border-right: 0;
        border-bottom: 1px solid #aac3d1;
    }

    body[data-page="shop"] .products-tab:last-child {
        border-bottom: 0;
    }

    body[data-page="shop"] .products-grid {
        grid-template-columns: 1fr;
    }
}

body[data-page="shop"] .products-remove-original:not([hidden]) ~ .products-cart-feedback {
    margin-top: 8px;
}
