/*
Theme Name: DMS Distributor Social Commerce Pro
Theme URI: https://example.com/
Author: DMS Store Team
Description: Production-oriented, highly editable WordPress Block Theme for distributor social commerce, retailer routing, WhatsApp ordering and future app/DMS integrations.
Version: 3.0.0
Requires at least: 6.9
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: dms-distributor-social-commerce-pro
Tags: block-patterns, e-commerce, full-site-editing, custom-colors, custom-logo, custom-menu, editor-style, responsive-layout
*/

:root{
  --dms-orange:#fe861d;
  --dms-orange-dark:#c9630a;
  --dms-orange-soft:#fff3e8;
  --dms-charcoal:#4c4c4c;
  --dms-ink:#181818;
  --dms-muted:#6f7378;
  --dms-surface:#f6f7f9;
  --dms-surface-warm:#fff9f3;
  --dms-border:#e2e6ea;
  --dms-green:#25d366;
  --dms-green-dark:#0a5d2a;
  --dms-radius:18px;
}

html{scroll-behavior:smooth}
body{margin:0;overflow-x:hidden}
img{max-width:100%;height:auto}
a{text-underline-offset:3px}
button,input,select,textarea{font:inherit}
.wp-site-blocks{min-height:100vh}

/* Global chrome */
.dms-site-header{position:sticky;top:0;z-index:90;background:rgba(255,255,255,.96)!important;border-bottom:1px solid rgba(76,76,76,.10);backdrop-filter:saturate(140%) blur(12px)}
.dms-site-header .wp-block-navigation__responsive-container.is-menu-open{padding:1.25rem}
.dms-site-header .wp-block-site-logo img{max-height:58px;width:auto}
.dms-site-header .wp-block-search__input{border-radius:999px!important;min-height:46px}
.dms-site-footer{margin-top:clamp(2.5rem,6vw,5rem)}
.dms-footer-link-grid a{text-decoration:none}

/* Editor-friendly section helpers */
.dms-eyebrow{letter-spacing:.11em;text-transform:uppercase;font-size:.74rem;font-weight:850;color:var(--dms-orange);margin-bottom:.55rem}
.dms-hero{position:relative;overflow:hidden;isolation:isolate}
.dms-hero:before{content:"";position:absolute;inset:auto -10% -45% 35%;height:75%;background:radial-gradient(circle,rgba(254,134,29,.28),transparent 64%);z-index:-1}
.dms-hero:after{content:"";position:absolute;inset:-20% 55% 35% -10%;background:radial-gradient(circle,rgba(76,76,76,.10),transparent 64%);z-index:-1}
.dms-chip{border:1px solid rgba(76,76,76,.12);background:#fff;border-radius:999px;padding:.45rem .75rem;font-size:.8rem}
.dms-feature-card,.dms-promo-card{border:1px solid rgba(76,76,76,.10);box-shadow:0 10px 30px rgba(76,76,76,.06);transition:transform .2s ease,box-shadow .2s ease}
.dms-feature-card:hover,.dms-promo-card:hover{transform:translateY(-3px);box-shadow:0 18px 42px rgba(76,76,76,.10)}
.dms-hero-card{background:linear-gradient(145deg,#fff 0%,#fff7ef 100%);border:1px solid rgba(254,134,29,.18);box-shadow:0 22px 70px rgba(76,76,76,.10)}
.dms-app-banner{border:1px solid rgba(255,255,255,.14);background:linear-gradient(135deg,#4c4c4c,#202020);color:#fff}
.dms-app-banner a{color:#fff}

/* WooCommerce blocks */
.wc-block-components-notice-banner{border-radius:14px}
.wp-block-woocommerce-product-collection .wc-block-components-product-image img{border-radius:16px}
.wp-block-woocommerce-product-collection .wc-block-components-product-title a{text-decoration:none}
.wp-block-woocommerce-product-collection .wc-block-grid__product,.wp-block-woocommerce-product-collection .wc-block-product-template__product{border:1px solid var(--dms-border);border-radius:18px;padding:10px;background:#fff;box-shadow:0 10px 30px rgba(24,24,24,.06)}
.wp-block-woocommerce-product-collection .wc-block-components-product-price{font-weight:900}
.wp-block-woocommerce-product-collection .wp-block-button__link{width:100%;border-radius:12px}
.wp-block-woocommerce-product-filters{border:1px solid var(--dms-border);border-radius:18px;padding:14px;background:#fff;box-shadow:0 12px 30px rgba(24,24,24,.05)}
.wp-block-woocommerce-product-filter-price,.wp-block-woocommerce-product-filter-status,.wp-block-woocommerce-product-filter-attribute{padding:8px 0;border-bottom:1px solid #eef0f2}
.wp-block-woocommerce-product-filter-price:last-child,.wp-block-woocommerce-product-filter-status:last-child,.wp-block-woocommerce-product-filter-attribute:last-child{border-bottom:0}

/* DMS dynamic product cards */
.dms-product-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}
.dms-product-card{display:flex;flex-direction:column;min-width:0;border:1px solid var(--dms-border);border-radius:18px;background:#fff;overflow:hidden;box-shadow:0 10px 28px rgba(24,24,24,.055);transition:transform .18s ease,box-shadow .18s ease}
.dms-product-card:hover{transform:translateY(-3px);box-shadow:0 18px 42px rgba(24,24,24,.10)}
.dms-product-card__media{position:relative;aspect-ratio:1/1;background:var(--dms-surface);overflow:hidden}
.dms-product-card__media img{width:100%;height:100%;object-fit:cover;display:block;transition:transform .28s ease}
.dms-product-card:hover .dms-product-card__media img{transform:scale(1.025)}
.dms-product-card__badge{position:absolute;top:10px;left:10px;z-index:2;padding:.38rem .56rem;border-radius:999px;background:var(--dms-orange);color:#fff;font-size:.68rem;font-weight:850;box-shadow:0 6px 16px rgba(201,99,10,.22)}
.dms-product-card__body{display:flex;flex-direction:column;gap:7px;padding:15px;flex:1}
.dms-product-card__category{font-size:.72rem;font-weight:800;color:var(--dms-orange);text-transform:uppercase;letter-spacing:.06em}
.dms-product-card__title{font-size:1rem;line-height:1.35;margin:0}
.dms-product-card__title a{text-decoration:none;color:var(--dms-ink)}
.dms-product-card__summary{font-size:.82rem;line-height:1.5;color:var(--dms-muted);margin:0}
.dms-product-card__sku{font-size:.72rem;color:var(--dms-muted)}
.dms-product-card__highlights{font-size:.78rem;color:#3e444a;padding-left:1.1rem;margin:.1rem 0}
.dms-product-card__highlights li+li{margin-top:.2rem}
.dms-product-card__meta{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-top:auto;padding-top:4px}
.dms-product-card__price{font-weight:900;color:var(--dms-charcoal);white-space:nowrap}
.dms-product-card__actions{display:grid;grid-template-columns:1fr 1.15fr;gap:7px;margin-top:4px}
.dms-product-card__actions a{display:flex;align-items:center;justify-content:center;min-height:42px;border-radius:11px;text-decoration:none;font-weight:850;font-size:.78rem;padding:.5rem .6rem}
.dms-product-card__details{border:1px solid var(--dms-charcoal);color:var(--dms-charcoal)}
.dms-product-card__wa{background:var(--dms-green);color:var(--dms-green-dark)!important}
.dms-product-card__wa:hover{filter:brightness(.96)}

/* Retailers + campaigns */
.dms-retailer-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.dms-retailer-card{border:1px solid var(--dms-border);border-radius:18px;background:#fff;padding:18px;box-shadow:0 10px 28px rgba(24,24,24,.05)}
.dms-retailer-card__actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px}
.dms-retailer-card__actions a{display:inline-flex;align-items:center;justify-content:center;min-height:40px;padding:.5rem .75rem;border-radius:10px;text-decoration:none;font-weight:850;font-size:.78rem}
.dms-retailer-card__wa{background:var(--dms-green);color:var(--dms-green-dark)!important}
.dms-retailer-card__use{background:var(--dms-orange);color:#fff!important}
.dms-campaign-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.dms-campaign-card{min-height:240px;position:relative;border-radius:18px;overflow:hidden;background:linear-gradient(135deg,#4c4c4c,#252525);background-size:cover;background-position:center;box-shadow:0 10px 28px rgba(24,24,24,.08)}
.dms-campaign-card__shade{position:absolute;inset:0;background:linear-gradient(180deg,rgba(0,0,0,.05),rgba(0,0,0,.75))}
.dms-campaign-card__content{position:absolute;inset:auto 16px 16px 16px;z-index:1}

/* Search suggestions */
.dms-product-search{position:relative;max-width:680px}
.dms-product-search form{display:flex;gap:8px}
.dms-product-search input{width:100%;min-height:48px;border:1px solid var(--dms-border);border-radius:999px;padding:0 18px;background:#fff}
.dms-product-search button{min-width:110px;border:0;border-radius:999px;background:var(--dms-orange);color:#fff;font-weight:850;cursor:pointer}
.dms-product-search__results{position:absolute;top:56px;left:0;right:0;z-index:120;background:#fff;border:1px solid var(--dms-border);border-radius:16px;box-shadow:0 22px 45px rgba(24,24,24,.14);padding:6px;display:none}
.dms-product-search__results.is-open{display:block}
.dms-product-search__results a{display:flex;align-items:center;gap:10px;padding:10px;border-radius:11px;text-decoration:none;color:var(--dms-ink)}
.dms-product-search__results a:hover{background:var(--dms-orange-soft)}
.dms-product-search__results img{width:40px;height:40px;border-radius:8px;object-fit:cover;background:var(--dms-surface)}
.dms-product-search__meta{display:flex;flex-direction:column;gap:2px}
.dms-product-search__price{font-size:.75rem;font-weight:800;color:var(--dms-charcoal)}

/* Editor-selectable block styles */
.is-style-dms-card{border:1px solid var(--dms-border);border-radius:18px;box-shadow:0 12px 34px rgba(34,34,34,.08)}
.is-style-dms-soft-card{border:1px solid rgba(254,134,29,.16);border-radius:18px;background:linear-gradient(145deg,#fff 0%,#fff7ef 100%);box-shadow:0 12px 34px rgba(34,34,34,.06)}
.is-style-dms-glass-card{border:1px solid rgba(255,255,255,.7);border-radius:20px;background:rgba(255,255,255,.75);box-shadow:0 18px 42px rgba(24,24,24,.10);backdrop-filter:blur(12px)}
.is-style-dms-outline-orange .wp-block-button__link{background:transparent!important;color:var(--dms-orange)!important;border:2px solid var(--dms-orange)!important}
.is-style-dms-pill .wp-block-button__link{border-radius:999px!important}
.is-style-dms-soft-image img{box-shadow:0 16px 40px rgba(34,34,34,.12)}
.is-style-dms-pill-navigation .wp-block-navigation-item__content{border-radius:999px;padding:.5rem .8rem}
.is-style-dms-pill-navigation .wp-block-navigation-item__content:hover{background:var(--dms-orange-soft)}
.is-style-dms-section-heading{position:relative;padding-left:14px}
.is-style-dms-section-heading:before{content:"";position:absolute;left:0;top:.1em;bottom:.1em;width:4px;border-radius:999px;background:var(--dms-orange)}

/* Mobile action bar */
.dms-mobile-bar{display:none}

/* Woo classic compatibility when hooks render outside blocks */
.woocommerce .product .button{border-radius:12px!important;font-weight:800!important}
.woocommerce div.product{max-width:1200px;margin:0 auto}
.woocommerce div.product .summary{padding:22px;border:1px solid var(--dms-border);border-radius:20px;box-shadow:0 18px 42px rgba(76,76,76,.07)}
.woocommerce div.product div.images img{border-radius:20px}
.woocommerce div.product .price{font-weight:900;color:var(--dms-charcoal)}
.woocommerce span.onsale{background:var(--dms-orange);padding:.4em .7em}
.dms-whatsapp-button{display:inline-flex;align-items:center;justify-content:center;gap:.45rem;background:var(--dms-green);color:var(--dms-green-dark)!important;border-radius:12px;text-decoration:none;padding:.8rem 1rem;font-weight:900;margin-top:.75rem}
.dms-whatsapp-button:hover{filter:brightness(.97);transform:translateY(-1px)}

@media (max-width:1024px){
  .dms-product-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media (max-width:782px){
  .dms-site-header .wp-block-navigation__responsive-container-open{min-width:44px;min-height:44px}
  .dms-site-header .wp-block-site-logo img{max-height:48px}
  .dms-product-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .dms-retailer-grid,.dms-campaign-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .dms-feature-card:hover,.dms-promo-card:hover,.dms-product-card:hover{transform:none}
}
@media (max-width:560px){
  .dms-product-grid{gap:10px}
  .dms-product-card__body{padding:11px}
  .dms-product-card__summary,.dms-product-card__highlights,.dms-product-card__sku{display:none}
  .dms-product-card__actions{grid-template-columns:1fr}
  .dms-retailer-grid,.dms-campaign-grid{grid-template-columns:1fr}
}
@media (max-width:480px){
  .dms-mobile-bar{display:block;position:fixed;left:10px;right:10px;bottom:10px;z-index:100;padding-bottom:env(safe-area-inset-bottom)}
  .dms-mobile-bar__inner{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;background:rgba(255,255,255,.96);backdrop-filter:blur(12px);border:1px solid rgba(76,76,76,.14);box-shadow:0 16px 45px rgba(0,0,0,.18);border-radius:17px;padding:7px}
  .dms-mobile-bar a{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:48px;border-radius:11px;text-decoration:none;color:var(--dms-charcoal);font-size:.68rem;font-weight:800}
  .dms-mobile-bar__primary{background:var(--dms-orange);color:#fff!important}
  body{padding-bottom:86px}
}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;animation:none!important;transition:none!important}}
