/* ==========================================================================
   Phyzitex theme styles
   ========================================================================== */
:root {
  --pzx-forest: #143A2C;
  --pzx-emerald: #2E7A5A;
  --pzx-sage: #8DAA91;
  --pzx-mint: #DCE8DC;
  --pzx-cream: #F7F3E8;
  --pzx-ivory: #FFFDF7;
  --pzx-gold: #C9A227;
  --pzx-radius: 28px;
  --pzx-shadow: 0 22px 50px -26px rgba(20, 58, 44, .45);
}

/* ---------- Unique layered background ----------
   1. cream base  2. botanical line-art tile  3. drifting aura blobs
   4. paper grain overlay                                                */
body {
  background-color: var(--pzx-cream);
  background-image:
    url("../images/bg-botanical.svg"),
    radial-gradient(1200px 600px at 110% -10%, rgba(201, 162, 39, .14), transparent 60%),
    radial-gradient(900px 700px at -10% 30%, rgba(141, 170, 145, .25), transparent 60%),
    radial-gradient(1000px 800px at 50% 120%, rgba(46, 122, 90, .14), transparent 60%);
  background-size: 320px 320px, auto, auto, auto;
  background-attachment: fixed;
}
body::before,
body::after {
  content: "";
  position: fixed;
  pointer-events: none;
  z-index: -1;
}
body::before { /* slow drifting auras */
  inset: -20vmax;
  background:
    radial-gradient(38vmax 38vmax at 20% 25%, rgba(141, 170, 145, .28), transparent 65%),
    radial-gradient(30vmax 30vmax at 82% 70%, rgba(242, 210, 122, .22), transparent 65%),
    radial-gradient(26vmax 26vmax at 60% 10%, rgba(46, 122, 90, .12), transparent 65%);
  animation: pzx-drift 38s ease-in-out infinite alternate;
}
body::after { /* paper grain */
  inset: 0;
  opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
@keyframes pzx-drift {
  0% { transform: translate3d(0, 0, 0) rotate(0deg); }
  100% { transform: translate3d(4vmax, -3vmax, 0) rotate(8deg); }
}

::selection { background: var(--pzx-gold); color: var(--pzx-forest); }

/* ---------- Announcement ticker ---------- */
.pzx-ticker {
  background: var(--pzx-forest);
  color: var(--pzx-ivory);
  overflow: hidden;
  padding-top: .5rem !important;
  padding-bottom: .5rem !important;
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .04em;
  position: relative;
}
.pzx-ticker::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--pzx-gold), transparent);
}
.pzx-ticker p { margin: 0; white-space: nowrap; }
.pzx-ticker a { color: var(--pzx-gold); }
.pzx-ticker.is-scrolling > * { max-width: none !important; }
.pzx-ticker .pzx-ticker-track {
  display: inline-flex; gap: 3rem; white-space: nowrap;
  animation: pzx-marquee 32s linear infinite;
}
.pzx-ticker:hover .pzx-ticker-track { animation-play-state: paused; }
@keyframes pzx-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- Header ---------- */
.pzx-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 253, 247, .82);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid rgba(20, 58, 44, .08);
}
.admin-bar .pzx-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .pzx-header { top: 0; } }
.pzx-header .wp-block-site-logo img { height: auto; }
.pzx-header .wp-block-navigation a { position: relative; padding: .3rem 0; }
.pzx-header .wp-block-navigation-item__content::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: -2px; height: 2px;
  background: var(--pzx-gold); border-radius: 2px; transition: right .3s ease;
}
.pzx-header .wp-block-navigation-item__content:hover::after,
.pzx-header .current-menu-item > .wp-block-navigation-item__content::after { right: 0; }
.pzx-header .wc-block-mini-cart__button,
.pzx-header .wc-block-customer-account a {
  color: var(--pzx-forest);
}
.pzx-header .wc-block-mini-cart__badge { background: var(--pzx-gold); color: var(--pzx-forest); border-color: var(--pzx-gold); }

/* ---------- Flash banner (hero slider) ---------- */
.pzx-flash {
  position: relative;
  display: grid;
  border-radius: calc(var(--pzx-radius) + 8px);
  overflow: hidden;
  background:
    url("../images/bg-botanical.svg"),
    radial-gradient(700px 400px at 85% 50%, rgba(201, 162, 39, .25), transparent 60%),
    linear-gradient(135deg, #1B4A38 0%, #143A2C 55%, #0E2B20 100%);
  background-size: 320px 320px, auto, auto;
  box-shadow: var(--pzx-shadow);
  isolation: isolate;
}
.pzx-flash::before { /* organic gold arc */
  content: "";
  position: absolute; width: 640px; height: 640px; right: -180px; top: -220px;
  border: 1.5px solid rgba(242, 210, 122, .35);
  border-radius: 46% 54% 60% 40% / 50% 42% 58% 50%;
  animation: pzx-morph 16s ease-in-out infinite alternate;
  z-index: -1;
}
.pzx-flash::after {
  content: "";
  position: absolute; width: 420px; height: 420px; left: -160px; bottom: -200px;
  background: radial-gradient(circle, rgba(141, 170, 145, .35), transparent 70%);
  z-index: -1;
}
@keyframes pzx-morph {
  0% { border-radius: 46% 54% 60% 40% / 50% 42% 58% 50%; transform: rotate(0); }
  100% { border-radius: 60% 40% 38% 62% / 42% 60% 40% 58%; transform: rotate(25deg); }
}
.pzx-flash .pzx-slide {
  grid-area: 1 / 1;
  opacity: 0; visibility: hidden;
  transform: translateY(14px);
  transition: opacity .8s ease, transform .8s ease, visibility .8s;
}
.pzx-flash .pzx-slide.is-active,
.pzx-flash:not(.is-ready) .pzx-slide:first-child {
  opacity: 1; visibility: visible; transform: none;
}
.pzx-flash .pzx-slide.is-active img { animation: pzx-bob 6s ease-in-out infinite; }
@keyframes pzx-bob { 0%, 100% { transform: translateY(0) } 50% { transform: translateY(-10px) } }
.pzx-flash h1, .pzx-flash h2 { color: var(--pzx-ivory); }
.pzx-flash p { color: rgba(255, 253, 247, .86); }
.pzx-flash .pzx-eyebrow {
  display: inline-block; color: var(--pzx-forest) !important;
  background: linear-gradient(120deg, #F2D27A, #C9A227);
  padding: .3rem .9rem; border-radius: 999px;
  font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
}
.pzx-flash .wp-block-button.is-style-outline .wp-block-button__link {
  color: var(--pzx-ivory); border: 1.5px solid rgba(255, 253, 247, .6); background: transparent;
}
.pzx-flash .wp-block-button.is-style-outline .wp-block-button__link:hover { background: var(--pzx-ivory); color: var(--pzx-forest); }
.pzx-flash .wp-block-button:not(.is-style-outline) .wp-block-button__link { background: var(--pzx-gold); color: var(--pzx-forest); }
.pzx-flash .wp-block-button:not(.is-style-outline) .wp-block-button__link:hover { background: var(--pzx-ivory); }
.pzx-flash-dots {
  position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%);
  display: flex; gap: 10px; z-index: 3;
}
.pzx-flash-dots button {
  width: 10px; height: 10px; border-radius: 99px; border: 0; padding: 0; cursor: pointer;
  background: rgba(255, 253, 247, .4); transition: width .35s ease, background .35s ease;
}
.pzx-flash-dots button.is-active { width: 30px; background: var(--pzx-gold); }

/* Flash deal chip with countdown */
.pzx-deal {
  display: inline-flex !important; align-items: center; gap: .6rem;
  background: rgba(255, 253, 247, .1);
  border: 1px solid rgba(242, 210, 122, .45);
  border-radius: 999px; padding: .45rem 1rem !important;
  color: var(--pzx-ivory) !important; font-weight: 700; font-size: .9rem;
}
.pzx-deal::before {
  content: ""; width: 9px; height: 9px; border-radius: 50%; background: #F2D27A;
  box-shadow: 0 0 0 0 rgba(242, 210, 122, .7); animation: pzx-pulse 1.6s infinite;
}
@keyframes pzx-pulse { 70% { box-shadow: 0 0 0 10px rgba(242, 210, 122, 0) } 100% { box-shadow: 0 0 0 0 rgba(242, 210, 122, 0) } }
.pzx-countdown { font-variant-numeric: tabular-nums; color: #F2D27A; letter-spacing: .04em; }

/* ---------- Sections ---------- */
.pzx-section-title { position: relative; }
.pzx-kicker {
  color: var(--pzx-emerald) !important; font-weight: 800 !important; font-size: .78rem !important;
  letter-spacing: .18em; text-transform: uppercase;
  display: inline-flex; align-items: center; gap: .6rem;
}
.pzx-kicker::before { content: ""; width: 28px; height: 2px; background: var(--pzx-gold); }

.pzx-card {
  background: rgba(255, 253, 247, .78);
  border: 1px solid rgba(20, 58, 44, .08);
  border-radius: var(--pzx-radius);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .7) inset;
  backdrop-filter: blur(6px);
  transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease;
}
.pzx-card:hover { transform: translateY(-6px); box-shadow: var(--pzx-shadow); border-color: rgba(201, 162, 39, .45); }
.pzx-card .wp-block-image img { transition: transform .5s ease; }
.pzx-card:hover .wp-block-image img { transform: rotate(-6deg) scale(1.08); }
.pzx-icon-badge img {
  background: var(--pzx-mint); border-radius: 22px 22px 22px 6px; padding: 12px;
}

.pzx-category-grid .pzx-card { position: relative; overflow: hidden; }
.pzx-category-grid .pzx-card::after {
  content: "→"; position: absolute; right: 22px; bottom: 18px;
  font-size: 1.2rem; color: var(--pzx-gold); transition: transform .3s ease;
}
.pzx-category-grid .pzx-card:hover::after { transform: translateX(6px); }
.pzx-category-grid .pzx-card a { color: inherit; text-decoration: none; }
.pzx-category-grid .pzx-card a::before { content: ""; position: absolute; inset: 0; }

.pzx-trust { border-top: 1px dashed rgba(20, 58, 44, .2); border-bottom: 1px dashed rgba(20, 58, 44, .2); }
.pzx-trust h3 { font-size: 1.05rem !important; margin: 0; }
.pzx-trust p { margin: 0; font-size: .9rem; color: #4b5a52; }

/* Organic panel with leaf-shaped corners */
.pzx-organic {
  border-radius: 80px 24px 80px 24px;
  position: relative; overflow: hidden;
}
.pzx-organic.has-forest-background-color { color: var(--pzx-ivory); }
.pzx-organic.has-forest-background-color h2, .pzx-organic.has-forest-background-color h3 { color: var(--pzx-ivory); }
.pzx-organic.has-forest-background-color { background-image: url("../images/bg-botanical.svg"); background-size: 320px; }

/* Wave divider before footer */
.pzx-footer { position: relative; margin-top: clamp(4rem, 8vw, 7rem) !important; }
.pzx-footer::before {
  content: ""; position: absolute; left: 0; right: 0; top: -59px; height: 60px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 60' preserveAspectRatio='none'%3E%3Cpath d='M0 60 V30 C180 0 360 0 540 22 S900 60 1080 34 S1320 6 1440 26 V60 Z' fill='%23143A2C'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
}
.pzx-footer { background-image: url("../images/bg-botanical.svg"); background-size: 320px; }
.pzx-footer a { color: var(--pzx-ivory); text-decoration: none; }
.pzx-footer a:hover { color: var(--pzx-gold); }
.pzx-footer h3, .pzx-footer h4 { color: #F2D27A !important; }
.pzx-footer .wp-block-site-logo img { background: var(--pzx-ivory); border-radius: 16px; padding: 10px 14px; }
.pzx-footer ul { list-style: none; padding-left: 0; }
.pzx-footer li { margin: .35rem 0; }
.pzx-disclaimer { opacity: .7; font-size: .8rem !important; }

/* Page hero for regular pages */
.pzx-page-hero {
  position: relative; overflow: hidden;
  border-radius: 0 0 60px 60px;
  background:
    radial-gradient(600px 260px at 85% 0%, rgba(201, 162, 39, .22), transparent 60%),
    linear-gradient(160deg, rgba(255, 253, 247, .85), rgba(220, 232, 220, .85));
}
.pzx-page-hero::after {
  content: ""; position: absolute; right: 6%; top: 50%; width: 140px; height: 140px; transform: translateY(-50%) rotate(-12deg);
  background: url("../images/logo-mark.svg") no-repeat center / contain; opacity: .12;
}

/* Contact */
.pzx-info-item { display: flex; gap: 1rem; align-items: flex-start; }
.pzx-form { display: grid; gap: 1rem; }
.pzx-form .pzx-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 640px) { .pzx-form .pzx-row { grid-template-columns: 1fr; } }
.pzx-form label { font-weight: 700; font-size: .85rem; color: var(--pzx-forest); display: block; margin-bottom: .35rem; }
.pzx-form input, .pzx-form textarea, .pzx-form select,
.woocommerce form .input-text, .woocommerce form select {
  width: 100%; box-sizing: border-box;
  font: inherit; color: var(--pzx-forest);
  background: var(--pzx-ivory);
  border: 1.5px solid rgba(20, 58, 44, .15);
  border-radius: 14px; padding: .8rem 1rem;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.pzx-form input:focus, .pzx-form textarea:focus, .woocommerce form .input-text:focus {
  outline: none; border-color: var(--pzx-emerald); box-shadow: 0 0 0 4px rgba(46, 122, 90, .15);
}
.pzx-form button, .woocommerce button.button, .woocommerce a.button, .woocommerce input.button {
  font: inherit; font-weight: 700; cursor: pointer;
  background: var(--pzx-forest) !important; color: var(--pzx-ivory) !important;
  border: 0; border-radius: 999px !important; padding: .9rem 1.9rem !important;
  transition: background .25s ease, color .25s ease, transform .25s ease;
}
.pzx-form button:hover, .woocommerce button.button:hover, .woocommerce a.button:hover {
  background: var(--pzx-gold) !important; color: var(--pzx-forest) !important; transform: translateY(-2px);
}
.pzx-hp { position: absolute !important; left: -9999px !important; }
.pzx-notice { padding: 1rem 1.25rem; border-radius: 14px; font-weight: 600; }
.pzx-notice.ok { background: var(--pzx-mint); color: var(--pzx-forest); }
.pzx-notice.err { background: #F8E1DC; color: #7A2318; }
.pzx-map iframe { width: 100%; height: 340px; border: 0; border-radius: var(--pzx-radius); filter: saturate(.8) sepia(.08); }

/* Customer page / My Account */
.woocommerce-account .woocommerce { display: block; }
.woocommerce-MyAccount-navigation ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .4rem; }
.woocommerce-MyAccount-navigation a {
  display: block; padding: .7rem 1rem; border-radius: 12px; text-decoration: none; font-weight: 600;
  color: var(--pzx-forest); background: rgba(255, 253, 247, .7);
}
.woocommerce-MyAccount-navigation .is-active a, .woocommerce-MyAccount-navigation a:hover { background: var(--pzx-forest); color: var(--pzx-ivory); }
.woocommerce form.login, .woocommerce form.register {
  background: rgba(255, 253, 247, .85); border: 1px solid rgba(20, 58, 44, .08) !important;
  border-radius: var(--pzx-radius) !important; padding: 1.8rem !important;
}
.pzx-steps { counter-reset: step; }
.pzx-steps .pzx-card { counter-increment: step; position: relative; }
.pzx-steps .pzx-card::before {
  content: counter(step, decimal-leading-zero);
  font-family: Fraunces, serif; font-weight: 700; font-size: 2.4rem; line-height: 1;
  color: var(--pzx-gold); display: block; margin-bottom: .6rem;
}
.pzx-faq .wp-block-details {
  background: rgba(255, 253, 247, .8); border: 1px solid rgba(20, 58, 44, .08);
  border-radius: 18px; padding: 1rem 1.3rem;
}
.pzx-faq .wp-block-details summary { font-weight: 700; color: var(--pzx-forest); cursor: pointer; }
.pzx-faq .wp-block-details[open] { border-color: rgba(201, 162, 39, .5); }

/* ---------- WooCommerce product grid polish ---------- */
.wc-block-product, .woocommerce ul.products li.product, .wc-block-grid__product {
  background: rgba(255, 253, 247, .85);
  border: 1px solid rgba(20, 58, 44, .08);
  border-radius: 22px; padding: 14px !important;
  transition: transform .35s ease, box-shadow .35s ease;
}
.wc-block-product:hover, .woocommerce ul.products li.product:hover { transform: translateY(-5px); box-shadow: var(--pzx-shadow); }
.wc-block-product img, .woocommerce ul.products li.product img { border-radius: 16px; }
.woocommerce ul.products li.product .price, .wc-block-components-product-price { color: var(--pzx-emerald); font-weight: 700; }
.woocommerce span.onsale, .wc-block-components-product-sale-badge {
  background: linear-gradient(120deg, #F2D27A, #C9A227) !important; color: var(--pzx-forest) !important;
  border-radius: 999px !important; border: 0 !important; font-weight: 800;
}
.pzx-vendor-badge {
  display: inline-flex; align-items: center; gap: .5rem;
  background: var(--pzx-mint); color: var(--pzx-forest);
  padding: .35rem .9rem; border-radius: 999px; font-size: .85rem; font-weight: 700; margin: .25rem 0 1rem;
}
.pzx-vendor-badge a { color: var(--pzx-emerald); }
.pzx-vendors { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
.pzx-vendors a {
  display: flex; flex-direction: column; gap: .2rem; padding: 1.1rem 1.2rem; text-decoration: none;
  background: rgba(255, 253, 247, .85); border: 1px solid rgba(20, 58, 44, .1); border-radius: 18px; color: var(--pzx-forest);
  transition: transform .3s ease, border-color .3s ease;
}
.pzx-vendors a:hover { transform: translateY(-4px); border-color: var(--pzx-gold); }
.pzx-vendors strong { font-family: Fraunces, serif; font-size: 1.1rem; }
.pzx-vendors span { font-size: .82rem; color: #56655c; }
.pzx-empty { padding: 2rem; text-align: center; border: 1.5px dashed rgba(20, 58, 44, .2); border-radius: 22px; background: rgba(255, 253, 247, .6); }

/* Reveal on scroll */
.pzx-reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s ease, transform .9s ease; }
.pzx-reveal.is-visible { opacity: 1; transform: none; }

@media (max-width: 781px) {
  .pzx-flash .wp-block-columns { flex-direction: column-reverse; }
  .pzx-flash .wp-block-image img { max-width: 260px; margin: 0 auto; }
  .pzx-organic { border-radius: 40px 16px 40px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .pzx-reveal { opacity: 1; transform: none; }
}

/* ---------- Editor: show all slides so each is editable ---------- */
.editor-styles-wrapper .pzx-flash .pzx-slide {
  grid-area: auto; opacity: 1; visibility: visible; transform: none;
  border-bottom: 1px dashed rgba(242, 210, 122, .4);
}
.editor-styles-wrapper .pzx-reveal { opacity: 1; transform: none; }
