/*
Theme Name: OMVY
Theme URI: https://www.amazon.com/dp/B0HKGV7798
Author: OMVY
Description: Block theme for OMVY nipple covers. Soft, discreet and bright, built from the OMVY brand palette (peacock gold, shade circles and the pastel feather colours). Includes a home template, brand patterns and a landing page template.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: omvy
*/

/* ---------- Base ---------- */
html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
a { text-underline-offset: 0.2em; }
:focus-visible { outline: 2px solid var(--wp--preset--color--gold); outline-offset: 3px; }
img { height: auto; }

/* ---------- Layout resets ---------- */
.wp-site-blocks > * + * { margin-block-start: 0; }
.wp-site-blocks main > *, .wp-site-blocks main .wp-block-post-content > * { margin-block-start: 0; margin-block-end: 0; }
.omvy-section { padding: var(--wp--preset--spacing--60) var(--wp--preset--spacing--40); }
.omvy-section--tight { padding-top: var(--wp--preset--spacing--50); padding-bottom: var(--wp--preset--spacing--50); }
.omvy-section > .wp-block-columns { gap: var(--wp--preset--spacing--50); }

/* ---------- Header ---------- */
.wp-site-blocks > header.wp-block-template-part { position: sticky; top: 0; z-index: 50; }
.admin-bar .wp-site-blocks > header.wp-block-template-part { top: 32px; }
.omvy-header { background: rgba(251,249,246,.95); backdrop-filter: blur(8px); border-bottom: 1px solid var(--wp--preset--color--line); padding: .8rem max(var(--wp--preset--spacing--40), calc((100vw - 1180px) / 2)); }
.omvy-header .wp-block-navigation a { text-decoration: none; letter-spacing: .02em; }
.omvy-header .wp-block-navigation a:hover { color: var(--wp--preset--color--gold); }
.omvy-logo img { display: block; width: auto; height: 44px; }

/* ---------- Buttons ---------- */
.wp-block-button__link { transition: background-color .2s ease, color .2s ease, border-color .2s ease; letter-spacing: .06em; }
.wp-block-button.is-style-outline .wp-block-button__link { border: 1px solid var(--wp--preset--color--gold); }
.wp-block-button.is-style-outline .wp-block-button__link:hover { background: var(--wp--preset--color--gold-deep); color: #fff; }
.wp-block-button:not(.is-style-outline) .wp-block-button__link:hover { background: #6f5826; }
.has-gold-deep-background-color .wp-block-button__link { background: #fff; color: var(--wp--preset--color--gold-deep); }
.has-gold-deep-background-color .wp-block-button__link:hover { background: var(--wp--preset--color--shade-ivory); color: var(--wp--preset--color--gold-deep); }

/* ---------- Colour tabs (echo the listing banners) ---------- */
.omvy-tab { display: inline-block; margin: 0; padding: .55em 1.2em; color: var(--wp--preset--color--ink); font-size: .8rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; line-height: 1.2; }
.omvy-tab--coral { background: var(--wp--preset--color--coral); }
.omvy-tab--peach { background: var(--wp--preset--color--peach); }
.omvy-tab--sky { background: var(--wp--preset--color--sky); }
.omvy-tab--butter { background: var(--wp--preset--color--butter); }
.omvy-tab--sage { background: var(--wp--preset--color--sage); }

/* ---------- Hero ---------- */
.omvy-hero { overflow: hidden; padding-top: var(--wp--preset--spacing--50); padding-bottom: var(--wp--preset--spacing--60); }
.omvy-hero-photo { position: relative; }
.omvy-hero-photo .omvy-tab { position: absolute; top: 0; left: 0; z-index: 2; }
.omvy-hero h1 { text-wrap: balance; }

/* ---------- Shade circles (signature device, from the packaging) ---------- */
.omvy-shades { display: flex; justify-content: center; align-items: center; margin: 0 auto; padding: 0; max-width: 920px; }
.omvy-shade { position: relative; flex: 0 0 auto; width: clamp(180px, 31vw, 330px); aspect-ratio: 1; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; margin: 0 0 0 calc(clamp(180px, 31vw, 330px) * -0.12); mix-blend-mode: multiply; transition: transform .35s ease; }
.omvy-shade:first-child { margin-left: 0; }
.omvy-shade--ivory { background: #f3e4cc; }
.omvy-shade--nude  { background: #f3c9a8; }
.omvy-shade--mocha { background: #b8926f; }
.omvy-shade p { margin: 0; position: relative; }
.omvy-shade .omvy-shade-name { font-family: var(--wp--preset--font-family--serif); font-size: clamp(1rem, 2vw, 1.35rem); color: #3f3f46; }
.omvy-shade--mocha .omvy-shade-name { color: #fff; }
.omvy-shade:hover { transform: translateY(-6px); }
@media (max-width: 640px) {
  .omvy-shades { flex-direction: column; }
  .omvy-shade { width: min(70vw, 260px); margin: calc(min(70vw, 260px) * -0.12) 0 0 0; }
  .omvy-shade:first-child { margin-top: 0; }
}

/* ---------- Product photo frames ---------- */
.omvy-frame img { width: 100%; display: block; }
.omvy-soft-img img { border-radius: 4px; }

/* ---------- Size scale ---------- */
.omvy-size { text-align: center; }
.omvy-size-disc { margin: 0 auto 1rem; border-radius: 50%; border: 1.5px solid var(--wp--preset--color--gold); display: flex; align-items: center; justify-content: center; color: var(--wp--preset--color--gold-deep); font-family: var(--wp--preset--font-family--serif); }
.omvy-size-disc--1 { width: 134px; height: 134px; }
.omvy-size-disc--2 { width: 165px; height: 165px; }
.omvy-size-disc--3 { width: 197px; height: 197px; }
.omvy-size-disc p { margin: 0; }
.omvy-sizes { align-items: flex-end !important; }

/* ---------- Feature rows & rules ---------- */
.omvy-rule-list { list-style: none; margin: 1.5rem 0 0; padding: 0; }
.omvy-rule-list li { padding: 1.1rem 0; border-top: 1px solid var(--wp--preset--color--line); }
.omvy-rule-list li:last-child { border-bottom: 1px solid var(--wp--preset--color--line); }
.omvy-rule-list strong { display: block; font-family: var(--wp--preset--font-family--serif); font-weight: 400; font-size: 1.15rem; color: var(--wp--preset--color--ink); margin-bottom: .2rem; }

/* ---------- FAQ (details block) ---------- */
.wp-block-details { border-top: 1px solid var(--wp--preset--color--line); padding: 1.1rem 0; }
.wp-block-details:last-of-type { border-bottom: 1px solid var(--wp--preset--color--line); }
.wp-block-details summary { cursor: pointer; font-family: var(--wp--preset--font-family--serif); font-size: 1.15rem; color: var(--wp--preset--color--ink); list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.wp-block-details summary::-webkit-details-marker { display: none; }
.wp-block-details summary::after { content: "+"; color: var(--wp--preset--color--gold); font-family: var(--wp--preset--font-family--sans); font-size: 1.4rem; line-height: 1; }
.wp-block-details[open] summary::after { content: "\2212"; }
.wp-block-details > :not(summary) { margin-top: .8rem; }

/* ---------- Tables ---------- */
.wp-block-table table { border-collapse: collapse; }
.wp-block-table th, .wp-block-table td { border: 0; border-bottom: 1px solid var(--wp--preset--color--line); padding: .9rem .75rem; text-align: left; }
.wp-block-table thead { border-bottom: 1px solid var(--wp--preset--color--gold); }
.wp-block-table th { font-weight: 600; color: var(--wp--preset--color--gold-deep); }

/* ---------- Footer ---------- */
.omvy-footer a { text-decoration: none; }
.omvy-footer a:hover { color: var(--wp--preset--color--gold); text-decoration: underline; }
.omvy-footer .omvy-logo img { height: 52px; }

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------- Facts strip (mirrors the box-back grid) ---------- */
.omvy-facts { gap: 0 !important; }
.omvy-facts > .wp-block-column { padding: .25rem 1.5rem; border-left: 1px solid var(--wp--preset--color--gold); }
.omvy-facts > .wp-block-column:first-child { border-left: 0; padding-left: 0; }
.omvy-facts h3 { font-size: 1.05rem; margin: 0 0 .25rem; }
.omvy-facts p { margin: 0; font-size: .9rem; color: var(--wp--preset--color--muted); line-height: 1.55; }
@media (max-width: 781px) { .omvy-facts > .wp-block-column { border-left: 0; border-top: 1px solid var(--wp--preset--color--line); padding: 1rem 0; } .omvy-facts > .wp-block-column:first-child { border-top: 0; } }

/* ---------- Product cards ---------- */
.omvy-card h3 { margin: .75rem 0 .1rem; }
.omvy-card p { margin: 0 0 .75rem; }
.omvy-card .omvy-meta { color: var(--wp--preset--color--muted); font-size: .9rem; }
.omvy-quiet { color: var(--wp--preset--color--muted); }
.omvy-warning { border-left: 2px solid var(--wp--preset--color--gold); padding: .25rem 0 .25rem 1.25rem; font-size: .9rem; color: var(--wp--preset--color--muted); }
.omvy-steps { counter-reset: step; list-style: none; padding: 0; margin: 0; }
.omvy-steps li { counter-increment: step; display: grid; grid-template-columns: 2.5rem 1fr; padding: .9rem 0; border-top: 1px solid var(--wp--preset--color--line); }
.omvy-steps li::before { content: counter(step); font-family: var(--wp--preset--font-family--serif); color: var(--wp--preset--color--gold-text); font-size: 1.3rem; }
.omvy-steps li:last-child { border-bottom: 1px solid var(--wp--preset--color--line); }

/* ---------- Generic photo wrapper with corner tab ---------- */
.omvy-photo { position: relative; }
.omvy-logo { margin: 0; }
@media (max-width: 600px) { .omvy-header .wp-block-buttons { display: none; } }
.omvy-footer .omvy-footer-legal { margin-top: var(--wp--preset--spacing--40); padding-top: var(--wp--preset--spacing--30); border-top: 1px solid var(--wp--preset--color--line); }
.omvy-footer h4 { margin-bottom: .6rem; }
.omvy-footer p { margin: 0 0 .4rem; }

/* ---------- Small refinements ---------- */
.has-text-align-center { text-wrap: balance; }
.omvy-hero h1 { font-size: clamp(2.5rem, 5vw, 4rem); line-height: 1.1; }
.wp-block-buttons { margin-top: 1.75rem; }
.wp-block-image.alignwide img { width: 100%; }
.omvy-footer-legal { max-width: 1180px; }
.wp-site-blocks { min-height: 100vh; display: flex; flex-direction: column; }
.wp-site-blocks > main { flex: 1 0 auto; }
.omvy-steps { margin-top: 1.5rem; }

/* ---------- Header with seven links ---------- */
.omvy-header .wp-block-navigation { gap: 1.4rem; }
.omvy-header .wp-block-navigation__container { gap: 1.4rem; }
@media (max-width: 1100px) { .omvy-header .wp-block-buttons { display: none; } }

/* ---------- Product selector (Shop) ---------- */
.omvy-product { --shade: #F3C9A8; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(1.5rem, 5vw, 4.5rem); max-width: 1180px; margin: 0 auto; align-items: start; }
.omvy-product__stage { background: #fff; border-radius: 4px; overflow: hidden; }
.omvy-product__stage img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; }
.omvy-product__thumbs { display: flex; gap: .75rem; margin-top: .75rem; }
.omvy-product__thumbs button { padding: 0; width: 76px; height: 76px; border: 1px solid var(--wp--preset--color--line); background: #fff; border-radius: 4px; overflow: hidden; cursor: pointer; opacity: .75; transition: opacity .2s, border-color .2s; }
.omvy-product__thumbs button img { display: block; width: 100%; height: 100%; object-fit: cover; }
.omvy-product__thumbs button.is-active, .omvy-product__thumbs button:hover { opacity: 1; border-color: var(--wp--preset--color--gold-deep); }
.omvy-product__title { font-size: clamp(1.8rem, 3.4vw, 2.5rem); margin: 0 0 .75rem; }
.omvy-product__lede { margin: 0 0 1.75rem; color: var(--wp--preset--color--muted); }
.omvy-opt { border: 0; padding: 0; margin: 0 0 1.75rem; min-width: 0; }
.omvy-opt legend { padding: 0; margin-bottom: .85rem; font-weight: 600; font-size: .95rem; letter-spacing: .02em; }
.omvy-opt legend span { font-weight: 400; color: var(--wp--preset--color--muted); margin-left: .5rem; }
.omvy-opt__row { display: flex; gap: 1.25rem; flex-wrap: wrap; align-items: flex-end; }
.omvy-opt__hint { margin: .85rem 0 0; font-size: .85rem; color: var(--wp--preset--color--muted); }
.omvy-swatch { position: relative; display: flex; flex-direction: column; align-items: center; gap: .5rem; cursor: pointer; text-align: center; }
.omvy-swatch input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.omvy-swatch__label { font-size: .85rem; font-weight: 500; }
.omvy-swatch__meta { font-size: .75rem; line-height: 1.4; color: var(--wp--preset--color--muted); }
.omvy-swatch__dot { width: 56px; height: 56px; border-radius: 50%; background: var(--sw); box-shadow: inset 0 0 0 1px rgba(63,63,70,.12); outline: 2px solid transparent; outline-offset: 4px; transition: outline-color .2s; }
.omvy-swatch--shade:hover .omvy-swatch__dot { outline-color: var(--wp--preset--color--line); }
.omvy-swatch--shade input:checked + .omvy-swatch__dot { outline-color: var(--wp--preset--color--gold-deep); }
.omvy-disc { width: var(--d); height: var(--d); border-radius: 50%; background: var(--shade); box-shadow: inset 0 0 0 1px rgba(63,63,70,.12); outline: 2px solid transparent; outline-offset: 4px; transition: outline-color .2s, background-color .25s; }
.omvy-swatch--size { justify-content: flex-end; min-width: 96px; }
.omvy-swatch--size:hover .omvy-disc { outline-color: var(--wp--preset--color--line); }
.omvy-swatch--size input:checked + .omvy-disc { outline-color: var(--wp--preset--color--gold-deep); }
.omvy-swatch input:focus-visible + .omvy-swatch__dot, .omvy-swatch input:focus-visible + .omvy-disc { outline: 2px solid var(--wp--preset--color--ink); }
.omvy-swatch input:checked ~ .omvy-swatch__label { color: var(--wp--preset--color--gold-deep); font-weight: 600; }
.omvy-buybox { border-top: 1px solid var(--wp--preset--color--line); padding-top: 1.5rem; }
.omvy-buybox__summary { margin: 0 0 1rem; }
.omvy-buybox .wp-block-button, .omvy-buybox .wp-block-button__link { display: block; text-align: center; }
.omvy-buybox__notes { list-style: none; margin: 1.1rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem 1.5rem; font-size: .85rem; color: var(--wp--preset--color--muted); }
@media (max-width: 860px) { .omvy-product { grid-template-columns: 1fr; } }

/* ---------- Occasions, cards, pledges ---------- */
.omvy-occ-row { gap: 1.5rem !important; }
.omvy-occ h3 { margin: .9rem 0 .25rem; font-size: 1.15rem; }
.omvy-occ p { margin: 0; font-size: .92rem; color: var(--wp--preset--color--muted); }
.omvy-card h3 { margin: .9rem 0 .35rem; font-size: 1.15rem; }
.omvy-meta { font-size: .9rem; color: var(--wp--preset--color--muted); }
.omvy-pledge { border-top: 2px solid var(--wp--preset--color--gold); padding-top: 1.25rem; }
.omvy-pledge h3 { margin-top: 0; }
.omvy-guide { border-top: 2px solid var(--wp--preset--color--gold); padding-top: 1.25rem; height: 100%; }
.omvy-guide h2 { font-size: 1.6rem; margin: 0 0 .25rem; }
.omvy-guide .omvy-steps { margin-top: 1rem; }
.omvy-warning-line { margin-top: 1.5rem; color: var(--wp--preset--color--muted); }
.wp-block-table td:first-child { font-weight: 500; width: 34%; }
.wp-block-table { margin: 1.5rem 0; }

/* ---------- Photo shapes: set on the figure so nothing can resize the image ---------- */
.wp-block-image.omvy-occ-img, .wp-block-image.omvy-occ-photo, .wp-block-image.omvy-landscape,
.wp-block-image.omvy-portrait, .wp-block-image.omvy-cover-img { position: relative; overflow: hidden; margin: 0; border-radius: 4px; width: 100%; }
.wp-block-image.omvy-occ-img { aspect-ratio: 3 / 4; }
.wp-block-image.omvy-occ-photo { aspect-ratio: 4 / 5; }
.wp-block-image.omvy-landscape { aspect-ratio: 4 / 3; }
.wp-block-image.omvy-portrait { aspect-ratio: 4 / 5; }
.wp-block-image.omvy-cover-img { aspect-ratio: 1 / 1; }
.wp-block-image.omvy-occ-img img, .wp-block-image.omvy-occ-photo img, .wp-block-image.omvy-landscape img,
.wp-block-image.omvy-portrait img, .wp-block-image.omvy-cover-img img { display: block; width: 100% !important; height: 100% !important; max-width: none !important; aspect-ratio: auto !important; object-fit: cover !important; border-radius: 0; }
.wp-block-image.omvy-occ-img img, .wp-block-image.omvy-occ-photo img, .wp-block-image.omvy-landscape img { object-position: 50% 20% !important; }
.wp-block-image.omvy-portrait img { object-position: 50% 8% !important; }
/* Keep card text starting at the same height in every column */
.omvy-occ-row > .wp-block-column { display: flex; flex-direction: column; }
.omvy-occ { display: flex; flex-direction: column; height: 100%; }
.omvy-occ h3 { min-height: 1.4em; }
@media (min-width: 782px) and (max-width: 1100px) { .omvy-occ h3 { min-height: 2.8em; } }
