/* ============================================================
   Finderra craft pass: uniform card containers and readable contrast
   Loaded after the design system on every page. Presentation only.
   ============================================================ */

/* ---------- Shop archive: one image container size for every card ---------- */
.woocommerce ul.products li.product a.ct-media-container{
  display:block;
  aspect-ratio:1 / 1;
  overflow:hidden;
  border-radius:12px;
  background:#F6F1E4;
}
.woocommerce ul.products li.product a.ct-media-container img{
  width:100%;
  height:100%;
  object-fit:cover;
}
/* Two lines of title everywhere so every card ends at the same height */
.woocommerce ul.products li.product .woocommerce-loop-product__title{
  display:-webkit-box !important;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
  line-height:1.35;
  min-height:2.7em;
  max-height:2.7em;
}
.woocommerce ul.products li.product .price{min-height:2.6em}

/* Merchant hover button over the image was white on transparent: unreadable */
.woocommerce ul.products li.product a.button.product_type_simple{
  background:#1B4332;
  border-color:#1B4332;
  color:#fff;
}
.woocommerce ul.products li.product a.button.product_type_simple:hover{
  background:#142A21;
  border-color:#142A21;
}
/* Cash on delivery pill: pure green was too bright for white text */
.woocommerce ul.products li.product a.button.alt{background:#1B4332;border-color:#1B4332;color:#fff}
.woocommerce ul.products li.product a.button.alt:hover{background:#142A21;border-color:#142A21}
.woocommerce ul.products li.product .merchant-quick-view-button{background:#212121;border-color:#212121;color:#fff}

/* ---------- Product page: uniform thumbnails and recommendation cards ---------- */
.single-product .fnd-pd-thumb{
  aspect-ratio:1 / 1;
  width:76px;
  height:76px;
  overflow:hidden;
  border-radius:10px;
  background:#F6F1E4;
  flex:0 0 auto;
}
.single-product .fnd-pd-thumb img{width:100%;height:100%;object-fit:cover}
.single-product .fnd-rcd-card{display:flex;flex-direction:column}
.single-product .fnd-rcd-card img{
  width:100%;
  aspect-ratio:4 / 3;
  object-fit:cover;
  border-radius:12px;
  background:#F6F1E4;
}
.single-product .fnd-rcd-card .fnd-rcd-title,
.single-product .fnd-rcd-card h4,
.single-product .fnd-rcd-card h3{
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}
.single-product .fnd-pd-title{text-wrap:balance}
.single-product .fnd-rcd-wa{background:#0E6B4E !important;border-color:#0E6B4E !important;color:#fff !important}
.single-product .fnd-rcd-note{color:#4E5A50 !important}
.single-product .fnd-pd-badge{color:#8C2A16 !important}
.single-product .fnd-pd-price ins,
.single-product .fnd-pd-price ins bdi{color:#C1121F !important}
.single-product .stars-filled{color:#8A4508 !important}
.single-product .fnd-rcd-card del,
.single-product .fnd-rcd-card del *{color:#6F6A5C !important}
.single-product .fnd-rcd-eyebrow,
.single-product .fnd-rcd-toolbar-label,
.single-product .fnd-rcd-count{color:#56685A !important}
.single-product .fnd-pd-desc-section a,
.single-product .fnd-pd-reviews-section a,
.single-product .fnd-cod-form a,
.single-product .fnd-pd-info a{color:#C1121F}
.single-product .fnd-cod-toggle em,
.single-product .fnd-cod-chev{color:#FBE3D8 !important}
body form.cart .single_add_to_cart_button,
body .fnd-cod-toggle{background:#C1121F !important;border-color:#C1121F !important;color:#fff !important}
body form.cart .single_add_to_cart_button:hover,
body .fnd-cod-toggle:hover{background:#9A0E18 !important;border-color:#9A0E18 !important}

/* ---------- Contrast: light surfaces (homepage, shop, product body) ----------
   Accent orange cannot carry white or small text on light backgrounds, so
   action surfaces take the darker accent and accent text darkens too. */
body [class~="bg-[#E76F51]"]{background:#C1121F !important;border-color:#C1121F !important;color:#fff !important}
body [class*="#E76F51"]:not([class*="bg-[#E76F51]"]){color:#C1121F !important}
body [class*="bg-[#FDE2E4]"][class*="#E76F51"]{color:#8C2A16 !important}
body [class~="text-stone-400"],body del,body del *{color:#6F6A5C !important}
body [class~="text-stone-300"],body [class~="text-stone-200"]{color:#5C6470 !important}
body [class~="text-amber-300"],body [class~="text-amber-400"],body [class~="text-amber-500"]{color:#8A4508 !important}
body [class~="text-[#D4A373]"]{color:#8A5A34 !important}
body [style*="color:#F59E0B"],body [style*="color: #F59E0B"]{color:#8A4508 !important}
body .fq-page .fq-stars{color:#8A4508}
/* Footer links: the footer surface is light, so palette red links need to be darker */
body #footer-section a{color:#C1121F}
body #footer-section a:hover{color:#9A0E18}
/* Cart counts: white on accent orange failed */
body .ct-dynamic-count-cart{background:#C1121F !important;color:#fff !important}
body .moderncart-floating-cart-count,
body .moderncart-floating-cart-count *{background:#C1121F !important;color:#fff !important}
/* Translucent white pills sat on light bands and vanished */
body [class*="bg-white/20"]{background:#1B4332 !important;border-color:#1B4332 !important;color:#fff !important}
/* WhatsApp pill */
body a[class*="bg-[#25D366]"]{background:#0E6B4E !important;border-color:#0E6B4E !important}
body a[class*="bg-[#25D366]"]:hover{background:#0A5340 !important;border-color:#0A5340 !important}
/* Header nav links picked up the accent from the palette */
body #nav-header .menu-item > a,
body #nav-header .ct-menu-link{color:#2B2D42}
/* The palette red used for links, one step darker for AA */
body .entry-content a,
body .woocommerce-MyAccount-navigation-link a{color:#C4181E}

/* ---------- Contrast: dark surfaces (reviews band, newsletter, quiz CTA) ---------- */
body [class*="bg-[#1B4332]"] [class~="text-amber-300"],
body [class*="bg-[#1F4A37]"] [class~="text-amber-300"],
body [class*="bg-[#163829]"] [class~="text-amber-300"],
body [class*="bg-[#282C40]"] [class~="text-amber-300"]{color:#FAD2A1 !important}
body [class*="bg-[#1B4332]"] [class*="#E76F51"],
body [class*="bg-[#1F4A37]"] [class*="#E76F51"],
body [class*="bg-[#163829]"] [class*="#E76F51"],
body [class*="bg-[#282C40]"] [class*="#E76F51"],
body .fq-dark [class*="#E76F51"]{color:#F6B28B !important}
body [class*="bg-[#1F4A37]"] p,
body [class*="bg-[#1F4A37]"] div,
body [class*="bg-[#1F4A37]"] span,
body [class*="bg-[#1F4A37]"] small,
body [class*="bg-[#1F4A37]"] strong{color:#F1E7DA}
body #newsletter-section p,
body #newsletter-section span,
body #newsletter-section li{color:#F1E7DA}
/* Grey body copy on ink was 2.2:1 */
body .stk-block-column p,
body .stk-block-column div,
body .stk-block-column span,
body .stk-block-column li,
body .stk-block-column h2,
body .stk-block-column h3{color:#D8DEE9}
body .stk-block-column a{color:#FAD2A1}
body [class~="bg-[#1B4332]"][class~="text-white"],
body #reviews-section [class~="text-white"]{color:#fff !important}
body .fq-dark p,body .fq-dark span{color:#C6CEDA}

/* ---------- Inline colours the templates hard-code ---------- */
body [style*="color:#E76F51"],body [style*="color: #E76F51"]{color:#C1121F !important}
body [style*="color:#CFE6D4"],body [style*="color: #CFE6D4"]{color:#FBE3D8 !important}

/* ---------- Craft pass, second round: beat the theme palette rules ---------- */
/* The theme maps these Tailwind colour classes with its own !important palette
   rules, so these carry an html body prefix to outrank them. */
html body [class~="text-amber-300"],
html body [class~="text-amber-400"],
html body [class~="text-amber-500"]{color:#8A4508 !important}
html body [class~="text-stone-300"],
html body [class~="text-stone-200"]{color:#5C6470 !important}
html body [class*="#E76F51"]:not([class*="bg-[#E76F51]"]){color:#C1121F !important}
html body [class~="text-[#D4A373]"]{color:#8A5A34 !important}
html body [class~="bg-[#E76F51]"]{background:#C1121F !important;border-color:#C1121F !important;color:#fff !important}

/* Dark surfaces: the same classes have to go bright instead. Same-element and
   descendant forms both included because some badges carry both. */
html body [class*="bg-[#1B4332]"][class~="text-amber-300"],
html body [class*="bg-[#1B4332]"] [class~="text-amber-300"],
html body [class*="bg-[#1F4A37]"] [class~="text-amber-300"],
html body [class*="bg-[#163829]"] [class~="text-amber-300"],
html body [class*="bg-[#2B2F44]"] [class~="text-amber-300"],
html body [class*="bg-[#2B2F44]"] [class~="text-amber-400"],
html body [class*="bg-[#282C40]"] [class~="text-amber-300"],
html body #newsletter-section [class~="text-amber-300"],
html body .fq-dark [class~="text-amber-300"]{color:#FAD2A1 !important}
html body [class*="bg-[#1B4332]"][class~="text-[#D4A373]"],
html body [class*="bg-[#1F4A37]"][class~="text-[#D4A373]"],
html body #footer-section [class~="text-[#D4A373]"]{color:#E3B98A !important}
html body [class*="bg-[#1B4332]"] [class~="text-stone-300"],
html body [class*="bg-[#1B4332]"] [class~="text-stone-200"],
html body [class*="bg-[#1F4A37]"] [class~="text-stone-300"],
html body [class*="bg-[#163829]"] [class~="text-stone-300"],
html body #newsletter-section [class~="text-stone-300"],
html body #newsletter-section [class~="text-stone-200"],
html body .fq-dark [class~="text-stone-300"],
html body .fq-dark [class~="text-stone-200"]{color:#C6CEDA !important}
html body [class*="bg-[#1B4332]"] [class*="#E76F51"],
html body [class*="bg-[#1F4A37]"] [class*="#E76F51"],
html body [class*="bg-[#163829]"] [class*="#E76F51"],
html body #newsletter-section [class*="#E76F51"],
html body .fq-dark [class*="#E76F51"]{color:#F6B28B !important}
html body [class*="bg-[#1B4332]"][class~="text-white"],
html body [class*="bg-[#1F4A37]"][class~="text-white"],
html body [class*="bg-[#2B2F44]"][class~="text-white"]{color:#fff !important}

/* ---------- Craft pass, third round: per-section ground truth ----------
   These sections have stable IDs and known backgrounds, so the rules are
   written against the surface that actually renders. */

/* Reviews score panel and badges sit on light surfaces */
body [class*="bg-[#2B2F44]"][class~="text-amber-300"],
body [class*="bg-[#2B2F44]"][class~="text-amber-400"]{color:#FAD2A1 !important}
html body [class~="text-amber-400"]{color:#8A4508 !important}
html body [class~="text-amber-300"]{color:#8A4508 !important}

/* The newsletter band is dark green, so everything in it goes light */
body #newsletter-section p,
body #newsletter-section span,
body #newsletter-section div,
body #newsletter-section li,
body #newsletter-section strong,
body #newsletter-section small{color:#F1E7DA !important}
body #newsletter-section a:not([class*="bg-"]){color:#FAD2A1 !important}
body #newsletter-section [class~="text-amber-300"],
body #newsletter-section [class~="text-amber-400"]{color:#FAD2A1 !important}
body #newsletter-section [class~="bg-[#E76F51]"],
body #newsletter-section [class~="bg-[#E76F51]"] *{background:#C1121F !important;border-color:#C1121F !important;color:#fff !important}
body #newsletter-section [class~="bg-[#1F4A37]"]{background:#1F4A37 !important}

/* The footer renders light, so its copy has to be dark */
body #footer-section p,
body #footer-section span,
body #footer-section li,
body #footer-section div,
body #footer-section a,
body #footer-section small{color:#4A5163 !important}
body #footer-section h3,
body #footer-section h4{color:#2B2D42 !important}
body #footer-section [class~="text-white"]{color:#fff !important}
body #footer-section [class*="bg-[#1B4332]"]{color:#fff !important}
body #footer-section [class~="text-amber-300"],
body #footer-section [class~="text-amber-400"]{color:#8A4508 !important}
body #footer-section [class~="text-[#D4A373]"]{color:#8A5A34 !important}

/* Buttons on accent keep white text whatever band they sit in */
html body [class~="bg-[#E76F51]"]{background:#C1121F !important;border-color:#C1121F !important;color:#fff !important}
html body [class~="bg-[#E76F51]"] *{color:#fff !important}

/* ---------- Craft pass, final round: outrank the section rule ---------- */
/* finderra-home.css pins the reviews score in gold with an ID rule, so these
   carry the same ID plus a class to win. */
body #reviews-section .text-amber-400,
body #reviews-section .text-amber-300,
body #reviews-section [class~="text-amber-400"]{color:#8A4508 !important}
/* Newsletter avatars keep their own dark-or-light text */
body #newsletter-section span[class*="text-white"],
body #newsletter-section div[class*="text-white"]{color:#fff !important}
body #newsletter-section span[class*="text-[#2B2D42]"]{color:#2B2D42 !important}
/* Dark badges inside the light footer keep light text */
body #footer-section [class*="bg-[#1B4332]"][class~="text-amber-300"],
body #footer-section [class*="bg-[#1B4332]"] [class~="text-amber-300"]{color:#FAD2A1 !important}
body #footer-section [class*="bg-[#1B4332]"][class~="text-white"],
body #footer-section [class*="bg-[#1B4332]"] [class~="text-white"]{color:#fff !important}

/* Newsletter links one step brighter for AA */
body #newsletter-section a:not([class*="bg-"]){color:#FBE7C6 !important}

/* Product summary star rating */
body .fnd-pd-stars, body .fnd-pd-stars *{color:#8A4508 !important}

/* Keep the shop card category line to one row so cards stay the same height */
.woocommerce ul.products li.product ul.entry-meta{
  display:flex;
  flex-wrap:nowrap;
  overflow:hidden;
  white-space:nowrap;
  text-overflow:ellipsis;
  min-height:20px;
}

/* Screen-reader text was leaking into layout and shifting card heights */
body .screen-reader-text{
  position:absolute !important;
  width:1px !important;
  height:1px !important;
  padding:0 !important;
  margin:-1px !important;
  overflow:hidden !important;
  clip:rect(0,0,0,0) !important;
  white-space:nowrap !important;
  border:0 !important;
}
/* One action area height for every card, whether or not it has two buttons */
.woocommerce ul.products li.product .ct-woo-card-actions{
  min-height:120px;
  display:flex;
  flex-direction:column;
  justify-content:flex-end;
  gap:6px;
}
