/*
 Theme Name:   Vietpot Child
 Theme URI:    https://vietpot.vn
 Description:  Child theme đồng bộ giao diện WooCommerce với React website Vietpot.
               Dựa trên Storefront — theme chính thức của WooCommerce.
               Không chỉnh core WordPress hay WooCommerce.
 Author:       Vietpot
 Author URI:   https://vietpot.vn
 Template:     storefront
 Version:      1.0.2
 License:      GNU General Public License v2 or later
 Text Domain:  vietpot-child
*/

/* ─────────────────────────────────────────────────────────────────────────────
   VIETPOT DESIGN TOKENS
   Đồng bộ 1:1 với React website (web/src/styles.css)
───────────────────────────────────────────────────────────────────────────── */

:root {
  --vp-primary:        #1b6f49;
  --vp-primary-dark:   #14543a;
  --vp-primary-light:  #2a9060;
  --vp-secondary:      #f1e6d6;
  --vp-accent:         #c8a96e;
  --vp-accent-dark:    #a88a52;
  --vp-bg:             #faf8f5;
  --vp-bg-alt:         #f5f0ea;
  --vp-bg-warm:        #f1e6d6;
  --vp-text:           #1a1a17;
  --vp-text-muted:     #6b6659;
  --vp-text-light:     #9c9487;
  --vp-border:         #e8dfd4;
  --vp-white:          #ffffff;
  --vp-footer-bg:      #14201b;

  --vp-font-display:   'Playfair Display', Georgia, serif;
  --vp-font-body:      'DM Sans', system-ui, sans-serif;

  --vp-radius-sm:      6px;
  --vp-radius:         10px;
  --vp-radius-lg:      16px;
  --vp-radius-xl:      24px;

  --vp-shadow-sm:      0 1px 3px rgba(26,26,23,0.06);
  --vp-shadow-md:      0 4px 16px rgba(26,26,23,0.08), 0 2px 6px rgba(26,26,23,0.05);
  --vp-shadow-lg:      0 12px 40px rgba(26,26,23,0.10), 0 4px 12px rgba(26,26,23,0.06);

  --vp-nav-height:     72px;
}

/* ─────────────────────────────────────────────────────────────────────────────
   GLOBAL BASE
───────────────────────────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--vp-font-body) !important;
  /* Teal gradient — giống React body background */
  background: linear-gradient(135deg, #477a73 0%, #3d6b64 55%, #2f5b52 100%) !important;
  background-attachment: fixed !important;
  color: var(--vp-text) !important;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
  margin: 0;
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--vp-font-display) !important;
  font-weight: 500 !important;
  color: var(--vp-text) !important;
  line-height: 1.25 !important;
}

a { color: var(--vp-primary); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--vp-primary-dark); }

img { max-width: 100%; height: auto; }

/* ─────────────────────────────────────────────────────────────────────────────
   STOREFRONT OVERRIDES — Header (hidden — replaced by custom header.php)
───────────────────────────────────────────────────────────────────────────── */

/* Storefront's native header/nav/cart are fully replaced by our header.php pill nav */
.site-header,
.storefront-primary-navigation,
#site-navigation,
.main-navigation,
.site-header-cart,
.site-branding {
  display: none !important;
}

/* Prevent Storefront sticky nav adding body padding-top */
body.storefront-sticky-nav { padding-top: 0 !important; }

/* Prevent #page from adding a top offset */
#page { margin-top: 0 !important; padding-top: 0 !important; }

/* ─────────────────────────────────────────────────────────────────────────────
   STOREFRONT OVERRIDES — Footer (hidden — replaced by custom footer.php)
───────────────────────────────────────────────────────────────────────────── */

/* Storefront's native footer widgets/info are hidden; our footer.php takes over */
#colophon.site-footer,
.site-info,
.storefront-handheld-footer-bar {
  display: none !important;
}

/* ─────────────────────────────────────────────────────────────────────────────
   MAIN CONTENT AREA — inside .vp-content-shell
───────────────────────────────────────────────────────────────────────────── */

/* Content shell itself has bg #f7f2ea. WC inner wrappers use var(--vp-bg) */
.vp-content-shell .site-main,
.vp-content-shell #page,
.vp-content-shell .woocommerce {
  background: transparent !important;
}

/* Container max-width inside shell (non-account pages) */
.vp-content-shell .col-full,
.woocommerce .col-full {
  max-width: 1200px !important;
  padding: 0 32px !important;
  margin: 0 auto !important;
}

/* Account pages: override col-full constraint — .woocommerce div controls width */
.woocommerce-account .col-full,
.woocommerce-account #primary,
.woocommerce-account .content-area {
  max-width: none !important;
  width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  float: none !important;
}

/* Padding-top to account for the fixed pill nav on WC pages that use woocommerce_before_main_content */
.woocommerce-cart .woocommerce,
.woocommerce-checkout .woocommerce,
.woocommerce-account .woocommerce {
  padding-top: 40px;
}

/* ─────────────────────────────────────────────────────────────────────────────
   BREADCRUMB
───────────────────────────────────────────────────────────────────────────── */

.woocommerce-breadcrumb {
  font-family: var(--vp-font-body) !important;
  font-size: 13px !important;
  color: var(--vp-text-muted) !important;
  padding: 20px 0 !important;
  background: none !important;
}

.woocommerce-breadcrumb a { color: var(--vp-primary) !important; }

/* ─────────────────────────────────────────────────────────────────────────────
   NOTICES / FLASH MESSAGES
───────────────────────────────────────────────────────────────────────────── */

.woocommerce-message,
.woocommerce-info {
  background: #f0fdf4 !important;
  border-top-color: var(--vp-primary) !important;
  color: var(--vp-text) !important;
  border-radius: 0 var(--vp-radius) var(--vp-radius) 0 !important;
  font-family: var(--vp-font-body) !important;
}

.woocommerce-error {
  background: #fef2f2 !important;
  border-top-color: #dc2626 !important;
  border-radius: 0 var(--vp-radius) var(--vp-radius) 0 !important;
  font-family: var(--vp-font-body) !important;
}

/* ─────────────────────────────────────────────────────────────────────────────
   MOBILE MENU TOGGLE
───────────────────────────────────────────────────────────────────────────── */

button.menu-toggle,
.menu-toggle {
  background: rgba(255,255,255,0.15) !important;
  border: 1px solid rgba(255,255,255,0.3) !important;
  color: var(--vp-white) !important;
  border-radius: var(--vp-radius-sm) !important;
  font-family: var(--vp-font-body) !important;
  font-size: 13px !important;
}

button.menu-toggle:hover {
  background: rgba(255,255,255,0.25) !important;
}
