/* ============================================================
   The Good Market — Divi child theme overrides & fixes.
   Loaded after tgm.css. Targets Divi/WooCommerce/Dokan markup.
   ============================================================ */

/* ------------------------------------------------------------
   0) [tgm_home] homepage — the home-only rules not already in
   tgm.css (which provides .btn*, .section, .tile-grid, .cause-tile,
   .card.dir-card, .step, .stat-card, .impact-band, .grid.cols-*, .ph …).
   Divi wraps the shortcode, so scope the full-bleed hero to escape
   Divi's constrained content column.
   ------------------------------------------------------------ */
.tgm-home,.tgm-page{--maxw:1240px;
  /* Break the whole design out of Divi's constrained content column so the
     coloured section bands run edge-to-edge, exactly like the old theme. */
  margin-left:calc(50% - 50vw);margin-right:calc(50% - 50vw)}
/* Pages driven by a full-page tgm shortcode: drop Divi's title + sidebar. */
body.tgm-full-shortcode .entry-title,
body.tgm-full-shortcode .et_pb_title_container,
body.tgm-full-shortcode h1.entry-title{display:none}
body.tgm-full-shortcode{overflow-x:hidden}
body.tgm-full-shortcode #main-content .container{width:100%;max-width:100%;padding:0}
body.tgm-full-shortcode #left-area{width:100%;padding:0}
body.tgm-full-shortcode #sidebar{display:none}

/* About / Contact page hero + contact layout. */
.tgm-page-hero{background:var(--sand,#F5F0E1);padding:64px 0}
.tgm-page-hero.dark{background:var(--charcoal,#2B2B2B)}
.tgm-page-hero.dark .eyebrow{color:var(--cyan,#00BCD4)}
.tgm-page-hero.dark h1,.tgm-page-hero.dark .lead{color:#fff}
.tgm-page-hero .wrap{max-width:1180px;margin:0 auto;padding:0 28px}
.tgm-page-hero h1{font-family:var(--serif,'Playfair Display',serif);font-size:clamp(2rem,4vw,3rem);margin:.15em 0}
.tgm-page-hero .lead{max-width:640px;color:var(--ink-60,#5e5e5e);font-size:1.15rem}
.tgm-about .prose p{color:var(--ink-60,#5e5e5e);line-height:1.75;margin:0 0 14px}
.tgm-contact .contact-grid{display:grid;grid-template-columns:1fr 1fr;gap:44px;align-items:start}
.tgm-contact .ci-row{display:flex;gap:14px;align-items:flex-start;margin-bottom:22px}
.tgm-contact .ci-ico{width:46px;height:46px;border-radius:12px;background:var(--cyan-soft,#e2f7fa);color:var(--cyan-dark,#0097a7);display:grid;place-items:center;flex-shrink:0}
.tgm-contact .contact-info h4{margin:0 0 3px}
.tgm-contact .contact-info p{margin:0;color:var(--ink-60,#5e5e5e)}
.tgm-contact .form-card{background:#fff;border:1px solid var(--line,#e7e2d6);border-radius:16px;padding:30px 32px;box-shadow:0 10px 34px rgba(43,43,43,.06)}
.tgm-contact .form-card .tgm-form{max-width:none}
@media(max-width:820px){.tgm-contact .contact-grid{grid-template-columns:1fr}}

.tgm-home .home-hero{position:relative;min-height:620px;display:flex;align-items:center;background:var(--charcoal,#2B2B2B)}
.tgm-home .home-hero .hero-bg{position:absolute;inset:0;z-index:1}
.tgm-home .home-hero .hero-bg img{width:100%;height:100%;object-fit:cover}
.tgm-home .home-hero .scrim{position:absolute;inset:0;z-index:2;background:linear-gradient(90deg,rgba(43,43,43,.9) 0%,rgba(43,43,43,.6) 45%,rgba(43,43,43,.15) 100%)}
.tgm-home .home-hero .wrap{position:relative;z-index:3;max-width:var(--maxw);margin:0 auto;padding:0 28px;width:100%}
.tgm-home .home-hero .hero-inner{color:#fff;max-width:640px}
.tgm-home .home-hero h1{color:#fff;margin:14px 0 18px;font-family:var(--serif,'Playfair Display',serif);font-size:clamp(2.4rem,5vw,3.6rem);line-height:1.05}
.tgm-home .home-hero .lead{color:rgba(255,255,255,.86);font-size:1.22rem;margin-bottom:26px}
.tgm-home .home-hero .hero-cta{display:flex;gap:14px;flex-wrap:wrap;align-items:center}
.tgm-home .home-hero .hero-trust{display:flex;gap:30px;margin-top:38px;flex-wrap:wrap}
.tgm-home .home-hero .hero-trust .ht-n{font-family:var(--serif,'Playfair Display',serif);font-size:1.8rem;font-weight:800;color:var(--cyan,#00BCD4)}
.tgm-home .home-hero .hero-trust .ht-l{font-size:.84rem;color:rgba(255,255,255,.7);text-transform:uppercase;letter-spacing:.08em}

.tgm-home .value-row{display:grid;grid-template-columns:repeat(3,1fr);gap:26px}
.tgm-home .value-card{display:flex;gap:16px;align-items:flex-start;padding:26px;background:#fff;border:1px solid var(--line,#e7e2d6);border-radius:var(--radius,14px)}
.tgm-home .value-card .v-ico{width:52px;height:52px;border-radius:14px;background:var(--cyan-soft,#e2f7fa);color:var(--cyan-dark,#0097a7);display:grid;place-items:center;flex-shrink:0}
.tgm-home .value-card h4{margin:0 0 6px}
.tgm-home .value-card p{margin:0;color:var(--ink-60,#5e5e5e);font-size:.94rem}

.tgm-home .head-flex{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin-bottom:38px;flex-wrap:wrap}
.tgm-home .head-flex .section-head{margin:0}
.tgm-home .link-arrow{display:inline-flex;align-items:center;gap:8px;font-weight:800;color:var(--cyan-dark,#0097a7);text-decoration:none;white-space:nowrap}

.tgm-home .newsletter{background:var(--charcoal,#2B2B2B);color:#fff;border-radius:22px;padding:48px;display:flex;align-items:center;justify-content:space-between;gap:34px;flex-wrap:wrap}
.tgm-home .newsletter h2{color:#fff;margin:.2em 0}
.tgm-home .newsletter p{color:rgba(255,255,255,.75);margin:8px 0 0}

@media(max-width:980px){
  .tgm-home .value-row{grid-template-columns:1fr}
  .tgm-home .home-hero{min-height:540px}
}
@media(max-width:760px){
  .tgm-home .newsletter{padding:32px;flex-direction:column;align-items:flex-start}
}


/* ============================================================
   WooCommerce brand styling — My Account, Cart, Checkout, forms,
   buttons, messages. Scoped to .woocommerce so nothing else is touched.
   ============================================================ */
:root{--tgm-line-soft:#f0ebe0;--tgm-green:#2f7d52;--tgm-green-soft:#e7f4ec;--tgm-red:#b1402f;--tgm-red-soft:#f8e7e2}

/* Give Woo pages a comfortable max width even at full-width. */
.woocommerce-account .woocommerce,
.woocommerce-cart .woocommerce,
.woocommerce-checkout .woocommerce{max-width:1180px;margin-left:auto;margin-right:auto}

/* ---- Inputs ---- */
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce .form-row input.input-text,
.woocommerce #customer_details input,
.woocommerce #customer_details textarea,
.woocommerce input.input-text,
.woocommerce select,
.select2-container .select2-selection{
  border:1.5px solid var(--line,#e7e2d6)!important;border-radius:10px!important;
  padding:12px 14px!important;font-family:var(--sans,'Lato',sans-serif);min-height:48px;background:#fff;box-shadow:none}
.woocommerce form .form-row input.input-text:focus,
.woocommerce input.input-text:focus,
.woocommerce textarea:focus{border-color:var(--cyan,#00BCD4)!important;outline:none}
.woocommerce form .form-row label{font-weight:700;color:var(--charcoal,#2B2B2B);margin-bottom:6px}

/* ---- Buttons ---- */
.woocommerce a.button,.woocommerce button.button,.woocommerce input.button,
.woocommerce a.button.alt,.woocommerce button.button.alt,.woocommerce #respond input#submit,
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button,.wc-block-components-button{
  background:var(--cyan,#00BCD4)!important;color:#fff!important;font-family:var(--sans,'Lato',sans-serif);font-weight:800;
  border-radius:999px!important;border:0!important;padding:13px 26px!important;cursor:pointer;
  box-shadow:0 6px 18px rgba(0,188,212,.30);transition:.18s;font-size:.96rem;line-height:1.2}
.woocommerce a.button:hover,.woocommerce button.button:hover,.woocommerce input.button:hover,
.woocommerce a.button.alt:hover,.woocommerce button.button.alt:hover{background:var(--cyan-dark,#0097a7)!important;color:#fff!important}
.woocommerce .single_add_to_cart_button{min-height:52px}
.woocommerce .quantity .qty{width:66px;height:48px;text-align:center;border:1.5px solid var(--line,#e7e2d6);border-radius:10px;font-weight:800}

/* ---- Form rows: label above a full-width input ---- */
.woocommerce form .form-row{display:block;margin:0 0 16px}
.woocommerce form .form-row label{display:block;font-weight:700;color:var(--charcoal,#2B2B2B);margin:0 0 6px}
.woocommerce form .form-row .input-text,
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea{width:100%!important;display:block}

/* ---- Login / Register: two cards side by side ---- */
.woocommerce #customer_login.col2-set,
.woocommerce .u-columns.col2-set{display:grid;grid-template-columns:1fr 1fr;gap:34px;align-items:start;max-width:960px;margin:0 auto;float:none}
/* WooCommerce adds ::before/::after clearfix pseudo-elements; in a grid they
   become stray grid items and push Register onto its own row. Remove them. */
.woocommerce #customer_login.col2-set::before,
.woocommerce #customer_login.col2-set::after,
.woocommerce .u-columns.col2-set::before,
.woocommerce .u-columns.col2-set::after{display:none!important;content:none!important}
.woocommerce #customer_login .col-1,
.woocommerce #customer_login .col-2,
.woocommerce .u-columns .col-1,
.woocommerce .u-columns .col-2{width:auto!important;float:none!important;margin:0!important}
.woocommerce form.login,.woocommerce form.register{
  background:#fff;border:1px solid var(--line,#e7e2d6);border-radius:16px;padding:28px 30px;
  box-shadow:0 10px 34px rgba(43,43,43,.06)}
.woocommerce form.login .button,.woocommerce form.register .button{width:100%;text-align:center;white-space:nowrap;margin-top:6px}

/* ---- My Account dashboard (only when logged in, so login/register isn't squished) ---- */
.woocommerce-account.logged-in .woocommerce{display:grid;grid-template-columns:240px 1fr;gap:34px;align-items:start}
.woocommerce-account.logged-in .woocommerce::before,
.woocommerce-account.logged-in .woocommerce::after{display:none!important;content:none!important}
/* WooCommerce sets nav=35% / content=65% floats — kill them so the nav isn't
   clipped inside the 240px grid cell and the content fills its cell. */
.woocommerce-account.logged-in .woocommerce-MyAccount-navigation,
.woocommerce-account.logged-in .woocommerce-MyAccount-content{width:100%!important;float:none!important;margin:0!important}
.woocommerce-MyAccount-navigation ul{overflow:visible}
.woocommerce-MyAccount-navigation li a{white-space:normal}
.woocommerce-MyAccount-navigation ul{list-style:none;padding:0;margin:0;background:#fff;border:1px solid var(--line,#e7e2d6);border-radius:14px;overflow:hidden}
.woocommerce-MyAccount-navigation li a{display:block;padding:14px 18px;font-weight:700;color:var(--charcoal,#2B2B2B);border-bottom:1px solid var(--tgm-line-soft);text-decoration:none}
.woocommerce-MyAccount-navigation li:last-child a{border-bottom:0}
.woocommerce-MyAccount-navigation li.is-active a{background:var(--cyan-soft,#e2f7fa);color:var(--cyan-dark,#0097a7)}

/* ---- Cart & checkout ---- */
.woocommerce table.shop_table{border:1px solid var(--line,#e7e2d6);border-radius:14px;border-collapse:separate;overflow:hidden;background:#fff}
.woocommerce table.shop_table th{background:var(--sand,#F5F0E1);text-transform:uppercase;letter-spacing:.06em;font-size:.74rem;color:var(--ink-60,#5e5e5e);padding:16px}
.woocommerce table.shop_table td{padding:16px;border-top:1px solid var(--tgm-line-soft);vertical-align:middle}
.woocommerce .cart_item img{width:72px;border-radius:10px;border:1px solid var(--line,#e7e2d6)}
.cart-collaterals .cart_totals,.woocommerce-checkout #order_review,.woocommerce-checkout #customer_details .col-1,.woocommerce-checkout #customer_details .col-2{
  background:#fff;border:1px solid var(--line,#e7e2d6);border-radius:14px;padding:24px}
.woocommerce .cart-collaterals .cart_totals>h2,#order_review_heading{font-size:1.35rem;margin-bottom:16px}

/* ---- Notices ---- */
.woocommerce-message,.woocommerce-info,.woocommerce-error{border:0;border-radius:12px;padding:15px 18px;font-weight:600}
.woocommerce-message{background:var(--tgm-green-soft);color:var(--tgm-green)}
.woocommerce-info{background:var(--cyan-soft,#e2f7fa);color:var(--cyan-dark,#0097a7)}
.woocommerce-error{background:var(--tgm-red-soft);color:var(--tgm-red);list-style:none}

@media(max-width:820px){
  .woocommerce-account .woocommerce{grid-template-columns:1fr}
  /* Include the #customer_login ID selector so it beats the desktop grid rule
     (which has an ID and would otherwise keep login/register side-by-side). */
  .woocommerce-account .u-columns.col2-set,
  .woocommerce #customer_login.col2-set{grid-template-columns:1fr!important}
}

/* ------------------------------------------------------------
   Site-wide Fullwidth safety net: with the sidebar defaulted off,
   make sure no leftover empty sidebar column squeezes the content
   (Divi's et_full_width_page normally handles this; belt-and-braces).
   ------------------------------------------------------------ */
body.et_full_width_page #sidebar{display:none}
body.et_full_width_page #main-content #left-area{width:100%;padding-right:0;float:none}

/* ------------------------------------------------------------
   Shop filter sidebar (Search · Categories · Shop by Cause).
   ------------------------------------------------------------ */
.tgm-shop-side .tgm-side-block{background:#fff;border:1px solid var(--line,#e7e2d6);border-radius:14px;padding:20px 22px;margin-bottom:22px}
.tgm-shop-side .tgm-side-title{font-family:var(--sans,'Lato',sans-serif);font-weight:800;text-transform:uppercase;letter-spacing:.08em;font-size:.82rem;margin:0 0 14px;color:var(--charcoal,#2B2B2B)}
.tgm-shop-side .tgm-side-search input[type=search]{width:100%;border:1.5px solid var(--line,#e7e2d6);border-radius:999px;padding:11px 16px;font-family:inherit;font-size:.95rem}
.tgm-shop-side .tgm-side-list{list-style:none;margin:0;padding:0}
.tgm-shop-side .tgm-side-list li{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:9px 0;border-bottom:1px solid #f0ebe0}
.tgm-shop-side .tgm-side-list li:last-child{border-bottom:0}
.tgm-shop-side .tgm-side-list a{color:var(--charcoal,#2B2B2B);font-weight:600;text-decoration:none}
.tgm-shop-side .tgm-side-list a:hover{color:var(--cyan-dark,#0097a7)}
.tgm-shop-side .tgm-side-list span{color:var(--ink-40,#8a8a8a);font-size:.8rem;font-weight:700;flex:0 0 auto}

/* ------------------------------------------------------------
   Shop loop product-card branding (category badge, business name,
   "Supports [NFP]" row) — injected by tgm-core/includes/shop.php.
   ------------------------------------------------------------ */
.woocommerce ul.products li.product{position:relative}
.tgm-loop-cat{position:absolute;top:14px;left:14px;z-index:3;background:#e2f7fa;color:#0097a7;
  font-weight:800;font-size:.72rem;text-transform:uppercase;letter-spacing:.04em;padding:5px 12px;border-radius:20px}
.tgm-loop-biz{display:block;font-size:.74rem;font-weight:800;color:var(--cyan-dark,#0097a7);
  text-transform:uppercase;letter-spacing:.04em;margin:0 0 2px;text-decoration:none}
a.tgm-loop-biz:hover{text-decoration:underline}
/* Single product: "Sold by [Business]" link back to the business listing. */
.tgm-sold-by{margin:2px 0 14px;font-size:.9rem;color:var(--ink-60,#5e5e5e)}
.tgm-sold-by .tgm-eyebrow{text-transform:uppercase;letter-spacing:.04em;font-size:.72rem;
  font-weight:700;color:var(--ink-60,#5e5e5e)}
.tgm-sold-by-link{font-weight:800;color:var(--cyan-dark,#0097a7);text-decoration:none}
a.tgm-sold-by-link:hover{text-decoration:underline}
/* Shop card: business name behaves as a link (JS-navigable, see shop.php). */
.tgm-biz-navigable{cursor:pointer}
.tgm-biz-navigable:hover{text-decoration:underline}

/* Header cart widget ([tgm_cart]) — icon + live count bubble. */
.tgm-cart-widget{position:relative;text-decoration:none;color:inherit}
.tgm-cart-widget .tgm-cart-count{position:absolute;top:-4px;right:-4px;min-width:20px;height:20px;
  padding:0 5px;border-radius:999px;background:var(--cyan,#00BCD4);color:#fff;font-size:.72rem;
  font-weight:800;display:grid;place-items:center;border:2px solid #fff;line-height:1}
.tgm-cart-widget .tgm-cart-count.tgm-cart-empty{display:none}
.tgm-loop-supports{display:flex;align-items:center;gap:9px;margin:10px 0 2px;padding-top:10px;
  border-top:1px dashed var(--line,#e7e2d6);font-size:.8rem;color:var(--ink-60,#5e5e5e)}
.tgm-loop-supports .tgm-dots{display:inline-flex}
.tgm-loop-supports .nfp-dot{width:24px;height:24px;border-radius:50%;overflow:hidden;display:inline-block;
  background:var(--sand,#F5F0E1);border:2px solid #fff;box-shadow:0 0 0 1px var(--line,#e7e2d6);margin-left:-8px}
.tgm-loop-supports .nfp-dot:first-child{margin-left:0}
.tgm-loop-supports .nfp-dot img{width:100%;height:100%;object-fit:cover}
.tgm-supports-txt{font-weight:700}

/* ------------------------------------------------------------
   1) SHOP: independently-scrolling, sticky refine sidebar.
   Divi renders the shop with a right sidebar (#sidebar). By
   default it only "catches up" once the product column ends.
   Making it sticky with its own overflow lets the refine/search
   widgets scroll on their own when hovered, while the product
   grid scrolls with the page.
   ------------------------------------------------------------ */
@media (min-width: 981px) {
  /* Let the two columns align to the top so sticky has room. */
  .woocommerce-page #main-content > .container,
  .post-type-archive-product #main-content > .container,
  .tax-product_cat #main-content > .container,
  .single-product #main-content > .container {
    align-items: flex-start;
  }

  .woocommerce-page #sidebar,
  .post-type-archive-product #sidebar,
  .tax-product_cat #sidebar {
    position: sticky;
    top: 100px;                          /* clears Divi's fixed header */
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    overscroll-behavior: contain;        /* don't hand scroll to page mid-list */
    scrollbar-width: thin;
    padding-right: 6px;
  }
  /* Slim scrollbar for the refine panel (WebKit). */
  .woocommerce-page #sidebar::-webkit-scrollbar,
  .post-type-archive-product #sidebar::-webkit-scrollbar,
  .tax-product_cat #sidebar::-webkit-scrollbar { width: 8px; }
  .woocommerce-page #sidebar::-webkit-scrollbar-thumb,
  .post-type-archive-product #sidebar::-webkit-scrollbar-thumb,
  .tax-product_cat #sidebar::-webkit-scrollbar-thumb {
    background: #d9c4a3; border-radius: 8px;
  }
}

/* ------------------------------------------------------------
   2) Business profile (rendered on the Dokan store page via the
   dokan_store_profile_frame_after hook, and the
   [tgm_business_profile] shortcode).
   ------------------------------------------------------------ */
.tgm-bizprofile {
  --cyan: #00BCD4; --cyan-dark: #0097a7; --charcoal: #2B2B2B;
  --ink-60: #5e5e5e; --sand: #F5F0E1; --line: #e0dccc;
  max-width: 1180px;
  margin: 28px auto 8px;
  padding: 0 20px;
  font-family: 'Lato', system-ui, sans-serif;
}
.tgm-bizprofile .tgm-biz-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 10px 34px rgba(43,43,43,.08);
  padding: 30px 32px;
}
.tgm-bizprofile .tgm-biz-head {
  display: flex; gap: 22px; align-items: center; flex-wrap: wrap;
  border-bottom: 1px solid var(--line); padding-bottom: 22px; margin-bottom: 22px;
}
.tgm-bizprofile .tgm-biz-logo {
  width: 88px; height: 88px; border-radius: 14px; object-fit: cover;
  border: 1px solid var(--line); background: var(--sand); flex: 0 0 auto;
}
.tgm-bizprofile .tgm-biz-head h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.7rem; margin: 0 0 6px; color: var(--charcoal);
}
.tgm-bizprofile .tgm-biz-badges { display: flex; gap: 8px; flex-wrap: wrap; }
.tgm-bizprofile .tgm-biz-badge {
  display: inline-block; background: #e2f7fa; color: var(--cyan-dark);
  font-weight: 700; font-size: .78rem; padding: 4px 12px; border-radius: 20px;
}
.tgm-bizprofile .tgm-biz-about { color: var(--ink-60); line-height: 1.7; margin: 0 0 18px; }
.tgm-bizprofile .tgm-biz-about p { margin: 0 0 12px; }
.tgm-bizprofile .tgm-biz-meta {
  display: flex; flex-wrap: wrap; gap: 10px 26px; margin: 6px 0 4px;
  font-size: .92rem; color: var(--charcoal);
}
.tgm-bizprofile .tgm-biz-meta a { color: var(--cyan-dark); font-weight: 700; text-decoration: none; }
.tgm-bizprofile .tgm-biz-section-label {
  display: block; text-transform: uppercase; letter-spacing: .16em;
  font-size: .72rem; font-weight: 800; color: var(--cyan-dark); margin: 24px 0 12px;
}
.tgm-bizprofile .tgm-biz-causes { display: flex; flex-wrap: wrap; gap: 10px; }
.tgm-bizprofile .tgm-biz-cause {
  display: inline-flex; align-items: center; gap: 8px; background: #fff;
  border: 1px solid var(--line); border-radius: 40px; padding: 5px 14px 5px 5px;
  font-weight: 700; font-size: .85rem; color: var(--charcoal); text-decoration: none;
}
.tgm-bizprofile .tgm-biz-cause img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; }
.tgm-bizprofile .tgm-biz-cause:hover { border-color: var(--cyan); }
.tgm-bizprofile .tgm-biz-products-intro {
  margin: 30px auto 0; max-width: 1180px; text-align: center;
}
.tgm-bizprofile .tgm-biz-products-intro h3 {
  font-family: 'Playfair Display', Georgia, serif; color: var(--charcoal);
  font-size: 1.5rem; margin: 0 0 6px;
}
.tgm-bizprofile .tgm-biz-products-intro p { color: var(--ink-60); margin: 0; }

@media (max-width: 640px) {
  .tgm-bizprofile .tgm-biz-head { text-align: center; justify-content: center; }
}
