/**
 * ÉTHÉRÉ — WooCommerce shop styling
 * Brand: #94c573 | Headings: Ivy Mode | Body: Libre Franklin
 * Load after WooCommerce & Elementor CSS (priority 25+).
 */

:root {
  --ethere-green: #94c573;
  --ethere-green-dark: #7aad5a;
  --ethere-green-soft: rgba(148, 197, 115, 0.12);
  --ethere-text: #1a1a1a;
  --ethere-text-muted: #5c5c5c;
  --ethere-border: #e8e8e8;
  --ethere-white: #ffffff;
  --ethere-font-heading:
    "Ivy Mode", "Cormorant Garamond", "Playfair Display", Georgia, serif;
  --ethere-font-body:
    "Libre Franklin", system-ui, -apple-system, Segoe UI, sans-serif;
}

/* Ivy Mode is often loaded via Adobe Fonts / Elementor Custom Fonts — fallbacks above apply */

body.woocommerce-page,
body.post-type-archive-product,
body.tax-product_cat {
  color: var(--ethere-text);
  font-family: var(--ethere-font-body);
  font-size: 16px;
  line-height: 1.6;
}

body.woocommerce-page .woocommerce-breadcrumb,
body.woocommerce-page .woocommerce-result-count,
body.woocommerce-page .woocommerce-ordering {
  font-family: var(--ethere-font-body);
  font-size: 0.9rem;
  color: var(--ethere-text-muted);
}

/* Page title (if theme prints it) */
body.woocommerce-page .woocommerce-products-header__title,
body.woocommerce-page h1.page-title {
  font-family: var(--ethere-font-heading);
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--ethere-text);
  margin-bottom: 0.5rem;
}

/* Product grid */
body.woocommerce ul.products {
  margin-top: 2rem;
}

body.woocommerce ul.products li.product {
  background: var(--ethere-white);
  border: 1px solid var(--ethere-border);
  border-radius: 12px;
  padding: 1rem 1rem 1.25rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.04);
  transition:
    box-shadow 0.25s ease,
    border-color 0.25s ease;
}

body.woocommerce ul.products li.product:hover {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
  border-color: rgba(148, 197, 115, 0.35);
}

body.woocommerce ul.products li.product .woocommerce-loop-product__title,
body.woocommerce ul.products li.product h2.woocommerce-loop-product__title {
  font-family: var(--ethere-font-heading);
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--ethere-text);
  padding-top: 0.75rem;
  line-height: 1.35;
}

body.woocommerce ul.products li.product .price {
  font-family: var(--ethere-font-body);
  color: var(--ethere-green-dark);
  font-weight: 600;
  font-size: 0.95rem;
}

body.woocommerce ul.products li.product .button,
body.woocommerce ul.products li.product a.button {
  font-family: var(--ethere-font-body);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: transparent !important;
  color: var(--ethere-text) !important;
  border: 1px solid var(--ethere-text) !important;
  border-radius: 0;
  padding: 0.65rem 1.25rem;
  margin-top: 0.75rem;
  transition:
    background 0.2s,
    color 0.2s,
    border-color 0.2s;
}

body.woocommerce ul.products li.product .button:hover,
body.woocommerce ul.products li.product a.button:hover {
  background: var(--ethere-green) !important;
  border-color: var(--ethere-green) !important;
  color: var(--ethere-white) !important;
}

/* Sale badge */
body.woocommerce span.onsale {
  background: var(--ethere-green) !important;
  color: var(--ethere-white) !important;
  font-family: var(--ethere-font-body);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  border-radius: 0;
  min-height: auto;
  line-height: 1;
  padding: 0.4rem 0.6rem;
}

/* Pagination — brand green borders & focus (override theme/Woo default blue) */
body.woocommerce nav.woocommerce-pagination ul,
body.woocommerce nav.woocommerce-pagination ul li {
  border: none;
}

body.woocommerce nav.woocommerce-pagination ul li a,
body.woocommerce nav.woocommerce-pagination ul li span {
  font-family: var(--ethere-font-body);
  border: 1px solid var(--ethere-green) !important;
  color: var(--ethere-text);
  background: var(--ethere-white);
  min-width: 2.25rem;
  text-align: center;
}

body.woocommerce nav.woocommerce-pagination ul li a:hover {
  background: var(--ethere-green-soft);
  color: var(--ethere-text);
  border-color: var(--ethere-green-dark) !important;
}

body.woocommerce nav.woocommerce-pagination ul li span.current,
body.woocommerce nav.woocommerce-pagination ul li a:focus,
body.woocommerce nav.woocommerce-pagination ul li a:focus-visible {
  background: var(--ethere-green-soft) !important;
  border-color: var(--ethere-green) !important;
  color: var(--ethere-text);
  outline: none;
  box-shadow: 0 0 0 2px var(--ethere-green-soft);
}

body.woocommerce nav.woocommerce-pagination ul li a:focus-visible {
  outline: 2px solid var(--ethere-green);
  outline-offset: 2px;
}

/* Alternate markup: plain .page-numbers links (some themes) */
body.ethere-woo-brand.woocommerce-page .woocommerce-pagination a.page-numbers,
body.ethere-woo-brand.woocommerce-page
  .woocommerce-pagination
  span.page-numbers {
  border: 1px solid var(--ethere-green) !important;
  color: var(--ethere-text);
}

body.ethere-woo-brand.woocommerce-page
  .woocommerce-pagination
  a.page-numbers:hover,
body.ethere-woo-brand.woocommerce-page .woocommerce-pagination span.current {
  background: var(--ethere-green-soft);
  border-color: var(--ethere-green-dark) !important;
}

/* Sidebar / filter widgets (classic + block widgets) */
body.woocommerce .widget-area .widget,
body.woocommerce .wp-block-woocommerce-filter-active,
body.woocommerce .wc-block-product-filter {
  font-family: var(--ethere-font-body);
}

body.woocommerce .widget-area .widget-title,
body.woocommerce .wp-block-heading {
  font-family: var(--ethere-font-heading);
  font-size: 1.1rem;
  color: var(--ethere-text);
  border-bottom: 2px solid var(--ethere-green);
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}

body.woocommerce .widget_layered_nav ul li a,
body.woocommerce .wc-block-checkbox-list__label {
  color: var(--ethere-text-muted);
}

body.woocommerce .widget_layered_nav ul li.chosen a,
body.woocommerce .widget_layered_nav ul li a:hover {
  color: var(--ethere-green-dark);
}

/* WooCommerce Blocks filter chips */
body.woocommerce .wc-block-components-chip {
  border-radius: 999px;
  border-color: var(--ethere-border);
}

body.woocommerce .wc-block-components-chip.is-selected {
  background: var(--ethere-green-soft);
  border-color: var(--ethere-green);
}

/* --- Shortcode: Shop by diamond shape row --- */
.ethere-shop-by-shape {
  max-width: 1200px;
  margin: 0 auto 2.5rem;
  padding: 0 1rem;
  text-align: center;
}

.ethere-shop-by-shape__title {
  font-family: var(--ethere-font-heading);
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 400;
  color: var(--ethere-text);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 0.5rem;
}

.ethere-shop-by-shape__subtitle {
  font-family: var(--ethere-font-body);
  font-size: 0.85rem;
  color: var(--ethere-green-dark);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin: 0 0 1.75rem;
}

.ethere-shop-by-shape__grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem 1.25rem;
}

.ethere-cut-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 88px;
  text-decoration: none;
  color: var(--ethere-text-muted);
  padding: 0.5rem 0.35rem;
  border-radius: 10px;
  transition:
    background 0.2s,
    color 0.2s,
    transform 0.2s;
}

.ethere-cut-item:hover,
.ethere-cut-item:focus-visible {
  background: var(--ethere-green-soft);
  color: var(--ethere-text);
  outline: none;
}

.ethere-cut-item.is-active {
  color: var(--ethere-green-dark);
  background: var(--ethere-green-soft);
}

.ethere-cut-item__icon {
  width: 56px;
  height: 56px;
  margin-bottom: 0.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ethere-cut-item__icon svg {
  width: 48px;
  height: 48px;
  stroke: var(--ethere-green);
  stroke-width: 1.5;
  fill: none;
}

.ethere-cut-item__icon .ethere-cut-item__img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.ethere-cut-item:hover .ethere-cut-item__icon svg,
.ethere-cut-item.is-active .ethere-cut-item__icon svg {
  stroke: var(--ethere-green-dark);
}

.ethere-cut-item__label {
  font-family: var(--ethere-font-body);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-align: center;
  line-height: 1.2;
}

@media (min-width: 768px) {
  .ethere-cut-item {
    width: 96px;
  }
}

/* Shop archive: filters left, products right (below diamond row) */
.ethere-shop-archive-grid--with-filters {
  display: grid;
  grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
  gap: 2rem 2.5rem;
  align-items: start;
  width: 100%;
}

.ethere-shop-archive-grid--no-filters {
  display: block;
}

.ethere-shop-filters-aside {
  font-family: var(--ethere-font-body);
  position: sticky;
  top: 1rem;
  align-self: start;
}

.ethere-shop-filters-aside .widget {
  margin-bottom: 1.5rem;
}

.ethere-shop-filters-aside .widget-title {
  font-family: var(--ethere-font-heading);
  font-size: 1.1rem;
  border-bottom: 2px solid var(--ethere-green);
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}

.ethere-shop-loop-main {
  min-width: 0;
}

body.woocommerce .ethere-shop-loop-main ul.products {
  margin-top: 0;
}

body.woocommerce .ethere-shop-loop-main ul.products.columns-3,
body.woocommerce .ethere-shop-loop-main ul.products {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem !important;
}

body.woocommerce .ethere-shop-loop-main ul.products li.product {
  width: auto !important;
  max-width: none !important;
}

@media (max-width: 992px) {
  body.woocommerce .ethere-shop-loop-main ul.products {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 600px) {
  .ethere-shop-archive-grid--with-filters {
    grid-template-columns: 1fr;
  }

  .ethere-shop-filters-aside {
    position: static;
  }

  body.woocommerce .ethere-shop-loop-main ul.products {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

/* --- Category page hero banner --- */
.ethere-category-banner {
  position: relative;
  width: 100%;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;
  border-radius: 12px;
  overflow: hidden;
}

.ethere-category-banner--no-image {
  min-height: 180px;
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
}

.ethere-category-banner__overlay {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 2.5rem 2rem;
  width: 100%;
}

.ethere-category-banner--no-image .ethere-category-banner__overlay {
  background: transparent;
}

.ethere-category-banner__title {
  font-family: var(--ethere-font-heading);
  font-weight: 400;
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  color: var(--ethere-white);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 0.5rem;
}

.ethere-category-banner__desc {
  font-family: var(--ethere-font-body);
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.85);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

@media (max-width: 600px) {
  .ethere-category-banner {
    min-height: 200px;
    border-radius: 0;
    margin-bottom: 1.5rem;
  }
  .ethere-category-banner__overlay {
    padding: 1.5rem 1rem;
  }
}

/* ==========================================================================
   WooCommerce price slider filter
   ========================================================================== */

.wc-block-product-filter-price-slider__content {
  padding: 0.5rem 0;
}

.wc-block-product-filter-price-slider__range {
  position: relative;
  height: 4px;
  margin: 1.25rem 0 1.5rem;
  background: #ececec;
  border-radius: 2px;
}

.wc-block-product-filter-price-slider__range .range-bar {
  position: absolute;
  top: 0;
  height: 4px;
  border-radius: 2px;
  background: var(--ethere-green, #94c573) !important;
  left: var(--low, 0%) !important;
  width: calc(var(--high, 100%) - var(--low, 0%)) !important;
  z-index: 1;
}

.wc-block-product-filter-price-slider__range input[type="range"] {
  -webkit-appearance: none !important;
  appearance: none !important;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  left: 0;
  width: 100%;
  height: 20px;
  margin: 0;
  padding: 0;
  background: transparent !important;
  pointer-events: none;
  z-index: 3;
  outline: none;
}

.wc-block-product-filter-price-slider__range input[type="range"]::-webkit-slider-runnable-track {
  -webkit-appearance: none !important;
  appearance: none !important;
  background: transparent !important;
  border: none !important;
  height: 4px;
  box-shadow: none !important;
}

.wc-block-product-filter-price-slider__range input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none !important;
  appearance: none !important;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--ethere-white, #fff) !important;
  border: 2px solid var(--ethere-green, #94c573) !important;
  cursor: pointer;
  pointer-events: all;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
  margin-top: -7px;
  position: relative;
  z-index: 4;
}

.wc-block-product-filter-price-slider__range input[type="range"]::-webkit-slider-thumb:hover {
  border-color: var(--ethere-green-dark, #7aad5a) !important;
  box-shadow: 0 0 0 4px var(--ethere-green-soft, rgba(148, 197, 115, 0.15));
}

.wc-block-product-filter-price-slider__range input[type="range"]::-moz-range-track {
  background: transparent !important;
  border: none !important;
  height: 4px;
  box-shadow: none !important;
}

.wc-block-product-filter-price-slider__range input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--ethere-white, #fff) !important;
  border: 2px solid var(--ethere-green, #94c573) !important;
  cursor: pointer;
  pointer-events: all;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.wc-block-product-filter-price-slider__left,
.wc-block-product-filter-price-slider__right {
  display: inline-block;
}

.wc-block-product-filter-price-slider__left input,
.wc-block-product-filter-price-slider__right input {
  border: 1px solid var(--ethere-border, #e8e8e8);
  border-radius: 6px;
  padding: 0.4rem 0.6rem;
  font-family: var(--ethere-font-body);
  font-size: 0.85rem;
  color: var(--ethere-text);
  text-align: center;
  width: 90px;
  outline: none;
  transition: border-color 0.2s;
}

.wc-block-product-filter-price-slider__left input:focus,
.wc-block-product-filter-price-slider__right input:focus {
  border-color: var(--ethere-green, #94c573);
}

/* Notices */
body.woocommerce .woocommerce-message,
body.woocommerce .woocommerce-info {
  border-top-color: var(--ethere-green);
  font-family: var(--ethere-font-body);
}

body.woocommerce .woocommerce-message::before,
body.woocommerce .woocommerce-info::before {
  color: var(--ethere-green-dark);
}

/* ==========================================================================
   [ethere_featured_products] shortcode — product cards
   ========================================================================== */

.ethere-fp__heading {
  font-family: var(--ethere-font-heading);
  font-weight: 400;
  font-size: clamp(1.3rem, 3vw, 1.7rem);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-align: center;
  color: var(--ethere-text);
  margin: 0 0 1.75rem;
}

.ethere-fp {
  display: grid;
  grid-template-columns: repeat(var(--ethere-fp-cols, 3), 1fr);
  gap: 1.5rem;
}

.ethere-fp__card {
  background: var(--ethere-white, #fff);
  border: 1px solid var(--ethere-border, #e8e8e8);
  border-radius: 12px;
  overflow: hidden;
  transition: box-shadow 0.25s, border-color 0.25s;
}

.ethere-fp__card:hover {
  border-color: rgba(148, 197, 115, 0.35);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.06);
}

.ethere-fp__image-link {
  display: block;
  padding: 1.25rem 1.25rem 0;
}

.ethere-fp__img {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
  display: block;
  border-radius: 8px;
  background: #fafafa;
}

.ethere-fp__info {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 1rem 1.25rem 1.15rem;
  gap: 0.75rem;
}

.ethere-fp__meta {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.ethere-fp__title {
  font-family: var(--ethere-font-heading);
  font-weight: 400;
  font-size: 0.95rem;
  color: var(--ethere-text);
  text-decoration: none;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ethere-fp__title:hover {
  color: var(--ethere-green-dark, #7aad5a);
}

.ethere-fp__price {
  font-family: var(--ethere-font-body);
  font-size: 0.82rem;
  color: var(--ethere-text-muted);
}

.ethere-fp__price del {
  opacity: 0.5;
  margin-right: 0.3em;
}

.ethere-fp__price ins {
  text-decoration: none;
  color: var(--ethere-green-dark, #7aad5a);
}

.ethere-fp__add {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--ethere-border, #e8e8e8);
  background: var(--ethere-white, #fff);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  text-decoration: none;
}

.ethere-fp__add svg {
  width: 16px;
  height: 16px;
  stroke: var(--ethere-green, #94c573);
  stroke-width: 2;
  stroke-linecap: round;
  fill: none;
  transition: stroke 0.2s;
}

.ethere-fp__add:hover {
  background: var(--ethere-green, #94c573);
  border-color: var(--ethere-green, #94c573);
}

.ethere-fp__add:hover svg {
  stroke: var(--ethere-white, #fff);
}

.ethere-fp__add.added::after {
  content: none !important;
}

.ethere-fp__add.loading {
  opacity: 0.6;
}

@media (max-width: 768px) {
  .ethere-fp {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
}

@media (max-width: 480px) {
  .ethere-fp {
    grid-template-columns: 1fr;
  }
}
