/*
Theme Name: ED Business
Theme URI: https://expensivedesign.com/ed-business
Author: expensivedesign.com
Author URI: https://expensivedesign.com
Description: ธีม WordPress สำหรับเว็บไซต์ธุรกิจทั่วไป (บริษัท/ที่ปรึกษา/บริการ) ไม่ผูกกับธุรกิจประเภทใดประเภทหนึ่ง มีหน้าแรก, บริการ, โปรโมชั่น, บล็อก พร้อมหน้าติดต่อในตัว
Version: 1.13.3
Requires at least: 6.1
Requires PHP: 7.4
Tested up to: 6.6
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: ed-business
Tags: custom-menu, featured-images, threaded-comments, translation-ready
*/

/* =========================================================
   0. RESET / VARIABLES
   ========================================================= */
:root{
  --th-green-dark:#1d3557;
  --th-green:#e63946;
  --th-green-light:#ef5b68;
  --th-teal:#457b9d;
  --th-teal-soft:#a8dadc;
  --th-cream:#f7f9fb;
  --th-cream-2:#eef4f8;
  --th-text:#1d3557;
  --th-text-light:#5c6b7a;
  --th-white:#ffffff;
  --th-border:#e1e8ec;
  --th-radius:4px;
  --th-shadow:0 10px 30px rgba(29,53,87,.08);
  --th-font-head:'Prompt', sans-serif;
  --th-font-body:'Sarabun', sans-serif;
  --th-maxw:1220px;

  /* Compatibility bridge for the ported Gutenberg block library
     (blocks.css / render.php files use Shopper's original --s-*
     variable names) — map them to this theme's own tokens above so the
     ported CSS works unmodified. */
  --s-space: 32px;
  --s-container-w: var(--th-maxw);
  --s-heading: var(--th-font-head);
  --s-heading-weight: 600;
  --s-text: var(--th-text);
  --s-text-light: var(--th-text-light);
  --s-accent: var(--th-teal);
  --s-accent-hover: var(--th-green-light);
  --s-bg: var(--th-white);
  --s-dark: var(--th-green-dark);
  --s-line: var(--th-border);
  --s-border-radius: var(--th-radius);
  --s-shadow: var(--th-shadow);
  --s-woo-card: var(--th-white);
  --s-woo-bg: var(--th-cream-2);
  --s-woo-border-radius: var(--th-radius);
  --s-woo-shadow: var(--th-shadow);
  --spacing-20: 24px;
  --spacing-30: 32px;
  --spacing-40: 40px;
  --spacing-50: 64px;

  /* Customizable via Appearance > Customize > Colors */
  --th-header-bg: var(--th-white);
  --th-header-text: var(--th-green-dark);
  --th-header-border: var(--th-border);
  --th-footer-bg: #191b21;
  --th-footer-text: #c7cad1;
  --th-card-bg: var(--th-white);
  --th-nav-btn-bg: var(--th-teal);
}

*,*::before,*::after{box-sizing:border-box;}
html{scroll-behavior:smooth;}
body{
  margin:0;
  font-family:var(--th-font-body);
  color:var(--th-text);
  background:var(--th-cream);
  line-height:1.7;
  font-size:16px;
}
img{max-width:100%;display:block;height:auto;}
a{color:inherit;text-decoration:none;}
ul{list-style:none;margin:0;padding:0;}
h1,h2,h3,h4,h5{
  font-family:var(--th-font-head);
  color:var(--th-green-dark);
  font-weight:600;
  line-height:1.3;
  margin:0 0 .6em;
}
h1{font-size:2.6rem;}
h2{font-size:2rem;}
h3{font-size:1.35rem;}
p{margin:0 0 1.2em;}
.container{max-width:var(--th-maxw);margin:0 auto;padding:0 24px;}

/* Block width alignment (align-wide theme support) — used by
   .th-front-page-blocks (front-page.php) and .th-page-content (page.php)
   so Gutenberg blocks respect Normal / Wide / Full width choices instead
   of always rendering edge-to-edge with no constraint. */
.th-block-content-area{max-width:var(--th-maxw);margin:0 auto;padding:0 24px;}
.th-block-content-area > *{max-width:var(--th-maxw);margin-left:auto;margin-right:auto;}
.th-block-content-area > .alignwide{max-width:1400px;}
.th-block-content-area > .alignfull{
  max-width:none;width:100vw;
  margin-left:calc(50% - 50vw);margin-right:calc(50% - 50vw);
}
/* Blocks placed in the front page's content (Hero, Product Grid, CTA,
   Post Grid, etc.) each carry their own top+bottom padding already
   (.ed-block-section and its per-block equivalents in blocks.css, ~64px
   each side). Two of them stacked back-to-back therefore double up to
   a ~128px gap with nothing in it, which reads as a big empty box.
   Pull the next block up by one block's worth of padding so consecutive
   blocks end up with roughly ONE block's normal spacing between them,
   not two stacked on top of each other. */
.th-front-page-blocks > * + *{margin-top:calc(var(--s-space, 32px) * -2);}
.th-page-title{margin-bottom:30px;}

/* Regular Page content (page.php) is normal prose, not a stack of
   Gutenberg blocks — the 56px block-gap above reads as huge, broken-
   looking whitespace between ordinary paragraphs, so give it sane prose
   spacing instead. */
.th-page-content{line-height:1.8;}

/* Narrow = comfortable reading column (default for new/plain pages).
   Wide = keeps the full 1220px container, e.g. for pages built with
   wide-aligned layout blocks. Higher specificity than the two rules
   above (which set max-width:var(--th-maxw)) so it always wins. */
.th-page-content.th-page-content--narrow{max-width:760px;}
.th-page-content.th-page-content--narrow > *{max-width:760px;}
.th-page-content > * + *{margin-top:0;}
.th-page-content p{margin:0 0 1.4em;}
.th-page-content h2,
.th-page-content h3,
.th-page-content h4{margin-top:1.4em;}
.th-page-content ul,
.th-page-content ol{margin:0 0 1.4em;padding-left:1.4em;}
.th-page-content li{margin-bottom:.4em;}
.th-page-content img{border-radius:var(--th-radius);margin:1.4em 0;}
.th-page-content blockquote{
  border-left:3px solid var(--th-teal);margin:1.4em 0;padding:4px 0 4px 20px;
  color:var(--th-text-light);font-style:italic;
}
.s-container{max-width:var(--th-maxw);margin:0 auto;padding:0 24px;}
a.s-button{
  display:inline-block;background:var(--th-green);color:#fff;padding:14px 30px;
  font-family:var(--th-font-head);font-size:.85rem;letter-spacing:.08em;text-transform:uppercase;
  border:1px solid var(--th-green);border-radius:var(--th-radius);transition:.2s;
}
a.s-button:hover{background:transparent;color:var(--th-green);}
a.s-button.-ghost{background:transparent;color:#fff;border-color:currentColor;}
a.s-button.-ghost:hover{background:#fff;color:var(--th-green-dark);}
.btn{
  display:inline-block;
  background:var(--th-green);
  color:#fff;
  padding:14px 30px;
  font-family:var(--th-font-head);
  font-size:.85rem;
  letter-spacing:.08em;
  text-transform:uppercase;
  border:1px solid var(--th-green);
  border-radius:var(--th-radius);
  cursor:pointer;
  transition:.25s;
}
.btn:hover{background:transparent;color:var(--th-green);}
.btn-outline{background:transparent;color:var(--th-white);border-color:var(--th-white);}
.btn-outline:hover{background:var(--th-white);color:var(--th-green-dark);}
.section{padding:80px 0;}
.section-tight{padding:50px 0;}
.section-alt{background:var(--th-white);}
.text-center{text-align:center;}
.eyebrow{
  display:block;color:var(--th-teal);font-family:var(--th-font-head);
  letter-spacing:.15em;text-transform:uppercase;font-size:.8rem;margin-bottom:10px;
}
.section-title{max-width:880px;margin:0 auto 50px;text-align:center;}
.section-title h2{position:relative;padding-bottom:18px;}
.section-title h2::after{
  content:'';position:absolute;bottom:0;left:50%;transform:translateX(-50%);
  width:56px;height:2px;background:var(--th-teal);
}

/* =========================================================
   1. HEADER
   ========================================================= */
.th-topbar{
  position:relative;
  color:#fff;
}
.th-hero-image{
  position:relative;
}

/* Full Screen mode (existing behaviour): tall fixed-height banner,
   crops via background-size:cover, dark gradient + overlaid text. */
.th-hero-image--full{
  min-height:560px;
  background-size:cover;background-position:center;
}
.th-hero-image--full::before{
  content:'';position:absolute;inset:0;z-index:1;background:linear-gradient(180deg,rgba(10,30,25,.15),rgba(10,30,25,.55));
}
.th-hero-image--full .th-hero-slide{
  position:absolute;inset:0;background-size:cover;background-position:center;
  opacity:0;transition:opacity 1.6s ease;z-index:0;
}
.th-hero-image--full .th-hero-slide.is-active{opacity:1;}

/* Auto mode: the image sits in normal flow at its own natural aspect
   ratio — full width, height follows automatically, so it's never
   cropped and never leaves empty letterbox space either. No dark
   overlay or overlaid text (see header.php — that markup is skipped
   entirely in this mode), since this is meant for a banner graphic
   that already carries its own text/branding. */
.th-hero-image--auto{
  line-height:0;
}
.th-hero-image--auto .th-hero-image__img{
  display:block;width:100%;height:auto;
}
.th-hero-image--auto .th-hero-image__img.th-hero-slide{
  position:absolute;top:0;left:0;width:100%;height:100%;object-fit:contain;
  opacity:0;transition:opacity 1.6s ease;z-index:0;
}
.th-hero-image--auto.th-hero-slideshow{
  position:relative;
  aspect-ratio:21/9; /* All slides are absolutely stacked for the
    crossfade, so none sits in normal flow to set the box's height —
    this assumes a wide banner-style image (matches this mode's intended
    use). Adjust here if a different shape suits your images better. */
}
.th-hero-image--auto .th-hero-image__img.th-hero-slide.is-active{opacity:1;}

.th-hero-inner{
  position:relative;z-index:2;padding:60px 24px 0;max-width:var(--th-maxw);margin:0 auto;width:100%;
}
.th-hero-inner .th-logo{margin-bottom:0;}
.th-hero-text{
  position:absolute;top:50%;left:0;right:0;transform:translateY(-50%);
  z-index:2;width:100%;max-width:640px;margin:0 auto;padding:0 24px;text-align:center;
}
.th-hero-text h1{color:#fff;font-size:2.4rem;margin-bottom:.2em;}
.th-hero-text p{color:#eef4f1;font-size:1.1rem;margin-bottom:28px;}
.th-hero-cta{display:inline-block;}

.th-hero-search{
  position:absolute;left:0;right:0;bottom:0;z-index:2;
}
.th-hero-search-inner{width:100%;max-width:var(--th-maxw);margin:0 auto;padding:0 24px;}

.th-logo{
  font-family:var(--th-font-head);font-weight:600;color:#fff;
  font-size:1.6rem;letter-spacing:.03em;
}
.th-logo span{display:block;font-size:.6rem;letter-spacing:.3em;font-weight:400;text-transform:uppercase;opacity:.85;}
.th-logo img{max-height:52px;}

.th-topbar-utility{
  background:var(--th-green-dark);
  color:#cfd2d8;
  font-size:.78rem;
}
.th-topbar-utility__inner{
  max-width:var(--th-maxw);margin:0 auto;padding:8px 24px;
  display:flex;align-items:center;justify-content:space-between;gap:16px;
}
.th-topbar-utility__contact{display:flex;gap:20px;flex-wrap:wrap;}
.th-topbar-utility__contact a{color:#cfd2d8;display:inline-flex;align-items:center;gap:6px;transition:.2s;}
.th-topbar-utility__contact a:hover{color:var(--th-teal);}
.th-topbar-utility__contact .dashicons{font-size:15px;width:15px;height:15px;}
.th-topbar-utility__right{display:flex;align-items:center;gap:20px;}
.th-topbar-utility__social{display:flex;gap:12px;}
.th-topbar-utility__social a{color:#cfd2d8;transition:.2s;}
.th-topbar-utility__social a:hover{color:var(--th-teal);}
.th-topbar-utility__social .dashicons{font-size:15px;width:15px;height:15px;}
@media(max-width:700px){.th-topbar-utility__social{display:none;}}
@media(max-width:560px){.th-topbar-utility__contact a:last-child{display:none;}}
.th-topbar-utility__custom{color:#cfd2d8;font-size:.85rem;}
.th-topbar-utility__custom a{color:inherit;text-decoration:underline;text-underline-offset:2px;}
.th-topbar-utility__custom a:hover{color:var(--th-teal);}

.th-nav-wrap{
  background:var(--th-header-bg);
  position:sticky;
  top:0;
  z-index:999;
  flex-shrink:0;
  border-bottom:1px solid var(--th-header-border);
  box-shadow:0 2px 12px rgba(20,20,24,.06);
}
.th-nav-inner{
  max-width:var(--th-maxw);margin:0 auto;padding:0 24px;
  display:flex;align-items:center;justify-content:space-between;gap:24px;
}
.th-nav-logo{flex-shrink:0;padding:10px 0;}
.th-nav-logo .th-logo{margin-bottom:0;}
.th-nav-logo img{max-height:34px;}
.th-nav-logo a{font-family:var(--th-font-head);font-weight:600;font-size:1.2rem;color:var(--th-header-text);}
.th-main-nav{flex:1;}
.th-main-nav ul{display:flex;flex-wrap:wrap;}
.th-main-nav a{
  display:block;padding:15px 16px;color:var(--th-header-text);font-family:var(--th-font-head);
  font-size:14px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;transition:.2s;
}
.th-main-nav li.current-menu-item > a,
.th-main-nav a:hover{color:var(--th-teal);}
.th-nav-cta{display:flex;align-items:center;gap:18px;flex-shrink:0;}
.th-nav-search-toggle{color:var(--th-header-text);display:inline-flex;transition:.2s;}
.th-nav-search-toggle:hover{color:var(--th-teal);}
.th-nav-search-toggle .dashicons{font-size:20px;width:20px;height:20px;}
.th-nav-cta .btn{padding:12px 24px;background:var(--th-nav-btn-bg);color:#fff;border-color:var(--th-nav-btn-bg);}
.th-nav-cta .btn:hover{background:transparent;color:var(--th-nav-btn-bg);}
.th-menu-toggle{
  display:none;background:none;border:0;color:var(--th-header-text);font-size:1.5rem;cursor:pointer;
  padding:10px;line-height:0;
}
.th-menu-toggle .dashicons{font-size:26px;width:26px;height:26px;}

/* ED Translate's switcher sets color with !important directly on
   .ed-lang-current (not just via the --ed-lang-color variable), so we
   must override those same elements with equal/higher specificity. */
.th-nav-wrap .ed-lang-current,
.th-nav-wrap .ed-lang-current .ed-code,
.th-nav-wrap .ed-lang-current .ed-chevron{color:var(--th-green-dark) !important;}

/* Trust strip below hero */
.th-trust-strip{background:var(--th-teal);}
.th-trust-strip__inner{
  display:grid;grid-template-columns:repeat(3,1fr);gap:24px;
  padding:32px 24px;
}
.th-trust-strip__item{display:flex;align-items:flex-start;gap:14px;color:#fff;}
.th-trust-strip__item .dashicons{font-size:30px;width:30px;height:30px;flex-shrink:0;opacity:.9;}
.th-trust-strip__item strong{display:block;font-family:var(--th-font-head);font-size:.95rem;margin-bottom:4px;}
.th-trust-strip__item p{margin:0;font-size:.85rem;opacity:.9;line-height:1.5;}
@media(max-width:820px){.th-trust-strip__inner{grid-template-columns:1fr;}}

/* Hero keyword search bar */
.th-hero-search-bar{
  display:flex;max-width:520px;margin:28px auto 0;
  background:var(--th-card-bg);border-radius:var(--th-radius);overflow:hidden;box-shadow:var(--th-shadow);
}
.th-hero-search-bar__field{flex:1;}
.th-hero-search-bar__field input{
  width:100%;height:100%;border:0;padding:16px 18px;font-size:.95rem;font-family:var(--th-font-body);color:var(--th-text);
}
.th-hero-search-bar__field input:focus{outline:none;}
.th-hero-search-bar__btn{border-radius:0;padding:16px 28px;margin:0;border:0;}

@media(max-width:900px){
  .th-menu-toggle{display:flex;align-items:center;justify-content:center;}
  .th-nav-inner{
    flex-wrap:wrap;padding:10px 20px;position:relative;
  }
  .th-main-nav{
    display:none;width:100%;order:3;
    border-top:1px solid rgba(255,255,255,.15);
    margin-top:10px;
  }
  .th-main-nav.is-open{display:block;animation:th-menu-drop .2s ease;}
  .th-main-nav ul{flex-direction:column;padding:6px 0;}
  .th-main-nav li{border-bottom:1px solid rgba(255,255,255,.08);}
  .th-main-nav li:last-child{border-bottom:0;}
  .th-main-nav a{padding:14px 6px;}
  .th-nav-cta{order:2;}
  .th-nav-cta .btn{padding:10px 18px;font-size:.75rem;}
  .th-hero-image{min-height:440px;}
  .th-hero-inner{padding-top:30px;}
}

@keyframes th-menu-drop{
  from{opacity:0;transform:translateY(-6px);}
  to{opacity:1;transform:translateY(0);}
}

/* =========================================================
   1B. Legacy search-card styles (unused in this theme — kept from
   an earlier fork; harmless if left in place, safe to delete).
   ========================================================= */
.th-hero-search .edhb-search-form{
  background:var(--th-white);
  border:none;
  border-radius:6px;
  box-shadow:0 20px 40px rgba(18,63,52,.18);
  padding:22px 28px;
  display:flex;
  align-items:flex-end;
  gap:0;
}
.th-hero-search .edhb-field{
  flex:1;
  min-width:140px;
  padding:0 24px;
  border-right:1px solid var(--th-border);
}
.th-hero-search .edhb-field:first-child{padding-left:0;}
.th-hero-search .edhb-field.edhb-field-narrow{
  flex:0 0 auto;
  max-width:110px;
  border-right:1px solid var(--th-border);
}
.th-hero-search .edhb-field label,
.th-hero-search-placeholder label{
  display:block;font-family:var(--th-font-head);font-size:.7rem;letter-spacing:.1em;
  text-transform:uppercase;color:var(--th-teal);margin-bottom:6px;font-weight:600;
}
.th-hero-search .edhb-field input,
.th-hero-search .edhb-field select{
  border:0;padding:0;font-family:var(--th-font-body);font-size:1rem;color:var(--th-green-dark);
  background:transparent;width:100%;
}
.th-hero-search .edhb-field input::placeholder{color:var(--th-text-light);}
.th-hero-search .edhb-search-btn{
  flex:0 0 auto;margin-left:24px;padding:14px 30px;white-space:nowrap;
  background:var(--th-green);border-color:var(--th-green);
}
.th-hero-search .edhb-search-btn:hover{background:var(--th-teal);border-color:var(--th-teal);}
.th-hero-search .edhb-search-results{margin-top:24px;}
.th-hero-search .stb-empty-state,
.th-hero-search .edhb-empty-state{
  background:var(--th-white);border-radius:6px;box-shadow:0 10px 30px rgba(18,63,52,.1);
}

/* Legacy placeholder styling (unused in this theme) */
.th-hero-search-placeholder{
  background:var(--th-white);border-radius:6px;box-shadow:0 20px 40px rgba(18,63,52,.18);
  padding:22px 28px;display:flex;align-items:flex-end;gap:0;flex-wrap:wrap;
}
.th-hero-search-placeholder .edhb-field{flex:1;min-width:140px;padding:0 24px;border-right:1px solid var(--th-border);}
.th-hero-search-placeholder .edhb-field:first-child{padding-left:0;}
.th-hero-search-value{display:block;font-size:1rem;color:var(--th-text-light);}
.th-hero-search-disabled-btn{
  flex:0 0 auto;margin-left:24px;padding:14px 30px;white-space:nowrap;opacity:.5;cursor:not-allowed;
}
.th-hero-search-note{
  text-align:center;color:var(--th-text-light);font-size:.82rem;margin:10px 0 0;
}

@media(max-width:900px){
  .th-hero-search .edhb-search-form,
  .th-hero-search-placeholder{flex-wrap:wrap;padding:20px;}
  .th-hero-search .edhb-field,
  .th-hero-search-placeholder .edhb-field{
    flex:1 1 45%;border-right:0;border-bottom:1px solid var(--th-border);padding:10px 0;
  }
  .th-hero-search .edhb-search-btn,
  .th-hero-search-disabled-btn{width:100%;margin-left:0;margin-top:14px;}
}
@media(max-width:560px){
  .th-hero-search .edhb-field,
  .th-hero-search-placeholder .edhb-field{flex:1 1 100%;}
}

/* =========================================================
   2. HOME / INTRO
   ========================================================= */
.th-intro{text-align:center;}
.th-intro h2{font-size:1.1rem;letter-spacing:.1em;text-transform:uppercase;color:var(--th-teal);}
.th-intro h1{margin-bottom:.5em;}
.th-why-grid{
  display:grid;grid-template-columns:repeat(4,1fr);gap:30px;margin-top:50px;text-align:left;
}
.th-why-grid div strong{
  display:block;color:var(--th-green);font-family:var(--th-font-head);margin-bottom:6px;
  letter-spacing:.04em;text-transform:uppercase;font-size:.85rem;
}
@media(max-width:800px){.th-why-grid{grid-template-columns:1fr 1fr;}}
@media(max-width:520px){.th-why-grid{grid-template-columns:1fr;}}

/* Article cards — used on the front page "Recent Articles" section,
   the blog index (index.php), and category archives (category.php) */
.th-articles-grid{
  display:grid;
  grid-template-columns:repeat(var(--th-grid-cols-mobile, 1), 1fr);
  gap:36px;margin-top:20px;
}
@media(min-width:561px) and (max-width:820px){
  .th-articles-grid{grid-template-columns:repeat(var(--th-grid-cols-tablet, var(--th-grid-cols-mobile, 2)), 1fr);}
}
@media(min-width:821px){
  .th-articles-grid{grid-template-columns:repeat(var(--th-grid-cols-desktop, 3), 1fr);}
}

.th-article-card{background:var(--th-card-bg);border-radius:var(--th-radius);overflow:hidden;box-shadow:var(--th-shadow);}
.th-article-card__img{display:block;aspect-ratio:4/3;overflow:hidden;background:var(--th-cream-2);}
.th-article-card__img img{width:100%;height:100%;object-fit:cover;transition:.4s;}
.th-article-card:hover .th-article-card__img img{transform:scale(1.05);}
.th-article-card__body{padding:22px 24px 26px;}
.th-article-card__body h3,
.th-article-card__body h2{font-size:1.05rem;margin:0 0 10px;line-height:1.4;}
.th-article-card__body h3 a,
.th-article-card__body h2 a{color:var(--th-text);}
.th-article-card__body h3 a:hover,
.th-article-card__body h2 a:hover{color:var(--th-teal);}
.th-article-card__meta{
  display:flex;align-items:center;gap:14px;margin-bottom:12px;font-size:.8rem;color:var(--th-text-light);
}
.th-article-card__meta span{display:inline-flex;align-items:center;gap:5px;}
.th-article-card__meta .dashicons{font-size:14px;width:14px;height:14px;color:var(--th-teal);}
.th-article-card__body p{color:var(--th-text-light);font-size:.92rem;margin:0 0 14px;}
.th-article-card__link{
  font-family:var(--th-font-head);font-size:.75rem;text-transform:uppercase;letter-spacing:.06em;font-weight:600;
  color:var(--th-teal);
}
.th-article-card__link:hover{color:var(--th-green-dark);}

.th-pagination .nav-links{display:flex;gap:8px;justify-content:center;margin-top:40px;flex-wrap:wrap;}
.th-pagination .page-numbers{
  display:inline-flex;align-items:center;justify-content:center;min-width:38px;height:38px;padding:0 10px;
  border:1px solid var(--th-border);border-radius:var(--th-radius);color:var(--th-text-light);font-size:.88rem;
}
.th-pagination .page-numbers.current,
.th-pagination .page-numbers:hover{background:var(--th-teal);border-color:var(--th-teal);color:#fff;}

.th-empty-state{padding:40px;background:var(--th-cream-2);border-radius:var(--th-radius);text-align:center;color:var(--th-text-light);}

/* Single blog post */
.th-single-post-hero{
  position:relative;min-height:320px;background-size:cover;background-position:center;
  display:flex;align-items:flex-end;
}
.th-single-post-hero::before{
  content:'';position:absolute;inset:0;background:linear-gradient(0deg,rgba(20,20,24,.75),rgba(20,20,24,.35));
}
.th-single-post-hero--plain{background:var(--th-green-dark);}
.th-single-post-hero__inner{
  position:relative;z-index:1;display:flex;gap:24px;align-items:flex-end;padding:50px 24px 40px;
}
.th-single-post-hero__date{
  flex-shrink:0;background:var(--th-teal);color:#fff;border-radius:var(--th-radius);
  width:64px;padding:10px 0;text-align:center;line-height:1.2;
}
.th-single-post-hero__day{display:block;font-family:var(--th-font-head);font-size:1.5rem;font-weight:600;}
.th-single-post-hero__month{display:block;font-size:.75rem;text-transform:uppercase;letter-spacing:.06em;}
.th-single-post-hero__meta{display:flex;flex-wrap:wrap;gap:6px 18px;margin-bottom:10px;}
.th-single-post-hero__meta span{display:inline-flex;align-items:center;gap:5px;font-size:.8rem;color:#e6e6e6;}
.th-single-post-hero__meta .dashicons{font-size:14px;width:14px;height:14px;color:var(--th-teal-soft);}
.th-single-post-hero h1{color:#fff;margin:0;font-size:1.9rem;}
@media(max-width:600px){
  .th-single-post-hero__inner{flex-direction:column;align-items:flex-start;gap:14px;}
  .th-single-post-hero h1{font-size:1.4rem;}
}

.th-single-post-layout{
  display:grid;grid-template-columns:2fr 1fr;gap:48px;align-items:start;
}
@media(max-width:900px){.th-single-post-layout{grid-template-columns:1fr;}}

.th-single-post__content{line-height:1.8;}
.th-single-post__content p{margin-bottom:1.4em;}
.th-single-post__content img{border-radius:var(--th-radius);}
.th-single-post__content blockquote{
  margin:24px 0;padding:18px 24px;border-left:3px solid var(--th-teal);background:var(--th-cream-2);
  font-style:italic;color:var(--th-text);
}
.th-single-post__tags{margin-top:30px;display:flex;gap:10px;flex-wrap:wrap;}
.th-single-post__tags a{
  font-size:.8rem;background:var(--th-cream-2);padding:6px 14px;border-radius:999px;color:var(--th-text-light);
}
.th-single-post__tags a:hover{background:var(--th-teal);color:#fff;}

.th-share-row{display:flex;align-items:center;gap:14px;margin-top:26px;padding-top:22px;border-top:1px solid var(--th-border);}
.th-share-row span{font-size:.85rem;color:var(--th-text-light);}
.th-share-row a{
  display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;
  border:1px solid var(--th-border);border-radius:50%;color:var(--th-text-light);transition:.2s;
}
.th-share-row a:hover{background:var(--th-teal);border-color:var(--th-teal);color:#fff;}
.th-share-row .dashicons{font-size:16px;width:16px;height:16px;}

.th-author-box{
  display:flex;gap:20px;margin-top:30px;padding:26px;background:var(--th-cream-2);border-radius:var(--th-radius);
}
.th-author-box img{border-radius:50%;flex-shrink:0;}
.th-author-box__label{font-size:.78rem;text-transform:uppercase;letter-spacing:.05em;color:var(--th-text-light);}
.th-author-box h3{margin:2px 0 8px;}
.th-author-box p{margin:0;color:var(--th-text-light);font-size:.92rem;}
@media(max-width:480px){.th-author-box{flex-direction:column;text-align:center;align-items:center;}}

.th-single-post__nav{
  display:grid;grid-template-columns:1fr 1fr;gap:20px;margin-top:30px;padding-top:24px;
  border-top:1px solid var(--th-border);
}
.th-single-post__nav-label{display:block;font-size:.78rem;text-transform:uppercase;letter-spacing:.05em;color:var(--th-text-light);margin-bottom:4px;}
.th-single-post__nav a{font-weight:600;color:var(--th-text);}
.th-single-post__nav a:hover{color:var(--th-teal);}
@media(max-width:600px){.th-single-post__nav{grid-template-columns:1fr;}}

.th-single-post-sidebar .th-sidebar-box,
.th-blog-sidebar .th-sidebar-box{
  background:var(--th-card-bg);border:1px solid var(--th-border);border-radius:var(--th-radius);padding:22px;margin-bottom:26px;
}
.th-sidebar-box h3{margin:0 0 16px;font-size:1rem;text-transform:uppercase;letter-spacing:.04em;}
.th-recent-comments{list-style:none;margin:0;padding:0;}
.th-recent-comments li{font-size:.88rem;margin-bottom:12px;color:var(--th-text-light);line-height:1.5;}
.th-recent-comments li:last-child{margin-bottom:0;}
.th-recent-comments a{color:var(--th-teal);}
.th-tag-cloud{display:flex;flex-wrap:wrap;gap:8px;}
.th-tag-cloud a{
  font-size:.8rem !important;background:var(--th-cream-2);padding:6px 14px;border-radius:999px;color:var(--th-text-light);
}
.th-tag-cloud a:hover{background:var(--th-teal);color:#fff;}

/* Category archive — list cards + sidebar (mirrors the Tours archive layout) */
.th-list-card{
  background:var(--th-card-bg);border:1px solid var(--th-border);border-radius:var(--th-radius);overflow:hidden;margin-bottom:30px;
}
.th-list-card__img{display:block;aspect-ratio:16/8;overflow:hidden;}
.th-list-card__img img{width:100%;height:100%;object-fit:cover;}
.th-list-card__body{padding:24px 26px;}
.th-list-card__body h2{font-size:1.2rem;margin:0 0 10px;}
.th-list-card__body h2 a{color:var(--th-text);}
.th-list-card__body h2 a:hover{color:var(--th-teal);}
.th-list-card__meta{display:flex;flex-wrap:wrap;gap:6px 20px;margin-bottom:12px;}
.th-list-card__meta span{display:inline-flex;align-items:center;gap:6px;font-size:.85rem;color:var(--th-text-light);}
.th-list-card__meta .dashicons{font-size:16px;width:16px;height:16px;color:var(--th-teal);}
.th-list-card__body p{margin:0 0 14px;color:var(--th-text-light);font-size:.92rem;}
.th-list-card__link{
  font-family:var(--th-font-head);font-size:.75rem;text-transform:uppercase;letter-spacing:.06em;font-weight:600;
  color:#fff;background:var(--th-green-dark);padding:9px 18px;border-radius:var(--th-radius);display:inline-block;
}
.th-list-card__link:hover{background:var(--th-teal);}

.th-sidebar-list{list-style:none;margin:0;padding:0;}
.th-sidebar-list li{display:flex;gap:12px;margin-bottom:16px;align-items:flex-start;}
.th-sidebar-list li:last-child{margin-bottom:0;}
.th-sidebar-list__img{flex-shrink:0;width:64px;height:64px;border-radius:var(--th-radius);overflow:hidden;display:block;background:var(--th-cream-2);}
.th-sidebar-list__img img{width:100%;height:100%;object-fit:cover;}
.th-sidebar-list__title{display:block;font-size:.9rem;font-weight:600;color:var(--th-text);margin-bottom:4px;line-height:1.35;}
.th-sidebar-list__date{color:var(--th-text-light);font-size:.8rem;}

.th-sidebar-cta{
  background:linear-gradient(135deg,var(--th-teal),var(--th-green-light));
  border-radius:var(--th-radius);padding:26px;margin-bottom:26px;color:#fff;
}
.th-sidebar-cta h3{margin:0 0 10px;color:#fff;}
.th-sidebar-cta p{margin:0 0 16px;font-size:.88rem;opacity:.95;}
.th-sidebar-cta__phone,
.th-sidebar-cta__email{display:block;color:#fff;font-weight:700;margin-bottom:6px;}

.th-amenities{
  display:grid;grid-template-columns:repeat(5,1fr);gap:20px;margin-top:60px;text-align:center;
}
.th-amenities .amenity-icon{
  width:56px;height:56px;margin:0 auto 14px;border:1.5px solid var(--th-teal);border-radius:50%;
  display:flex;align-items:center;justify-content:center;color:var(--th-teal);font-size:1.4rem;
}
.th-amenities p{font-size:.85rem;margin:0;color:var(--th-text-light);}
@media(max-width:800px){.th-amenities{grid-template-columns:repeat(2,1fr);}}

.th-gallery-quad{
  display:grid;grid-template-columns:repeat(2,1fr);gap:16px;margin-top:60px;
}
.th-gallery-quad a{position:relative;overflow:hidden;display:block;aspect-ratio:4/3;}
.th-gallery-quad img{width:100%;height:100%;object-fit:cover;transition:.4s;}
.th-gallery-quad a:hover img{transform:scale(1.06);}
.th-gallery-quad span{
  position:absolute;left:20px;bottom:16px;color:#fff;font-family:var(--th-font-head);
  font-size:1.15rem;text-shadow:0 2px 8px rgba(0,0,0,.5);z-index:2;
}
.th-gallery-quad a::after{content:'';position:absolute;inset:0;background:linear-gradient(180deg,transparent 50%,rgba(0,0,0,.55));}
@media(max-width:560px){.th-gallery-quad{grid-template-columns:1fr;}}

.th-facility-fallback-grid{
  display:grid;grid-template-columns:repeat(3,1fr);gap:20px;margin-top:60px;
}
.th-facility-fallback-grid a{
  display:flex;flex-direction:column;align-items:center;text-align:center;gap:12px;
  padding:34px 20px;background:var(--th-card-bg);border:1px solid var(--th-border);border-radius:var(--th-radius);
  transition:.2s;color:var(--th-text);
}
.th-facility-fallback-grid a:hover{border-color:var(--th-teal);box-shadow:var(--th-shadow);}
.th-facility-fallback-grid .dashicons{font-size:34px;width:34px;height:34px;color:var(--th-teal);}
.th-facility-fallback-grid span:last-child{font-family:var(--th-font-head);font-size:.95rem;font-weight:600;}
@media(max-width:700px){.th-facility-fallback-grid{grid-template-columns:1fr 1fr;}}
@media(max-width:460px){.th-facility-fallback-grid{grid-template-columns:1fr;}}

/* =========================================================
   3. ROOMS / WOOCOMMERCE PRODUCT GRID
   ========================================================= */
.th-room-list{display:flex;flex-direction:column;gap:60px;margin-top:20px;}
.th-room-row{display:grid;grid-template-columns:1fr 1fr;gap:50px;align-items:center;}
.th-room-row:nth-child(even) .th-room-image{order:2;}
.th-room-image img{border-radius:var(--th-radius);}
.th-room-price{color:var(--th-teal);font-family:var(--th-font-head);font-size:1.2rem;margin-bottom:10px;}
@media(max-width:800px){
  .th-room-row{grid-template-columns:1fr;}
  .th-room-row:nth-child(even) .th-room-image{order:0;}
}

.th-rooms-grid{
  display:grid;grid-template-columns:repeat(2,1fr);gap:40px;margin-top:20px;
}
@media(max-width:800px){.th-rooms-grid{grid-template-columns:1fr;}}
.th-rooms-grid--3{grid-template-columns:repeat(3,1fr);gap:30px;}
@media(max-width:900px){.th-rooms-grid--3{grid-template-columns:1fr 1fr;}}
@media(max-width:600px){.th-rooms-grid--3{grid-template-columns:1fr;}}
.th-room-card{background:var(--th-card-bg);box-shadow:var(--th-shadow);border-radius:var(--th-radius);overflow:hidden;}
.th-room-card .th-room-card-img{overflow:hidden;aspect-ratio:4/3;}
.th-room-card .th-room-card-img img{width:100%;height:100%;object-fit:cover;transition:.4s;}
.th-room-card:hover .th-room-card-img img{transform:scale(1.05);}
.th-room-card-body{padding:22px 24px 26px;}
.th-room-card-body h3{margin-bottom:6px;font-size:1.08rem;}
.th-room-card-body .price{color:var(--th-teal);font-family:var(--th-font-head);font-weight:600;font-size:1.15rem;margin-bottom:10px;display:block;}
.th-room-card-body p{color:var(--th-text-light);font-size:.92rem;}
.th-more-link{
  display:inline-block;margin-top:6px;
  font-family:var(--th-font-head);font-size:.75rem;text-transform:uppercase;letter-spacing:.06em;font-weight:600;
  color:#fff;background:var(--th-green-dark);padding:9px 18px;border-radius:var(--th-radius);transition:.2s;
}
.th-more-link:hover{background:var(--th-teal);}
.th-room-card-example{opacity:.97;}
.th-example-badge{
  color:#fff;font-family:var(--th-font-head);font-size:.72rem;letter-spacing:.08em;text-transform:uppercase;
  background:rgba(0,0,0,.28);border:1px solid rgba(255,255,255,.6);border-radius:999px;padding:6px 16px;
}
.th-example-note{
  grid-column:1 / -1;color:var(--th-text-light);font-size:.9rem;margin-top:6px;
}
.th-example-note a{color:var(--th-green);text-decoration:underline;text-underline-offset:2px;margin-left:6px;}

/* Single product (room detail) */
.th-single-room{display:grid;grid-template-columns:1.1fr .9fr;gap:60px;}
.th-single-room .price{font-size:1.5rem;color:var(--th-teal);font-family:var(--th-font-head);}
.th-room-gallery img{border-radius:var(--th-radius);margin-bottom:10px;}
.th-single-room .cart{margin-top:20px;}
.th-single-room table.variations{width:100%;margin-bottom:20px;}
.th-single-room .woocommerce-product-attributes{margin-top:30px;border-top:1px solid var(--th-border);padding-top:20px;}
@media(max-width:800px){.th-single-room{grid-template-columns:1fr;}}

/* =========================================================
   4. FACILITIES
   ========================================================= */
.th-facility-grid{
  display:grid;grid-template-columns:repeat(3,1fr);gap:40px;margin-top:20px;
}
@media(max-width:900px){.th-facility-grid{grid-template-columns:1fr 1fr;}}
@media(max-width:600px){.th-facility-grid{grid-template-columns:1fr;}}
.th-facility-card img{height:200px;width:100%;object-fit:cover;margin-bottom:20px;}
.th-facility-card h3{color:var(--th-green);}
.th-facility-card p{color:var(--th-text-light);font-size:.95rem;}

/* =========================================================
   5. SPECIAL OFFERS
   ========================================================= */
.th-offer-row{
  display:grid;grid-template-columns:340px 1fr;gap:0;background:var(--th-card-bg);box-shadow:var(--th-shadow);margin-bottom:30px;
}
.th-offer-image{height:100%;min-height:220px;overflow:hidden;position:relative;}
.th-offer-image img{width:100%;height:100%;object-fit:cover;}
.th-offer-body{padding:34px 40px;}
.th-offer-body .offer-title{color:#c0316b;font-family:var(--th-font-head);font-size:1.3rem;margin-bottom:2px;}
.th-offer-body .offer-save{color:#c0316b;font-family:var(--th-font-head);font-weight:600;letter-spacing:.05em;margin-bottom:14px;display:block;}
.th-offer-body .offer-period{color:var(--th-green);font-size:.9rem;margin-bottom:4px;}
.th-offer-body .offer-rate{color:var(--th-green);font-weight:600;}
.th-offer-body .offer-perks{color:var(--th-text-light);font-size:.88rem;margin:14px 0;}
@media(max-width:700px){.th-offer-row{grid-template-columns:1fr;}.th-offer-image{height:220px;}}

/* =========================================================
   6. CONTACT
   ========================================================= */
.th-contact-grid{display:grid;grid-template-columns:1fr 1fr;gap:60px;}
.th-contact-info li{display:flex;gap:14px;margin-bottom:22px;align-items:flex-start;}
.th-contact-info .dashicons{color:var(--th-teal);margin-top:3px;}
.th-contact-form input[type=text],
.th-contact-form input[type=email],
.th-contact-form input[type=tel],
.th-contact-form select,
.th-contact-form textarea{
  width:100%;padding:12px 14px;border:1px solid var(--th-border);margin-bottom:18px;
  font-family:var(--th-font-body);background:var(--th-card-bg);border-radius:var(--th-radius);
}
.th-contact-form label{display:block;font-family:var(--th-font-head);font-size:.85rem;margin-bottom:6px;color:var(--th-green-dark);}
@media(max-width:800px){.th-contact-grid{grid-template-columns:1fr;}}

.th-map{margin-top:60px;height:420px;}
.th-map iframe{width:100%;height:100%;border:0;}

/* =========================================================
   7. FOOTER
   ========================================================= */
.th-footer{background:var(--th-footer-bg);color:var(--th-footer-text);padding:60px 0 20px;}
.th-footer h3{color:#fff;}
.th-footer-grid{display:grid;grid-template-columns:1.4fr 1fr 1fr 1fr;gap:40px;}
.th-footer a{color:var(--th-footer-text);}
.th-footer a:hover{color:var(--th-teal);}
.th-footer li{margin-bottom:10px;font-size:.92rem;display:flex;gap:10px;}
.th-footer .th-footer-links li{display:block;}
.th-social a{
  display:inline-flex;width:34px;height:34px;border:1px solid #3a3d47;border-radius:50%;
  align-items:center;justify-content:center;margin-right:8px;margin-top:14px;
}
.th-footer-bottom{
  border-top:1px solid #2c2f38;margin-top:40px;padding-top:20px;font-size:.82rem;color:#8a8d96;
  display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;
}
.th-footer-bottom a{color:#8a8d96;text-decoration:none;}
.th-footer-bottom a:hover{color:var(--th-teal);}
.th-footer-bottom .th-heart{color:var(--th-teal);}
@media(max-width:600px){.th-footer-bottom{justify-content:center;text-align:center;}}
@media(max-width:900px){.th-footer-grid{grid-template-columns:1fr 1fr;}}
@media(max-width:520px){.th-footer-grid{grid-template-columns:1fr;}}

/* =========================================================
   8. WOOCOMMERCE TWEAKS
   ========================================================= */
.woocommerce span.onsale{background:#c0316b;}
.woocommerce div.product form.cart .button{
  background:var(--th-green-dark);color:#fff;text-transform:uppercase;font-size:.85rem;letter-spacing:.06em;
  padding:14px 34px;border-radius:var(--th-radius);border:0;font-family:var(--th-font-head);font-weight:600;
}
.woocommerce div.product form.cart .button:hover{background:var(--th-teal);}

/* Generic product grid fallback (related/up-sell products on the single
   product page, shortcodes, etc.) — the shop page itself uses the more
   specific .ed-shop-grid rules further down. */
.woocommerce ul.products{
  display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:26px;list-style:none;margin:20px 0 0;padding:0;
  min-width:0;
}
@media(max-width:1100px){.woocommerce ul.products{grid-template-columns:repeat(3,minmax(0,1fr));}}
@media(max-width:750px){.woocommerce ul.products{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;}}
@media(max-width:460px){.woocommerce ul.products{grid-template-columns:minmax(0,1fr);}}

/* Fix: WooCommerce core's own stylesheet still ships a legacy clearfix
   for the (originally float-based) product grid:
     .woocommerce ul.products::before,
     .woocommerce ul.products::after { content:' '; display:table; }
   Under display:grid that generated box gets blockified into a real
   grid item — an empty "phantom" first card the same height as its
   siblings, with no content because it isn't a product at all. Grid
   doesn't need float-clearing, so switch it off everywhere ul.products
   is used (shop grid, Product Grid block, related/up-sell products). */
.woocommerce ul.products::before,
.woocommerce ul.products::after{
  content:none!important;display:none!important;
}

/* =========================================================
   9. SHOP PAGE — marketplace-style layout
   ========================================================= */

/* --- Page header band (shared across Pages, blog, category, Shop,
   Contact, Facilities, Special Offers — see th_page_hero() in
   inc/template-tags.php). Flat colour on purpose, no gradient/photo. --- */
.th-page-hero{
  background:var(--th-green-dark);
  padding:56px 0;
}
.th-page-hero__title{color:#fff;margin:0;font-size:2.2rem;}
.th-page-hero__desc{color:rgba(255,255,255,.85);margin:10px 0 0;max-width:700px;}

.ed-shop-section{padding-top:50px;}

/* --- Layout: sidebar + grid --- */
.ed-shop-layout{
  display:grid;
  grid-template-columns:270px minmax(0,1fr);
  gap:40px;
  align-items:start;
  min-width:0;
}
@media(max-width:900px){
  .ed-shop-layout{grid-template-columns:minmax(0,1fr);}
}

/* --- Sidebar widgets (collapsible) --- */
.ed-shop-sidebar{display:flex;flex-direction:column;gap:20px;}
.ed-shop-widget{
  background:var(--th-card-bg);
  border:1px solid var(--th-border);
  border-radius:var(--th-radius);
  overflow:hidden;
}
.ed-shop-widget__head{
  width:100%;display:flex;align-items:center;justify-content:space-between;
  padding:18px 20px;background:none;border:0;cursor:pointer;
  font-family:var(--th-font-head);font-size:1rem;font-weight:600;color:var(--th-green-dark);
}
.ed-shop-widget__toggle{
  display:inline-flex;align-items:center;justify-content:center;
  width:22px;height:22px;flex-shrink:0;font-size:1.15rem;line-height:1;color:var(--th-teal);
}
.ed-shop-widget__body{padding:0 20px 20px;}
.ed-shop-widget.is-collapsed .ed-shop-widget__body{display:none;}
.ed-shop-widget.is-collapsed .ed-shop-widget__head{padding-bottom:18px;}

/* Category list */
.ed-shop-cats li{
  display:flex;align-items:flex-start;justify-content:space-between;gap:8px;
  padding:9px 0;border-bottom:1px solid var(--th-border);
}
.ed-shop-cats li:last-child{border-bottom:0;}
.ed-shop-cats a{font-size:.92rem;color:var(--th-text);transition:.2s;overflow-wrap:break-word;word-break:break-word;min-width:0;}
.ed-shop-cats a:hover{color:var(--th-teal);}
.ed-shop-cats li.is-active a{color:var(--th-teal);font-weight:600;}
.ed-shop-cats__count{font-size:.8rem;color:var(--th-text-light);flex-shrink:0;}
.ed-shop-sidebar,
.ed-shop-widget,
.ed-shop-widget__body{min-width:0;}

/* Price range slider */
.ed-price-filter__label{
  font-size:.92rem;color:var(--th-text);margin:0 0 16px;font-family:var(--th-font-head);
}
.ed-price-filter__min,.ed-price-filter__max{color:var(--th-teal);font-weight:600;}
.ed-price-slider{position:relative;height:4px;margin:10px 4px 22px;}
.ed-price-slider__track{
  position:absolute;left:0;right:0;top:0;height:4px;border-radius:4px;background:var(--th-border);
}
.ed-price-slider__range{
  position:absolute;top:0;height:4px;border-radius:4px;background:var(--th-teal);
}
.ed-price-slider__input{
  position:absolute;top:-8px;left:0;width:100%;margin:0;height:20px;
  background:none;pointer-events:none;-webkit-appearance:none;appearance:none;
}
.ed-price-slider__input::-webkit-slider-thumb{
  pointer-events:all;-webkit-appearance:none;appearance:none;
  width:18px;height:18px;border-radius:50%;background:var(--th-teal);
  border:3px solid #fff;box-shadow:0 1px 4px rgba(0,0,0,.3);cursor:pointer;
}
.ed-price-slider__input::-moz-range-thumb{
  pointer-events:all;width:18px;height:18px;border-radius:50%;background:var(--th-teal);
  border:3px solid #fff;box-shadow:0 1px 4px rgba(0,0,0,.3);cursor:pointer;
}
.ed-price-slider__input::-webkit-slider-runnable-track{background:transparent;}
.ed-price-slider__input::-moz-range-track{background:transparent;}
.ed-price-filter__btn{
  display:inline-block;width:100%;text-align:center;background:var(--th-teal);color:#fff;
  font-family:var(--th-font-head);font-size:.82rem;letter-spacing:.05em;text-transform:uppercase;
  padding:11px 16px;border:0;border-radius:var(--th-radius);cursor:pointer;transition:.2s;
}
.ed-price-filter__btn:hover{background:var(--th-green-dark);}

/* Rating filter */
.ed-shop-ratings li{padding:6px 0;}
.ed-shop-ratings a{display:flex;align-items:center;gap:8px;}
.ed-shop-ratings__stars .dashicons{font-size:16px;width:16px;height:16px;}
.ed-shop-ratings__stars .is-on{color:#f2b632;}
.ed-shop-ratings__stars .is-off{color:var(--th-border);}
.ed-shop-ratings__label{font-size:.82rem;color:var(--th-text-light);}
.ed-shop-ratings li.is-active .ed-shop-ratings__label{color:var(--th-teal);font-weight:600;}

/* --- Toolbar: result count + sort --- */
.ed-shop-toolbar{
  display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:14px;
  margin-bottom:26px;
}
.woocommerce-result-count{margin:0;color:var(--th-text-light);font-size:.92rem;}
.woocommerce-ordering{margin:0;}
.woocommerce-ordering select.orderby{
  padding:10px 34px 10px 14px;border:1px solid var(--th-border);border-radius:var(--th-radius);
  background:#fff;font-family:var(--th-font-body);font-size:.9rem;color:var(--th-text);cursor:pointer;
}

/* --- Product grid ---
   Selector deliberately matches (or beats) .woocommerce ul.products'
   specificity — that generic fallback rule further up has an extra
   element selector (ul) which made it win over a plain two-class
   .ed-shop-grid.products selector, silently overriding the
   --th-shop-cols column count back to a hardcoded 4 regardless of the
   Customizer setting. */
.woocommerce ul.products.ed-shop-grid{
  display:grid!important;
  grid-template-columns:repeat(var(--th-shop-cols,4),minmax(0,1fr));
  gap:26px;
  list-style:none;
  margin:0;
  padding:0;
  min-width:0;
}
@media(max-width:1100px){.woocommerce ul.products.ed-shop-grid{grid-template-columns:repeat(min(3,var(--th-shop-cols,4)),minmax(0,1fr));}}
@media(max-width:750px){.woocommerce ul.products.ed-shop-grid{grid-template-columns:repeat(min(2,var(--th-shop-cols,4)),minmax(0,1fr));gap:16px;}}
@media(max-width:460px){.woocommerce ul.products.ed-shop-grid{grid-template-columns:minmax(0,1fr);}}

/* Card extras (wishlist icon / meta row) on top of .ed-product-card from blocks.css */
.ed-product-card{padding-bottom:4px;}
.ed-product-card__wishlist{
  position:absolute;top:12px;right:12px;z-index:3;
  width:34px;height:34px;border-radius:50%;background:#fff;border:0;
  display:flex;align-items:center;justify-content:center;cursor:pointer;
  box-shadow:0 2px 6px rgba(0,0,0,.15);transition:.2s;
}
.ed-product-card__wishlist .dashicons{font-size:16px;width:16px;height:16px;color:var(--th-text-light);}
.ed-product-card__wishlist:hover .dashicons{color:#e63946;}
.ed-product-card__wishlist.is-active .dashicons{color:#e63946;}
.ed-product-card__badge{right:auto;}

.ed-product-card__title-link{text-decoration:none;color:inherit;flex:1;display:block;}
.ed-product-card .ed-product-card__title{
  margin:18px 20px 14px!important;
  overflow-wrap:break-word;word-break:break-word;
}

.ed-product-card .ed-product-card__footer{
  margin-top:auto;
}

.ed-product-card__price del{
  order:2;display:block;font-size:.8rem;color:var(--th-text-light);
  text-decoration:line-through;line-height:1.2;font-weight:400;
}
.ed-product-card__price ins{
  order:1;display:block;text-decoration:none;font-weight:600;font-size:1.05rem;color:var(--th-text);
}
.ed-product-card__price .woocommerce-Price-amount{font-family:var(--th-font-head);}
.ed-product-card__price > .woocommerce-Price-amount{font-weight:600;font-size:1.05rem;color:var(--th-text);}

/* Fix: WooCommerce core's own frontend stylesheet still applies
   width:30.75% + float to `.product` list items. That's harmless inside
   the Product Grid block (its render.php adds a scoped width:100% reset
   just for that instance), but anywhere else — Related Products,
   up-sells, shortcodes — it was never reset, so cards collapsed down to
   a narrow floated column instead of filling their grid cell. */
.woocommerce ul.products li.product,
.woocommerce ul.products li.product.ed-product-card{
  width:100%!important;max-width:100%!important;flex:unset!important;float:none!important;margin:0!important;
}

/* Keep the footer (price + button) pinned to the bottom of every card,
   even when titles/meta differ in length between cards in the same row. */
.ed-product-card{height:100%;}

/* Buttons in the card action area: WooCommerce only adds the
   `add_to_cart_button` class when a product can be added straight from
   the loop. Products that need the single product page first (variable
   products, out of stock, etc.) render a plain `.button` labelled
   "Read more" instead — style that the same as Add to cart so cards stay
   visually consistent regardless of product type. */
.ed-product-card .ed-product-card__action .button{
  display:flex!important;align-items:center;justify-content:center;
  width:100%;min-height:40px;padding:8px 16px!important;
  border-radius:var(--s-woo-border-radius,var(--th-radius))!important;
  background-color:var(--s-text)!important;color:var(--s-bg)!important;
  font-family:var(--s-heading);font-size:0.875rem;font-weight:var(--s-heading-weight);line-height:1;
  text-decoration:none!important;white-space:nowrap;border:none!important;cursor:pointer;
  transition:background-color 0.2s ease,transform 0.15s ease,box-shadow 0.2s ease!important;
  opacity:1!important;margin-top:14px!important;
}
.ed-product-card .ed-product-card__action .button:hover,
.ed-product-card .ed-product-card__action .button:focus{
  background-color:var(--s-accent-hover,#D4D4D8)!important;color:var(--s-bg,#0B0B0C)!important;
  transform:translateY(-2px)!important;box-shadow:0 4px 12px rgba(0,0,0,0.25)!important;text-decoration:none!important;
}
@media(max-width:767px){
  .ed-product-card .ed-product-card__action .button{margin-top:0!important;}
}

/* --- Pagination --- */
.ed-shop-pagination{margin-top:44px;display:flex;justify-content:center;}
.ed-shop-pagination .page-numbers{
  display:inline-flex;align-items:center;justify-content:center;
  min-width:38px;height:38px;padding:0 8px;margin:0 3px;border-radius:var(--th-radius);
  background:#fff;border:1px solid var(--th-border);color:var(--th-text);font-size:.9rem;
}
.ed-shop-pagination .page-numbers.current{background:var(--th-teal);border-color:var(--th-teal);color:#fff;}
.ed-shop-pagination a.page-numbers:hover{border-color:var(--th-teal);color:var(--th-teal);}

/* --- Empty state --- */
.ed-shop-empty{
  grid-column:1/-1;text-align:center;padding:60px 20px;
  background:var(--th-card-bg);border-radius:var(--th-radius);border:1px dashed var(--th-border);
}
.ed-shop-empty p{color:var(--th-text-light);margin-bottom:18px;}

/* =========================================================
   10. SINGLE PRODUCT PAGE
   ========================================================= */
.ed-single-product-wrap{padding-bottom:70px;}

.ed-breadcrumb{
  padding:22px 0 4px;font-size:.85rem;color:var(--th-text-light);
}
.ed-breadcrumb a{color:var(--th-text-light);}
.ed-breadcrumb a:hover{color:var(--th-teal);}

/* Gallery */
.woocommerce div.product .woocommerce-product-gallery{
  border-radius:var(--th-radius);overflow:hidden;background:var(--th-cream-2,#eef4f8);
}
.woocommerce div.product .woocommerce-product-gallery img{
  border-radius:var(--th-radius);width:100%;height:auto;
}
.woocommerce div.product .flex-control-thumbs{margin-top:12px;gap:10px;display:flex;}
.woocommerce div.product .flex-control-thumbs li{list-style:none;width:76px;}
.woocommerce div.product .flex-control-thumbs img{
  border-radius:var(--th-radius);border:2px solid transparent;cursor:pointer;opacity:.7;
}
.woocommerce div.product .flex-control-thumbs img.flex-active{border-color:var(--th-teal);opacity:1;}
.woocommerce-product-gallery__trigger{
  background:#fff;border-radius:50%;box-shadow:var(--th-shadow);width:38px;height:38px;
  display:flex;align-items:center;justify-content:center;
}
.woocommerce span.onsale{
  font-family:var(--th-font-head);font-size:.78rem;font-weight:600;letter-spacing:.02em;
}

/* Summary column */
.woocommerce div.product .summary{padding-top:6px;}
.woocommerce div.product .summary .product_title{margin-bottom:14px;}
.woocommerce div.product p.price,
.woocommerce div.product span.price{
  font-family:var(--th-font-head);font-size:1.4rem;font-weight:600;color:var(--th-teal);margin-bottom:20px;display:block;
}
.woocommerce div.product p.price del,
.woocommerce div.product span.price del{
  color:var(--th-text-light);font-size:.85em;font-weight:400;text-decoration:line-through;opacity:1;margin-right:8px;
}
.woocommerce div.product p.price ins,
.woocommerce div.product span.price ins{
  text-decoration:none;color:var(--th-teal);font-weight:600;
}
.woocommerce div.product .woocommerce-product-details__short-description{
  color:var(--th-text-light);line-height:1.8;margin-bottom:26px;
}
.woocommerce div.product form.cart{
  display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin-bottom:20px;
}
.woocommerce div.product form.cart .quantity{margin:0;}
.woocommerce div.product form.cart .quantity .qty{
  width:72px;padding:13px 10px;border:1px solid var(--th-border);border-radius:var(--th-radius);
  font-family:var(--th-font-body);text-align:center;background:#fff;
}
.woocommerce div.product .product_meta{
  margin-top:30px;padding-top:20px;border-top:1px solid var(--th-border);
  font-size:.85rem;color:var(--th-text-light);
}
.woocommerce div.product .product_meta > span{display:block;margin-bottom:6px;}
.woocommerce div.product .product_meta a{color:var(--th-teal);}
.woocommerce div.product .product_meta a:hover{text-decoration:underline;}

/* Tabs (Description / Reviews) */
.woocommerce-tabs{margin-top:56px;}
.woocommerce-tabs ul.tabs{
  border-bottom:1px solid var(--th-border);padding:0;margin:0;display:flex;gap:6px;list-style:none;
}
.woocommerce-tabs ul.tabs li{list-style:none;margin:0;}
.woocommerce-tabs ul.tabs li a{
  display:inline-block;padding:14px 22px;font-family:var(--th-font-head);font-weight:600;font-size:.92rem;
  color:var(--th-text-light);border-bottom:2px solid transparent;margin-bottom:-1px;
}
.woocommerce-tabs ul.tabs li.active a{color:var(--th-teal);border-bottom-color:var(--th-teal);}
.woocommerce-Tabs-panel{padding:30px 0 0;color:var(--th-text-light);line-height:1.85;}
.woocommerce-Tabs-panel h2{font-size:1.4rem;margin-bottom:16px;}

/* Related / up-sell products */
.related.products,
.up-sells.products{
  margin-top:70px;padding-top:50px;border-top:1px solid var(--th-border);
}
.related.products > h2,
.up-sells.products > h2{font-size:1.6rem;margin-bottom:26px;}

@media(max-width:800px){
  .woocommerce div.product .summary{margin-top:30px;}
}

/* Widgets/misc */
.screen-reader-text{position:absolute;left:-9999px;}
.th-badge-summer{
  position:absolute;top:20px;left:20px;background:#fff;color:var(--th-green-dark);
  padding:8px 16px;font-family:var(--th-font-head);font-size:.75rem;letter-spacing:.08em;text-transform:uppercase;
}

/* Empty cart (woocommerce/cart/cart-empty.php) */
.ed-cart-empty{text-align:center;padding:70px 20px;}
.ed-cart-empty__icon{
  font-size:60px;width:60px;height:60px;color:var(--th-green-dark);opacity:.8;margin-bottom:18px;display:inline-block;
}
.ed-cart-empty__msg{font-family:var(--th-font-head);font-size:1.3rem;color:var(--th-green-dark);margin:0 0 26px;}
.ed-cart-empty__return .button{
  display:inline-block;background:var(--th-green-dark);color:#fff;text-decoration:none;
  padding:13px 30px;border-radius:var(--th-radius);font-family:var(--th-font-head);font-weight:600;
  font-size:.85rem;letter-spacing:.05em;text-transform:uppercase;transition:.2s;
}
.ed-cart-empty__return .button:hover{background:var(--th-teal);}

/* Empty Cart fallback: WooCommerce's default "New in store" block.
   Belt-and-suspenders alongside the render_block PHP filter in
   functions.php, in case the block ever renders client-side instead. */
.wc-block-cart__empty-cart .wp-block-woocommerce-product-new,
.wc-block-cart__empty-cart .wc-block-product-template{
  display:none!important;
}
