/* =========================================================
   BOUND IN INK — PRODUCT PAGE
   Mobile-first product detail layout
========================================================= */

:root {
    --product-cream: #f7f2ec;
    --product-cream-deep: #eee5dc;
    --product-white: #fffdf9;
    --product-ink: #171313;
    --product-muted: #6f6260;
    --product-burgundy: #701522;
    --product-burgundy-dark: #4d0e17;
    --product-burgundy-soft: #a94d59;
    --product-border: #d8c9c0;
    --product-shadow: 0 8px 26px rgba(42, 18, 18, 0.12);
}


/* =========================================================
   PAGE
========================================================= */

body.product-page {
    margin: 0;
    min-height: 100vh;
    background: var(--product-cream);
    color: var(--product-ink);
}

.product-page *,
.product-page *::before,
.product-page *::after {
    box-sizing: border-box;
}


/* =========================================================
   TOP PRODUCT BAR
========================================================= */

.product-header {
    position: sticky;
    top: 0;
    z-index: 100;

    display: grid;
    grid-template-columns: 56px 1fr 64px;
    align-items: center;

    min-height: 68px;
    padding: 6px 10px;

    background: rgba(255, 253, 249, 0.96);
    border-bottom: 1px solid var(--product-border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.product-close {
    width: 46px;
    height: 46px;

    border: 0;
    background: transparent;

    color: var(--product-ink);
    font-size: 2.4rem;
    font-weight: 300;
    line-height: 1;

    cursor: pointer;
}

.product-logo {
    justify-self: center;

    color: var(--product-ink);
    text-decoration: none;

    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.35rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}


/* =========================================================
   CART ICON
========================================================= */

.product-cart-button {
    position: relative;
    justify-self: end;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 58px;
    height: 58px;

    padding: 0;
    border: 0;
    background: transparent;

    cursor: pointer;
}

.product-cart-icon {
    display: block;
    width: 56px;
    height: 56px;
    object-fit: contain;
}

.product-cart-count {
    position: absolute;
    top: 1px;
    right: 0;

    min-width: 22px;
    height: 22px;

    padding: 0 6px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 2px solid var(--product-white);
    border-radius: 999px;

    background: var(--product-burgundy);
    color: white;

    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
}

.product-cart-count[hidden] {
    display: none;
}


/* =========================================================
   MAIN LAYOUT
========================================================= */

.product-main {
    width: 100%;
}

.product-detail {
    width: min(100%, 760px);
    margin: 0 auto;
    padding-bottom: 42px;
}


/* =========================================================
   PRODUCT IMAGE
========================================================= */

.product-gallery {
    width: 100%;
    padding-inline: 12px;
}

.product-main-image-wrap {
    width: 100%;
    aspect-ratio: 1 / 1;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;

    background: #e8dfd6;
}

.product-main-image,
.product-main-video {
    display: block;

    width: calc(100% - 20px);
    height: calc(100% - 20px);

    object-fit: contain;

    border-radius: 6px;

    transition:
        opacity 180ms ease,
        transform 220ms ease;
}


/* =========================================================
   PRODUCT INTRO
========================================================= */

.product-intro {
    padding: 25px 20px 14px;
    text-align: center;
}

.product-title {
    margin: 0;

    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2rem, 8vw, 2.75rem);
    font-weight: 500;
    line-height: 1.08;

    letter-spacing: 0.035em;
    text-transform: uppercase;
}

.product-tagline {
    max-width: 580px;
    margin: 12px auto 0;

    color: var(--product-muted);

    font-size: 1rem;
    line-height: 1.55;
}


/* =========================================================
   VARIANTS
========================================================= */

.product-variants {
    padding: 14px 16px 8px;
}

.product-variants h2 {
    margin: 0 0 14px;

    color: var(--product-burgundy);

    font-family: Georgia, "Times New Roman", serif;
    font-size: 1rem;
    font-weight: 500;

    letter-spacing: 0.1em;
    text-align: center;
    text-transform: uppercase;
}

.variant-options {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.variant-option {
    min-width: 0;
    min-height: 128px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    gap: 7px;

    padding: 12px 7px;

    border: 1px solid var(--product-border);
    border-radius: 9px;

    background: var(--product-white);
    color: var(--product-ink);

    box-shadow: 0 3px 10px rgba(30, 15, 15, 0.04);

    cursor: pointer;

    transition:
        border-color 160ms ease,
        background 160ms ease,
        color 160ms ease,
        transform 160ms ease;
}

.variant-option:hover {
    border-color: var(--product-burgundy-soft);
}

.variant-option:active {
    transform: scale(0.98);
}

.variant-option.is-selected {
    border-color: var(--product-burgundy);
    background: var(--product-burgundy);
    color: white;
}

.variant-icon {
    font-size: 1.45rem;
}

.variant-name {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 0.88rem;
    line-height: 1.15;
    text-align: center;
}

.variant-price {
    font-size: 0.84rem;
    font-weight: 700;
}


/* =========================================================
   FRAGRANCE DETAILS
========================================================= */

.fragrance-details {
    margin: 12px 16px 18px;
    padding: 18px;

    border: 1px solid var(--product-border);
    border-radius: 10px;

    background: rgba(255, 253, 249, 0.72);
}

.fragrance-prompt {
    margin: 0;

    color: var(--product-muted);

    font-size: 0.92rem;
    line-height: 1.5;
    text-align: center;
}

#fragrance-content h2 {
    margin: 0 0 5px;

    color: var(--product-burgundy);

    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.4rem;
    font-weight: 500;

    text-transform: uppercase;
}

.fragrance-mood {
    margin: 0 0 13px;

    color: var(--product-burgundy-soft);

    font-size: 0.9rem;
    font-weight: 700;

    letter-spacing: 0.04em;
}

.fragrance-description {
    margin: 0 0 16px;

    font-size: 0.96rem;
    line-height: 1.6;
}

.fragrance-notes,
.fragrance-vibe {
    padding-top: 12px;
    border-top: 1px solid var(--product-border);
}

.fragrance-vibe {
    margin-top: 12px;
}

.fragrance-notes strong,
.fragrance-vibe strong {
    display: block;

    margin-bottom: 4px;

    color: var(--product-burgundy);

    font-family: Georgia, "Times New Roman", serif;
    font-style: italic;
}

.fragrance-notes p,
.fragrance-vibe p {
    margin: 0;

    font-size: 0.92rem;
    line-height: 1.5;
}


/* =========================================================
   PURCHASE AREA
========================================================= */

.product-purchase {
    padding: 4px 16px 26px;
}

.purchase-row {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 18px;

    margin-bottom: 16px;
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quantity-label {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 0.85rem;

    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.quantity-buttons {
    display: grid;
    grid-template-columns: 40px 42px 40px;

    overflow: hidden;

    border: 1px solid var(--product-border);
    border-radius: 7px;

    background: var(--product-white);
}

.quantity-buttons button,
#quantity-value {
    width: 100%;
    height: 42px;

    display: flex;
    align-items: center;
    justify-content: center;
}

.quantity-buttons button {
    border: 0;
    background: transparent;

    color: var(--product-ink);

    font-size: 1.25rem;

    cursor: pointer;
}

.quantity-buttons button:hover {
    background: var(--product-cream-deep);
}

.quantity-buttons button[aria-disabled="true"],
.cart-item-controls button[aria-disabled="true"] {
    color: var(--product-muted);
    background: var(--product-cream-deep);
    cursor: help;
}

.quantity-limit-message {
    position: fixed;
    z-index: 1300;
    right: 14px;
    bottom: 14px;
    left: 14px;
    width: fit-content;
    max-width: min(360px, calc(100% - 28px));
    margin: 0 auto;
    padding: 10px 14px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 8px;
    background: var(--product-ink);
    box-shadow: var(--product-shadow);
    color: var(--product-white);
    font-size: 0.86rem;
    line-height: 1.35;
    text-align: center;
}

.quantity-limit-message[hidden] {
    display: none;
}

#quantity-value {
    border-right: 1px solid var(--product-border);
    border-left: 1px solid var(--product-border);

    font-size: 1rem;
    font-weight: 700;
}

.selected-price {
    color: var(--product-burgundy);

    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.55rem;
    white-space: nowrap;
}


/* =========================================================
   PURCHASE BUTTONS
========================================================= */

.add-to-cart-button,
.buy-now-button {
    width: 100%;
    min-height: 52px;

    border-radius: 6px;

    font-family: Georgia, "Times New Roman", serif;
    font-size: 1rem;

    letter-spacing: 0.08em;
    text-transform: uppercase;

    cursor: pointer;

    transition:
        background 160ms ease,
        color 160ms ease,
        border-color 160ms ease,
        opacity 160ms ease,
        transform 160ms ease;
}

.add-to-cart-button {
    border: 1px solid var(--product-burgundy);
    background: var(--product-burgundy);
    color: white;
}

.add-to-cart-button:hover:not(:disabled) {
    background: var(--product-burgundy-dark);
}

.buy-now-button {
    margin-top: 9px;

    border: 1px solid var(--product-burgundy);
    background: transparent;
    color: var(--product-burgundy);
}

.buy-now-button:hover:not(:disabled) {
    background: rgba(112, 21, 34, 0.06);
}

.checkout-trust {
    margin: 13px 0 0;
    color: var(--product-muted);
    text-align: center;
}

.checkout-trust p {
    margin: 0;
    line-height: 1.4;
}

.checkout-trust-primary {
    color: var(--product-burgundy);
    font-size: 0.82rem;
    font-weight: 600;
}

.checkout-trust .checkout-trust-secondary {
    margin-top: 2px;
    font-size: 0.76rem;
}

.checkout-trust--compact {
    margin-top: 10px;
}

.checkout-trust--compact .checkout-trust-primary {
    font-size: 0.78rem;
}

.checkout-trust--compact .checkout-trust-secondary {
    font-size: 0.72rem;
}

.cart-payment-methods {
    display: block;
    width: 100%;
    max-width: 210px;
    height: auto;
    margin: 9px auto 0;
}

.add-to-cart-button:active:not(:disabled),
.buy-now-button:active:not(:disabled) {
    transform: scale(0.99);
}

.add-to-cart-button:disabled,
.buy-now-button:disabled {
    border-color: #bcb3ae;
    background: #d8d1cc;
    color: #7e7672;

    cursor: not-allowed;
    opacity: 0.72;
}

.cart-confirmation {
    margin: 11px 0 0;

    color: var(--product-burgundy);

    font-size: 0.9rem;
    font-weight: 700;
    text-align: center;
}


/* =========================================================
   ABOUT
========================================================= */

.product-about {
    margin: 0 16px 20px;
    padding: 22px 18px;

    border-top: 1px solid var(--product-border);
    border-bottom: 1px solid var(--product-border);
}

.product-about h2 {
    margin: 0 0 14px;

    color: var(--product-burgundy);

    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.25rem;
    font-weight: 500;

    text-align: center;
    text-transform: uppercase;
}

.product-about p {
    margin: 0 0 12px;

    font-size: 0.95rem;
    line-height: 1.65;
}

.product-about p:last-child {
    margin-bottom: 0;
}

.product-handmade-note {
    color: var(--product-muted);
}


/* =========================================================
   COLLAPSIBLE INFORMATION
========================================================= */

.product-info-section {
    margin: 0 16px 9px;

    overflow: hidden;

    border: 1px solid var(--product-border);
    border-radius: 8px;

    background: rgba(255, 253, 249, 0.65);
}

.product-info-section summary {
    position: relative;

    min-height: 58px;

    display: flex;
    align-items: center;

    padding: 15px 48px 15px 17px;

    color: var(--product-ink);

    font-family: Georgia, "Times New Roman", serif;
    font-size: 1rem;

    letter-spacing: 0.04em;
    text-transform: uppercase;

    cursor: pointer;

    list-style: none;
}

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

.product-info-section summary::after {
    content: "+";

    position: absolute;
    right: 18px;
    top: 50%;

    transform: translateY(-50%);

    color: var(--product-burgundy);

    font-family: Arial, sans-serif;
    font-size: 1.45rem;
    font-weight: 300;
}

.product-info-section[open] summary::after {
    content: "−";
}

.product-info-content {
    padding: 0 18px 18px;

    border-top: 1px solid var(--product-border);
}

.product-info-content p,
.product-info-content li {
    font-size: 0.92rem;
    line-height: 1.6;
}

.product-info-content ul {
    margin: 15px 0 0;
    padding-left: 20px;
}

.product-info-content li + li {
    margin-top: 6px;
}


/* =========================================================
   POLICY LINKS
========================================================= */

.product-policy-links {
    display: grid;
    gap: 9px;

    margin-top: 16px;
}

.product-policy-links a {
    display: flex;
    align-items: center;
    justify-content: center;

    min-height: 45px;
    padding: 10px 14px;

    border: 1px solid var(--product-burgundy);
    border-radius: 5px;

    color: var(--product-burgundy);
    text-decoration: none;

    font-size: 0.88rem;
    font-weight: 700;
    text-align: center;
}

.product-policy-links a:hover {
    background: var(--product-burgundy);
    color: white;
}


/* =========================================================
   BACK TO SHOP
========================================================= */

.back-to-shop {
    display: block;

    width: calc(100% - 32px);
    min-height: 48px;

    margin: 22px 16px 0;

    border: 1px solid var(--product-burgundy);
    border-radius: 5px;

    background: transparent;
    color: var(--product-burgundy);

    font-family: Georgia, "Times New Roman", serif;
    font-size: 0.95rem;

    letter-spacing: 0.07em;
    text-transform: uppercase;

    cursor: pointer;
}

.back-to-shop:hover {
    background: rgba(112, 21, 34, 0.06);
}


/* =========================================================
   CART DRAWER
   Hidden until JS opens it.
========================================================= */

.cart-drawer {
    position: fixed;
    z-index: 200;

    right: 0;
    bottom: 0;
    left: 0;

    max-height: 82vh;

    padding: 20px 18px;

    overflow-y: auto;

    border-radius: 20px 20px 0 0;

    background: var(--product-white);
    color: var(--product-ink);

    box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.22);

    transform: translateY(105%);

    transition: transform 220ms ease;
}

.cart-drawer.is-open {
    transform: translateY(0);
}

.cart-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding-bottom: 14px;
    border-bottom: 1px solid var(--product-border);
}

.cart-drawer-header h2 {
    margin: 0;

    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.45rem;
    font-weight: 500;

    text-transform: uppercase;
}

#cart-close {
    width: 42px;
    height: 42px;

    border: 0;
    background: transparent;

    color: var(--product-ink);

    font-size: 2rem;
    line-height: 1;

    cursor: pointer;
}

.cart-items {
    min-height: 80px;
    padding: 18px 0;
}

.cart-drawer-footer {
    padding-top: 14px;
    border-top: 1px solid var(--product-border);
}

.cart-total {
    display: flex;
    justify-content: space-between;

    margin-bottom: 14px;

    font-size: 1rem;
}

#cart-checkout,
#continue-shopping {
    width: 100%;
    min-height: 48px;

    border-radius: 5px;

    font-size: 0.95rem;
    text-transform: uppercase;

    cursor: pointer;
}

#cart-checkout {
    border: 1px solid var(--product-burgundy);
    background: var(--product-burgundy);
    color: white;
}

#cart-checkout:disabled {
    border-color: #bcb3ae;
    background: #d8d1cc;
    color: #7e7672;

    cursor: not-allowed;
}

#continue-shopping {
    margin-top: 8px;

    border: 1px solid var(--product-burgundy);
    background: transparent;
    color: var(--product-burgundy);
}

#cart-checkout:disabled ~ .checkout-trust--compact {
    display: none;
}


/* =========================================================
   FOCUS / ACCESSIBILITY
========================================================= */

.product-page button:focus-visible,
.product-page a:focus-visible,
.product-page summary:focus-visible {
    outline: 3px solid rgba(112, 21, 34, 0.35);
    outline-offset: 3px;
}


/* =========================================================
   SMALL PHONES
========================================================= */

@media (max-width: 360px) {

    .product-header {
        grid-template-columns: 50px 1fr 56px;
    }

    .product-logo {
        font-size: 1.05rem;
    }

    .product-cart-button,
    .product-cart-icon {
        width: 52px;
        height: 52px;
    }

    .variant-options {
        gap: 6px;
    }

    .variant-option {
        min-height: 118px;
        padding-inline: 5px;
    }

    .variant-name {
        font-size: 0.78rem;
    }

    .purchase-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    .selected-price {
        align-self: flex-end;
    }
}


/* =========================================================
   TABLET / DESKTOP
========================================================= */

@media (min-width: 768px) {

    .product-header {
        min-height: 78px;
        padding-inline: 24px;
    }

    .product-logo {
        font-size: 1.55rem;
    }

    .product-detail {
        padding-top: 28px;
    }

    .product-main-image-wrap {
        margin-inline: auto;

        width: calc(100% - 40px);
        max-width: 650px;

        border-radius: 12px;

        box-shadow: var(--product-shadow);
    }

    .product-media-thumbnails {
        width: calc(100% - 40px);
        margin-inline: auto;
    }

    .product-intro {
        padding-top: 34px;
    }

    .variant-options {
        gap: 14px;
    }

    .variant-option {
        min-height: 140px;
    }

    .fragrance-details,
    .product-about,
    .product-info-section {
        margin-right: 20px;
        margin-left: 20px;
    }

    .product-purchase {
        padding-right: 20px;
        padding-left: 20px;
    }

    .back-to-shop {
        width: calc(100% - 40px);
        margin-right: 20px;
        margin-left: 20px;
    }

    .cart-drawer {
        top: 0;
        bottom: 0;
        left: auto;

        width: min(430px, 92vw);
        max-height: none;

        border-radius: 0;

        transform: translateX(105%);
    }

    .cart-drawer.is-open {
        transform: translateX(0);
    }
}

/* =========================================================
   CART ITEMS
========================================================= */

.cart-empty-message {
    margin: 18px 0;
    color: var(--product-muted);
    text-align: center;
}

.cart-item {
    display: grid;
    grid-template-columns: 82px 1fr;
    gap: 14px;

    padding: 16px 0;

    border-bottom: 1px solid var(--product-border);
}

.cart-item:first-child {
    padding-top: 0;
}

.cart-item-image {
    width: 82px;
    height: 82px;

    border-radius: 7px;

    object-fit: cover;
}

.cart-item-info h3 {
    margin: 0 0 3px;

    font-family: Georgia, "Times New Roman", serif;
    font-size: 1rem;
    font-weight: 500;
}

.cart-item-variant {
    margin: 0;

    color: var(--product-muted);

    font-size: 0.86rem;
}

.cart-item-price {
    margin: 5px 0 9px;

    color: var(--product-burgundy);

    font-weight: 700;
}

.cart-item-controls {
    display: inline-grid;
    grid-template-columns: 34px 38px 34px;

    overflow: hidden;

    border: 1px solid var(--product-border);
    border-radius: 5px;
}

.cart-item-controls button,
.cart-item-controls span {
    height: 34px;

    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-item-controls button {
    border: 0;

    background: transparent;
    color: var(--product-ink);

    font-size: 1rem;

    cursor: pointer;
}

.cart-item-controls span {
    border-right: 1px solid var(--product-border);
    border-left: 1px solid var(--product-border);

    font-size: 0.85rem;
    font-weight: 700;
}

.cart-item-remove {
    margin-top: 8px;
    padding: 0;

    border: 0;
    background: transparent;

    color: var(--product-burgundy);

    font-size: 0.78rem;
    text-decoration: underline;

    cursor: pointer;
}

.product-main-image[hidden],
.product-main-video[hidden] {
    display: none;
}

.product-media-thumbnails {
    width: 100%;
    padding: 10px 2px 2px;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
}

.product-media-thumbnails[hidden] {
    display: none;
}

.product-media-thumbnail {
    width: 58px;
    height: 58px;
    padding: 3px;
    flex: 0 0 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--product-border);
    border-radius: 7px;
    background: var(--product-white);
    color: var(--product-ink);
    cursor: pointer;
}

.product-media-thumbnail.is-active {
    border-color: var(--product-burgundy);
    box-shadow: 0 0 0 2px rgba(112, 21, 34, 0.18);
}

.product-media-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 4px;
}

.product-media-video-icon {
    font-size: 1.35rem;
    line-height: 1;
}
