/*
Theme Name: Peptides-Boys — Kadence Child
Theme URI: https://example.com/
Description: Child theme for Kadence + Kadence Blocks + WooCommerce. Brand palette: #F24333 / #564D4A.
Author: Peptides-Boys
Version: 1.0.0
Template: kadence
License: GNU General Public License v2 or later
Text Domain: peptides-boys-kadence-child
*/

/* ==========================================================================
   1. Brand tokens
   --------------------------------------------------------------------------
   --brand        #F24333  headline accent, badges, borders, large display text
   --brand-deep   #D9331F  ANY red behind white text (4.72:1 — passes WCAG AA)
   --ink          #564D4A  body copy (8.3:1 on cream)
   ========================================================================== */

:root {
  --brand: #f24333;
  --brand-deep: #d9331f;
  --brand-tint: #fdedeb;
  --brand-glow: rgba(242, 67, 51, 0.14);
  --ink: #564d4a;
  --ink-deep: #3b3432;
  --ink-soft: #7d726e;
  --cream: #f5f1ed;
  --cream-deep: #ece5df;
  --surface: #ffffff;
  --line: #e4dbd6;
  --radius: 18px;
  --radius-pill: 999px;
  --shadow: 0 1px 2px rgba(59, 52, 50, 0.05), 0 12px 32px -12px rgba(59, 52, 50, 0.16);
}

/* ==========================================================================
   2. Global
   ========================================================================== */

body {
  background: var(--cream);
  color: var(--ink);
  font-family: Manrope, ui-sans-serif, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6,
.entry-title {
  color: var(--ink-deep);
  letter-spacing: -0.02em;
}

a {
  color: var(--brand-deep);
}

a:hover,
a:focus {
  color: var(--ink-deep);
}

:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}

::selection {
  background: var(--brand);
  color: #fff;
}

/* ==========================================================================
   3. Kadence header / footer
   ========================================================================== */

.site-header-wrap,
#main-header {
  background: rgba(245, 241, 237, 0.92);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-header-item .header-navigation .header-menu-container > ul > li > a {
  color: var(--ink);
  font-weight: 600;
}

.site-header-item .header-navigation .header-menu-container > ul > li > a:hover,
.header-navigation ul li.current-menu-item > a {
  color: var(--brand-deep);
}

.site-footer,
#colophon {
  background: var(--ink-deep);
  color: #cfc6c2;
}

.site-footer a,
#colophon a {
  color: #efe9e6;
}

.site-footer a:hover,
#colophon a:hover {
  color: var(--brand);
}

.site-footer h2,
.site-footer h3,
.site-footer h4,
#colophon h2,
#colophon h3,
#colophon h4 {
  color: #fff;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* Legal / RUO disclaimer strip */
.brand-disclaimer {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  font-size: 0.8125rem;
  line-height: 1.7;
  color: #b6aca8;
}

/* ==========================================================================
   4. Buttons
   ========================================================================== */

.wp-block-button__link,
.kb-button,
.button,
input[type="submit"],
button:not(.components-button) {
  background: var(--brand-deep);
  color: #fff;
  border: 0;
  border-radius: var(--radius-pill);
  font-weight: 700;
  letter-spacing: -0.01em;
  padding: 0.85em 1.75em;
  transition: transform 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.wp-block-button__link:hover,
.kb-button:hover,
.button:hover,
input[type="submit"]:hover,
button:not(.components-button):hover {
  background: var(--ink-deep);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px -8px rgba(59, 52, 50, 0.45);
}

/* Secondary / outline */
.is-style-outline .wp-block-button__link,
.button.alt-outline {
  background: transparent;
  color: var(--ink-deep);
  border: 1.5px solid var(--ink-deep);
}

.is-style-outline .wp-block-button__link:hover,
.button.alt-outline:hover {
  background: var(--ink-deep);
  color: #fff;
}

/* ==========================================================================
   5. Shared brand components (used by the patterns)
   ========================================================================== */

.brand-eyebrow {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand-deep);
}

.brand-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.75rem;
  height: 100%;
}

.brand-pill {
  display: inline-block;
  padding: 0.35em 0.85em;
  border-radius: var(--radius-pill);
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--brand-tint);
  color: var(--brand-deep);
  border: 1px solid rgba(242, 67, 51, 0.28);
}

.brand-pill.is-stock {
  background: #eef4ea;
  color: #3f6b32;
  border-color: rgba(63, 107, 50, 0.28);
}

.brand-stat {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  color: var(--ink-deep);
  line-height: 1;
}

.brand-stat + p {
  font-size: 0.8125rem;
  color: var(--ink-soft);
  margin-top: 0.4rem;
}

.brand-rule {
  height: 3px;
  width: 56px;
  background: var(--brand);
  border: 0;
  border-radius: 3px;
}

/* Hero */
.brand-hero {
  background: linear-gradient(180deg, var(--cream) 0%, var(--cream-deep) 100%);
  border-bottom: 1px solid var(--line);
}

.brand-hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.25rem);
  line-height: 1.02;
}

.brand-hero h1 em {
  font-style: normal;
  color: var(--brand);
}

/* Dark CTA band */
.brand-band-dark {
  background: var(--ink-deep);
  color: #e9e3e0;
  border-radius: var(--radius);
}

.brand-band-dark h2,
.brand-band-dark h3 {
  color: #fff;
}

/* ==========================================================================
   6. WooCommerce
   ========================================================================== */

.woocommerce ul.products li.product {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1rem 1.25rem;
  transition: box-shadow 0.18s ease, transform 0.18s ease;
}

.woocommerce ul.products li.product:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
  color: var(--ink-deep);
  font-weight: 700;
  font-size: 1.0625rem;
}

.woocommerce ul.products li.product .price,
.woocommerce div.product p.price,
.woocommerce div.product span.price {
  color: var(--ink-deep);
  font-weight: 800;
}

.woocommerce ul.products li.product .price del,
.woocommerce div.product p.price del {
  color: var(--ink-soft);
  font-weight: 500;
}

.woocommerce ul.products li.product .price ins {
  color: var(--brand-deep);
  text-decoration: none;
}

/* Sale flash */
.woocommerce span.onsale {
  background: var(--brand-deep);
  color: #fff;
  border-radius: var(--radius-pill);
  font-weight: 800;
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.4em 0.9em;
  min-height: 0;
  min-width: 0;
  line-height: 1.4;
}

/* Add to cart */
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce #respond input#submit {
  background: var(--brand-deep);
  color: #fff;
  border-radius: var(--radius-pill);
  font-weight: 700;
}

.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover,
.woocommerce #respond input#submit:hover {
  background: var(--ink-deep);
  color: #fff;
}

.woocommerce a.button.added::after {
  color: #fff;
}

/* Disabled state stays legible */
.woocommerce button.button:disabled,
.woocommerce button.button.alt.disabled {
  background: var(--ink-soft);
  color: #fff;
  opacity: 1;
}

/* Quantity + inputs */
.woocommerce .quantity .qty,
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select,
.woocommerce-page form .form-row input.input-text {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink-deep);
  padding: 0.7em 0.85em;
}

.woocommerce form .form-row input.input-text:focus,
.woocommerce .quantity .qty:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-glow);
  outline: none;
}

/* Star ratings */
.woocommerce .star-rating span::before,
.woocommerce p.stars a::before {
  color: var(--brand);
}

/* Notices */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
  border-top-color: var(--brand);
  background: var(--surface);
  border-radius: 12px;
  color: var(--ink-deep);
}

.woocommerce-message::before,
.woocommerce-info::before {
  color: var(--brand);
}

.woocommerce-error {
  border-top-color: var(--brand-deep);
}

/* Tabs */
.woocommerce div.product .woocommerce-tabs ul.tabs li.active {
  background: var(--surface);
  border-bottom-color: var(--surface);
}

.woocommerce div.product .woocommerce-tabs ul.tabs li.active a {
  color: var(--brand-deep);
  font-weight: 700;
}

/* Cart / checkout totals */
.woocommerce-cart .cart-collaterals .cart_totals,
.woocommerce-checkout #order_review,
.woocommerce-checkout .woocommerce-checkout-review-order {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.woocommerce-cart table.cart td.actions .coupon .input-text {
  border-radius: var(--radius-pill);
}

/* Progress / stepper accents */
.woocommerce .woocommerce-breadcrumb a {
  color: var(--ink-soft);
}

.woocommerce .woocommerce-breadcrumb a:hover {
  color: var(--brand-deep);
}

/* ==========================================================================
   7. Kadence Blocks accents
   ========================================================================== */

.kt-blocks-accordion-header.kt-accordion-panel-active .kt-blocks-accordion-title-wrap,
.wp-block-kadence-tabs .kt-tabs-title-list li.kt-tab-title-active a {
  color: var(--brand-deep);
}

.kt-blocks-info-box-link-wrap:hover .kt-blocks-info-box-media {
  color: var(--brand);
}

.wp-block-kadence-icon .kt-svg-style-default {
  color: var(--brand);
}

/* ==========================================================================
   8. Motion preference
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ==========================================================================
   9. Homepage layout modules
   ========================================================================== */

/* --- Cinematic hero ------------------------------------------------------ */

.pb-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 3.5rem 24px 4.5rem;
  border-radius: 0 0 28px 28px;
  background-color: var(--ink-deep);
  background-size: cover;
  background-position: center;
  color: #fff;
}

/* Scrim so display type stays legible over any photograph. */
.pb-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(242, 67, 51, 0.22) 0%, transparent 60%),
    linear-gradient(180deg, rgba(30, 26, 25, 0.72) 0%, rgba(30, 26, 25, 0.88) 100%);
}

.pb-hero-eyebrow {
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  margin: 0 0 1.5rem;
}

.pb-hero-title {
  color: #fff;
  font-size: clamp(3rem, 9vw, 7rem);
  font-weight: 800;
  line-height: 0.92;
  letter-spacing: -0.035em;
  text-transform: uppercase;
  margin: 0;
}

/* Pull the grid up under the display type only once the columns sit inline;
   while stacked it would collide with the floating card. */
@media (min-width: 782px) {
  .pb-hero-title {
    margin-bottom: -2rem;
  }
}

/* Outlined second line. Falls back to solid where text-stroke is unsupported. */
.pb-hero-title .pb-outline {
  font-style: italic;
  color: transparent;
  -webkit-text-stroke: 2px rgba(255, 255, 255, 0.85);
}

@supports not ((-webkit-text-stroke: 1px #fff)) {
  .pb-hero-title .pb-outline {
    color: rgba(255, 255, 255, 0.4);
  }
}

/* No z-index here: a stacking context would trap the hero shot's blend mode
   and strip the white out of product PNGs. .pb-hero owns the context. */
.pb-hero-grid {
  position: relative;
  margin-top: 0;
}

/* Specificity has to beat core's `.wp-block-image img { width: 100% }`. */
.pb-hero .pb-hero-stage img {
  filter: drop-shadow(0 30px 60px rgba(0, 0, 0, 0.55));
  max-height: 440px;
  max-width: 100%;
  width: auto;
  margin-inline: auto;
  mix-blend-mode: multiply;
}

.pb-hero-lede {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.9375rem;
  line-height: 1.65;
}

/* Floating price card */
.pb-float-card {
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(14px) saturate(140%);
  border-radius: 16px;
  padding: 0.85rem;
  display: flex;
  gap: 0.85rem;
  align-items: center;
  box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.7);
}

.pb-float-thumb {
  flex: 0 0 56px;
  margin: 0;
}

.pb-float-thumb img {
  width: 56px;
  height: 64px;
  object-fit: contain;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
}

.pb-float-body > * {
  margin: 0;
}

.pb-float-name {
  color: #fff;
  font-weight: 700;
  font-size: 0.8125rem;
  line-height: 1.3;
}

.pb-float-sku {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.625rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 0.15rem;
}

.pb-float-price {
  color: #fff;
  font-weight: 800;
  font-size: 1.0625rem;
  margin-top: 0.35rem;
}

.pb-float-card .wp-block-button__link {
  padding: 0.45em 1.1em;
  font-size: 0.75rem;
  margin-top: 0.4rem;
}

/* --- Section headings ---------------------------------------------------- */

.pb-section-title {
  font-size: clamp(1.6rem, 3.2vw, 2.35rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  text-transform: uppercase;
}

/* --- Built for trust ----------------------------------------------------- */

.pb-trust {
  padding: var(--wp--preset--spacing--60, 5rem) 24px;
  background: var(--surface);
  border-block: 1px solid var(--line);
}

.pb-trust-title {
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  text-transform: uppercase;
  letter-spacing: -0.03em;
  margin: 0.35rem 0 0.75rem;
}

.pb-trust-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1rem;
}

.pb-icon-card {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.25rem;
}

.pb-icon-card h3 {
  margin: 0.85rem 0 0.4rem;
}

.pb-icon-card p {
  margin: 0;
  color: var(--ink-soft);
}

.pb-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--brand-tint);
  color: var(--brand-deep);
}

.pb-icon svg {
  width: 21px;
  height: 21px;
}

/* --- Shop by category ---------------------------------------------------- */

.pb-cats {
  padding: var(--wp--preset--spacing--60, 5rem) 24px;
}

.pb-cats .pb-section-title {
  margin-bottom: 2rem;
}

.pb-cat-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.9rem;
  max-width: 1240px;
  margin-inline: auto;
}

.pb-cat-tile {
  display: grid;
  place-items: center;
  gap: 0.65rem;
  padding: 1.4rem 0.75rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  text-decoration: none;
  text-align: center;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.pb-cat-tile:hover {
  transform: translateY(-3px);
  border-color: rgba(242, 67, 51, 0.4);
  box-shadow: var(--shadow);
}

.pb-cat-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--brand-tint);
  color: var(--brand-deep);
}

.pb-cat-icon svg {
  width: 23px;
  height: 23px;
}

.pb-cat-label {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--ink-deep);
  line-height: 1.3;
}

@media (max-width: 900px) {
  .pb-cat-grid { grid-template-columns: repeat(3, 1fr); }
}

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

/* --- Top selling --------------------------------------------------------- */

.pb-sellers {
  padding: var(--wp--preset--spacing--60, 5rem) 24px;
}

.pb-sellers-head {
  margin-bottom: 2rem;
}

/* Product card furniture (markup comes from the hooks in functions.php) */
.pb-card-media {
  position: relative;
  aspect-ratio: 1;
  border-radius: 14px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: linear-gradient(160deg, var(--cream) 0%, var(--cream-deep) 100%);
}

.pb-card-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  margin: 0;
}

/* Review count sits beside the stars; renders only when there are reviews. */
.woocommerce ul.products li.product .pb-rating {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  color: var(--ink-soft);
}

.pb-countdown {
  position: absolute;
  left: 50%;
  bottom: 0.75rem;
  transform: translateX(-50%);
  display: flex;
  gap: 2px;
  background: rgba(59, 52, 50, 0.9);
  border-radius: 10px;
  padding: 0.4rem 0.5rem;
  backdrop-filter: blur(6px);
}

.pb-countdown span {
  display: grid;
  min-width: 38px;
  text-align: center;
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 800;
  line-height: 1.1;
}

.pb-countdown span small {
  font-size: 0.5rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}

.pb-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.65rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--line);
}

.pb-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.28em;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
}

.pb-chip::before {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--brand-tint);
  border: 1px solid rgba(242, 67, 51, 0.35);
}

/* --- Stats band ---------------------------------------------------------- */

.pb-stats {
  background: var(--ink-deep);
  padding: 3rem 24px;
}

.pb-stats-grid {
  gap: 0;
}

.pb-stats-grid .wp-block-column + .wp-block-column {
  border-left: 1px solid rgba(255, 255, 255, 0.14);
}

.pb-stat-num {
  color: #fff;
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  margin: 0;
}

.pb-stat-label {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0.5rem 0 0;
}

@media (max-width: 781px) {
  .pb-stats-grid .wp-block-column + .wp-block-column {
    border-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    padding-top: 1.5rem;
    margin-top: 1.5rem;
  }
}
