/* ==========================================================================
   My Zawar — component classes  (DESIGN-SYSTEM.md §14.5)
   Written as plain CSS rather than Tailwind @apply so the stylesheet is a
   normal file the browser can load directly, with no build step and no
   dependency on the CDN compiling it. Values come from the tokens in main.css.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Layout
   -------------------------------------------------------------------------- */
.container-x {
  margin-inline: auto;
  width: 100%;
  max-width: 1280px;
  padding-inline: 1.25rem;
}
@media (min-width: 768px)  { .container-x { padding-inline: 2rem; } }
@media (min-width: 1024px) { .container-x { padding-inline: 2.5rem; } }

.section-y { padding-block: 4rem; }
@media (min-width: 768px)  { .section-y { padding-block: 5rem; } }
@media (min-width: 1024px) { .section-y { padding-block: 6rem; } }

/* --------------------------------------------------------------------------
   2. Typography
   -------------------------------------------------------------------------- */
.eyebrow,
.eyebrow-wine {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.24em;
}
.eyebrow      { color: var(--gold-700); }
.eyebrow-wine { color: var(--gold-500); }

@media (min-width: 768px) {
  .eyebrow,
  .eyebrow-wine { font-size: 12px; }
}

.h-section {
  font-family: var(--font-serif);
  font-size: 30px;
  line-height: 1.15;
  color: var(--ink-900);
}
@media (min-width: 768px)  { .h-section { font-size: 36px; } }
@media (min-width: 1024px) { .h-section { font-size: 40px; } }

.h-hero {
  font-family: var(--font-serif);
  font-size: 38px;
  line-height: 1.08;
  color: var(--ink-900);
}
@media (min-width: 640px)  { .h-hero { font-size: 46px; } }
@media (min-width: 1024px) { .h-hero { font-size: 58px; } }
@media (min-width: 1280px) { .h-hero { font-size: 64px; } }

/* --------------------------------------------------------------------------
   3. Buttons
   -------------------------------------------------------------------------- */
.btn,
.btn-primary,
.btn-secondary,
.btn-on-wine,
.btn-gold {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  transition: all var(--dur-base) var(--ease-silk);
}

.btn:focus-visible,
.btn-primary:focus-visible,
.btn-secondary:focus-visible,
.btn-on-wine:focus-visible,
.btn-gold:focus-visible {
  outline: 2px solid transparent;
  outline-offset: 2px;
  box-shadow: 0 0 0 3px rgba(194, 160, 92, .4);
}

.btn-primary,
.btn-secondary,
.btn-on-wine,
.btn-gold { padding: 1rem 2rem; }

.btn-primary        { background-color: var(--wine-700); color: var(--ivory-50); }
.btn-primary:hover  { background-color: var(--wine-600); }

.btn-secondary       { border: 1px solid var(--wine-700); color: var(--wine-700); }
.btn-secondary:hover { background-color: var(--wine-700); color: var(--ivory-50); }

.btn-on-wine       { border: 1px solid rgba(255, 253, 251, .7); color: var(--ivory-50); }
.btn-on-wine:hover { background-color: var(--ivory-50); color: var(--wine-800); }

.btn-gold       { background-color: var(--gold-500); color: var(--wine-900); }
.btn-gold:hover { background-color: var(--gold-400); }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--gold-700);
  transition: color var(--dur-base) var(--ease-std);
}
.btn-ghost:hover { color: var(--wine-700); }
.btn-ghost:focus-visible {
  outline: 2px solid transparent;
  outline-offset: 2px;
  box-shadow: 0 0 0 3px rgba(194, 160, 92, .4);
}

/* --------------------------------------------------------------------------
   4. Forms
   -------------------------------------------------------------------------- */
.field {
  height: 3rem;
  width: 100%;
  border: 1px solid var(--line-strong);
  background-color: var(--surface);
  padding-inline: 1rem;
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--ink-800);
  transition: all var(--dur-fast) var(--ease-std);
}
.field::placeholder { color: var(--ink-400); }
.field:focus {
  border-color: var(--gold-500);
  outline: 2px solid transparent;
  outline-offset: 2px;
  box-shadow: 0 0 0 3px rgba(194, 160, 92, .25);
}

.field-label {
  display: block;
  margin-bottom: 0.5rem;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  color: var(--ink-700);
}

/* --------------------------------------------------------------------------
   5. Price
   -------------------------------------------------------------------------- */
.price {
  font-family: var(--font-sans);
  font-size: 17px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--wine-700);
}
.price-strike {
  font-family: var(--font-sans);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  color: var(--ink-400);
  text-decoration-line: line-through;
}

/* --------------------------------------------------------------------------
   6. Ornament & media
   -------------------------------------------------------------------------- */
.rule-gold {
  height: 1px;
  width: 100%;
  background-image: linear-gradient(to right, transparent, var(--gold-400), transparent);
}

.img-zoom {
  object-fit: cover;
  transition: transform var(--dur-image) var(--ease-silk);
}
.group:hover .img-zoom { transform: scale(1.06); }

/* --------------------------------------------------------------------------
   7. Controls & navigation
   -------------------------------------------------------------------------- */
.icon-btn {
  display: grid;
  height: 2.75rem;
  width: 2.75rem;
  place-items: center;
  color: var(--ink-700);
  transition: color var(--dur-base) var(--ease-std);
}
.icon-btn:hover { color: var(--wine-700); }
.icon-btn:focus-visible {
  outline: 2px solid transparent;
  outline-offset: 2px;
  box-shadow: 0 0 0 3px rgba(194, 160, 92, .4);
}

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding-block: 0.5rem;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-700);
  transition: color var(--dur-base) var(--ease-std);
}
.nav-link:hover { color: var(--wine-700); }
.nav-link:focus-visible {
  outline: 2px solid transparent;
  outline-offset: 2px;
  box-shadow: 0 0 0 3px rgba(194, 160, 92, .4);
}

/* --------------------------------------------------------------------------
   8. Badge
   -------------------------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.625rem;
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

/* --------------------------------------------------------------------------
   9. Product cards — equal body height; pin Add to Bag to the bottom
   -------------------------------------------------------------------------- */
article[data-product] {
  height: 100%;
}
article[data-product] h3 {
  min-height: 2.45em; /* slight reserve for two-line titles without a large gap */
}
article[data-product] > .flex.flex-1.flex-col > [class*="items-baseline"] {
  min-height: 1.25rem;
  margin-top: 0.25rem;  /* match mt-1 */
  margin-bottom: 0.5rem; /* tighter than mb-3 */
}

/* ==========================================================================
   10. WordPress block integration
   Maps the component classes above onto core block markup and the block style
   variations registered in inc/setup.php, so editors pick these from the
   Styles panel instead of typing class names.
   ========================================================================== */

/* 10.1 Container — makes a Group behave like .container-x */
.is-style-container-x > .wp-block-group__inner-container,
.wp-block-group.is-style-container-x {
  margin-inline: auto;
  width: 100%;
  max-width: 1280px;
  padding-inline: 1.25rem;
}
@media (min-width: 768px) {
  .is-style-container-x > .wp-block-group__inner-container,
  .wp-block-group.is-style-container-x { padding-inline: 2rem; }
}
@media (min-width: 1024px) {
  .is-style-container-x > .wp-block-group__inner-container,
  .wp-block-group.is-style-container-x { padding-inline: 2.5rem; }
}

/* 10.2 Eyebrow — the signature gold kicker, as a block style */
.is-style-eyebrow {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  color: var(--gold-700);
}
@media (min-width: 768px) {
  .is-style-eyebrow { font-size: 12px; }
}

/* On a wine background the accessible gold shifts one step lighter. */
.has-wine-700-background-color .is-style-eyebrow,
.has-wine-800-background-color .is-style-eyebrow,
.has-wine-900-background-color .is-style-eyebrow,
.has-wine-950-background-color .is-style-eyebrow {
  color: var(--gold-500);
}

/* 10.3 Buttons — core/button variations mapped to the btn-* components */
.wp-block-button__link {
  border-radius: 0;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  line-height: 1;
  text-transform: uppercase;
  transition: all var(--dur-base) var(--ease-silk);
}

.wp-block-button.is-style-secondary > .wp-block-button__link {
  background-color: transparent;
  border: 1px solid var(--wine-700);
  color: var(--wine-700);
}
.wp-block-button.is-style-secondary > .wp-block-button__link:hover {
  background-color: var(--wine-700);
  color: var(--ivory-50);
}

.wp-block-button.is-style-on-wine > .wp-block-button__link {
  background-color: transparent;
  border: 1px solid rgba(255, 253, 251, .7);
  color: var(--ivory-50);
}
.wp-block-button.is-style-on-wine > .wp-block-button__link:hover {
  background-color: var(--ivory-50);
  color: var(--wine-800);
}

.wp-block-button.is-style-gold > .wp-block-button__link {
  background-color: var(--gold-500);
  color: var(--wine-900);
}
.wp-block-button.is-style-gold > .wp-block-button__link:hover {
  background-color: var(--gold-400);
}

.wp-block-button.is-style-ghost > .wp-block-button__link {
  background-color: transparent;
  border: 0;
  padding: 0;
  gap: 0.375rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--gold-700);
}
.wp-block-button.is-style-ghost > .wp-block-button__link:hover {
  background-color: transparent;
  color: var(--wine-700);
}

.wp-block-button.is-style-ghost-on-wine > .wp-block-button__link {
  background-color: transparent;
  border: 1px solid rgb(224 199 138 / 0.4);
  color: var(--ivory-50);
}
.wp-block-button.is-style-ghost-on-wine > .wp-block-button__link:hover {
  background-color: transparent;
  border-color: var(--gold-400);
  color: var(--gold-400);
}

/* 10.4 Separator — the gold hairline ornament */
.wp-block-separator.is-style-rule-gold {
  height: 1px;
  border: 0;
  width: 100%;
  max-width: none;
  background-image: linear-gradient(to right, transparent, var(--gold-400), transparent);
}

/* 10.5 Navigation — restore the animated gold underline on nav items */
.wp-block-navigation .wp-block-navigation-item__content {
  position: relative;
  padding-block: 0.5rem;
}
.wp-block-navigation .wp-block-navigation-item__content::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 2px;
  height: 1.5px;
  width: 0;
  background: var(--gold-500);
  transition: width var(--dur-base) var(--ease-silk);
}
.wp-block-navigation .wp-block-navigation-item__content:hover::after,
.wp-block-navigation .wp-block-navigation-item__content:focus-visible::after,
.wp-block-navigation .current-menu-item > .wp-block-navigation-item__content::after,
.wp-block-navigation .wp-block-navigation-item__content[aria-current="page"]::after {
  width: 100%;
}

/* Submenus inherit the mega-menu panel treatment, not the underline. */
.wp-block-navigation__submenu-container .wp-block-navigation-item__content::after {
  display: none;
}

/* 10.6 Search — match the .field input and .btn-primary submit */
.wp-block-search__input {
  height: 3rem;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  background-color: var(--surface);
  padding-inline: 1rem;
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--ink-800);
}
.wp-block-search__input::placeholder { color: var(--ink-400); }
.wp-block-search__input:focus {
  border-color: var(--gold-500);
  outline: 2px solid transparent;
  outline-offset: 2px;
  box-shadow: 0 0 0 3px rgba(194, 160, 92, .25);
}
.wp-block-search__button {
  border-radius: 0;
  background-color: var(--wine-700);
  border: 0;
  color: var(--ivory-50);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 0 1.5rem;
}
.wp-block-search__button:hover { background-color: var(--wine-600); }

/* 10.7 Details — the FAQ and footer accordions */
.wp-block-details summary {
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-800);
  list-style: none;
}
.wp-block-details summary::-webkit-details-marker { display: none; }
.wp-block-details summary::after {
  content: "+";
  float: right;
  font-size: 18px;
  line-height: 1;
  color: var(--gold-600);
  transition: transform var(--dur-base) var(--ease-silk);
}
.wp-block-details[open] > summary::after {
  content: "\2212";
}

/* 10.8 Skip link */
.skip-link:focus {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* ==========================================================================
   11. Custom block styles
   Only the rules the blocks' own markup cannot express with utilities.
   ========================================================================== */

/* 11.1 Rotating announcement — cross-fade between messages */
.myzawar-rotator__item {
  animation: mz-rotator-in var(--dur-base) var(--ease-silk);
}

@keyframes mz-rotator-in {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .myzawar-rotator__item { animation: none; }
}

.myzawar-rotator__nav:focus-visible {
  outline: 2px solid transparent;
  outline-offset: 2px;
  box-shadow: 0 0 0 2px currentColor;
}

/* 11.2 Marquee — fade the strip into its background at both edges */
.myzawar-marquee {
  -webkit-mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
          mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
}

/* 11.3 Stat counter — reserve the settled width so the layout does not jump
   while the number animates up. */
.myzawar-countup__value {
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   12. Pattern ornaments
   Decorative layers the original markup drew with empty <span> elements.
   Recreating them as pseudo-elements keeps the block trees clean, so an
   editor never sees an unexplained empty block in the list view.
   ========================================================================== */

/* 12.1 Category bento — slow zoom on the tile image */
.mz-bento-feature .wp-block-cover__image-background,
.mz-bento-tile .wp-block-cover__image-background {
  transition: transform 1.2s var(--ease-silk);
}
.mz-bento-feature:hover .wp-block-cover__image-background,
.mz-bento-tile:hover .wp-block-cover__image-background,
.mz-bento-feature:focus-within .wp-block-cover__image-background,
.mz-bento-tile:focus-within .wp-block-cover__image-background {
  transform: scale(1.06);
}

/* 12.2 Craft editorial — the offset gold frame behind the atelier photograph */
.mz-craft-frame { position: relative; }
.mz-craft-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  transform: translate(-16px, -16px);
  border: 1px solid rgb(212 175 55 / 0.6);
  pointer-events: none;
}

@media (min-width: 1024px) {
  .mz-craft-frame::before { transform: translate(-24px, -24px); }
}

/* 12.3 Promo banner — the wine scrim over the right-hand photograph, and the
   dashed ring that rotates around the discount badge. */
.mz-promo .wp-block-cover__image-background {
  object-position: 85% 50%;
}
.mz-promo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--wine-800) 0%, var(--wine-800) 42%, rgb(91 27 42 / 0.55) 62%, transparent 100%);
  pointer-events: none;
}
@media (max-width: 767px) {
  .mz-promo::after { background: var(--wine-800); }
}
.mz-promo > .wp-block-cover__inner-container { position: relative; z-index: 1; }

.mz-promo-badge::before,
.mz-promo-badge::after {
  content: "";
  position: absolute;
  border-radius: 9999px;
}
.mz-promo-badge::before {
  inset: 0;
  border: 1px dashed rgb(212 175 55 / 0.55);
  animation: mz-spin-slow 18s linear infinite;
}
.mz-promo-badge::after {
  inset: 10px;
  border: 1px solid rgb(212 175 55 / 0.8);
}

@keyframes mz-spin-slow {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .mz-promo-badge::before { animation: none; }
}

/* 12.4 Testimonials — the oversized quotation mark sits behind the text */
.mz-testimonial__mark { pointer-events: none; }

/* 12.5 Social mosaic — zoom the thumbnail and reveal a wine scrim on hover */
.mz-social-grid .wp-block-image { position: relative; overflow: hidden; }
.mz-social-grid img { transition: transform 1.2s var(--ease-silk); }
.mz-social-grid a:hover img,
.mz-social-grid a:focus-visible img { transform: scale(1.07); }
.mz-social-grid a::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgb(74 22 34 / 0);
  transition: background var(--dur-base) var(--ease-silk);
}
.mz-social-grid a:hover::after,
.mz-social-grid a:focus-visible::after {
  background: rgb(74 22 34 / 0.55);
}

/* 12.6 Budget cards — the whole card is clickable via the stretched heading link */
.mz-price-card { position: relative; }
.mz-price-card h3 a::after {
  content: "";
  position: absolute;
  inset: 0;
}

/* 12.7 Page banner — the two gold rings that bleed off the corners */
.mz-page-banner::before,
.mz-page-banner::after {
  content: "";
  position: absolute;
  border-radius: 9999px;
  pointer-events: none;
}
.mz-page-banner::before {
  top: -80px;
  right: -64px;
  height: 256px;
  width: 256px;
  border: 1px solid rgb(224 199 138 / 0.35);
}
.mz-page-banner::after {
  bottom: 0;
  left: -40px;
  height: 160px;
  width: 160px;
  border: 1px solid rgb(224 199 138 / 0.25);
}

/* 12.8 Milestones timeline — one continuous rule with a marker per entry.
   Drawn in CSS so the block tree stays a plain list of headings and text. */
.mz-timeline::before {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 15px;
  width: 1px;
  background: rgb(196 160 92 / 0.7);
}
.mz-timeline__item::before {
  content: "";
  position: absolute;
  top: 4px;
  left: 15px;
  z-index: 1;
  display: block;
  height: 30px;
  width: 30px;
  transform: translateX(-50%);
  border: 2px solid var(--gold-500);
  border-radius: 9999px;
  background: var(--ivory-300);
}
.mz-timeline__item::after {
  content: "";
  position: absolute;
  top: 17px;
  left: 15px;
  z-index: 2;
  height: 8px;
  width: 8px;
  transform: translate(-50%, -50%);
  border-radius: 9999px;
  background: var(--wine-700);
}
.mz-timeline__item:last-child { padding-bottom: 0; }

@media (min-width: 768px) {
  .mz-timeline::before,
  .mz-timeline__item::before,
  .mz-timeline__item::after { left: 50%; }

  .mz-timeline__item { width: 50%; padding-left: 0; padding-right: 2.5rem; text-align: right; }
  .mz-timeline__item :is(p, h3) { margin-left: auto; }

  .mz-timeline__item:nth-child(even) {
    margin-left: 50%;
    padding-left: 2.5rem;
    padding-right: 0;
    text-align: left;
  }
  .mz-timeline__item:nth-child(even) :is(p, h3) { margin-left: 0; margin-right: auto; }
  .mz-timeline__item:nth-child(even)::before,
  .mz-timeline__item:nth-child(even)::after { left: 0; }
}

/* 12.9 Certification marks — desaturated until hovered */
.mz-cert {
  filter: grayscale(1);
  opacity: 0.7;
  transition: filter var(--dur-base) var(--ease-silk), opacity var(--dur-base) var(--ease-silk);
}
.mz-cert:hover { filter: none; opacity: 1; }

/* 12.10 Team and store cards — gentle zoom on the portrait */
.mz-team-card img,
.mz-store-card img {
  transition: transform var(--dur-base) var(--ease-silk);
}
.mz-team-card:hover img,
.mz-store-card:hover img { transform: scale(1.03); }

/* 12.11 Contact map — tint the third-party iframe into the palette */
.mz-map__frame { filter: grayscale(100%) sepia(18%) contrast(0.95); }

/* 12.12 Contact card — social pills borrow the header icon button sizing */
.mz-social-pill:hover {
  border-color: var(--gold-500);
  background: var(--gold-500);
  color: var(--wine-900);
}
