/*
Theme Name:   Indigo Outdoor
Theme URI:    https://indigooutdoorfurniture.com
Description:  Custom child theme for Indigo Outdoor Furniture. Overrides WoodMart's
              presentation layer only — products, orders, and settings are untouched.
Author:       NTemOnline
Template:     woodmart
Version:      1.2.0
Text Domain:  indigo-child
*/

/* ==========================================================================
   1. Tokens
   ========================================================================== */

:root {
  /* Ground */
  --idg-ink:        #0F2438;   /* deepest indigo, base dark */
  --idg-indigo:     #1C4670;   /* mid indigo, brand */
  --idg-indigo-lt:  #2E5C8A;   /* hover / borders on dark */

  /* Light surfaces */
  --idg-linen:      #EDEDE8;   /* cool greyed paper — not cream */
  --idg-linen-deep: #E2E2DC;
  --idg-white:      #FFFFFF;

  /* Text */
  --idg-slate:      #5C6B7A;   /* secondary text */
  --idg-slate-lt:   #8B98A5;   /* tertiary, meta */

  /* Accent — the rope/teak tone, from the product itself. Prices only. */
  --idg-rope:       #C9A97E;
  --idg-rope-deep:  #A88453;

  /* Lines */
  --idg-rule:       #D6D6D0;
  --idg-rule-dark:  rgba(255,255,255,0.14);

  /* Type */
  --idg-display: "Petrona", Georgia, "Times New Roman", serif;
  --idg-sans:    "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Scale — 1.25 minor third off 17px */
  --idg-t-xs:   0.75rem;
  --idg-t-sm:   0.875rem;
  --idg-t-base: 1.0625rem;
  --idg-t-md:   1.3125rem;
  --idg-t-lg:   1.75rem;
  --idg-t-xl:   2.375rem;
  --idg-t-2xl:  3.25rem;
  --idg-t-3xl:  4.5rem;

  /* Rhythm */
  --idg-gutter: 1.5rem;
  --idg-max:    1360px;
  --idg-band:   6.5rem;   /* vertical padding on full-width bands */

  --idg-radius: 2px;      /* crisp, not pillowy */
  --idg-ease:   cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ==========================================================================
   2. Base typography — overrides WoodMart's font settings
   ========================================================================== */

body,
body.woodmart-theme,
body p,
body .wd-entities-title,
body input,
body select,
body textarea,
body button {
  font-family: var(--idg-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-size: var(--idg-t-base);
  line-height: 1.65;
  color: var(--idg-ink);
  background: var(--idg-white);
}

body h1, body h2, body h3,
body .idg-display {
  font-family: var(--idg-display);
  font-weight: 500;
  font-optical-sizing: auto;
  letter-spacing: -0.015em;
  line-height: 1.1;
  color: var(--idg-ink);
}

body h4, body h5, body h6 {
  font-family: var(--idg-sans);
  font-weight: 600;
  letter-spacing: -0.005em;
  line-height: 1.25;
}

body h1 { font-size: clamp(2.25rem, 5.2vw, var(--idg-t-3xl)); }
body h2 { font-size: clamp(1.875rem, 3.6vw, var(--idg-t-2xl)); }
body h3 { font-size: var(--idg-t-xl); }

/* Body copy shouldn't run wider than it can be read. */
body .idg-prose p { max-width: 66ch; }

a { color: var(--idg-indigo); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--idg-ink); }

/* Visible keyboard focus everywhere — WoodMart suppresses this in places. */
body a:focus-visible,
body button:focus-visible,
body input:focus-visible,
body select:focus-visible,
body .button:focus-visible {
  outline: 2px solid var(--idg-rope-deep);
  outline-offset: 3px;
}

/* ==========================================================================
   3. Shared layout helpers
   ========================================================================== */

.idg-wrap {
  max-width: var(--idg-max);
  margin-inline: auto;
  padding-inline: var(--idg-gutter);
}

.idg-band { padding-block: var(--idg-band); }

.idg-band--dark {
  background: var(--idg-ink);
  color: var(--idg-linen);
}
.idg-band--dark h1,
.idg-band--dark h2,
.idg-band--dark h3 { color: var(--idg-white); }
.idg-band--dark p  { color: rgba(237,237,232,0.78); }

.idg-band--linen { background: var(--idg-linen); }

/* Section heading + optional standfirst. No all-caps eyebrows. */
.idg-head { margin-bottom: 3rem; max-width: 60ch; }
.idg-head h2 { margin: 0 0 0.75rem; }
.idg-head p  { margin: 0; color: var(--idg-slate); font-size: var(--idg-t-md); line-height: 1.5; }
.idg-band--dark .idg-head p { color: rgba(237,237,232,0.72); }

/* ==========================================================================
   4. Buttons
   ========================================================================== */

body .idg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-family: var(--idg-sans);
  font-size: var(--idg-t-sm);
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1;
  padding: 1.05rem 2rem;
  border-radius: var(--idg-radius);
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s var(--idg-ease),
              border-color 0.2s var(--idg-ease),
              color 0.2s var(--idg-ease);
}

body .idg-btn--solid  { background: var(--idg-indigo); color: var(--idg-white); }
body .idg-btn--solid:hover { background: var(--idg-ink); color: var(--idg-white); }

body .idg-btn--ghost  { background: transparent; color: var(--idg-white); border-color: var(--idg-rule-dark); }
body .idg-btn--ghost:hover { border-color: var(--idg-linen); background: rgba(255,255,255,0.06); color: var(--idg-white); }

body .idg-btn--line   { background: transparent; color: var(--idg-ink); border-color: var(--idg-ink); }
body .idg-btn--line:hover { background: var(--idg-ink); color: var(--idg-white); }

/* WooCommerce's own buttons, brought into the system */
body .woocommerce .button,
body .wd-buttons .wd-add-cart-btn,
body .single_add_to_cart_button,
body .checkout-button,
body .wc-block-components-button {
  font-family: var(--idg-sans) !important;
  font-weight: 600;
  border-radius: var(--idg-radius);
  letter-spacing: 0.01em;
}

body .single_add_to_cart_button,
body .checkout-button {
  background-color: var(--idg-indigo) !important;
  color: var(--idg-white) !important;
  padding: 1.15rem 2.25rem !important;
}
body .single_add_to_cart_button:hover,
body .checkout-button:hover { background-color: var(--idg-ink) !important; }

/* ==========================================================================
   5. Hero — the signature element
   ========================================================================== */

.idg-hero {
  position: relative;
  background: var(--idg-ink);
  color: var(--idg-linen);
  overflow: hidden;
}

/* A soft indigo lift behind the product so the cut-out doesn't float in void. */
.idg-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(58% 68% at 76% 46%, rgba(46,92,138,0.55) 0%, rgba(15,36,56,0) 70%);
  pointer-events: none;
}

.idg-hero__inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  align-items: center;
  gap: 3rem;
  min-height: 76vh;
  padding-block: 5rem;
}

.idg-hero__copy { max-width: 34ch; }

.idg-hero h1 {
  color: var(--idg-white);
  margin: 0 0 1.5rem;
  font-weight: 500;
  line-height: 1.03;
  letter-spacing: -0.025em;
}

.idg-hero__sub {
  font-size: var(--idg-t-md);
  line-height: 1.55;
  color: rgba(237,237,232,0.76);
  margin: 0 0 2.5rem;
}

.idg-hero__actions { display: flex; flex-wrap: wrap; gap: 0.875rem; }

.idg-hero__media {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.idg-hero__media img {
  width: 100%;
  height: auto;
  max-height: 62vh;
  object-fit: contain;
  display: block;
}

/* The single orchestrated moment on the page: one slow settle at load. */
@media (prefers-reduced-motion: no-preference) {
  .idg-hero__media img {
    animation: idg-settle 1.1s var(--idg-ease) both;
  }
  .idg-hero__copy > * {
    animation: idg-rise 0.8s var(--idg-ease) both;
  }
  .idg-hero__copy > *:nth-child(2) { animation-delay: 0.08s; }
  .idg-hero__copy > *:nth-child(3) { animation-delay: 0.16s; }
}

@keyframes idg-settle {
  from { opacity: 0; transform: translateY(-14px) scale(1.02); }
  to   { opacity: 1; transform: none; }
}
@keyframes idg-rise {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}

/* Shipping / assurance strip directly under the hero */
.idg-assure {
  background: var(--idg-indigo);
  color: var(--idg-white);
}
.idg-assure ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem 2.5rem;
  list-style: none;
  margin: 0;
  padding-block: 1.15rem;
  font-size: var(--idg-t-sm);
  font-weight: 500;
}
.idg-assure li { margin: 0; }

/* ==========================================================================
   6. Category grid — even three-up, caption below the image
   ========================================================================== */

.idg-cats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2.5rem 1.75rem;
}

.idg-cat {
  display: block;
  text-decoration: none;
  color: var(--idg-ink);
}

.idg-cat__frame {
  display: block;
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: var(--idg-radius);
  background: var(--idg-linen);
  margin-bottom: 1rem;
}

.idg-cat__frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--idg-ease);
}

/* Transparent product cut-outs: contain and centre on the linen surface
   instead of cropping them to fill, which leaves them clipped and floating. */
.idg-cat--cutout .idg-cat__frame img {
  object-fit: contain;
  padding: 14%;
}

.idg-cat:hover .idg-cat__frame img { transform: scale(1.03); }

.idg-cat__label { display: block; }

.idg-cat__name {
  display: block;
  font-family: var(--idg-display);
  font-size: var(--idg-t-md);
  font-weight: 500;
  line-height: 1.2;
  color: var(--idg-ink);
}
.idg-cat:hover .idg-cat__name { color: var(--idg-indigo); }

.idg-cat__count {
  display: block;
  margin-top: 0.25rem;
  font-size: var(--idg-t-sm);
  color: var(--idg-slate-lt);
}
.idg-cat--empty .idg-cat__count { color: var(--idg-rope-deep); }

/* ==========================================================================
   7. Product grid on the homepage
   ========================================================================== */

.idg-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2.25rem 1.5rem;
}

.idg-card { position: relative; }

.idg-card__media {
  display: block;
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--idg-linen);
  border-radius: var(--idg-radius);
  margin-bottom: 1.1rem;
}
.idg-card__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--idg-ease);
}
.idg-card:hover .idg-card__media img { transform: scale(1.035); }

.idg-card__sale {
  position: absolute;
  z-index: 2;
  top: 0.85rem;
  left: 0.85rem;
  background: var(--idg-ink);
  color: var(--idg-white);
  font-size: var(--idg-t-xs);
  font-weight: 600;
  padding: 0.35rem 0.6rem;
  border-radius: var(--idg-radius);
}

.idg-card__title {
  font-family: var(--idg-sans);
  font-size: var(--idg-t-base);
  font-weight: 500;
  line-height: 1.4;
  margin: 0 0 0.4rem;
}
.idg-card__title a { color: var(--idg-ink); text-decoration: none; }
.idg-card__title a:hover { text-decoration: underline; }

.idg-card__price { font-size: var(--idg-t-base); color: var(--idg-ink); }
.idg-card__price del { color: var(--idg-slate-lt); font-size: var(--idg-t-sm); margin-right: 0.5rem; }
.idg-card__price ins { text-decoration: none; color: var(--idg-rope-deep); font-weight: 600; }

/* ==========================================================================
   8. Climate / materials band
   ========================================================================== */

.idg-climate__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 5rem;
  align-items: center;
}
.idg-climate img { width: 100%; height: auto; display: block; border-radius: var(--idg-radius); }

.idg-notes { list-style: none; margin: 2.25rem 0 0; padding: 0; }
.idg-notes li {
  padding: 1.15rem 0;
  border-top: 1px solid var(--idg-rule-dark);
}
.idg-notes li:last-child { border-bottom: 1px solid var(--idg-rule-dark); }
.idg-notes strong {
  display: block;
  font-size: var(--idg-t-base);
  font-weight: 600;
  color: var(--idg-white);
  margin-bottom: 0.25rem;
}
.idg-notes span { font-size: var(--idg-t-sm); color: rgba(237,237,232,0.7); line-height: 1.55; }

/* ==========================================================================
   9. Showroom / consultation close
   ========================================================================== */

.idg-visit__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 4rem;
  align-items: center;
}
.idg-visit address {
  font-style: normal;
  font-size: var(--idg-t-md);
  line-height: 1.6;
  color: var(--idg-slate);
  margin: 0 0 2rem;
}
.idg-visit__actions { display: flex; flex-wrap: wrap; gap: 0.875rem; }

/* ==========================================================================
   10. Shop & archive pages
   ========================================================================== */

body.woocommerce .page-title,
body .wd-page-title { font-family: var(--idg-display); }

/* Product card titles across the whole store */
body .wd-entities-title {
  font-family: var(--idg-sans) !important;
  font-weight: 500;
  letter-spacing: -0.005em;
}

/* Price treatment, store-wide */
body .price,
body .wd-product .price {
  font-family: var(--idg-sans);
  color: var(--idg-ink);
}
body .price ins { text-decoration: none; color: var(--idg-rope-deep); font-weight: 600; }
body .price del { color: var(--idg-slate-lt); opacity: 1; }

/* Category meta under product cards — quiet it down */
body .wd-product-cats,
body .wd-product .wd-product-cats a {
  font-size: var(--idg-t-xs);
  color: var(--idg-slate-lt);
  letter-spacing: 0;
  text-transform: none;
}

/* Sale badge */
body .product-labels .onsale,
body .wd-product-label.onsale {
  background: var(--idg-ink);
  color: var(--idg-white);
  border-radius: var(--idg-radius);
  font-family: var(--idg-sans);
  font-weight: 600;
}

/* ==========================================================================
   11. Single product
   ========================================================================== */

body.single-product .product_title {
  font-family: var(--idg-display);
  font-weight: 500;
  letter-spacing: -0.02em;
  font-size: clamp(1.875rem, 3vw, var(--idg-t-xl));
}
body.single-product .summary .price { font-size: var(--idg-t-lg); margin-bottom: 1.5rem; }
body.single-product .woocommerce-product-details__short-description { color: var(--idg-slate); }

body.single-product .wd-tabs .wd-nav-tabs li a,
body.single-product .woocommerce-tabs ul.tabs li a {
  font-family: var(--idg-sans);
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
}

/* ==========================================================================
   12. Header & footer trim
   ========================================================================== */

body .whb-main-header a,
body .wd-nav > li > a {
  font-family: var(--idg-sans);
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

body .wd-header-nav .wd-nav > li > a { font-size: var(--idg-t-sm); }

/* Footer */
body .wd-footer,
body footer.footer-container {
  background: var(--idg-ink);
  color: rgba(237,237,232,0.72);
}
body .wd-footer a,
body footer.footer-container a { color: rgba(237,237,232,0.82); }
body .wd-footer a:hover,
body footer.footer-container a:hover { color: var(--idg-white); }
body .wd-footer .widgettitle,
body footer.footer-container .widgettitle {
  font-family: var(--idg-sans);
  font-weight: 600;
  color: var(--idg-white);
  text-transform: none;
  letter-spacing: 0;
}

/* ==========================================================================
   13. WhatsApp — their real sales channel, so give it a persistent home
   ========================================================================== */

.idg-wa {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 400;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.15rem;
  background: var(--idg-ink);
  color: var(--idg-white);
  border-radius: 999px;
  font-size: var(--idg-t-sm);
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 6px 24px rgba(15,36,56,0.28);
  transition: background-color 0.2s var(--idg-ease);
}
.idg-wa:hover { background: var(--idg-indigo); color: var(--idg-white); }
.idg-wa svg { width: 19px; height: 19px; flex: none; fill: currentColor; }

@media (max-width: 768px) {
  .idg-wa { right: 1rem; bottom: 5.25rem; padding: 0.8rem; }
  .idg-wa span { display: none; }
}

/* ==========================================================================
   14. Responsive
   ========================================================================== */

@media (max-width: 1100px) {
  .idg-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .idg-climate__inner,
  .idg-visit__inner { gap: 3rem; }
}

@media (max-width: 900px) {
  :root { --idg-band: 4.5rem; }

  .idg-hero__inner {
    grid-template-columns: 1fr;
    min-height: 0;
    padding-block: 3.5rem;
    gap: 2.5rem;
  }
  .idg-hero__copy { max-width: none; order: 2; }
  .idg-hero__media { order: 1; }
  .idg-hero__media img { max-height: 42vh; }

  .idg-cats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem 1.25rem; }

  .idg-climate__inner,
  .idg-visit__inner { grid-template-columns: 1fr; }
  .idg-climate figure { order: 2; }

  .idg-assure ul { justify-content: flex-start; gap: 0.5rem 1.75rem; font-size: var(--idg-t-xs); }
}

@media (max-width: 640px) {
  .idg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.75rem 1rem; }
  .idg-head { margin-bottom: 2rem; }
  .idg-hero__actions .idg-btn { flex: 1 1 auto; }
}

/* ==========================================================================
   15. Motion & accessibility floor
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

.idg-sr {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   16. Premium mode — v1.1
   Belt-and-braces CSS for label markup WoodMart prints outside the PHP hooks.
   ========================================================================== */

body .product-labels,
body .wd-product-label,
body .wd-product-label.onsale,
body span.onsale,
body .woocommerce span.onsale,
body .idg-card__sale {
  display: none !important;
}

/* Single price presentation, store-wide */
body .price del,
body .price .woocommerce-Price-amount del,
body .idg-card__price del {
  display: none;
}
body .price ins,
body .idg-card__price ins {
  text-decoration: none;
  color: var(--idg-ink);
  font-weight: 500;
}

/* Quiet the card chrome. Compare and wishlist are marketplace furniture;
   they pull attention away from the product on a considered purchase. */
body .wd-product .wd-compare-btn,
body .wd-product .wd-wishlist-btn,
body .wd-product .wd-quick-view-btn {
  display: none;
}

/* Category meta under cards: one line, quiet, no shouting */
body .wd-product .wd-product-cats {
  font-size: var(--idg-t-xs);
  color: var(--idg-slate-lt);
  margin-bottom: 0.35rem;
}

/* Mega-menu, brought into the type system */
body .wd-dropdown-menu .wd-sub-menu > li > a {
  font-family: var(--idg-sans);
  font-weight: 600;
  font-size: var(--idg-t-sm);
  letter-spacing: 0;
  text-transform: none;
  color: var(--idg-ink);
}
body .wd-dropdown-menu .sub-sub-menu > li > a {
  font-family: var(--idg-sans);
  font-weight: 400;
  font-size: var(--idg-t-sm);
  color: var(--idg-slate);
  text-transform: none;
}
body .wd-dropdown-menu .sub-sub-menu > li > a:hover { color: var(--idg-indigo); }

/* Drop the small furniture icons beside menu items — they read as busy */
body .wd-nav > li > a img,
body .wd-nav > li > a svg.wd-nav-img { display: none; }
