/*
Theme Name: marmu house
Theme URI: https://marmuhouse.com/
Author: marmuhouse
Author URI: https://marmuhouse.com/
Description: A warm, Swiss-structured theme for marmu house — recipes, ceramics, and a handmade home. Built around the Pliant typeface with olive (#635731) and cream (#FAFAF0), gentle motion, and a Shopify-ready shop. Classic PHP theme for WordPress.com Business / self-hosted WordPress.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: marmu-house
Tags: blog, food-and-drink, custom-menu, custom-logo, featured-images, translation-ready
*/

/* ============================================================
   0. Design tokens
   ============================================================ */
:root {
  --olive: #635731;
  /* brand primary  */
  --cream: #fafaf0;
  /* brand light    */
  --ink: #2b2617;
  /* deep warm brown-black, matches the logo stroke */
  --olive-700: #4c4325;
  /* darker olive: hovers / pressed */
  --olive-300: #a79c7a;
  /* muted olive: meta, hairlines on cream */
  --sand: #efebdc;
  /* card surface / subtle fill on cream */
  --sand-line: #e0dac6;
  /* borders on cream */

  --maxw: 1180px;
  --gutter: clamp(20px, 5vw, 64px);

  --radius: 4px;
  /* Swiss: minimal rounding */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur: 0.55s;

  --font: "Pliant", "Helvetica Neue", "Arial Nova", Arial, sans-serif;
}

/* ============================================================
   1. Reset / base
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.6;
  font-weight: 400;
  letter-spacing: 0.002em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
}

/* focus visibility (quality floor) */
:focus-visible {
  outline: 2.5px solid var(--olive);
  outline-offset: 3px;
  border-radius: 2px;
}

.on-olive :focus-visible {
  outline-color: var(--cream);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--cream);
  padding: 12px 18px;
  z-index: 1000;
  border-radius: 0 0 var(--radius) 0;
}

.skip-link:focus {
  left: 0;
}

/* ============================================================
   2. Layout helpers
   ============================================================ */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: clamp(56px, 9vw, 120px);
}

.section--tight {
  padding-block: clamp(40px, 6vw, 72px);
}

.eyebrow {
  font-size: 0.74rem;
  text-transform: lowercase;
  letter-spacing: 0.28em;
  color: var(--olive-300);
  margin: 0 0 1.1em;
  font-weight: 400;
}

.on-olive .eyebrow {
  color: rgba(250, 250, 240, 0.62);
}

/* the roofline glyph, drawn in CSS, used as a section divider + link marker */
.roofmark {
  display: inline-block;
  width: 34px;
  height: 12px;
  background:
    linear-gradient(
        45deg,
        transparent 47%,
        currentColor 47%,
        currentColor 53%,
        transparent 53%
      )
      left / 51% 100% no-repeat,
    linear-gradient(
        -45deg,
        transparent 47%,
        currentColor 47%,
        currentColor 53%,
        transparent 53%
      )
      right / 51% 100% no-repeat;
  color: var(--olive-300);
  opacity: 0.8;
}

/* ============================================================
   3. Typography scale (Pliant carries everything, Swiss-style)
   ============================================================ */
h1,
h2,
h3,
h4 {
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
}

.display {
  font-size: clamp(2.6rem, 6.4vw, 5rem);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.025em;
}

.h-section {
  font-size: clamp(1.7rem, 3.2vw, 2.6rem);
  letter-spacing: -0.02em;
}

.lede {
  font-size: clamp(1.05rem, 1.6vw, 1.28rem);
  line-height: 1.65;
  max-width: 54ch;
}

.meta {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--olive-300);
  font-weight: 400;
}

p {
  margin: 0 0 1.1em;
}

.entry-content {
  max-width: inherit;
}

/* .entry-content { max-width: 68ch; } */
.entry-content h2 {
  margin-top: 1.6em;
  font-size: clamp(1.4rem, 2.4vw, 2rem);
}

.entry-content h3 {
  margin-top: 1.4em;
  font-size: 1.3rem;
}

.entry-content li {
  margin-bottom: 0.5em;
}

.entry-content img {
  border-radius: var(--radius);
  transition: transform 0.7s var(--ease);
}

.entry-content a {
  text-decoration: none;
  transition: color 0.3s var(--ease);
}

/* linked images get the same "picked off a shelf" hover as the recipe/ceramic cards */
.entry-content a:has(img) {
  overflow: hidden;
  border-radius: var(--radius);
  text-decoration: none;
  transition: transform 0.45s var(--ease);
}

.entry-content blockquote {
  margin: 1.6em 0;
  padding: 0.2em 0 0.2em 1.2em;
  border-left: 3px solid var(--olive);
  color: var(--olive-700);
  font-size: 1.15rem;
}

.recipe-block a:hover {
  color: var(--olive);
}

.recipe-block {
  transition:
    transform 0.45s var(--ease),
    color 0.3s var(--ease);
}

.recipe-block:hover {
  transform: translateY(-6px) rotate(-0.5deg) scale(1.05);
  color: var(--olive);
}

/* ============================================================
   4. Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  padding: 0.82em 1.6em;
  border: 1.5px solid var(--olive);
  border-radius: var(--radius);
  background: var(--olive);
  color: var(--cream);
  font-weight: 400;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  transition:
    transform 0.3s var(--ease),
    background 0.3s var(--ease),
    color 0.3s var(--ease);
  will-change: transform;
}

.btn:hover {
  background: var(--olive-700);
  border-color: var(--olive-700);
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.btn--ghost {
  background: transparent;
  color: var(--olive);
}

.btn--ghost:hover {
  background: var(--olive);
  color: var(--cream);
}

.on-olive .btn {
  background: var(--cream);
  color: var(--olive);
  border-color: var(--cream);
}

.on-olive .btn:hover {
  background: transparent;
  color: var(--cream);
}

.on-olive .link-more {
  color: var(--cream);
}

.btn .arr {
  transition: transform 0.3s var(--ease);
}

.btn:hover .arr {
  transform: translateX(4px);
}

/* ============================================================
   5. Header
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--cream) 82%, transparent);
  backdrop-filter: saturate(1.1) blur(8px);
  -webkit-backdrop-filter: saturate(1.1) blur(8px);
  border-bottom: 1px solid transparent;
  transition:
    padding 0.35s var(--ease),
    border-color 0.35s var(--ease),
    background 0.35s var(--ease);
}

.site-header.is-scrolled {
  border-bottom-color: var(--sand-line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: clamp(16px, 2.2vw, 26px);
  transition: padding 0.35s var(--ease);
}

.header-right {
  display: flex;
  align-items: center;
}

@media (min-width: 768px) {
  .header-right {
    gap: clamp(18px, 2.4vw, 36px);
  }
}

.site-header.is-scrolled .header-inner {
  padding-block: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--olive);
}

.brand svg,
.brand img {
  height: 42px;
  width: auto;
  transition: height 0.35s var(--ease);
}

.site-header.is-scrolled .brand svg,
.site-header.is-scrolled .brand img {
  height: 34px;
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.4vw, 36px);
  margin-left: auto;
}

.nav a {
  position: relative;
  font-size: 0.96rem;
  font-weight: 400;
  color: var(--ink);
  padding: 4px 0;
  letter-spacing: 0.01em;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -3px;
  width: 0;
  height: 2px;
  background: var(--olive);
  transform: translateX(-50%);
  transition: width 0.32s var(--ease);
}

.nav a:hover::after,
.nav a[aria-current="page"]::after {
  width: 100%;
}

.header-right .search-toggle {
  background: none;
  border: none;
  padding: 6px;
  color: var(--ink);
  display: inline-flex;
  border-radius: var(--radius);
  transition:
    color 0.25s,
    transform 0.25s;
}

.header-right .search-toggle:hover {
  color: var(--olive);
  transform: scale(1.06);
}

.header-inner a:has(.navigation__view-cart) {
  padding: 6px;
  color: var(--ink);
  display: inline-flex;
  border-radius: var(--radius);
  transition:
    color 0.25s,
    transform 0.25s;
}

.header-inner a:has(.navigation__view-cart):hover {
  color: var(--olive);
  transform: scale(1.06);
}

/* the cart's shopify-context web component prints its raw technical
   error text straight into the page when the fetch fails (e.g. "GraphQL
   Client: NetworkError..."). Swap that text for a short human message
   instead of showing visitors a stack-trace-looking string. */
.navigation__view-cart .shopify-error {
  font-size: 0;
  line-height: 0;
  color: transparent;
}

.navigation__view-cart .shopify-error::before {
  content: "Error fetching items — refresh to try again";
  display: inline-block;
  font-size: 0.78rem;
  line-height: 1.3;
  color: var(--olive-300);
  white-space: nowrap;
}

/* mobile menu */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  padding: 8px;
  color: var(--ink);
}

.menu-toggle .bar {
  display: block;
  width: 24px;
  height: 2px;
  background: currentColor;
  margin: 5px 0;
  transition:
    transform 0.3s var(--ease),
    opacity 0.3s var(--ease);
}

/* search drawer */
.search-drawer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s var(--ease);
  border-top: 1px solid transparent;
}

.search-drawer.is-open {
  max-height: 120px;
  border-top-color: var(--sand-line);
}

.search-drawer .wrap {
  padding-block: 18px;
}

.search-form {
  display: flex;
  gap: 10px;
}

.search-form input[type="search"] {
  flex: 1;
  padding: 0.7em 1em;
  font: inherit;
  font-size: 1rem;
  border: 1.5px solid var(--sand-line);
  border-radius: var(--radius);
  background: var(--cream);
  color: var(--ink);
}

.search-form input[type="search"]:focus {
  border-color: var(--olive);
  outline: none;
}

.search-form button {
  padding: 0.7em 1.3em;
}

/* ============================================================
   6. Hero
   ============================================================ */
.hero {
  padding-block: clamp(52px, 8vw, 104px);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}

.hero-logo {
  display: flex;
  justify-content: center;
}

.hero-logo svg {
  width: min(320px, 74%);
  height: auto;
  color: var(--olive);
}

.hero .display {
  margin-bottom: 0.35em;
}

.hero .lede {
  margin-bottom: 1.6em;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.hero-tags {
  margin-top: 2.2em;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  color: var(--olive-700);
  font-size: 0.95rem;
}

.hero-tags span {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
}

/* ============================================================
   7. Cards / grids (recipes)
   ============================================================ */
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: clamp(28px, 4vw, 48px);
  flex-wrap: wrap;
}

.section-head .link-more {
  font-weight: 400;
  color: var(--olive);
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
}

.section-head .link-more .arr {
  transition: transform 0.3s var(--ease);
}

.section-head .link-more:hover .arr {
  transform: translateX(4px);
}

.card-grid {
  display: grid;
  gap: clamp(20px, 3vw, 34px);
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.card-grid--4 {
  grid-template-columns: repeat(4, 1fr);
}

.card {
  display: flex;
  flex-direction: column;
}

.card .thumb {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--sand);
  aspect-ratio: 3 / 4;
}

.card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease);
}

.card .thumb .ph {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--olive-300);
}

.card .thumb .ph svg {
  width: 46%;
  opacity: 0.5;
}

.card-title {
  font-size: 1.14rem;
  font-weight: 400;
  margin: 0.9em 0 0.25em;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.card .meta {
  font-size: 0.72rem;
}

.card .price {
  color: var(--olive);
  font-weight: 400;
  margin-top: 0.25em;
}

/* the "picked off a shelf" hover */
.card a.card-link {
  display: block;
  color: inherit;
  transition: transform 0.45s var(--ease);
}

.card a.card-link:hover {
  transform: translateY(-6px) rotate(-0.5deg);
}

.card a.card-link:hover .thumb img {
  transform: scale(1.05);
}

.card a.card-link:hover .card-title {
  color: var(--olive);
}

.card a.card-link {
  transition: transform 0.45s var(--ease);
}

/* ============================================================
   8. Shop band
   ============================================================ */
.shop-band {
  background: var(--olive);
  color: var(--cream);
}

.shop-band .h-section {
  color: var(--cream);
}

.shop-band p {
  color: rgba(250, 250, 240, 0.85);
  max-width: 46ch;
}

.shop-band .shop-embed {
  min-height: 160px;
  margin-top: 32px;
}

/* the shop page empty-state */
.shop-empty {
  border: 1.5px dashed var(--sand-line);
  border-radius: var(--radius);
  padding: 40px;
  text-align: center;
  color: var(--olive-300);
}

/* ============================================================
   9. Footer  (label:value contact device from the brand cards)
   ============================================================ */
.site-footer {
  background: var(--olive);
  color: var(--cream);
  padding-block: clamp(56px, 8vw, 96px);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 6vw, 72px);
  align-items: center;
}

.footer-brand svg {
  width: 116px;
  height: auto;
  color: var(--cream);
  margin-bottom: 18px;
}

.footer-brand .brand-name {
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: 0.02em;
}

.contact-list {
  display: grid;
  gap: 14px;
  margin: 0;
}

.contact-list .row {
  display: flex;
  gap: 0.6em;
  align-items: baseline;
  font-size: 1.02rem;
}

.contact-list .label {
  color: rgba(250, 250, 240, 0.6);
  min-width: 84px;
  font-weight: 400;
}

.contact-list .value {
  font-weight: 400;
}

.contact-list a.value {
  position: relative;
}

.contact-list a.value::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 1.5px;
  background: var(--cream);
  transition: width 0.3s var(--ease);
}

.contact-list a.value:hover::after {
  width: 100%;
}

.social {
  display: flex;
  gap: 12px;
  margin-top: 26px;
}

.social a {
  width: 42px;
  height: 42px;
  border: 1.5px solid rgba(250, 250, 240, 0.35);
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  color: var(--cream);
  transition:
    transform 0.3s var(--ease),
    background 0.3s var(--ease),
    border-color 0.3s var(--ease);
}

.social a:hover {
  background: var(--cream);
  color: var(--olive);
  transform: translateY(-3px);
  border-color: var(--cream);
}

.social svg {
  width: 18px;
  height: 18px;
}

.footer-bottom {
  margin-top: clamp(40px, 6vw, 64px);
  padding-top: 22px;
  border-top: 1px solid rgba(250, 250, 240, 0.18);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: rgba(250, 250, 240, 0.6);
}

/* ============================================================
   10. Single / archive / page
   ============================================================ */
.page-head {
  padding-block: clamp(48px, 7vw, 88px) clamp(20px, 3vw, 36px);
}

.page-head .display {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
}

.entry-hero-img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: clamp(28px, 4vw, 44px);
}

.entry-meta {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 1.4em;
}

.pagination {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: clamp(40px, 6vw, 64px);
}

.pagination .page-numbers {
  min-width: 44px;
  height: 44px;
  padding: 0 12px;
  display: inline-grid;
  place-items: center;
  border: 1.5px solid var(--sand-line);
  border-radius: var(--radius);
  font-weight: 400;
  transition:
    background 0.25s,
    color 0.25s,
    border-color 0.25s;
}

.pagination .page-numbers:hover,
.pagination .page-numbers.current {
  background: var(--olive);
  color: var(--cream);
  border-color: var(--olive);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  color: var(--olive);
  font-weight: 400;
  margin-bottom: 1.4em;
}

.back-link .arr {
  transition: transform 0.3s var(--ease);
}

.back-link:hover .arr {
  transform: translateX(-4px);
}

/* ============================================================
   11. Motion — entrance reveals
   ============================================================ */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.7s var(--ease),
    transform 0.7s var(--ease);
}

[data-reveal].is-in {
  opacity: 1;
  transform: none;
}

[data-reveal-stagger] > * {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.6s var(--ease),
    transform 0.6s var(--ease);
}

[data-reveal-stagger].is-in > * {
  opacity: 1;
  transform: none;
}

/* ============================================================
   12. Responsive
   ============================================================ */
@media (max-width: 860px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .hero-logo {
    order: -1;
    justify-content: flex-start;
  }

  .hero-logo svg {
    width: 200px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .card-grid--4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .header-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 12px;
  }

  .menu-toggle {
    display: block;
    justify-self: start;
  }

  .brand {
    justify-self: center;
  }

  .header-right {
    justify-self: end;
    gap: 10px;
  }

  .nav {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(320px, 82vw);
    background: var(--cream);
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 96px 32px 32px;
    transform: translateX(100%);
    transition: transform 0.4s var(--ease);
    box-shadow: -20px 0 60px rgba(43, 38, 23, 0.12);
    z-index: 90;
    height: 100vh;
  }

  .nav.is-open {
    transform: none;
  }

  .nav a {
    font-size: 1.3rem;
    padding: 10px 0;
  }

  .nav a::after {
    bottom: 4px;
  }

  .menu-toggle.is-open .bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .menu-toggle.is-open .bar:nth-child(2) {
    opacity: 0;
  }

  .menu-toggle.is-open .bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  body.menu-open {
    overflow: hidden;
  }

  .nav-scrim {
    position: fixed;
    inset: 0;
    background: rgba(43, 38, 23, 0.3);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s;
    z-index: 80;
  }

  .nav-scrim.is-open {
    opacity: 1;
    pointer-events: auto;
  }
}

@media (max-width: 560px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  body {
    font-size: 17px;
  }
}

/* ============================================================
   13. Reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  [data-reveal],
  [data-reveal-stagger] > * {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* WP core alignment helpers for block content */
.alignwide {
  max-width: 1100px;
  margin-inline: auto;
}

.alignfull {
  width: 100vw;
  margin-left: calc(50% - 50vw);
}

.aligncenter {
  margin-inline: auto;
}

.wp-caption-text,
figcaption {
  font-size: 0.82rem;
  color: var(--olive-300);
  margin-top: 0.5em;
  text-align: center;
}

/* ============================================================
   14. Shopify styling
============================================================ */

.cart-quantity {
  bottom: -20%;
  right: 20%;
  width: 14px;
  height: 14px;
}

.navigation__view-cart span::after {
  height: 20px;
  width: 20px;
}

/* ---- Product card (shop/collection grid) — badge + sold-out styling
   shared with the PDP below; the link itself stays clickable when sold
   out, this is purely visual. ---- */
.product-card__badge {
  display: inline-block;
  width: fit-content;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 400;
  padding: 0.35em 0.75em;
  border-radius: var(--radius);
  margin-top: 0.75rem;
}

.product-card__badge--out-of-stock {
  color: var(--olive-300);
  background: transparent;
  border: 1px solid var(--sand-line);
}

/* [hidden] vs. flex/grid display rules are equal specificity, so without
   this the shopify-attr--hidden bindings wouldn't reliably hide things */
.product-card [hidden] {
  display: none !important;
}

/* .product-card[data-sold-out] .product-card__image-container shopify-media img {
  filter: grayscale(60%);
  opacity: 0.6;
} */

.product-card__image-container {
  border-radius: 0;
}

.product-card {
  padding: 0 0 1.5rem 0;
  box-shadow: none;
}

.product-card:hover {
  box-shadow: none;
}

/* ---- PDP (shopify/pdp.php) — adapted from Shopify's reference
   product-layout example; colors/radius use the marmu house tokens
   instead of the reference's black/white, pill-shaped defaults. ---- */
.shopify-pdp {
  /* single source of truth for the main image's capped height — the hover
     overlay must match this exactly, or object-fit:cover crops it more
     tightly than the main image and it reads as "zoomed in". */
  --pdp-media-max-height: min(460px, 56vh);
}

.shopify-pdp .product-card {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
  background: none;
  border: none;
}

.shopify-pdp .product-card__container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .shopify-pdp .product-card__container {
    flex-direction: row;
  }
}

.shopify-pdp .product-card__media {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

@media (min-width: 1024px) {
  .shopify-pdp .product-card__media {
    aspect-ratio: 4 / 5;
    width: 50%;
  }
}

.shopify-pdp .product-card__main-image {
  position: relative !important;
  width: 100% !important;
  aspect-ratio: 4 / 5 !important;
  max-height: var(--pdp-media-max-height) !important;
}

.shopify-pdp .product-card__main-image shopify-media img {
  border-radius: var(--radius);
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

.shopify-pdp .product-card__gallery {
  position: relative;
  width: 100%;
}

.shopify-pdp .product-card__images {
  display: flex;
  flex-wrap: wrap;
  position: relative;
  justify-content: center;
  gap: 8px;
  width: 100% !important;
  margin-top: 8px;
}

.shopify-pdp .product-card__image-small {
  cursor: pointer;
  transition: opacity 0.2s var(--ease);
}

.shopify-pdp .product-card__image-small img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
}

.shopify-pdp .product-card__image-small img:hover {
  opacity: 0.8;
}

/* Hover preview sits flush above the thumbnail row (bottom:100% + a
   margin matching .product-card__images's own margin-top) rather than a
   hardcoded pixel offset, and shares the main image's aspect-ratio so it
   covers exactly the same box regardless of the source photo's own
   proportions. */
.shopify-pdp .product-card__images .product-card__image-large {
  display: block !important;
  position: absolute !important;
  transition: opacity 0.2s var(--ease);
  opacity: 0;
  bottom: 100% !important;
  top: auto !important;
  left: 0 !important;
  width: 100% !important;
  aspect-ratio: 4 / 5 !important;
  max-height: var(--pdp-media-max-height) !important;
  margin-bottom: 8px !important;
  z-index: 1;
}

.shopify-pdp .product-card__images .product-card__image-large img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  border-radius: var(--radius);
}

.shopify-pdp .product-card__image:hover .product-card__image-large {
  opacity: 1;
}

/* Mobile: there's no hover on touch, so the gallery becomes a swipeable
   carousel instead, powered by Swiper (assets/vendor/swiper — enqueued from
   shopify/pdp.php since this partial renders after wp_head() has already
   run). shopify-list-context (the actual DOM parent of the cloned slides)
   is forced to display:contents by the plugin's own base styles no matter
   what we set here, so its children flatten straight into .product-card__images
   visually — but Swiper needs them as real direct children of that box to
   treat it as its slide track, which the init script unwraps for on mobile. */
@media (max-width: 767px) {
  /* !important throughout this block: WordPress.com's asset concatenation
     appears to reorder/duplicate rules such that this media-query block
     doesn't reliably win the cascade against the identical base-rule
     selectors above, even though it's later in source order and equal
     specificity should let it win on its own. */
  .shopify-pdp .product-card__main-image {
    display: none !important;
  }

  .shopify-pdp .product-card__images {
    position: relative !important;
    flex-wrap: nowrap !important;
    gap: 0 !important;
    width: 100% !important;
    margin-top: 0 !important;
  }

  .shopify-pdp .product-card__image {
    flex: 0 0 100% !important;
  }

  .product-card__image-small,
  .shopify-pdp .product-card__image-small {
    display: none !important;
  }

  .shopify-pdp .product-card__images .product-card__image-large {
    position: static !important;
    opacity: 1 !important;
    width: 100% !important;
  }

  .shopify-pdp .product-card__images .product-card__image-large img {
    width: 100% !important;
    aspect-ratio: 1 / 1 !important;
    object-fit: cover !important;
  }

  .product-card__carousel-nav {
    display: flex !important;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--cream) 82%, transparent);
    color: var(--olive);
    border: 1.5px solid var(--sand-line);
    z-index: 2;
  }

  .product-card__carousel-nav--prev {
    left: 8px;
  }

  .product-card__carousel-nav--next {
    right: 8px;
  }

  .product-card__carousel-nav:disabled,
  .product-card__carousel-nav.swiper-button-disabled {
    opacity: 0.35;
    pointer-events: none;
  }

  .shopify-pdp .product-card__buttons {
    flex-direction: column !important;
  }

  .shopify-pdp .product-card__buttons button {
    flex: none !important;
    width: 100% !important;
  }
}

.product-card__carousel-nav {
  display: none;
}

.product-card__details {
  display: flex;
  flex-direction: column;
  width: 100%;
  background: none;
}

.product-card .product-card__details {
  display: flex;
  align-items: flex-start;
}

.pdp .product-card__details {
  justify-content: flex-start;
  align-items: flex-start;
  gap: 2rem;
  width: 100%;
  padding: 0;
}

@media (min-width: 768px) {
  .pdp .product-card__details {
    width: 50%;
  }
}

.product-card__info {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  width: 100%;
}

.pdp .product-card__info {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
}

.product-card__hover-button {
  margin-right: 1rem;
}

.product-card[data-sold-out] .product-card__hover-button {
  display: none;
}

.shopify-pdp .product-card__vendor-text {
  opacity: 0.6;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.76rem;
  color: var(--olive-300);
}

.shopify-pdp .product-card__badge {
  flex-basis: 100%;
  margin-top: 0;
}

.shopify-pdp .product-card__title,
.pdp .product-card__title {
  font-size: clamp(1.9rem, 2.8vw, 2.5rem) !important;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
  cursor: default !important;
  text-decoration: none !important;
}

.shopify-pdp .product-card__title:hover,
.pdp .product-card__title:hover {
  cursor: default !important;
  text-decoration: none !important;
}

.shopify-pdp .product-card__price {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  font-size: 1rem !important;
  font-weight: 600;
}

.shopify-pdp .product-card__compare-price {
  font-weight: 400;
  font-size: 0.95rem;
  text-decoration: line-through;
  opacity: 0.5;
}

.shopify-pdp .product-card__buttons {
  display: flex;
  flex-direction: row;
  gap: 0.75rem;
  width: 100%;
}

.shopify-pdp .product-card__buttons button {
  flex: 1;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: var(--radius);
  padding: 0.95em 1.6em;
  transition:
    background 0.3s var(--ease),
    color 0.3s var(--ease),
    transform 0.3s var(--ease);
}

.shopify-pdp .product-card__buttons button:hover {
  transform: translateY(-2px);
}

.shopify-pdp .product-card__add-button {
  background-color: #000;
  color: var(--cream);
  border: 1.5px solid #000;
}

.shopify-pdp .product-card__buy-button {
  background-color: transparent;
  border: 1.5px solid var(--olive);
  color: var(--olive);
}

.shopify-pdp .product-card__buy-button:hover {
  background-color: var(--olive);
  color: var(--cream);
}

.shopify-pdp .product-card__add-button[disabled],
.shopify-pdp .product-card__buy-button[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
}

.shopify-pdp .product-card__add-button[disabled]:hover {
  background-color: #000;
  color: var(--cream);
  transform: none;
}

.shopify-pdp .product-card__buy-button[disabled]:hover {
  background-color: transparent;
  color: var(--olive);
  transform: none;
}

.shopify-pdp .product-card__description {
  display: flex;
  padding-top: 1.5rem;
  border-top: 1px solid var(--sand-line);
}

.shopify-pdp .product-card__description-text {
  font-weight: 400;
  color: var(--olive-700);
  letter-spacing: 0.01em;
  font-size: 0.95rem;
}

.shopify-pdp .product-card__description-text p {
  margin: 0;
}

.shopify-pdp shopify-variant-selector::part(radio) {
  padding: 0.5rem 0.875rem;
  font-size: 0.875rem;
}

/* skeleton loading state, shown until shopify-context resolves */
.shopify-pdp .skeleton-box {
  box-sizing: border-box;
  display: block;
  position: relative;
  background-color: var(--sand);
  border-radius: var(--radius);
  overflow: hidden;
}

.shopify-pdp .skeleton-box::after {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  transform: translateX(-100%);
  background-image: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0,
    rgba(255, 255, 255, 0.2) 20%,
    rgba(255, 255, 255, 0.5) 60%,
    rgba(255, 255, 255, 0)
  );
  animation: shopify-pdp-shimmer 5s infinite;
  content: "";
}

@keyframes shopify-pdp-shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

.shopify-pdp shopify-context,
.shopify-pdp .contents {
  display: contents;
}

.shopify-pdp shopify-context > .placeholder {
  opacity: 1;
  display: flex;
}

.shopify-pdp shopify-context > .placeholder.contents {
  display: contents;
}

.shopify-pdp
  shopify-context[shopify-content-loaded]
  > .placeholder.placeholder {
  opacity: 0;
  display: none;
}

.shopify-pdp
  shopify-context:has(> .placeholder)
  > :not(.placeholder, template) {
  opacity: 0;
  display: none;
  transition:
    opacity 0.5s ease,
    display 0.5s ease allow-discrete;
  transition-delay: 0.1s;
}

.shopify-pdp
  shopify-context:has(> .placeholder)[shopify-content-loaded]
  > :not(.placeholder, template) {
  opacity: 1;
  display: flex;
}

@starting-style {
  .shopify-pdp
    shopify-context:has(> .placeholder)[shopify-content-loaded]
    > :not(.placeholder, template) {
    opacity: 0;
  }
}

@media (max-width: 768px) {
  .cart-dialog {
    min-width: 100vw;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
  }
}
