/* ============================================================
   ECOGEN DECK — Global Design System
   ChatGPT preview implementation
   Loaded via astra-child functions.php
   ============================================================ */

/* ── RESET & BASE ── */
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  color: #2f4034;
  background: #fff;
  font: 15px/1.65 -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-underline-offset: 5px; }
button, input, select { font: inherit; }
a:focus-visible, button:focus-visible { outline: 3px solid #b69970; outline-offset: 5px; }

/* ── LAYOUT WRAPPER ── */
.ecd-wrap, .woocommerce .ecd-wrap { max-width: 1240px; margin: auto; padding: 0 36px; }

/* ── TYPOGRAPHY ── */
.ecd-eyebrow {
  font-size: 10px; font-weight: 600; letter-spacing: 2px;
  text-transform: uppercase; color: #809074; display: block; margin-bottom: 6px;
}
h1.ecd-h1 { font-size: clamp(38px, 5vw, 62px); font-weight: 450; letter-spacing: -2.5px; line-height: 1.08; margin: 20px 0; color: #2f4034; }
h2.ecd-h2 { font-size: clamp(26px, 3.5vw, 34px); font-weight: 450; letter-spacing: -1px; line-height: 1.2; margin: 10px 0; color: #2f4034; }
h3.ecd-h3 { font-size: 19px; font-weight: 500; letter-spacing: -0.4px; margin: 14px 0 5px; }

/* ── BUTTONS ── */
.ecd-btn-primary {
  display: inline-block; border: 0; border-radius: 5px;
  padding: 12px 22px; background: #36513d; color: #fff !important;
  text-decoration: none; font-size: 13px; font-weight: 500;
  cursor: pointer; transition: background 0.2s;
}
.ecd-btn-primary:hover { background: #2a3f2f; }
.ecd-btn-outline {
  border: 1px solid #ccd5c5; border-radius: 5px;
  padding: 10px 18px; text-decoration: none;
  display: inline-block; background: #fff; font-size: 13px;
  transition: border-color 0.2s;
}
.ecd-btn-outline:hover { border-color: #809074; }

/* ── HIDE WC DEFAULT UI — we replace with our own ── */
.ecd-category-page .woocommerce-products-header,
.ecd-category-page .woocommerce-ordering,
.ecd-category-page .woocommerce-result-count,
.ecd-category-page nav.woocommerce-pagination,
.ecd-category-page ul.products,
.ecd-product-page .woocommerce-breadcrumb,
.ecd-product-page .woocommerce div.product,
.ecd-product-page .up-sells,
.ecd-product-page .related,
body.single-product .ast-woocommerce-container > :not(.ecd-product-wrap) { display: none !important; }

/* ── ASTRA OVERRIDES — remove padding/sidebar conflicts ── */
.ecd-category-page #primary,
.ecd-product-page #primary { width: 100% !important; padding: 0 !important; }
.ecd-category-page .ast-container,
.ecd-product-page .ast-container { max-width: 100% !important; padding: 0 !important; }
.ecd-category-page #content,
.ecd-product-page #content { padding: 0 !important; }

/* ── CATEGORY PAGE ── */
.ecd-cat-header {
  border-bottom: 1px solid #e6eadf;
  padding: 48px 0 36px;
}
.ecd-cat-header-inner {
  max-width: 1240px; margin: auto; padding: 0 36px;
  display: flex; justify-content: space-between; align-items: flex-end; gap: 32px;
}
.ecd-cat-title { font-size: clamp(32px,4vw,52px); font-weight: 450; letter-spacing: -2px; line-height: 1.1; margin: 10px 0 0; }
.ecd-cat-desc { font-size: 14px; color: #7a8570; max-width: 380px; margin: 0; }
.ecd-filter-bar {
  max-width: 1240px; margin: 0 auto; padding: 20px 36px;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  border-bottom: 1px solid #e6eadf;
}
.ecd-search {
  border: 1px solid #ccd5c5; border-radius: 5px;
  padding: 9px 14px; font-size: 13px; width: 220px;
  background: #fff; color: #2f4034;
}
.ecd-search:focus { outline: 2px solid #b69970; border-color: transparent; }
.ecd-filters { display: flex; gap: 8px; flex-wrap: wrap; }
.ecd-filter-btn {
  border: 1px solid #ccd5c5; border-radius: 4px; background: #fff;
  padding: 8px 16px; font-size: 12px; cursor: pointer; transition: all 0.15s; color: #2f4034;
}
.ecd-filter-btn:hover, .ecd-filter-btn[aria-pressed="true"] {
  background: #36513d; color: #fff; border-color: #36513d;
}
.ecd-result-count { margin-left: auto; font-size: 12px; color: #7e8a70; }
.ecd-products-body { max-width: 1240px; margin: 0 auto; padding: 36px 36px 80px; }
.ecd-section-heading {
  font-size: 12px; font-weight: 600; letter-spacing: 1.5px;
  text-transform: uppercase; color: #809074;
  padding: 24px 0 14px; border-bottom: 1px solid #e6eadf; margin-bottom: 24px;
}
.ecd-collection-section { margin-bottom: 56px; }
.ecd-products-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 22px;
}
.ecd-card {
  background: none; border: none; padding: 0; cursor: pointer; text-align: left;
}
.ecd-card-img {
  background: #f1f2ec; border-radius: 8px; overflow: hidden;
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
}
.ecd-card-img img { width: 100%; height: 100%; object-fit: contain; transition: transform 0.25s; display: block; }
.ecd-card:hover .ecd-card-img img { transform: scale(1.04); }
.ecd-card-name { font-size: 15px; font-weight: 500; letter-spacing: -0.3px; margin: 14px 0 3px; color: #2f4034; }
.ecd-card-sub { font-size: 12px; color: #7a8570; }
.ecd-empty { text-align: center; padding: 80px 0; color: #7e8a70; font-size: 14px; }

/* Product modal (dialog) */
.ecd-modal { border: none; border-radius: 10px; padding: 0; max-width: 520px; width: 90%; box-shadow: 0 12px 48px rgba(0,0,0,0.15); }
.ecd-modal::backdrop { background: rgba(0,0,0,0.45); }
.ecd-modal-inner { padding: 36px; }
.ecd-modal img { width: 100%; border-radius: 6px; background: #f1f2ec; aspect-ratio:1; object-fit:contain; }
.ecd-modal-name { font-size: 22px; font-weight: 450; letter-spacing: -0.5px; margin: 18px 0 4px; }
.ecd-modal-cat { font-size: 11px; color: #809074; letter-spacing: 1.5px; text-transform: uppercase; }
.ecd-modal-warning { font-size: 11px; color: #a06030; background: #fff8f0; padding: 8px 12px; border-radius: 4px; margin-top: 14px; border-left: 3px solid #c87840; }
.ecd-modal-actions { display: flex; gap: 12px; margin-top: 20px; flex-wrap: wrap; align-items: center; }
.ecd-modal-close { border: none; background: none; font-size: 13px; color: #7a8570; cursor: pointer; padding: 0; text-decoration: underline; }

/* ── PRODUCT PAGE ── */
.ecd-product-wrap { max-width: 1240px; margin: 0 auto; padding: 0 36px 80px; }
.ecd-breadcrumb { font-size: 11px; color: #809074; padding: 20px 0 0; display: flex; gap: 6px; align-items: center; }
.ecd-breadcrumb a { color: #809074; text-decoration: none; }
.ecd-breadcrumb a:hover { color: #2f4034; }
.ecd-product-hero { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; padding: 36px 0 48px; align-items: start; }
.ecd-product-gallery {}
.ecd-product-main-img { background: #f4f5ef; border-radius: 10px; overflow: hidden; aspect-ratio: 1; display: flex; align-items: center; justify-content: center; }
.ecd-product-main-img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.ecd-product-thumbs { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.ecd-thumb { border: 1px solid #e6eadf; border-radius: 5px; padding: 0; background: #f4f5ef; width: 64px; height: 64px; overflow: hidden; cursor: pointer; transition: border-color 0.15s; }
.ecd-thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.ecd-thumb[aria-pressed="true"] { border-color: #36513d; }
.ecd-product-info {}
.ecd-product-sku { font-size: 11px; color: #809074; letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 10px; }
.ecd-product-title { font-size: clamp(28px,4vw,44px); font-weight: 450; letter-spacing: -1.5px; line-height: 1.1; margin: 0 0 14px; }
.ecd-product-finish { font-size: 14px; color: #7a8570; margin-bottom: 20px; }
.ecd-product-price { font-size: 22px; font-weight: 600; color: #2f4034; margin-bottom: 22px; }
.ecd-product-desc { font-size: 14px; line-height: 1.7; color: #7a8570; margin-bottom: 28px; max-width: 400px; }
.ecd-qty-row { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.ecd-qty-label { font-size: 12px; font-weight: 600; color: #2f4034; }
.ecd-qty-ctrl { display: flex; align-items: center; border: 1px solid #ccd5c5; border-radius: 5px; overflow: hidden; }
.ecd-qty-btn { border: none; background: #f4f5ef; width: 36px; height: 36px; font-size: 16px; cursor: pointer; color: #2f4034; }
.ecd-qty-input { border: none; border-left: 1px solid #ccd5c5; border-right: 1px solid #ccd5c5; width: 54px; text-align: center; font-size: 14px; padding: 6px 0; background: #fff; color: #2f4034; }
.ecd-product-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 28px; }
.ecd-product-note { font-size: 11px; color: #8e9d7f; line-height: 1.6; max-width: 360px; }
/* Spec table */
.ecd-spec-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 10px; }
.ecd-spec-table th { text-align: left; padding: 10px 12px 10px 0; color: #7a8570; font-weight: 500; border-bottom: 1px solid #e6eadf; width: 42%; }
.ecd-spec-table td { padding: 10px 0; border-bottom: 1px solid #e6eadf; color: #2f4034; }
/* Product nav */
.ecd-product-nav { display: flex; gap: 24px; border-bottom: 1px solid #e6eadf; margin-bottom: 36px; padding-top: 8px; }
.ecd-product-nav a { font-size: 13px; padding-bottom: 12px; text-decoration: none; color: #7a8570; border-bottom: 2px solid transparent; transition: all 0.15s; }
.ecd-product-nav a:hover, .ecd-product-nav a.active { color: #2f4034; border-bottom-color: #36513d; }
/* Room section */
.ecd-room { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-radius: 9px; overflow: hidden; background: #f4f4ee; margin: 56px 0; }
.ecd-room img { width: 100%; height: 400px; object-fit: cover; display: block; }
.ecd-room-copy { padding: 48px; align-self: center; }
.ecd-room-copy h2 { font-size: 32px; font-weight: 450; letter-spacing: -1px; line-height: 1.2; margin: 14px 0; }
.ecd-room-copy p { font-size: 13px; color: #7a8570; }
/* Related */
.ecd-related { margin-top: 56px; }
.ecd-related-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.ecd-related-head h2 { font-size: 24px; font-weight: 450; letter-spacing: -0.6px; margin: 0; }
.ecd-related-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.ecd-related-card { background: #f4f5ef; border-radius: 8px; overflow: hidden; text-align: center; padding: 20px 14px 16px; text-decoration: none; cursor: pointer; border: none; transition: background 0.15s; }
.ecd-related-card:hover { background: #eceee6; }
.ecd-related-card img { width: 100%; aspect-ratio: 1; object-fit: contain; display: block; border-radius: 5px; }
.ecd-related-card strong { display: block; font-size: 13px; font-weight: 600; margin-top: 12px; color: #2f4034; }
.ecd-related-card span { font-size: 11px; color: #7a8570; margin-top: 3px; display: block; }

/* ── HOMEPAGE ── */
.ecd-home-hero {
  margin: 28px 36px;
  display: grid; grid-template-columns: 1fr 1fr; min-height: 500px;
  border-radius: 10px; overflow: hidden; background: #f3f4ee;
}
.ecd-home-hero-copy { padding: 62px 48px; align-self: center; }
.ecd-home-hero-img { position: relative; }
.ecd-home-hero-img img { width: 100%; height: 100%; object-fit: cover; position: absolute; top: 0; left: 0; object-position: 50% 55%; }
.ecd-home-intro {
  display: flex; justify-content: space-between; gap: 20px;
  padding: 22px 36px; border-bottom: 1px solid #e4e9dc;
  font-size: 11px; color: #7e8a70; max-width: 1240px; margin: 0 auto;
}
.ecd-home-section { padding: 55px 0 0; max-width: 1240px; margin: 0 auto; padding-left: 36px; padding-right: 36px; }
.ecd-home-section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 25px; margin-bottom: 23px; }
.ecd-collections { display: grid; grid-template-columns: repeat(3,1fr); gap: 22px; }
.ecd-collection-card { text-decoration: none; display: block; }
.ecd-collection-img { height: 285px; position: relative; background: #f1f2ec; border-radius: 8px; overflow: hidden; }
.ecd-collection-img img { width: 100%; height: 100%; object-fit: contain; display: block; transition: transform 0.25s; }
.ecd-collection-card:hover img { transform: scale(1.035); }
.ecd-collection-num { position: absolute; left: 15px; top: 14px; font-size: 10px; color: #6a7a60; background: rgba(255,255,255,0.93); padding: 5px 9px; border-radius: 20px; }
.ecd-collection-name { font-size: 19px; font-weight: 500; letter-spacing: -0.4px; margin: 16px 0 5px; display: flex; justify-content: space-between; color: #2f4034; }
.ecd-collection-desc { font-size: 12px; color: #7a8570; line-height: 1.7; margin: 0; max-width: 300px; }
.ecd-collection-note { font-size: 10px; color: #909b84; margin-top: 10px; }
/* Feature block */
.ecd-feature {
  margin: 65px 36px 0;
  display: grid; grid-template-columns: 1fr 1fr;
  border-radius: 9px; background: #f4f4ee; overflow: hidden;
}
.ecd-feature-photo img { width: 100%; height: 425px; object-fit: cover; object-position: center 54%; display: block; }
.ecd-feature-copy { padding: 48px; align-self: center; }
.ecd-feature-copy h2 { font-size: 37px; line-height: 1.16; margin: 17px 0; font-weight: 450; letter-spacing: -1px; }
.ecd-feature-copy p { font-size: 13px; color: #7a8570; }
/* Finish grid */
.ecd-finish-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 22px; margin-top: 10px; }
.ecd-finish-link { text-decoration: none; }
.ecd-finish-img { width: 100%; aspect-ratio: 1; object-fit: contain; display: block; background: #f4f5ef; border: 1px solid #edefe7; border-radius: 6px; }
.ecd-finish-name { font-size: 13px; font-weight: 550; margin: 12px 0 2px; color: #2f4034; }
.ecd-finish-sub { font-size: 10px; color: #839274; }
/* Steps */
.ecd-steps { display: grid; grid-template-columns: repeat(3,1fr); gap: 35px; border-top: 1px solid #e5e9df; padding-top: 25px; margin-top: 25px; }
.ecd-step-num { font-size: 12px; color: #8e9d7f; }
.ecd-steps h3 { font-weight: 500; font-size: 16px; margin: 12px 0 7px; }
.ecd-steps p { font-size: 12px; margin: 0; color: #7a8570; }
/* Home CTA */
.ecd-home-cta {
  margin: 60px 36px 35px; border-radius: 9px; background: #eef2e7;
  padding: 33px 40px; display: flex; align-items: center;
  justify-content: space-between; gap: 30px;
}
.ecd-home-cta h2 { font-size: 28px; margin: 8px 0; font-weight: 450; letter-spacing: -0.8px; }
.ecd-home-cta p { font-size: 12px; margin: 0; color: #7a8570; }
/* Footer */
.ecd-footer { border-top: 1px solid #e3e8da; padding: 35px 36px 20px; max-width: 1240px; margin: 0 auto; }
.ecd-footer-top { display: flex; justify-content: space-between; gap: 25px; }
.ecd-footer-logo { font-size: 22px; font-weight: 750; letter-spacing: 3px; text-decoration: none; color: #2f4034; }
.ecd-footer-links { display: flex; gap: 23px; flex-wrap: wrap; font-size: 11px; }
.ecd-footer-links a { text-decoration: none; color: #2f4034; }
.ecd-footer-fine { font-size: 10px; color: #89977b; margin-top: 28px; max-width: 860px; }
.ecd-footer-copy { font-size: 10px; color: #8c977e; border-top: 1px solid #edf0e7; margin-top: 20px; padding-top: 17px; }

/* ── RESPONSIVE ── */
@media (max-width: 860px) {
  .ecd-home-hero, .ecd-feature, .ecd-room { grid-template-columns: 1fr; }
  .ecd-home-hero-img { height: 300px; position: relative; }
  .ecd-collections { grid-template-columns: 1fr; }
  .ecd-product-hero { grid-template-columns: 1fr; }
  .ecd-products-grid { grid-template-columns: repeat(2, 1fr); }
  .ecd-finish-grid { grid-template-columns: repeat(2,1fr); }
  .ecd-steps { grid-template-columns: 1fr; }
  .ecd-related-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 540px) {
  .ecd-wrap, .ecd-home-hero, .ecd-feature, .ecd-home-cta, .ecd-footer { margin-left: 16px; margin-right: 16px; }
  .ecd-home-section, .ecd-filter-bar, .ecd-products-body, .ecd-product-wrap, .ecd-home-intro { padding-left: 16px; padding-right: 16px; }
  .ecd-products-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
  .ecd-cat-header-inner { flex-direction: column; }
  .ecd-product-hero { gap: 28px; }
  .ecd-related-grid { grid-template-columns: 1fr; }
}
