/* JUVYRI Atelier: dress pages, collection page and ordinary pages.
   Uses the theme's colour and font tokens (--ink, --cream, --rust, --gold...). */

/* Clickable cards (homepage, collection, "you may also like") */
.product-card { position: relative; }
.jat-card-link { position: absolute; inset: 0; z-index: 2; border-radius: 6px; }
.jat-card-link:focus-visible { outline: 2px solid var(--rust, #6E1E2B); outline-offset: 4px; }
.product-card:has(.jat-card-link) h3 { transition: color .25s; }
.product-card:has(.jat-card-link):hover h3 { color: var(--rust, #6E1E2B); }

/* Dress page */
.jat-dress { max-width: var(--container, 1220px); margin: 0 auto; padding: 28px 24px 90px; }
.jat-crumbs { font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft, #5c524a); display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.jat-crumbs a { color: var(--ink-soft, #5c524a); border-bottom: 1px solid transparent; transition: color .2s, border-color .2s; }
.jat-crumbs a:hover { color: var(--rust, #6E1E2B); border-color: var(--rust, #6E1E2B); }
.jat-crumbs [aria-current] { color: var(--ink, #1a1614); }

.jat-dress-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: 56px; align-items: start; }

.jat-main-photo { position: relative; aspect-ratio: 3 / 4; border-radius: 8px; overflow: hidden; background: var(--cream-2, #efe6d8); }
.jat-main-photo img, .jat-no-photo { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; display: block; }
.jat-main-img { transition: opacity .25s ease; }
.jat-main-img.is-switching { opacity: .25; }
.jat-thumbs { display: flex; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.jat-thumb { width: 78px; aspect-ratio: 3 / 4; border-radius: 6px; overflow: hidden; padding: 0; border: 2px solid transparent; opacity: .72; transition: opacity .2s, border-color .2s; background: var(--cream-2, #efe6d8); }
.jat-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }
.jat-thumb:hover, .jat-thumb.is-active { opacity: 1; border-color: var(--rust, #6E1E2B); }
.jat-thumb:focus-visible { outline: 2px solid var(--rust, #6E1E2B); outline-offset: 2px; }

.jat-info { position: sticky; top: calc(var(--header-h, 76px) + 24px); }
.jat-info .eyebrow { margin-bottom: 10px; }
.jat-title { font-size: clamp(2rem, 3.6vw, 2.9rem); line-height: 1.08; margin: 0 0 14px; }
.jat-price { font-family: var(--font-body, inherit); font-size: 1.12rem; font-weight: 500; color: var(--rust-dark, #4E1520); margin: 0; letter-spacing: .01em; }
.jat-price-sizes { font-size: .84rem; color: var(--rust-dark, #4E1520); margin: 6px 0 0; }
.jat-price-note { font-size: .82rem; color: var(--ink-soft, #5c524a); margin: 4px 0 22px; }
.jat-desc { color: var(--ink-soft, #5c524a); font-size: 1rem; margin-bottom: 26px; }
.jat-desc p { margin: 0 0 12px; }

.jat-sizes { border-top: 1px solid var(--line, rgba(26,22,20,.14)); padding-top: 20px; margin-bottom: 18px; }
.jat-sizes-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.jat-label { font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 500; }
.jat-link { color: var(--rust, #6E1E2B); font-size: .86rem; border-bottom: 1px solid currentColor; padding-bottom: 1px; }
.jat-link:hover { color: var(--rust-dark, #4E1520); }
.jat-size-buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.jat-size { position: relative; min-width: 54px; height: 46px; padding: 0 12px; border: 1px solid var(--line, rgba(26,22,20,.14)); border-radius: 999px; background: var(--paper, #fff); font-size: .92rem; color: var(--ink, #1a1614); transition: border-color .2s, background .2s, color .2s; }
.jat-size:hover { border-color: var(--ink, #1a1614); }
.jat-size[aria-pressed="true"] { background: var(--ink, #1a1614); border-color: var(--ink, #1a1614); color: var(--cream, #f7f1e8); }
.jat-size.is-ready::after { content: ""; position: absolute; top: 6px; right: 8px; width: 6px; height: 6px; border-radius: 50%; background: var(--gold, #B8863B); }
.jat-size:focus-visible { outline: 2px solid var(--rust, #6E1E2B); outline-offset: 2px; }
.jat-size-status { font-size: .88rem; color: var(--ink-soft, #5c524a); margin: 12px 0 0; min-height: 1.4em; }
.jat-size-status.is-ready { color: var(--rust-dark, #4E1520); font-weight: 500; }
.jat-size-key { display: flex; align-items: center; gap: 8px; font-size: .78rem; color: var(--ink-soft, #5c524a); margin: 6px 0 0; }
.jat-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold, #B8863B); display: inline-block; }

.jat-model { font-size: .88rem; color: var(--ink-soft, #5c524a); font-style: italic; margin: 0 0 22px; }
.jat-fabric-note { font-size: .82rem; line-height: 1.55; color: var(--ink-soft, #5c524a); background: rgba(184,134,59,.08); border-left: 2px solid var(--gold, #B8863B); padding: 10px 14px; margin: 0 0 16px; }
.jat-order { width: 100%; padding: 17px 30px; font-size: .86rem; margin-top: 4px; }
.jat-order.is-nudge { animation: jatNudge .5s ease; }
@keyframes jatNudge { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.jat-order.is-locked { opacity: .55; }
.jat-order.is-locked:hover { opacity: .7; }
.jat-sizes.is-alert .jat-size { border-color: var(--rust, #6E1E2B); animation: jatNudge .45s ease; }
.jat-sizes.is-alert .jat-size-status { color: var(--rust, #6E1E2B); font-weight: 500; }
.jat-size-help { text-align: center; margin: 14px 0 0; }
.jat-size-help .jat-link { font-size: .84rem; }
.jat-reassure { text-align: center; font-size: .8rem; color: var(--ink-soft, #5c524a); margin: 12px 0 26px; letter-spacing: .02em; }

.jat-accordions { border-top: 1px solid var(--line, rgba(26,22,20,.14)); }
.jat-accordions details { border-bottom: 1px solid var(--line, rgba(26,22,20,.14)); }
.jat-accordions summary { list-style: none; cursor: pointer; padding: 17px 0; font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 500; display: flex; justify-content: space-between; align-items: center; }
.jat-accordions summary::-webkit-details-marker { display: none; }
.jat-accordions summary::after { content: "+"; font-size: 1.2rem; font-weight: 300; color: var(--rust, #6E1E2B); transition: transform .25s; }
.jat-accordions details[open] summary::after { transform: rotate(45deg); }
.jat-acc-body { padding: 0 0 18px; color: var(--ink-soft, #5c524a); font-size: .94rem; }
.jat-acc-body p { margin: 0 0 10px; }

.jat-more { margin-top: 100px; }
.jat-more .section-head { margin-bottom: 40px; }

/* Currency switcher */
.jat-cur { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 22px; }
.jat-cur-center { justify-content: center; margin: 22px 0 0; }
.jat-cur-label { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft, #5c524a); margin-right: 4px; }
.jat-cur button { min-width: 40px; height: 32px; padding: 0 10px; border: 1px solid var(--line, rgba(26,22,20,.14)); border-radius: 999px; background: transparent; font-size: .82rem; color: var(--ink, #1a1614); transition: background .2s, color .2s, border-color .2s; }
.jat-cur button:hover { border-color: var(--ink, #1a1614); }
.jat-cur button[aria-pressed="true"] { background: var(--rust, #6E1E2B); border-color: var(--rust, #6E1E2B); color: var(--cream, #f7f1e8); }
.jat-cur button:focus-visible { outline: 2px solid var(--rust, #6E1E2B); outline-offset: 2px; }
.jat-ghs { font-size: .78em; font-weight: 400; color: var(--ink-soft, #5c524a); }
.jat-price .jat-ghs { margin-left: 6px; }
.jat-price-note { margin-bottom: 14px; }

/* Collection page */
.jat-collection .section { padding-top: 70px; }
.jat-page-title { font-size: clamp(2rem, 4vw, 2.9rem); line-height: 1.1; margin: 0 0 16px; text-wrap: balance; }
.jat-empty { text-align: center; color: var(--ink-soft, #5c524a); }
.jat-pagination { margin-top: 40px; text-align: center; }

/* Ordinary pages (How to Order, Size Guide, Our Story...) */
.jat-page { padding: 70px 24px 100px; }
.jat-page-inner { max-width: 760px; margin: 0 auto; }
.jat-page-head { margin-bottom: 40px; }
.jat-page-photo { margin: 0 0 40px; border-radius: 10px; overflow: hidden; }
.jat-page-photo img { width: 100%; height: auto; display: block; }
.jat-prose { color: var(--ink-soft, #5c524a); font-size: 1.02rem; line-height: 1.75; }
.jat-prose h2, .jat-prose h3 { color: var(--ink, #1a1614); margin: 2em 0 .6em; line-height: 1.2; }
.jat-prose h2 { font-size: 1.9rem; }
.jat-prose h3 { font-size: 1.35rem; }
.jat-prose p, .jat-prose ul, .jat-prose ol { margin: 0 0 1.1em; }
.jat-prose ul { list-style: disc; padding-left: 1.3em; }
.jat-prose ol { list-style: decimal; padding-left: 1.3em; }
.jat-prose li { margin-bottom: .4em; }
.jat-prose a { color: var(--rust, #6E1E2B); border-bottom: 1px solid currentColor; }
.jat-prose strong { color: var(--ink, #1a1614); }
.jat-prose table { width: 100%; border-collapse: collapse; margin: 0 0 1.4em; font-size: .94rem; }
.jat-prose th, .jat-prose td { border-bottom: 1px solid var(--line, rgba(26,22,20,.14)); padding: 10px 8px; text-align: left; }
.jat-prose th { color: var(--ink, #1a1614); font-weight: 600; background: var(--cream-2, #efe6d8); }
.jat-prose .wp-block-table { overflow-x: auto; margin: 0 0 1.4em; }
.jat-prose .wp-block-table table, .jat-prose .wp-block-table thead, .jat-prose .wp-block-table tfoot { border: 0; }
.jat-prose .wp-block-table th, .jat-prose .wp-block-table td { border: 0; border-bottom: 1px solid var(--line, rgba(26,22,20,.14)); padding: 12px 10px; }
.jat-prose .wp-block-table thead th { border-bottom: 1px solid var(--gold, #B8863B); background: transparent; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--rust-dark, #4E1520); }
.jat-prose .wp-block-table tbody td:first-child { font-weight: 600; color: var(--ink, #1a1614); }
.jat-prose img { max-width: 100%; height: auto; border-radius: 8px; }
.jat-prose blockquote { border-left: 3px solid var(--gold, #B8863B); margin: 1.4em 0; padding: .2em 0 .2em 1.2em; font-family: var(--font-display, Georgia, serif); font-size: 1.25rem; font-style: italic; color: var(--ink, #1a1614); }

@media (max-width: 900px) {
	.jat-dress-grid { grid-template-columns: 1fr; gap: 34px; }
	.jat-info { position: static; }
	.jat-dress { padding-top: 18px; }
	.jat-more { margin-top: 70px; }
}
@media (max-width: 560px) {
	.jat-thumb { width: 64px; }
	.jat-page { padding: 50px 20px 80px; }
}
@media (prefers-reduced-motion: reduce) {
	.jat-main-img, .jat-order.is-nudge, .jat-sizes.is-alert .jat-size { transition: none; animation: none; }
}

/* Fabric swatches (1.5.0) */
.jat-fabrics { margin: 22px 0 18px; }
.jat-fabric-count { font-size: .78rem; color: var(--ink-soft, #5c524a); }
.jat-fabric-buttons { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; }
.jat-fabric { width: 64px; height: 64px; padding: 3px; border: 1px solid var(--line, rgba(26,22,20,.18)); border-radius: 50%; background: transparent; cursor: pointer; transition: border-color .2s, box-shadow .2s; }
.jat-fabric img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.jat-fabric:hover { border-color: var(--gold, #B8863B); }
.jat-fabric[aria-pressed="true"] { border: 2px solid var(--rust, #6E1E2B); box-shadow: 0 0 0 3px rgba(184,134,59,.25); }
.jat-fabric:focus-visible { outline: 2px solid var(--gold, #B8863B); outline-offset: 2px; }
.jat-fabric-status { font-size: .88rem; color: var(--ink-soft, #5c524a); margin: 12px 0 0; min-height: 1.4em; }
.jat-fabric-status.is-ready { color: var(--rust-dark, #4E1520); font-weight: 500; }
.jat-fabrics.is-alert .jat-fabric { border-color: var(--rust, #6E1E2B); animation: jatNudge .45s ease; }
.jat-fabrics.is-alert .jat-fabric-status { color: var(--rust, #6E1E2B); font-weight: 500; }
.jat-main-photo { position: relative; }
.jat-fabric-cap { position: absolute; left: 14px; bottom: 14px; z-index: 3; background: rgba(247,241,232,.94); color: var(--rust-dark, #4E1520); font-size: .8rem; letter-spacing: .04em; padding: 7px 12px; border-left: 2px solid var(--gold, #B8863B); }
.jat-fabric-cap[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { .jat-fabrics.is-alert .jat-fabric { animation: none; } }
