/*
Theme Name: EchnovaMall
Theme URI: https://www.echnovamall.com/
Author: EchnovaMall
Description: Mobile-first WooCommerce theme for Thai digital products and AI marketing tools.
Version: 1.0.0
Text Domain: echnovamall
*/

:root {
  --ecm-indigo: #4f46e5;
  --ecm-indigo-dark: #3730a3;
  --ecm-teal: #14b8a6;
  --ecm-teal-dark: #0f766e;
  --ecm-amber: #f59e0b;
  --ecm-navy: #0f172a;
  --ecm-slate: #475569;
  --ecm-muted: #64748b;
  --ecm-bg: #f8fafc;
  --ecm-white: #ffffff;
  --ecm-border: #e2e8f0;
  --ecm-radius: 20px;
  --ecm-shadow: 0 16px 50px rgba(15, 23, 42, .09);
  --ecm-max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ecm-navy);
  background: var(--ecm-white);
  font-family: "Noto Sans Thai", "Leelawadee UI", Tahoma, Arial, sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--ecm-indigo); text-decoration: none; }
a:hover { color: var(--ecm-indigo-dark); }
button, input, textarea, select { font: inherit; }

.ecm-container { width: min(calc(100% - 32px), var(--ecm-max)); margin-inline: auto; }
.ecm-section { padding: 76px 0; }
.ecm-section--soft { background: var(--ecm-bg); }
.ecm-section--compact { padding: 46px 0; }
.ecm-section-heading { max-width: 720px; margin: 0 auto 34px; text-align: center; }
.ecm-section-heading h2 { margin: 0 0 10px; font-size: clamp(1.75rem, 4vw, 2.6rem); line-height: 1.25; letter-spacing: -.03em; }
.ecm-section-heading p { margin: 0; color: var(--ecm-slate); font-size: 1.05rem; }
.ecm-eyebrow { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 12px; color: var(--ecm-indigo-dark); font-weight: 800; font-size: .76rem; letter-spacing: .12em; text-transform: uppercase; }
.ecm-eyebrow::before { content: ""; width: 26px; height: 3px; border-radius: 99px; background: var(--ecm-teal); }

.ecm-announcement { background: var(--ecm-navy); color: #fff; font-size: .88rem; }
.ecm-announcement .ecm-container { display: flex; justify-content: center; align-items: center; gap: 10px; min-height: 38px; text-align: center; }
.ecm-announcement strong { color: #fde68a; }
.ecm-site-header { position: sticky; top: 0; z-index: 90; background: rgba(255,255,255,.95); border-bottom: 1px solid rgba(226,232,240,.9); backdrop-filter: blur(14px); }
.admin-bar .ecm-site-header { top: 32px; }
.ecm-header-inner { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.ecm-brand { display: flex; align-items: center; gap: 10px; min-width: max-content; color: var(--ecm-navy); }
.ecm-brand img { width: 48px; height: 48px; object-fit: contain; }
.ecm-brand-text { font-size: 1.26rem; font-weight: 900; letter-spacing: -.035em; }
.ecm-brand-text span { color: var(--ecm-indigo); }
.ecm-nav { display: flex; align-items: center; gap: 28px; margin-left: auto; }
.ecm-nav a { color: #334155; font-weight: 700; font-size: .94rem; }
.ecm-nav a:hover { color: var(--ecm-indigo); }
.ecm-header-actions { display: flex; align-items: center; gap: 10px; }
.ecm-icon-link { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; color: var(--ecm-navy); background: var(--ecm-bg); border: 1px solid var(--ecm-border); font-weight: 800; }
.ecm-mobile-nav { display: none; position: relative; }
.ecm-mobile-nav summary { list-style: none; width: 44px; height: 44px; display: grid; place-items: center; cursor: pointer; border: 1px solid var(--ecm-border); border-radius: 12px; font-size: 1.25rem; }
.ecm-mobile-nav summary::-webkit-details-marker { display: none; }
.ecm-mobile-panel { position: absolute; right: 0; top: 54px; width: min(310px, calc(100vw - 32px)); padding: 14px; display: grid; gap: 4px; background: #fff; border: 1px solid var(--ecm-border); border-radius: 16px; box-shadow: var(--ecm-shadow); }
.ecm-mobile-panel a { padding: 11px 12px; color: var(--ecm-navy); font-weight: 700; border-radius: 10px; }
.ecm-mobile-panel a:hover { background: var(--ecm-bg); }

.ecm-hero { position: relative; overflow: hidden; background: linear-gradient(125deg,#f8fafc 0%,#eef2ff 48%,#ecfeff 100%); }
.ecm-hero::before { content: ""; position: absolute; inset: auto auto -170px -120px; width: 360px; height: 360px; border-radius: 50%; background: rgba(79,70,229,.08); filter: blur(4px); }
.ecm-hero-inner { min-height: 610px; display: grid; grid-template-columns: .95fr 1.05fr; align-items: center; gap: 36px; padding: 72px 0; }
.ecm-hero-copy { position: relative; z-index: 2; max-width: 610px; }
.ecm-hero h1 { margin: 0 0 20px; font-size: clamp(2.35rem, 5.4vw, 4.45rem); line-height: 1.08; letter-spacing: -.055em; }
.ecm-hero h1 .ecm-gradient { background: linear-gradient(90deg,var(--ecm-indigo),var(--ecm-teal-dark)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ecm-hero-copy > p { max-width: 590px; margin: 0 0 28px; color: var(--ecm-slate); font-size: 1.12rem; }
.ecm-cta-row { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.ecm-btn, .woocommerce a.button, .woocommerce button.button, .woocommerce input.button, .woocommerce #respond input#submit {
  display: inline-flex !important; justify-content: center; align-items: center; gap: 8px; min-height: 48px; padding: 12px 22px !important; border-radius: 12px !important; border: 0 !important; background: var(--ecm-indigo) !important; color: #fff !important; font-weight: 800 !important; line-height: 1.2 !important; box-shadow: 0 10px 24px rgba(79,70,229,.22); cursor: pointer;
}
.ecm-btn:hover, .woocommerce a.button:hover, .woocommerce button.button:hover { background: var(--ecm-indigo-dark) !important; color: #fff !important; transform: translateY(-1px); }
.ecm-btn--secondary { background: #fff !important; color: var(--ecm-navy) !important; border: 1px solid var(--ecm-border) !important; box-shadow: none; }
.ecm-btn--secondary:hover { background: var(--ecm-bg) !important; color: var(--ecm-indigo) !important; }
.ecm-hero-note { display: flex; align-items: center; gap: 8px; margin-top: 20px; color: var(--ecm-muted); font-size: .9rem; }
.ecm-hero-note span { color: var(--ecm-teal-dark); font-weight: 900; }
.ecm-hero-visual { position: relative; z-index: 1; }
.ecm-hero-visual img { width: 100%; display: block; border-radius: 28px; filter: drop-shadow(0 22px 40px rgba(79,70,229,.12)); }

.ecm-trust-strip { border-block: 1px solid var(--ecm-border); background: #fff; }
.ecm-trust-grid { min-height: 92px; display: grid; grid-template-columns: repeat(4, 1fr); align-items: center; gap: 22px; }
.ecm-trust-item { display: flex; align-items: center; gap: 12px; color: var(--ecm-slate); font-size: .9rem; }
.ecm-trust-icon { flex: 0 0 40px; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: #eef2ff; color: var(--ecm-indigo); font-weight: 900; }
.ecm-trust-item strong { display: block; color: var(--ecm-navy); }

.ecm-category-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.ecm-category-card { position: relative; overflow: hidden; min-height: 185px; padding: 24px; display: flex; flex-direction: column; justify-content: space-between; color: var(--ecm-navy); background: #fff; border: 1px solid var(--ecm-border); border-radius: var(--ecm-radius); box-shadow: 0 8px 26px rgba(15,23,42,.05); transition: .2s ease; }
.ecm-category-card:hover { transform: translateY(-4px); border-color: #c7d2fe; box-shadow: var(--ecm-shadow); }
.ecm-category-icon { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 16px; color: #fff; background: linear-gradient(135deg,var(--ecm-indigo),#818cf8); font-size: 1.45rem; font-weight: 900; }
.ecm-category-card:nth-child(2) .ecm-category-icon, .ecm-category-card:nth-child(5) .ecm-category-icon { background: linear-gradient(135deg,var(--ecm-teal-dark),var(--ecm-teal)); }
.ecm-category-card:nth-child(3) .ecm-category-icon { background: linear-gradient(135deg,#d97706,var(--ecm-amber)); }
.ecm-category-card h3 { margin: 20px 0 4px; font-size: 1.08rem; line-height: 1.35; }
.ecm-category-card p { margin: 0; color: var(--ecm-muted); font-size: .87rem; }

.ecm-product-block { margin-top: 24px; }
.ecm-product-block .woocommerce ul.products { display: grid !important; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 22px; margin: 0 !important; }
.ecm-product-block .woocommerce ul.products::before, .ecm-product-block .woocommerce ul.products::after { display: none !important; }
.woocommerce ul.products li.product, .ecm-product-block .woocommerce ul.products li.product { width: auto !important; float: none !important; margin: 0 !important; padding: 0 0 20px !important; background: #fff; border: 1px solid var(--ecm-border); border-radius: 18px; overflow: hidden; box-shadow: 0 8px 30px rgba(15,23,42,.055); transition: .2s ease; }
.woocommerce ul.products li.product:hover { transform: translateY(-4px); box-shadow: var(--ecm-shadow); }
.woocommerce ul.products li.product a img { width: 100%; aspect-ratio: 1/1; object-fit: cover; margin: 0 0 16px !important; background: var(--ecm-bg); }
.woocommerce ul.products li.product .woocommerce-loop-product__title { padding: 0 18px !important; min-height: 3.2em; color: var(--ecm-navy); font-size: 1rem !important; line-height: 1.5; }
.woocommerce ul.products li.product .price { padding: 0 18px; color: var(--ecm-indigo-dark) !important; font-size: 1.1rem !important; font-weight: 900 !important; }
.woocommerce ul.products li.product .button { margin: 8px 18px 0 !important; min-height: 42px; padding: 10px 16px !important; font-size: .9rem; box-shadow: none; }
.woocommerce span.onsale { min-width: auto; min-height: auto; padding: 6px 10px; border-radius: 10px; background: var(--ecm-amber); color: var(--ecm-navy); line-height: 1.2; font-weight: 900; }
.ecm-empty-products { padding: 28px; text-align: center; color: var(--ecm-muted); background: #fff; border: 1px dashed #cbd5e1; border-radius: 16px; }

.ecm-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.ecm-step { padding: 28px; background: #fff; border: 1px solid var(--ecm-border); border-radius: var(--ecm-radius); }
.ecm-step-number { width: 44px; height: 44px; display: grid; place-items: center; margin-bottom: 18px; border-radius: 50%; background: var(--ecm-indigo); color: #fff; font-weight: 900; }
.ecm-step h3 { margin: 0 0 8px; font-size: 1.18rem; }
.ecm-step p { margin: 0; color: var(--ecm-slate); }
.ecm-feature-panel { display: grid; grid-template-columns: 1fr 1fr; gap: 42px; align-items: center; padding: 42px; border-radius: 28px; color: #fff; background: linear-gradient(135deg,var(--ecm-navy),#312e81 70%,#0f766e); overflow: hidden; }
.ecm-feature-panel h2 { margin: 0 0 12px; font-size: clamp(1.8rem,4vw,3rem); line-height: 1.25; }
.ecm-feature-panel p { color: #cbd5e1; }
.ecm-feature-list { display: grid; gap: 14px; }
.ecm-feature-list div { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1px solid rgba(255,255,255,.14); border-radius: 14px; background: rgba(255,255,255,.07); }
.ecm-feature-list b { color: #5eead4; }
.ecm-faq { max-width: 860px; margin: 0 auto; display: grid; gap: 12px; }
.ecm-faq details { padding: 18px 20px; background: #fff; border: 1px solid var(--ecm-border); border-radius: 14px; }
.ecm-faq summary { cursor: pointer; font-weight: 800; }
.ecm-faq p { margin: 10px 0 0; color: var(--ecm-slate); }

.ecm-main { min-height: 55vh; }
.ecm-page-header { padding: 54px 0 30px; text-align: center; background: linear-gradient(135deg,#eef2ff,#f0fdfa); }
.ecm-page-header h1 { margin: 0; font-size: clamp(2rem,5vw,3.5rem); }
.ecm-content { width: min(calc(100% - 32px), 920px); margin: 0 auto; padding: 52px 0 78px; }
.ecm-content h2, .ecm-content h3 { line-height: 1.35; }
.ecm-content p, .ecm-content li { color: var(--ecm-slate); }
.ecm-content table { width: 100%; border-collapse: collapse; }
.ecm-content th, .ecm-content td { padding: 12px; border: 1px solid var(--ecm-border); text-align: left; }

.ecm-shop-wrap { width: min(calc(100% - 32px), var(--ecm-max)); margin: 0 auto; padding: 48px 0 76px; }
.woocommerce .woocommerce-breadcrumb { color: var(--ecm-muted); }
.woocommerce div.product { display: grid; grid-template-columns: minmax(0,.9fr) minmax(0,1.1fr); gap: 46px; }
.woocommerce div.product div.images, .woocommerce div.product div.summary { width: auto !important; float: none !important; }
.woocommerce div.product .product_title { font-size: clamp(1.8rem,4vw,2.75rem); line-height: 1.25; }
.woocommerce div.product p.price { color: var(--ecm-indigo-dark); font-size: 1.5rem; font-weight: 900; }
.woocommerce-message, .woocommerce-info { border-top-color: var(--ecm-teal) !important; background: #f0fdfa; }
.woocommerce-message::before, .woocommerce-info::before { color: var(--ecm-teal-dark) !important; }

.ecm-site-footer { padding: 58px 0 26px; color: #cbd5e1; background: var(--ecm-navy); }
.ecm-footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3,1fr); gap: 40px; }
.ecm-footer-brand { display: flex; align-items: center; gap: 10px; color: #fff; font-size: 1.25rem; font-weight: 900; }
.ecm-footer-brand img { width: 46px; height: 46px; object-fit: contain; }
.ecm-site-footer h3 { margin: 0 0 14px; color: #fff; font-size: 1rem; }
.ecm-site-footer p { color: #94a3b8; }
.ecm-site-footer ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 9px; }
.ecm-site-footer a { color: #cbd5e1; }
.ecm-site-footer a:hover { color: #fff; }
.ecm-footer-bottom { margin-top: 40px; padding-top: 22px; display: flex; justify-content: space-between; gap: 18px; border-top: 1px solid rgba(255,255,255,.11); color: #94a3b8; font-size: .88rem; }

@media (max-width: 1024px) {
  .ecm-nav { gap: 18px; }
  .ecm-category-grid { grid-template-columns: repeat(3,1fr); }
  .ecm-product-block .woocommerce ul.products { grid-template-columns: repeat(3,1fr); }
}
@media (max-width: 820px) {
  .admin-bar .ecm-site-header { top: 46px; }
  .ecm-nav { display: none; }
  .ecm-mobile-nav { display: block; }
  .ecm-hero-inner { min-height: auto; grid-template-columns: 1fr; padding: 58px 0 44px; }
  .ecm-hero-copy { text-align: center; margin: 0 auto; }
  .ecm-hero-copy > p { margin-inline: auto; }
  .ecm-cta-row, .ecm-hero-note { justify-content: center; }
  .ecm-hero-visual { max-width: 660px; margin: 0 auto; }
  .ecm-trust-grid { grid-template-columns: repeat(2,1fr); padding: 20px 0; }
  .ecm-product-block .woocommerce ul.products { grid-template-columns: repeat(2,1fr); }
  .ecm-feature-panel { grid-template-columns: 1fr; }
  .ecm-footer-grid { grid-template-columns: repeat(2,1fr); }
  .woocommerce div.product { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .ecm-container { width: min(calc(100% - 24px), var(--ecm-max)); }
  .ecm-section { padding: 56px 0; }
  .ecm-header-inner { min-height: 66px; }
  .ecm-brand img { width: 40px; height: 40px; }
  .ecm-brand-text { font-size: 1.08rem; }
  .ecm-header-actions .ecm-icon-link:first-child { display: none; }
  .ecm-hero h1 { font-size: 2.5rem; }
  .ecm-cta-row .ecm-btn { width: 100%; }
  .ecm-trust-grid { grid-template-columns: 1fr; gap: 14px; }
  .ecm-category-grid { grid-template-columns: repeat(2,1fr); gap: 12px; }
  .ecm-category-card { min-height: 165px; padding: 18px; }
  .ecm-product-block .woocommerce ul.products { gap: 12px; }
  .woocommerce ul.products li.product .woocommerce-loop-product__title { padding-inline: 12px !important; font-size: .9rem !important; }
  .woocommerce ul.products li.product .price { padding-inline: 12px; }
  .woocommerce ul.products li.product .button { margin-inline: 12px !important; width: calc(100% - 24px); font-size: .82rem; }
  .ecm-steps { grid-template-columns: 1fr; }
  .ecm-feature-panel { padding: 28px 20px; border-radius: 20px; }
  .ecm-footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .ecm-footer-bottom { flex-direction: column; }
}
