/*
Theme Name: Kashmir Expo Child
Template: kashmir-expo-natural-trade
Version: 2.0.0
Description: Traditions build — Pantry / Loom / Workshop.
*/

/* ==================================================================
   Tokens
   Palette comes from the goods themselves: crocus purple (the saffron
   flower), stigma red, honey amber, walnut, pine, on oat wool.
   Deliberately not the lacquer-black gallery palette — that belongs
   to mughalarts.com.
   ================================================================== */
:root{
  --kex-crocus:#3B2450;
  --kex-crocus-soft:#4C3165;
  --kex-oat:#E9E3D7;
  --kex-oat-deep:#DCD4C3;
  --kex-card:#F2EDE3;
  --kex-ink:#221A2B;
  --kex-ink-soft:#5E5266;
  --kex-saffron:#A8300F;
  --kex-honey:#C08019;
  --kex-pine:#2C4A34;
  --kex-walnut:#5A4028;
  --kex-rule:rgba(34,26,43,.22);
  --kex-rule-lt:rgba(233,227,215,.28);

  --kex-display:"Instrument Serif",Georgia,"Times New Roman",serif;
  --kex-body:"Archivo",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;
  --kex-step:clamp(3rem,6vw,5rem);
}

/* per-house accent, set on <body> and on each product card */
.kex-house-pantry   { --kex-house:var(--kex-pine); }
.kex-house-loom     { --kex-house:var(--kex-walnut); }
.kex-house-workshop { --kex-house:var(--kex-saffron); }
.kex-house-hampers  { --kex-house:var(--kex-honey); }
body{ --kex-house:var(--kex-crocus); }

/* ==================================================================
   Base
   ================================================================== */
body{
  background:var(--kex-oat);
  color:var(--kex-ink);
  font-family:var(--kex-body);
  font-size:17px;line-height:1.6;
  -webkit-font-smoothing:antialiased;
}
h1,h2,.woocommerce div.product .product_title,
.woocommerce-products-header__title,.entry-title{
  font-family:var(--kex-display);
  font-weight:400;letter-spacing:-.005em;line-height:1.08;
}
h1{font-size:clamp(2.2rem,4.8vw,3.6rem)}
h2{font-size:clamp(1.7rem,3.4vw,2.5rem)}
p{max-width:72ch}
a:hover{color:var(--kex-saffron)}
:focus-visible{outline:2px solid var(--kex-honey);outline-offset:3px}
@media (prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}

/* ==================================================================
   Header / footer
   ================================================================== */
.site-header{
  background:var(--kex-crocus);color:var(--kex-oat);
  border-bottom:1px solid var(--kex-rule-lt);
  position:sticky;top:env(safe-area-inset-top,0px);z-index:400;
}
.site-header a{color:var(--kex-oat);text-decoration:none}
.site-header a:hover{color:var(--kex-honey)}
.site-header .site-title{font-family:var(--kex-display);font-size:1.5rem}
.site-footer{background:var(--kex-crocus);color:#C3B2D2;padding-block:clamp(3rem,6vw,4.5rem) 2rem}
.site-footer a{color:#C3B2D2;text-decoration:none}
.site-footer a:hover{color:var(--kex-oat);text-decoration:underline}
.site-footer .widget-title,.site-footer h4{
  font-family:var(--kex-body);font-size:.74rem;letter-spacing:.18em;
  color:var(--kex-honey);font-weight:700;
}

/* ==================================================================
   Buttons — squared, no gradients, no shadows
   ================================================================== */
.button,button.button,input.button,
.woocommerce a.button,.woocommerce button.button,.woocommerce .button.alt,
.wc-block-components-button{
  font-family:var(--kex-body);font-weight:700;font-size:.93rem;
  padding:.85rem 1.8rem;border-radius:0;
  background:var(--kex-crocus);color:var(--kex-oat);
  border:1px solid var(--kex-crocus);
  box-shadow:none;text-shadow:none;
  transition:background .15s ease;
}
.button:hover,.woocommerce a.button:hover,
.woocommerce button.button:hover,.woocommerce .button.alt:hover{
  background:var(--kex-crocus-soft);border-color:var(--kex-crocus-soft);color:var(--kex-oat);
}
.woocommerce div.product form.cart .single_add_to_cart_button{
  background:var(--kex-honey);border-color:var(--kex-honey);color:#231704;
}
.woocommerce div.product form.cart .single_add_to_cart_button:hover{background:#D79726;border-color:#D79726}

/* ==================================================================
   Product grid — crate-label cards, not floating rounded tiles
   ================================================================== */
.woocommerce ul.products{display:grid;grid-template-columns:repeat(4,1fr);gap:1.5rem;margin:0}
.woocommerce ul.products::before,.woocommerce ul.products::after{display:none}
.woocommerce ul.products li.product{
  width:100%!important;margin:0!important;float:none!important;
  display:flex;flex-direction:column;text-align:left;
  background:var(--kex-card);
  border:1px solid var(--kex-rule);
  border-top:3px solid var(--kex-house);
  padding:0 0 1.1rem;
}
.woocommerce ul.products li.product > a:first-of-type{display:block}
.woocommerce ul.products li.product img{
  border-radius:0;margin:0 0 .9rem;
  aspect-ratio:4/3;object-fit:cover;width:100%;
  border-bottom:1px solid var(--kex-rule);
}
.woocommerce ul.products li.product .woocommerce-loop-product__title,
.woocommerce ul.products li.product .price,
.woocommerce ul.products li.product .button,
.woocommerce ul.products li.product .kex-card-meta{margin-inline:1.05rem}
.woocommerce ul.products li.product .woocommerce-loop-product__title{
  font-family:var(--kex-body);font-size:1rem;font-weight:700;line-height:1.3;
  padding:0;margin-bottom:.25rem;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;
}
.woocommerce ul.products li.product .button{margin-top:auto;width:calc(100% - 2.1rem);text-align:center}
@media(max-width:1000px){.woocommerce ul.products{grid-template-columns:repeat(2,1fr)}}
@media(max-width:440px){.woocommerce ul.products{grid-template-columns:1fr}}

/* Prices */
.woocommerce ul.products li.product .price,.woocommerce div.product p.price{
  color:var(--kex-ink);font-weight:700;font-size:1rem;
  display:flex;align-items:baseline;gap:.5rem;margin-bottom:.85rem;
}
.woocommerce .price del,.kex-price del{
  color:var(--kex-ink-soft);font-weight:400;font-size:.85rem;opacity:1;order:2;
}
.woocommerce .price ins,.kex-price ins{background:none;text-decoration:none;font-weight:700;order:1}
.kex-unit{font-weight:400;font-size:.82rem;color:var(--kex-ink-soft)}

/* Sale badge */
.woocommerce span.onsale{
  background:var(--kex-saffron);color:#fff;border-radius:0;
  font-family:var(--kex-body);font-weight:700;font-size:.68rem;letter-spacing:.08em;
  line-height:1;padding:.36rem .6rem;min-height:0;min-width:0;
  top:0;left:0;right:auto;margin:0;
}

/* ==================================================================
   Single product
   ================================================================== */
.woocommerce div.product .product_title{font-size:clamp(1.9rem,3.6vw,2.8rem);margin-bottom:.5rem}
.woocommerce div.product .woocommerce-product-gallery__image img{border-radius:0;border:1px solid var(--kex-rule)}

/* Provenance table — the spine of the whole site */
.kex-specs{
  margin:1.6rem 0;padding:1.1rem 0;
  border-top:3px solid var(--kex-house);
  border-bottom:1px solid var(--kex-rule);
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.7rem 2rem;
}
.kex-specs div{display:flex;gap:.7rem;font-size:.92rem;align-items:baseline}
.kex-specs dt{color:var(--kex-ink-soft);min-width:7rem;margin:0;flex:none}
.kex-specs dd{margin:0;font-weight:600}
.kex-specs a{color:var(--kex-saffron)}
@media(max-width:560px){.kex-specs{grid-template-columns:1fr}}

.kex-assure{list-style:none;margin:1.3rem 0 .8rem;padding:0;font-size:.9rem;color:var(--kex-ink-soft)}
.kex-assure li{position:relative;padding-left:1.4rem;margin-bottom:.4rem}
.kex-assure li::before{
  content:"";position:absolute;left:0;top:.55em;width:8px;height:8px;
  background:var(--kex-house);clip-path:polygon(50% 0,100% 50%,50% 100%,0 50%);
}
.kex-custom a{font-size:.92rem;color:var(--kex-saffron);text-decoration:underline}
.kex-note{
  font-size:.85rem;color:var(--kex-ink-soft);
  border-left:2px solid var(--kex-honey);padding-left:.75rem;margin-top:1rem;max-width:52ch;
}
.kex-fssai{
  display:inline-block;font-size:.75rem;letter-spacing:.1em;font-weight:600;
  border:1px solid var(--kex-rule);padding:.25rem .55rem;margin-top:.5rem;
}

/* Weight / size swatches for pantry variations */
.woocommerce div.product form.cart .variations select{
  border-radius:0;border:1px solid var(--kex-rule);background:var(--kex-card);
  padding:.6rem;font-family:inherit;
}
.woocommerce div.product form.cart .variations th{font-weight:700;font-size:.9rem}

/* Tabs */
.woocommerce div.product .woocommerce-tabs ul.tabs{padding:0;border-bottom:1px solid var(--kex-rule)}
.woocommerce div.product .woocommerce-tabs ul.tabs::before{display:none}
.woocommerce div.product .woocommerce-tabs ul.tabs li{background:none;border:0;border-radius:0;margin:0 1.7rem 0 0;padding:0}
.woocommerce div.product .woocommerce-tabs ul.tabs li::before,
.woocommerce div.product .woocommerce-tabs ul.tabs li::after{display:none}
.woocommerce div.product .woocommerce-tabs ul.tabs li a{font-weight:700;font-size:.94rem;padding:.8rem 0;display:block;border-bottom:2px solid transparent}
.woocommerce div.product .woocommerce-tabs ul.tabs li.active a{border-bottom-color:var(--kex-house)}

/* Reviews */
.woocommerce #reviews #comments ol.commentlist li .comment-text{
  border:0;border-top:2px solid var(--kex-house);border-radius:0;padding:1rem 0 0;margin-left:0;
}
.woocommerce #reviews #comments ol.commentlist li img.avatar{display:none}
.star-rating span::before,.star-rating::before,.woocommerce p.stars a{color:var(--kex-honey)}

/* ==================================================================
   Archive headers — each house gets its own colour band
   ================================================================== */
.woocommerce-products-header{
  background:var(--kex-crocus);color:var(--kex-oat);
  padding:clamp(2.5rem,5vw,4rem) 0;margin-bottom:var(--kex-step);
  border-bottom:6px solid var(--kex-house);
}
.woocommerce-products-header__title{color:var(--kex-oat)}
.woocommerce-products-header .term-description p{color:#C3B2D2;max-width:58ch}
.tax-product_cat.term-pantry   .woocommerce-products-header{background:var(--kex-pine)}
.tax-product_cat.term-loom     .woocommerce-products-header{background:var(--kex-walnut)}
.tax-product_cat.term-workshop .woocommerce-products-header{background:var(--kex-saffron)}
.tax-product_cat.term-hampers  .woocommerce-products-header{background:var(--kex-honey);color:#231704}
.tax-product_cat.term-hampers  .woocommerce-products-header__title{color:#231704}

/* Sidebar: nested houses, not a flat list of 30 */
.woocommerce .widget_product_categories ul{list-style:none;margin:0;padding:0}
.woocommerce .widget_product_categories > ul > li{
  padding:.6rem 0;border-bottom:1px solid var(--kex-rule);
}
.woocommerce .widget_product_categories > ul > li > a{font-weight:700;text-decoration:none}
.woocommerce .widget_product_categories ul.children{margin:.4rem 0 0;padding-left:.9rem;border-left:1px solid var(--kex-rule)}
.woocommerce .widget_product_categories ul.children li{padding:.22rem 0}
.woocommerce .widget_product_categories ul.children a{text-decoration:none;font-size:.93rem}
.woocommerce .widget_product_categories .count{color:var(--kex-ink-soft);font-size:.82rem}

/* ==================================================================
   Cart / checkout
   ================================================================== */
.woocommerce table.shop_table{border-radius:0;border-color:var(--kex-rule)}
.woocommerce-checkout #payment{background:var(--kex-oat-deep);border-radius:0}
.woocommerce-info,.woocommerce-message{background:var(--kex-oat-deep);border-top-color:var(--kex-honey)}
.woocommerce-info::before,.woocommerce-message::before{color:var(--kex-honey)}

/* ==================================================================
   Mobile
   ================================================================== */
@media(max-width:768px){
  body{font-size:16px}
  .woocommerce div.product div.images,.woocommerce div.product div.summary{float:none;width:100%}
  .woocommerce div.product form.cart .button{width:100%}
  .woocommerce.single-product form.cart{
    position:sticky;bottom:env(safe-area-inset-bottom,0px);
    background:var(--kex-oat);padding:.8rem 0;
    border-top:1px solid var(--kex-rule);z-index:300;
  }
}
