@font-face {
    font-family: "Nouvapouch Detail Text";
    src: url("../motion/barlow-condensed-500.ttf") format("truetype");
    font-weight: 500;
    font-display: swap;
}

body.np-tin-detail {
    --detail-paper: #eae6e3;
    --detail-ink: #2d2a26;
    --detail-outer: #efc415;
    --detail-outer-ink: #2d2a26;
    --detail-panel: #d32929;
    --detail-panel-ink: #fff8ee;
    --detail-title: #efc415;
    --detail-facts: #a61e1e;
    --detail-badge: #efc415;
    --detail-display: "Nouvapouch Display", Impact, sans-serif;
    --detail-text: "Nouvapouch Detail Text", "Arial Narrow", sans-serif;
    --detail-top: calc(90px + var(--wp-admin--admin-bar--height, 0px));
    --theme-text-color: var(--detail-ink);
    --theme-link-initial-color: var(--detail-ink);
    --theme-font-family: var(--detail-text);
    margin: 0;
    color: var(--detail-ink);
    background: var(--detail-outer);
    font: 500 19px/1.45 var(--detail-text);
    overflow-x: visible;
}

body.np-tin-detail-sea-salt-caramel {
    --detail-outer: #e3a898;
    --detail-panel: #8b231a;
    --detail-panel-ink: #fff8ee;
    --detail-title: #e3a898;
    --detail-facts: #8b231a;
    --detail-badge: #e3a898;
}

body.np-tin-detail-oat-latte {
    --detail-outer: #8b231a;
    --detail-outer-ink: #fff8ee;
    --detail-panel: #f45016;
    --detail-panel-ink: #2d2a26;
    --detail-title: #3f1813;
    --detail-facts: #51231b;
    --detail-badge: #efc415;
}

html:has(body.np-tin-detail) {
    scroll-behavior: auto;
    scroll-padding-top: calc(100px + var(--wp-admin--admin-bar--height, 0px));
    scrollbar-color: #d32929 #e3a898;
}

.np-tin-detail :is(a, button, input, summary):focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 4px;
}

.np-tin-detail :is(h1, h2, h3) {
    color: inherit;
    margin: 0;
    font: 400 clamp(34px, 4.75vw, 80px)/1.07 var(--detail-display);
    text-transform: uppercase;
}

.np-tin-detail p { margin: 0; }
.np-tin-detail a { color: inherit; text-decoration: none; }

.tin-detail-header {
    position: sticky;
    inset-block-start: calc(12px + var(--wp-admin--admin-bar--height, 0px));
    z-index: 12;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 20px;
    min-height: 63px;
    margin: 12px 14px 18px;
    padding: 6px 13px 6px 20px;
    background: var(--detail-paper);
    color: var(--detail-ink);
    border: 1px solid #2d2a2645;
}

.tin-detail-brand {
    font: 400 clamp(26px, 3vw, 43px)/1 var(--detail-display);
    text-transform: uppercase;
    letter-spacing: -.015em;
}

.tin-detail-nav { display: flex; align-items: center; gap: clamp(14px, 2vw, 30px); }
.tin-detail-nav a, .tin-detail-cart { font-size: 16px; letter-spacing: .02em; text-transform: uppercase; }
.tin-detail-nav a:hover, .tin-detail-footer a:hover { text-decoration: underline; text-underline-offset: .19em; }

.tin-detail-cart {
    justify-self: end;
    display: inline-flex;
    align-items: center;
    gap: 16px;
    min-height: 42px;
    padding: 0 15px;
    background: #2d2a26;
    color: #eae6e3 !important;
    border: 1px solid #2d2a26;
}

.tin-detail-cart:hover { background: #51453d; }
.tin-detail-cart span { font-variant-numeric: tabular-nums; }

.tin-detail-spread {
    --detail-pad: clamp(16px, 2vw, 32px);
    display: grid;
    grid-template-columns: minmax(200px, .84fr) minmax(350px, 1.7fr) minmax(220px, 1fr);
    grid-template-areas: "purchase main facts";
    align-items: start;
    max-width: 1780px;
    margin: 0 auto;
    padding-inline: 14px;
    gap: clamp(12px, 1.45vw, 24px);
}

.tin-detail-buy { grid-area: purchase; }
.tin-detail-main { grid-area: main; }
.tin-detail-facts { grid-area: facts; }

.tin-detail-buy, .tin-detail-facts {
    position: sticky;
    top: var(--detail-top);
    min-width: 0;
}

.tin-detail-buy {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: clamp(16px, 2vw, 30px) clamp(12px, 1vw, 16px) 20px 4px;
    color: var(--detail-outer-ink);
}

.tin-detail-buy :is(.tin-detail-back, .tin-detail-type) {
    font-size: 14px;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.tin-detail-buy .tin-detail-back { width: fit-content; border-bottom: 1px solid currentColor; }
.tin-detail-buy .tin-detail-back:hover { opacity: .8; }
.tin-detail-buy .tin-detail-buy-heading {
    max-width: 5ch;
    line-height: .97;
    font-size: clamp(51px, 6vw, 103px);
    letter-spacing: -.015em;
    text-wrap: balance;
}

.tin-detail-buy .price {
    margin: 0;
    font: 400 clamp(24px, 3vw, 41px)/1.15 var(--detail-display);
    color: inherit;
}

.tin-detail-buy .cart {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.tin-detail-buy .cart > * { margin: 0; }
.tin-detail-buy .quantity {
    --quantity-width: 92px;
    --quantity-height: 46px;
    width: 92px;
    color: #2d2a26;
    background: #fff8ee;
}

.tin-detail-buy .quantity .qty {
    width: 100%;
    min-height: 46px;
    text-align: center;
    margin: 0;
    padding-inline: 22px;
    background: #fff8ee;
    color: #2d2a26;
    border: 1px solid transparent;
    border-radius: 0;
}

.tin-detail-buy .quantity :is(.ct-increase, .ct-decrease) {
    color: #2d2a26;
}

.tin-detail-buy button.single_add_to_cart_button {
    min-height: 46px;
    border: 0;
    border-radius: 0;
    background: #2d2a26;
    color: #fff8ee;
    font: 500 20px/1 var(--detail-text);
    text-transform: uppercase;
    padding-inline: 14px;
    transition: transform 180ms ease, background-color 180ms ease;
}

.tin-detail-buy button.single_add_to_cart_button:hover {
    background: #4a3c34;
    transform: translateY(-2px);
}

.tin-detail-buy .stock { font-size: 16px; }
.tin-detail-buy .out-of-stock { color: inherit; }

.tin-detail-main {
    min-width: 0;
    background: var(--detail-panel);
    color: var(--detail-panel-ink);
}

.tin-detail-hero {
    min-height: min(760px, calc(100svh - 92px));
    display: grid;
    justify-items: center;
    align-content: start;
    padding: clamp(22px, 3vw, 45px) var(--detail-pad) 24px;
    text-align: center;
}

.tin-detail-hero .tin-detail-title {
    font-size: clamp(59px, 6.6vw, 123px);
    line-height: .98;
    letter-spacing: -.025em;
    color: var(--detail-title);
    text-wrap: balance;
    overflow-wrap: anywhere;
}

.tin-detail-art {
    position: relative;
    isolation: isolate;
    width: min(100%, 530px);
    display: grid;
    place-items: center;
    margin-top: 8px;
    padding: 0 10px;
}

.tin-detail-art::before, .tin-detail-art::after {
    content: "";
    position: absolute;
    width: 81%;
    aspect-ratio: 1;
    border-radius: 50%;
    border: 1px solid currentColor;
    color: var(--detail-title);
    opacity: .28;
    pointer-events: none;
    z-index: -1;
}

.tin-detail-art::after { width: 70%; opacity: .19; }
.tin-detail-art .character-wrap { width: min(100%, 405px, 52svh); }
.tin-detail-art .motion-tin-art { width: 100%; }
.tin-detail-art .motion-tin-art .coffee-tin img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 10px 12px #301b1d36);
}

.tin-detail-art .motion-tin-art .coffee-render-pose {
    animation: tin-detail-float 6s ease-in-out infinite;
    transform-origin: center 70%;
}

@keyframes tin-detail-float {
    0%, 100% { transform: translateY(0) rotate(-7deg); }
    50% { transform: translateY(-8px) rotate(-2deg); }
}

.tin-detail-hero-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px 26px;
}

.tin-detail-hero-links a, .tin-detail-package > a {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: .08em;
    border-bottom: 1px solid currentColor;
    padding-bottom: 4px;
}

.tin-detail-package > a { display: inline-block; margin-top: 14px; }
.tin-detail-intro { font-size: clamp(23px, 2.4vw, 32px); line-height: 1.2; }
.tin-detail-description { margin-top: 16px; }

.tin-detail-story, .tin-detail-package {
    padding: clamp(44px, 7vw, 118px) var(--detail-pad);
    border-top: 1px solid color-mix(in srgb, currentColor 52%, transparent);
}

.tin-detail-story :is(h2, .tin-detail-section-title),
.tin-detail-package :is(h2, .tin-detail-section-title) {
    font-size: clamp(44px, 5.1vw, 80px);
    color: var(--detail-title);
    margin-bottom: 18px;
}

.tin-detail-story :is(p, ul, ol) { margin: 0 0 .9em; }
.tin-detail-story p:last-child { margin-bottom: 0; }

.tin-detail-package img {
    display: block;
    width: min(100%, 420px);
    height: auto;
    margin-inline: auto;
    filter: drop-shadow(0 16px 18px #28130f49);
}

.tin-detail-facts {
    padding: clamp(18px, 2.4vw, 38px);
    min-height: 320px;
    color: #fff8ee;
    background: var(--detail-facts);
    border: 1px solid #2d2a2640;
}

.tin-detail-facts h2 {
    font-size: clamp(31px, 3.35vw, 55px);
    margin-bottom: 24px;
}

.tin-detail-facts dl { margin: 0; }
.tin-detail-facts dl > div {
    display: grid;
    grid-template-columns: minmax(0, .75fr) minmax(0, 1.25fr);
    gap: 10px;
    border-top: 1px solid #fff8ee80;
    padding-block: 12px;
}

.tin-detail-facts dt { text-transform: uppercase; font-size: 17px; letter-spacing: .035em; }
.tin-detail-facts dd { margin: 0; font-size: 17px; overflow-wrap: anywhere; }
.tin-detail-facts dl > div:last-child { border-bottom: 4px solid #fff8ee; }

.tin-detail-related {
    padding: clamp(46px, 6vw, 90px) clamp(18px, 6vw, 96px);
    background: #e3a898;
    color: #2d2a26;
}

.tin-detail-related h2 { margin-bottom: 34px; }
.tin-detail-related-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(14px, 3vw, 44px);
}

.tin-detail-card {
    display: grid;
    grid-template-rows: 1fr auto;
    place-items: center;
    min-width: 0;
    padding: clamp(18px, 4vw, 58px);
    border: 1px solid #2d2a2659;
    color: var(--card-ink, #2d2a26) !important;
    background: var(--card-bg, #eae6e3);
    text-align: center;
}

.tin-detail-card img {
    display: block;
    width: min(100%, 350px);
    height: auto;
    transition: transform .25s ease;
}

.tin-detail-card:is(:focus-visible, :hover) img { transform: rotate(-6deg) scale(1.035); }
.tin-detail-card-title { font: 400 clamp(26px, 3vw, 48px)/1.05 var(--detail-display); text-transform: uppercase; }

.tin-detail-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    padding: clamp(23px, 5vw, 58px) clamp(18px, 6vw, 96px);
    background: #2d2a26;
    color: #eae6e3;
}

.tin-detail-footer nav { display: flex; flex-wrap: wrap; gap: 20px; }
.np-tin-detail .woocommerce-notices-wrapper { max-width: 1360px; margin: 0 auto; padding-inline: 16px; }
.np-tin-detail .woocommerce-notices-wrapper:empty { display: none; }
.tin-detail-notices:empty { display: none; }

@media (min-width: 880px) and (max-height: 570px) {
    .tin-detail-buy, .tin-detail-facts { position: relative; top: auto; }
}

@media (max-width: 879px) {
    .tin-detail-spread {
        grid-template-columns: 1fr 1fr;
        grid-template-areas: "hero hero" "purchase facts" "story story" "package package";
        gap: 14px;
        padding-bottom: 18px;
    }
    .tin-detail-main { display: contents; }
    .tin-detail-hero { grid-area: hero; }
    .tin-detail-story { grid-area: story; }
    .tin-detail-package { grid-area: package; }
    .tin-detail-main > :is(.tin-detail-hero,.tin-detail-story,.tin-detail-package) {
        background: var(--detail-panel);
        color: var(--detail-panel-ink);
    }
    .tin-detail-hero { min-height: auto; }
    .tin-detail-hero .tin-detail-title { font-size: clamp(58px, 10vw, 98px); }
    .tin-detail-buy, .tin-detail-facts { position: static; }
}

@media (max-width: 580px) {
    .tin-detail-header { margin: 8px 8px 10px; padding-inline: 12px; gap: 12px; min-height: 56px; }
    .tin-detail-nav { gap: 12px; }
    .tin-detail-nav a { font-size: 14px; }
    .tin-detail-cart { min-height: 40px; padding-inline: 10px; gap: 5px; }
    .tin-detail-spread { grid-template-columns: minmax(0,1fr); grid-template-areas: "hero" "purchase" "facts" "story" "package"; padding-inline: 8px; }
    .tin-detail-hero .tin-detail-title { font-size: clamp(47px, 13vw, 77px); }
    .tin-detail-art .character-wrap { width: min(88vw, 340px, 44svh); }
    .tin-detail-buy { padding: 17px 14px 20px; }
    .tin-detail-buy .tin-detail-buy-heading { max-width: none; font-size: 55px; }
    .tin-detail-facts { min-height: auto; }
    .tin-detail-related h2 { font-size: clamp(43px, 11vw, 71px); }
    .tin-detail-related-grid { gap: 10px; }
    .tin-detail-card { padding: 11px; }
    .tin-detail-card-title { font-size: clamp(23px, 6vw, 37px); }
    .tin-detail-footer { flex-wrap: wrap; }
}

@media (max-width: 360px) {
    .tin-detail-brand { font-size: 21px; }
    .tin-detail-nav { gap: 8px; }
    .tin-detail-nav a { font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
    .tin-detail-art .motion-tin-art .coffee-render-pose { animation: none; }
    .tin-detail-card img, .tin-detail-buy button.single_add_to_cart_button { transition: none; }
    .tin-detail-card:is(:focus-visible,:hover) img, .tin-detail-buy button.single_add_to_cart_button:hover { transform: none; }
}
