/*
Theme Name: Eighth Supply
Theme URI: https://example.com/eighth-supply
Description: A refined WooCommerce block child theme for a jewelry storefront — necklaces, rings, earrings and bracelets.
Author: Commerce Team
Template: twentytwentyfive
Version: 1.0.0
Text Domain: eightshop
*/

:root {
  --es-ink: #171a18;
  --es-muted: #66706a;
  --es-surface: #f3f5f1;
  --es-panel: #ffffff;
  --es-line: #dce1dc;
  --es-accent: #d6ff4b;
  --es-accent-ink: #182000;
  --es-forest: #1f4236;
  --es-danger: #b42318;
  --es-radius: 6px;
  --es-shadow: 0 14px 34px rgba(20, 34, 27, .08);
}

html { scroll-behavior: smooth; }
body { background: var(--es-surface); color: var(--es-ink); letter-spacing: 0; }
a { text-underline-offset: .2em; }
.es-shell { max-width: 1340px; margin-inline: auto; padding-inline: clamp(18px, 4vw, 52px); }

.es-announcement { background: var(--es-ink); color: #fff; font-size: 12px; letter-spacing: .04em; text-align: center; padding: 9px 16px; }
.es-site-header { background: rgba(255,255,255,.96); border-bottom: 1px solid var(--es-line); position: sticky; top: 0; z-index: 50; backdrop-filter: blur(12px); }
.es-header-row { min-height: 72px; gap: 26px; box-sizing: border-box; max-width: 100%; }
.es-brand a { color: var(--es-ink); font-size: 20px; font-weight: 800; letter-spacing: .08em; text-decoration: none; white-space: nowrap; }
.es-primary-nav { flex: 1; min-width: 0; box-sizing: border-box; }
.es-primary-nav .wp-block-navigation-item__content { color: var(--es-ink); font-size: 14px; font-weight: 600; padding: 10px 4px; text-decoration: none; }
.es-primary-nav .wp-block-navigation-item__content:hover { color: var(--es-forest); }
.es-header-tools { gap: 8px; box-sizing: border-box; max-width: 100%; }
.es-header-tools a { color: var(--es-ink); font-size: 13px; text-decoration: none; white-space: nowrap; }
.es-header-tools .wp-block-search__inside-wrapper { border: 1px solid var(--es-line); border-radius: 999px; padding: 4px 6px 4px 14px; }
.es-header-tools .wp-block-search__input { min-width: 100px; font-size: 13px; }
.es-header-tools .wp-block-search__button { border-radius: 999px; padding: 7px 12px; }

.es-hero { min-height: min(76vh, 760px); position: relative; display: flex; align-items: flex-end; color: #fff; background-image: linear-gradient(90deg, rgba(11,18,14,.78) 0%, rgba(11,18,14,.28) 55%, rgba(11,18,14,.05) 100%), url('./assets/images/jewelry-hero.jpg'); background-position: center; background-size: cover; }
.es-hero-copy { max-width: 650px; padding-block: clamp(76px, 10vw, 138px); }
.es-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.es-hero h1 { color: #fff; font-size: clamp(42px, 6vw, 78px); line-height: .98; margin: 18px 0 22px; max-width: 12ch; }
.es-hero p { color: rgba(255,255,255,.88); font-size: clamp(17px, 2vw, 21px); line-height: 1.55; max-width: 520px; }
.es-button .wp-block-button__link, .single_add_to_cart_button, .checkout-button, #place_order { border-radius: 4px !important; background: var(--es-accent) !important; color: var(--es-accent-ink) !important; font-weight: 800 !important; padding: 14px 22px !important; }
.es-button.is-style-outline .wp-block-button__link { background: transparent !important; color: #fff !important; border: 1px solid rgba(255,255,255,.72) !important; }
.es-hero .wp-block-buttons { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.es-hero .wp-block-button { flex: 0 0 auto; }
.es-hero .wp-block-button__link { display: inline-flex; width: auto; height: auto; min-height: 48px; align-items: center; justify-content: center; line-height: 1.25; }

.es-section { padding-block: clamp(58px, 8vw, 104px); }
.es-section-head { align-items: end; margin-bottom: 30px; }
.es-section-head h2 { font-size: clamp(30px, 4vw, 48px); margin: 6px 0 0; }
.es-section-head p { color: var(--es-muted); max-width: 560px; }
.es-category-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 18px; }
.es-category-card { min-height: 360px; position: relative; overflow: hidden; border-radius: var(--es-radius); background-position: center; background-size: cover; box-shadow: var(--es-shadow); }
.es-category-card::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(10,17,13,.74), rgba(10,17,13,.04) 65%); }
.es-category-card.necklaces { background-image: url('./assets/images/jewelry-necklaces.jpg'); }
.es-category-card.rings { background-image: url('./assets/images/jewelry-rings.jpg'); }
.es-category-card.earrings { background-image: url('./assets/images/jewelry-earrings.jpg'); background-position: 60% center; }
.es-category-card.bracelets { background-image: url('./assets/images/jewelry-bracelets.jpg'); background-position: 70% center; }
.es-category-card a { color: #fff; display: flex; flex-direction: column; justify-content: flex-end; min-height: inherit; padding: 26px; position: relative; z-index: 1; text-decoration: none; }
.es-category-card strong { font-size: 28px; }
.es-category-card span { color: rgba(255,255,255,.82); margin-top: 6px; }

.es-trust { background: var(--es-forest); color: #fff; }
.es-trust-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 24px; padding-block: 32px; }
.es-trust-item strong { display: block; font-size: 15px; }
.es-trust-item span { color: rgba(255,255,255,.68); font-size: 13px; }

.woocommerce .products, .wp-block-woocommerce-product-template { gap: clamp(18px, 3vw, 32px) !important; }
.woocommerce ul.products li.product, .wp-block-woocommerce-product-template .wc-block-product { background: var(--es-panel); border: 1px solid var(--es-line); border-radius: var(--es-radius); overflow: hidden; padding: 0 0 18px !important; transition: transform .2s ease, box-shadow .2s ease; }
.woocommerce ul.products li.product:hover, .wp-block-woocommerce-product-template .wc-block-product:hover { box-shadow: var(--es-shadow); transform: translateY(-3px); }
.woocommerce ul.products li.product img { aspect-ratio: 4/5; object-fit: cover; background: #e8ebe7; margin-bottom: 16px !important; }
.woocommerce ul.products li.product .woocommerce-loop-product__title, .woocommerce ul.products li.product .price { padding-inline: 16px !important; text-align: left !important; }
.woocommerce ul.products li.product .button { margin-left: 16px !important; border-radius: 4px; }
.woocommerce .woocommerce-breadcrumb { color: var(--es-muted); font-size: 12px; letter-spacing: .02em; margin: 26px 0; }
.woocommerce-products-header__title, .woocommerce .page-title { font-size: clamp(38px, 5vw, 64px); line-height: 1.02; }
.woocommerce div.product { padding-block: clamp(30px, 5vw, 72px); }
.woocommerce div.product div.images img { background: #e8ebe7; border-radius: var(--es-radius); }
.woocommerce div.product .summary h1 { font-size: clamp(34px, 4vw, 56px); line-height: 1.05; }
.woocommerce div.product p.price { color: var(--es-forest); font-size: 26px; font-weight: 700; }
.woocommerce div.product form.cart .variations select { border: 1px solid var(--es-line); border-radius: 4px; min-height: 44px; padding: 8px 12px; }
.woocommerce div.product .woocommerce-tabs { margin-top: 50px; }

.es-footer { background: var(--es-ink); color: #fff; margin-top: 80px; padding-block: 60px 28px; }
.es-footer a { color: rgba(255,255,255,.76); text-decoration: none; }
.es-footer a:hover { color: #fff; }
.es-footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3,1fr); gap: 42px; }
.es-footer h3, .es-footer h4 { color: #fff; margin-top: 0; }
.es-footer p { color: rgba(255,255,255,.65); font-size: 14px; }
.es-footer-list { list-style: none; margin: 0; padding: 0; }
.es-footer-list li { margin: 9px 0; }
.es-footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 42px; padding-top: 22px; color: rgba(255,255,255,.55); font-size: 12px; }

.woocommerce-cart .wp-block-post-title, .woocommerce-checkout .wp-block-post-title { font-size: clamp(34px,5vw,56px); }
.woocommerce-cart main, .woocommerce-checkout main, .woocommerce-account main { max-width: 1180px; margin-inline: auto; }

@media (max-width: 900px) {
  .es-header-row { min-height: 64px; flex-wrap: wrap !important; }
  .es-brand { flex-shrink: 0; max-width: 100%; box-sizing: border-box; }
  .es-header-tools { margin-left: auto; min-width: 0; flex-shrink: 0; max-width: 100%; box-sizing: border-box; }
  .es-primary-nav { order: 3; flex-basis: 100%; min-width: 0; max-width: 100%; box-sizing: border-box; }
  .es-header-tools .wp-block-search { display: none; }
  .es-category-grid { grid-template-columns: 1fr 1fr; }
  .es-category-card:first-child { grid-column: 1/-1; }
  .es-trust-grid { grid-template-columns: 1fr 1fr; }
  .es-footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  body { --wp--style--root--padding-left: 18px; --wp--style--root--padding-right: 18px; }
  .es-header-row { gap: 12px; }
  .es-hero { min-height: 660px; background-position: 64% center; }
  .es-hero h1 { font-size: 44px; }
  .es-hero .wp-block-buttons { flex-direction: column; align-items: flex-start; }
  .es-category-grid { grid-template-columns: 1fr; }
  .es-category-card:first-child { grid-column: auto; }
  .es-category-card { min-height: 300px; }
  .es-trust-grid, .es-footer-grid { grid-template-columns: 1fr; }
  .woocommerce ul.products.columns-3 { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
.single_add_to_cart_button:disabled { opacity: .46 !important; cursor: not-allowed !important; filter: grayscale(.4); }
.es-variation-hint { color: var(--es-danger); font-size: 13px; margin: 0 0 10px; min-height: 1.4em; }
@media (max-width: 600px) {
  .single-product form.cart { background: rgba(255,255,255,.96); border-top: 1px solid var(--es-line); bottom: 0; margin-inline: -18px; padding: 14px 18px; position: sticky; z-index: 30; backdrop-filter: blur(10px); }
  .single-product form.cart .single_add_to_cart_button { width: 100%; }
}

.es-category-grid-four { grid-template-columns: repeat(4, minmax(0,1fr)); }
.es-category-card.bracelets { background-image: url('./assets/images/jewelry-bracelets.jpg'); background-position: 35% center; }


/* Language Switcher */
.es-lang-switcher { display: flex; align-items: center; gap: 6px; margin-right: 16px; font-size: 13px; }
.es-lang-switcher a { color: var(--es-muted); text-decoration: none; padding: 4px 8px; border-radius: 4px; transition: all 0.2s ease; }
.es-lang-switcher a:hover { color: var(--es-ink); background: var(--es-surface); }
.es-lang-switcher a.active { color: var(--es-ink); font-weight: 700; background: var(--es-accent); }
.es-lang-separator { color: var(--es-line); }
@media (max-width: 600px) { .es-lang-switcher { margin-right: 8px; font-size: 12px; } }

/* Header Icon Links (Account / Cart) */
.es-icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  color: var(--es-ink);
  text-decoration: none;
  border-radius: var(--es-radius);
  transition: background-color 0.2s ease, color 0.2s ease;
  position: relative;
}
.es-icon-link:hover,
.es-icon-link:focus-visible {
  background: var(--es-surface);
  color: var(--es-forest);
}
.es-icon-link:focus-visible {
  outline: 2px solid var(--es-forest);
  outline-offset: 2px;
}
.es-icon-link svg {
  display: block;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  stroke: currentColor;
}

/* Cart count badge */
.es-cart-count {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: var(--es-forest);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  border-radius: 999px;
  pointer-events: none;
  box-sizing: border-box;
}
.es-cart-count--empty {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Prevent Woo mini-cart styles from hiding our custom icons */
.es-header-tools .es-icon-link,
.es-header-tools .es-cart-link {
  display: inline-flex !important;
  visibility: visible !important;
  opacity: 1 !important;
}

@media (max-width: 600px) {
  .es-icon-link {
    width: 44px;
    height: 44px;
  }
}

/* Contact Form */
.es-contact-form-wrap { max-width: 720px; margin: 0 auto; }
.es-contact-form { display: flex; flex-direction: column; gap: 20px; }
.es-cf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.es-cf-field { display: flex; flex-direction: column; gap: 6px; }
.es-cf-field label { font-size: 14px; font-weight: 600; color: var(--es-ink); }
.es-cf-field label span[aria-hidden="true"] { color: var(--es-danger); }
.es-cf-field input,
.es-cf-field select,
.es-cf-field textarea { border: 1px solid var(--es-line); border-radius: var(--es-radius); padding: 10px 14px; font-size: 15px; font-family: inherit; color: var(--es-ink); background: var(--es-panel); transition: border-color 0.2s ease, box-shadow 0.2s ease; }
.es-cf-field input:focus,
.es-cf-field select:focus,
.es-cf-field textarea:focus { outline: none; border-color: var(--es-forest); box-shadow: 0 0 0 3px rgba(31, 66, 54, 0.12); }
.es-cf-field textarea { resize: vertical; min-height: 120px; }
.es-cf-err { font-size: 13px; color: var(--es-danger); min-height: 1.2em; }
.es-cf-button { background: var(--es-accent); color: var(--es-accent-ink); border: none; border-radius: 4px; font-weight: 800; font-size: 16px; padding: 14px 28px; cursor: pointer; transition: background 0.2s ease; }
.es-cf-button:hover { background: #c4ed38; }
.es-cf-button:focus { outline: 2px solid var(--es-forest); outline-offset: 2px; }
.es-cf-status { padding: 16px 20px; border-radius: var(--es-radius); margin-bottom: 24px; font-size: 15px; }
.es-cf-success { background: #e8f5e9; color: #2e7d32; border: 1px solid #a5d6a7; }
.es-cf-error { background: #fbe9e7; color: var(--es-danger); border: 1px solid #ef9a9a; }
.es-cf-unavailable { padding: 20px; background: var(--es-surface); border-radius: var(--es-radius); text-align: center; color: var(--es-muted); }
.es-cf-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 600px) {
  .es-cf-row { grid-template-columns: 1fr; }
}

/* Contact Page Quick Links */
.es-contact-quick-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.es-contact-ql { display: flex; flex-direction: column; gap: 6px; padding: 20px; background: var(--es-panel); border: 1px solid var(--es-line); border-radius: var(--es-radius); text-decoration: none; color: var(--es-ink); transition: box-shadow 0.2s ease, transform 0.2s ease; }
.es-contact-ql:hover { box-shadow: var(--es-shadow); transform: translateY(-2px); }
.es-contact-ql strong { font-size: 16px; }
.es-contact-ql span { font-size: 14px; color: var(--es-muted); }
.es-contact-reply-note { text-align: center; color: var(--es-muted); font-size: 14px; margin-bottom: 24px; }
@media (max-width: 600px) {
  .es-contact-quick-links { grid-template-columns: 1fr; }
}

/* About Page */
.es-about-hero { text-align: center; }
.es-about-hero h2 { font-size: clamp(28px, 4vw, 42px); margin: 12px 0 20px; }
.es-about-intro { max-width: 680px; margin: 0 auto; color: var(--es-muted); font-size: clamp(16px, 1.8vw, 19px); line-height: 1.65; }
.es-about-principles h2 { text-align: center; margin-bottom: 32px; }
.es-about-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.es-about-card { background: var(--es-panel); border: 1px solid var(--es-line); border-radius: var(--es-radius); padding: 28px; }
.es-about-card h3 { font-size: 18px; margin: 0 0 10px; color: var(--es-forest); }
.es-about-card p { margin: 0; color: var(--es-muted); font-size: 15px; line-height: 1.6; }
.es-about-cta h2 { margin-bottom: 12px; }
.es-about-cta p { max-width: 560px; margin: 0 auto 28px; color: var(--es-muted); }
@media (max-width: 600px) {
  .es-about-grid { grid-template-columns: 1fr; }
}



/* Product card button: force single-line text and clean sizing */
body .woocommerce ul.products li.product a.button,
body .woocommerce ul.products li.product button,
body .wp-block-woocommerce-product-template .wc-block-product a.button,
body .wp-block-woocommerce-product-template .wc-block-product button {
  white-space: nowrap !important;
  display: inline-block !important;
  overflow: visible !important;
  padding: 10px 18px !important;
  margin: 8px 16px 0 !important;
  width: auto !important;
  min-width: 0 !important;
  min-height: 42px !important;
  line-height: 1.3 !important;
  text-align: center !important;
  box-sizing: border-box !important;
}
/* 404 Page */
.es-404-hero {
  text-align: center;
  padding: clamp(40px, 8vw, 80px) 0 clamp(20px, 4vw, 40px);
}
.es-404-code {
  font-size: clamp(100px, 18vw, 180px);
  font-weight: 800;
  line-height: 0.85;
  color: var(--es-accent);
  margin-bottom: 20px;
  letter-spacing: -0.03em;
}
.es-404-title {
  font-size: clamp(28px, 5vw, 48px);
  color: var(--es-ink);
  margin-bottom: 16px;
}
.es-404-text {
  font-size: clamp(15px, 2vw, 18px);
  color: var(--es-muted);
  max-width: 520px;
  margin: 0 auto 32px;
  line-height: 1.6;
}
.es-404-search {
  max-width: 480px;
  margin: 0 auto 28px;
}
.es-404-search form {
  display: flex;
  gap: 8px;
}
.es-404-search-input {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid var(--es-line);
  border-radius: var(--es-radius);
  font-size: 16px;
  color: var(--es-ink);
  background: var(--es-panel);
  outline: none;
  transition: border-color 0.2s ease;
}
.es-404-search-input:focus {
  border-color: var(--es-forest);
}
.es-404-search-btn {
  background: var(--es-forest);
  color: #fff;
  border: none;
  padding: 12px 24px;
  border-radius: var(--es-radius);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}
.es-404-search-btn:hover {
  background: var(--es-accent);
  color: var(--es-accent-ink);
}
.es-404-links {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
.es-404-link {
  display: inline-block;
  padding: 12px 28px;
  border-radius: var(--es-radius);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}
.es-404-link:first-child {
  background: var(--es-forest);
  color: #fff;
}
.es-404-link:first-child:hover {
  background: var(--es-accent);
  color: var(--es-accent-ink);
}
.es-404-link-secondary {
  background: transparent;
  border: 2px solid var(--es-line);
  color: var(--es-ink);
}
.es-404-link-secondary:hover {
  border-color: var(--es-forest);
}
.es-404-section-title {
  text-align: center;
  font-size: clamp(22px, 3vw, 32px);
  color: var(--es-ink);
  margin-bottom: 8px;
}
.es-404-section-sub {
  text-align: center;
  color: var(--es-muted);
  font-size: 15px;
  margin-bottom: 24px;
}
@media (max-width: 600px) {
  .es-404-search form { flex-direction: column; }
  .es-404-search-btn { width: 100%; }
  .es-404-links { flex-direction: column; }
  .es-404-link { width: 100%; text-align: center; }
}
