/*
Theme Name: Decor
Theme URI: https://thaonhidecor.com
Author: ThaoNhi Decor
Author URI: https://thaonhidecor.com
Description: Giao diện WooCommerce được chuyển thể từ theme Shopify "Horizon" của ThaoNhi Decor (BookNook, Epoxy, Decor). Header 3 hàng, hero slider, Best Sellers, Special Collection, Featured Products, Customer Reviews... Toàn bộ nội dung trang chủ chỉnh được trong Giao diện → Tùy biến (Customizer).
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
WC requires at least: 8.0
WC tested up to: 9.5
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: decor
Tags: e-commerce, woocommerce, custom-colors, custom-logo, custom-menu, featured-images, full-width-template, translation-ready
*/

/* ---------- Design tokens (lấy từ settings_data.json của Shopify) ---------- */
:root {
  --c-bg: #ffffff;
  --c-fg: #000000;
  --c-color1: #333333;
  --c-border: #DFDFDF;
  --c-btn-bg: #111111;
  --c-btn-fg: #ffffff;
  --c-grad-start: #B75D35;
  --c-grad-end: #173B35;
  --c-accent: #173B35;
  --c-footer-bg: #eaca74;
  --radius-btn: 14px;
  --radius-input: 4px;
  --radius-card: 4px;
  --page-content-width: 90rem;
  --page-margin: 16px;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --header-offset: 0px;
}
@media (min-width: 750px) { :root { --page-margin: 40px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-fg);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.6;
  letter-spacing: 0.03em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration: underline; }
p { margin: 0 0 1em; }
h1, h2, h3, h4, h5, h6 { font-family: var(--font-body); font-weight: 700; margin: 0 0 .5em; line-height: 1.1; letter-spacing: 0; }
h1 { font-size: clamp(2rem, 5vw, 56px); line-height: 1; }
h2 { font-size: clamp(1.75rem, 4vw, 48px); line-height: 1; }
h3 { font-size: clamp(1.4rem, 3vw, 32px); line-height: 1.1; }
h4 { font-size: 24px; line-height: 1; }
h5 { font-size: 14px; font-weight: 500; line-height: 1.2; }
h6 { font-size: 12px; font-weight: 500; line-height: 1.2; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap; }
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 100000; background: #fff; padding: 10px 16px; clip: auto; width: auto; height: auto; }

.page-width { width: 100%; max-width: calc(var(--page-content-width) + var(--page-margin) * 2); margin-inline: auto; padding-inline: var(--page-margin); }
.full-bleed { width: 100vw; margin-inline: calc(50% - 50vw); }

/* ---------- Buttons / inputs ---------- */
.button, button.button, input[type="submit"], input[type="button"],
.wp-block-button__link, .woocommerce a.button, .woocommerce button.button,
.woocommerce input.button, .woocommerce #respond input#submit,
.woocommerce a.button.alt, .woocommerce button.button.alt, .woocommerce input.button.alt {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: 14px 28px; min-height: 44px;
  border: 1px solid var(--c-btn-bg); border-radius: var(--radius-btn);
  background: var(--c-btn-bg); color: var(--c-btn-fg);
  font: 500 13px/1.2 var(--font-body); letter-spacing: .06em; text-transform: uppercase;
  text-decoration: none; cursor: pointer; transition: opacity .2s, background .2s, color .2s;
}
.button:hover, .woocommerce a.button:hover, .woocommerce button.button:hover,
.woocommerce input.button:hover, .woocommerce a.button.alt:hover, .woocommerce button.button.alt:hover {
  background: var(--c-btn-bg); color: var(--c-btn-fg); opacity: .85; text-decoration: none;
}
.button--secondary { background: transparent; color: var(--c-fg); border-color: var(--c-fg); }
.button--secondary:hover { background: transparent; color: var(--c-fg); }
input[type="text"], input[type="email"], input[type="tel"], input[type="url"], input[type="password"],
input[type="search"], input[type="number"], textarea, select {
  width: 100%; padding: 12px 14px; border: 1px solid var(--c-border); border-radius: var(--radius-input);
  background: var(--c-bg); color: var(--c-color1); font: inherit; letter-spacing: normal;
}
input:focus-visible, textarea:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }

/* ---------- Generic content ---------- */
.site-main { min-height: 40vh; }
.content-area { padding-block: 40px 64px; }
.entry-title, .page-title { margin-bottom: .6em; }
.entry-content > * + * { margin-top: 1em; }
.posts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px 24px; }
@media (max-width: 989px) { .posts-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 599px) { .posts-grid { grid-template-columns: 1fr; } }
.post-card img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: var(--radius-card); }
.post-card h2 { font-size: 20px; margin: 12px 0 6px; }
.pagination, .nav-links { display: flex; gap: 8px; justify-content: center; margin-top: 40px; }
.page-numbers { padding: 8px 14px; border: 1px solid var(--c-border); border-radius: var(--radius-input); text-decoration: none; }
.page-numbers.current { background: var(--c-fg); color: var(--c-bg); border-color: var(--c-fg); }
