/*
Theme Name: National Mart Lite
Theme URI: https://nationalmart.jp
Author: National Mart
Description: A clean, from-scratch WooCommerce theme for National Mart — halal groceries delivered across Japan. Built around a spice-market palette of maroon, saffron gold and cream.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 7.4
Text Domain: nationalmart-lite
Tags: e-commerce, custom-menu, custom-logo, featured-images, translation-ready
*/

/* =========================================================
   DESIGN TOKENS
   ========================================================= */
:root{
  /* Brand palette — pulled from the original site's own CSS */
  --nm-maroon:        #883323;
  --nm-maroon-dark:    #5f2418;
  --nm-deep-red:       #640b11;
  --nm-gold:           #d98e2b;
  --nm-gold-light:     #f4b459;
  --nm-cream:          #fbf6ee;
  --nm-cream-deep:     #f2e8d8;
  --nm-ink:            #2b211d;
  --nm-ink-soft:       #6b5d54;
  --nm-white:          #ffffff;
  --nm-line:           #e7dccb;
  --nm-success:        #3c6e47;

  --nm-font-display: "Fraunces", "Noto Serif JP", Georgia, serif;
  --nm-font-body: "Work Sans", "Noto Sans JP", -apple-system, sans-serif;

  --nm-radius: 14px;
  --nm-radius-sm: 8px;
  --nm-shadow: 0 12px 30px -14px rgba(43,33,29,0.35);
  --nm-container: 1220px;
}

/* =========================================================
   RESET / BASE
   ========================================================= */
*, *::before, *::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin:0;
  font-family: var(--nm-font-body);
  color: var(--nm-ink);
  background: var(--nm-cream);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img{ max-width:100%; height:auto; display:block; }
a{ color: var(--nm-maroon); text-decoration:none; }
a:hover{ color: var(--nm-deep-red); }
ul{ margin:0; padding:0; list-style:none; }
h1,h2,h3,h4{
  font-family: var(--nm-font-display);
  color: var(--nm-ink);
  line-height: 1.15;
  margin: 0 0 .5em;
  font-weight: 600;
}
h1{ font-size: clamp(2.1rem, 4vw, 3.4rem); }
h2{ font-size: clamp(1.6rem, 3vw, 2.3rem); }
h3{ font-size: 1.25rem; }
p{ margin: 0 0 1em; }
button, input, select, textarea{ font-family: inherit; font-size:1rem; }
:focus-visible{ outline: 3px solid var(--nm-gold); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce){ *{ animation:none !important; transition:none !important; scroll-behavior:auto !important; } }

.nm-container{ max-width: var(--nm-container); margin:0 auto; padding: 0 24px; }
.nm-eyebrow{
  display:inline-flex; align-items:center; gap:8px;
  font-family: var(--nm-font-body);
  font-size: .78rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--nm-maroon);
}
.nm-eyebrow::before{ content:""; width:18px; height:2px; background: var(--nm-gold); display:inline-block; }

.nm-btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding: 13px 28px; border-radius: 999px;
  font-weight: 600; font-size: .95rem; cursor:pointer; border: 2px solid transparent;
  transition: transform .15s ease, background .15s ease, color .15s ease, border-color .15s ease;
}
.nm-btn-primary{ background: var(--nm-maroon); color: var(--nm-white); }
.nm-btn-primary:hover{ background: var(--nm-deep-red); color:var(--nm-white); transform: translateY(-2px); }
.nm-btn-ghost{ background: transparent; border-color: var(--nm-ink); color: var(--nm-ink); }
.nm-btn-ghost:hover{ border-color: var(--nm-maroon); color: var(--nm-maroon); transform: translateY(-2px); }
.nm-btn-light{ background: var(--nm-white); color: var(--nm-maroon); }
.nm-btn-light:hover{ background: var(--nm-gold-light); color: var(--nm-ink); }

/* Signature: scalloped divider, evokes a naan/papad edge between sections */
.nm-scallop{
  height: 22px; width:100%;
  background-image: radial-gradient(circle at 11px 0, transparent 11px, var(--nm-cream) 11.5px);
  background-size: 22px 22px;
  background-position: top;
}
.nm-scallop.flip{ transform: rotate(180deg); }

/* Signature: hand-stamped halal seal badge */
.nm-seal{
  width: 132px; height:132px; border-radius:50%;
  border: 3px dashed var(--nm-gold);
  display:flex; align-items:center; justify-content:center;
  text-align:center; padding: 10px;
  background: var(--nm-white);
  font-family: var(--nm-font-display); font-weight:600; color: var(--nm-maroon);
  font-size: .8rem; line-height:1.25; letter-spacing:.02em;
  transform: rotate(-8deg);
  box-shadow: var(--nm-shadow);
}

/* =========================================================
   HEADER
   ========================================================= */
.nm-topbar{ background: var(--nm-ink); color: var(--nm-cream); font-size:.82rem; }
.nm-topbar .nm-container{ display:flex; justify-content:space-between; align-items:center; padding-top:8px; padding-bottom:8px; gap:16px; flex-wrap:wrap; }
.nm-topbar a{ color: var(--nm-cream-deep); }
.nm-topbar-links{ display:flex; gap:18px; }

.nm-header{ background: var(--nm-white); border-bottom: 1px solid var(--nm-line); position: sticky; top:0; z-index: 40; }
.nm-header-inner{ display:flex; align-items:center; gap:28px; padding: 16px 0; }
.nm-logo{ flex-shrink:0; }
.nm-logo img{ max-height:52px; width:auto; }
.nm-logo-text{ font-family: var(--nm-font-display); font-weight:700; font-size:1.5rem; color: var(--nm-maroon); }

.nm-search-form{ flex:1; max-width: 520px; display:flex; }
.nm-search-form input[type="search"]{
  flex:1; border: 2px solid var(--nm-line); border-right:none; border-radius: 999px 0 0 999px;
  padding: 11px 18px; background: var(--nm-cream);
}
.nm-search-form button{
  border: 2px solid var(--nm-maroon); background: var(--nm-maroon); color:#fff;
  border-radius: 0 999px 999px 0; padding: 0 20px; cursor:pointer;
}

.nm-header-actions{ display:flex; align-items:center; gap:22px; margin-left:auto; }
.nm-header-action{ display:flex; align-items:center; gap:8px; font-size:.85rem; color: var(--nm-ink); position:relative; }
.nm-header-action .nm-icon{ font-size:1.3rem; }
.nm-cart-count{
  position:absolute; top:-8px; right:-10px; background: var(--nm-gold); color:var(--nm-ink);
  font-size:.65rem; font-weight:700; width:18px; height:18px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
}

.nm-nav{ background: var(--nm-maroon); }
.nm-nav .nm-container{ display:flex; align-items:center; gap: 6px; }
.nm-nav ul{ display:flex; flex-wrap:wrap; }
.nm-nav a{
  display:block; padding: 13px 18px; color: var(--nm-cream); font-weight:600; font-size:.92rem;
  letter-spacing:.01em;
}
.nm-nav a:hover, .nm-nav .current-menu-item > a{ color: var(--nm-gold-light); }
.nm-menu-toggle{ display:none; background:none; border:none; color:#fff; font-size:1.6rem; padding: 10px 0; cursor:pointer; }

@media (max-width: 880px){
  .nm-search-form{ display:none; }
  .nm-menu-toggle{ display:block; }
  .nm-nav ul{ display:none; flex-direction:column; width:100%; }
  .nm-nav.is-open ul{ display:flex; }
  .nm-nav .nm-container{ flex-direction:column; align-items:flex-start; }
  .nm-header-inner{ flex-wrap:wrap; }
}

/* =========================================================
   HERO
   ========================================================= */
.nm-hero{
  position:relative; overflow:hidden;
  background:
    radial-gradient(circle, var(--nm-cream-deep) 1.5px, transparent 1.5px) 0 0/26px 26px,
    linear-gradient(120deg, var(--nm-cream) 45%, var(--nm-cream-deep) 100%);
  padding: 64px 0 40px;
}
.nm-hero-grid{ display:grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items:center; }
.nm-hero h1{ margin-bottom:.4em; }
.nm-hero h1 em{ font-style: italic; color: var(--nm-maroon); }
.nm-hero-sub{ font-size:1.1rem; color: var(--nm-ink-soft); max-width: 46ch; margin-bottom: 1.6em; }
.nm-hero-cta{ display:flex; gap:14px; flex-wrap:wrap; margin-bottom: 28px; }
.nm-hero-visual{ position:relative; }
.nm-hero-visual img{ border-radius: var(--nm-radius); box-shadow: var(--nm-shadow); }
.nm-hero-seal-wrap{ position:absolute; bottom:-24px; left:-24px; }
@media (max-width: 880px){
  .nm-hero-grid{ grid-template-columns: 1fr; }
  .nm-hero-visual{ order:-1; }
  .nm-hero-seal-wrap{ display:none; }
}

/* =========================================================
   TRUST BAR
   ========================================================= */
.nm-trust{ background: var(--nm-white); padding: 30px 0; border-bottom: 1px solid var(--nm-line); }
.nm-trust-grid{ display:grid; grid-template-columns: repeat(4,1fr); gap: 24px; text-align:center; }
.nm-trust-item{ display:flex; flex-direction:column; align-items:center; gap:8px; }
.nm-trust-item .nm-icon{ font-size:1.8rem; }
.nm-trust-item strong{ font-size:.92rem; }
.nm-trust-item span{ font-size:.8rem; color: var(--nm-ink-soft); }
@media (max-width: 700px){ .nm-trust-grid{ grid-template-columns: repeat(2,1fr); } }

/* =========================================================
   SECTIONS
   ========================================================= */
.nm-section{ padding: 64px 0; }
.nm-section-head{ display:flex; justify-content:space-between; align-items:flex-end; gap:20px; margin-bottom: 34px; flex-wrap:wrap; }
.nm-section-head p{ margin:0; color: var(--nm-ink-soft); max-width: 50ch; }

/* Category grid */
.nm-cat-grid{ display:grid; grid-template-columns: repeat(6,1fr); gap: 20px; }
.nm-cat-card{ text-align:center; }
.nm-cat-card .nm-cat-thumb{
  width:100%; aspect-ratio:1; border-radius:50%; overflow:hidden;
  border: 3px solid var(--nm-cream-deep); margin-bottom:12px; background: var(--nm-white);
  transition: border-color .2s ease, transform .2s ease;
}
.nm-cat-card:hover .nm-cat-thumb{ border-color: var(--nm-gold); transform: translateY(-4px); }
.nm-cat-card .nm-cat-thumb img{ width:100%; height:100%; object-fit:cover; }
.nm-cat-card span{ font-weight:600; font-size:.9rem; }
@media (max-width: 980px){ .nm-cat-grid{ grid-template-columns: repeat(3,1fr); } }
@media (max-width: 560px){ .nm-cat-grid{ grid-template-columns: repeat(2,1fr); } }

/* Product grid */
.nm-product-grid, ul.products{
  display:grid !important; grid-template-columns: repeat(4,1fr) !important; gap: 24px; margin:0 !important;
}
@media (max-width: 980px){ .nm-product-grid, ul.products{ grid-template-columns: repeat(2,1fr) !important; } }

.nm-product-card, ul.products li.product{
  background: var(--nm-white); border: 1px solid var(--nm-line); border-radius: var(--nm-radius);
  padding: 16px; list-style:none; transition: box-shadow .2s ease, transform .2s ease;
}
.nm-product-card:hover, ul.products li.product:hover{ box-shadow: var(--nm-shadow); transform: translateY(-4px); }
.nm-product-thumb{ border-radius: var(--nm-radius-sm); overflow:hidden; margin-bottom:12px; aspect-ratio:1; background: var(--nm-cream); }
.nm-product-thumb img{ width:100%; height:100%; object-fit:cover; }
.nm-product-card h3, ul.products li.product .woocommerce-loop-product__title{
  font-family: var(--nm-font-body); font-weight:600; font-size:.95rem; margin-bottom:4px;
}
.nm-price, ul.products .price{ color: var(--nm-maroon); font-weight:700; }
.nm-halal-tag{
  display:inline-block; font-size:.68rem; font-weight:700; letter-spacing:.04em; text-transform:uppercase;
  background: var(--nm-success); color:#fff; padding: 3px 9px; border-radius:999px; margin-bottom:8px;
}

/* Story split */
.nm-story{ background: var(--nm-white); }
.nm-story-grid{ display:grid; grid-template-columns: .9fr 1.1fr; gap: 52px; align-items:center; }
.nm-story-grid img{ border-radius: var(--nm-radius); box-shadow: var(--nm-shadow); }
@media (max-width: 880px){ .nm-story-grid{ grid-template-columns:1fr; } }

/* Newsletter band */
.nm-newsletter{ background: var(--nm-maroon); color: var(--nm-cream); padding: 52px 0; }
.nm-newsletter-inner{ display:flex; justify-content:space-between; align-items:center; gap:28px; flex-wrap:wrap; }
.nm-newsletter h2{ color:#fff; margin-bottom:.2em; }
.nm-newsletter p{ color: var(--nm-cream-deep); margin:0; }
.nm-newsletter-form{ display:flex; gap:10px; }
.nm-newsletter-form input{ padding: 12px 18px; border-radius:999px; border:none; min-width:240px; }
@media (max-width:700px){ .nm-newsletter-form{ width:100%; } .nm-newsletter-form input{ flex:1; min-width:0; } }

/* =========================================================
   FOOTER
   ========================================================= */
.nm-footer{ background: var(--nm-ink); color: var(--nm-cream-deep); padding-top: 56px; }
.nm-footer-grid{ display:grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 36px; padding-bottom: 40px; }
.nm-footer h4{ color:#fff; font-size:1rem; margin-bottom: 1em; }
.nm-footer ul li{ margin-bottom: .6em; }
.nm-footer a{ color: var(--nm-cream-deep); }
.nm-footer a:hover{ color: var(--nm-gold-light); }
.nm-footer-logo{ max-height:44px; margin-bottom:14px; filter: brightness(0) invert(1); }
.nm-footer-social{ display:flex; gap:12px; margin-top:16px; }
.nm-footer-social a{
  width:36px; height:36px; border-radius:50%; border:1px solid rgba(255,255,255,.25);
  display:flex; align-items:center; justify-content:center;
}
.nm-footer-bottom{ border-top: 1px solid rgba(255,255,255,.12); padding: 18px 0; font-size:.82rem; }
.nm-footer-bottom .nm-container{ display:flex; justify-content:space-between; gap:16px; flex-wrap:wrap; }
@media (max-width: 880px){ .nm-footer-grid{ grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px){ .nm-footer-grid{ grid-template-columns: 1fr; } }

/* =========================================================
   GENERIC PAGE / BLOG / WOOCOMMERCE WRAPPER
   ========================================================= */
.nm-page-header{ background: var(--nm-cream-deep); padding: 44px 0; text-align:center; }
.nm-content-wrap{ padding: 56px 0; }
.nm-content-wrap .nm-container{ max-width: 860px; }
.woocommerce.nm-content-wrap .nm-container,
.woocommerce-page.nm-content-wrap .nm-container{ max-width: var(--nm-container); }

article.post{ background:#fff; border:1px solid var(--nm-line); border-radius: var(--nm-radius); padding: 28px; margin-bottom: 28px; }
.woocommerce a.button, .woocommerce button.button, .woocommerce input.button{
  background: var(--nm-maroon) !important; color:#fff !important; border-radius:999px !important;
  padding: 12px 26px !important; border:none !important; font-weight:600 !important;
}
.woocommerce a.button:hover, .woocommerce button.button:hover{ background: var(--nm-deep-red) !important; }
.woocommerce ul.products li.product .price{ font-size:1.05rem; }
