/*
Theme Name: WoodCraft Store
Theme URI: https://example.com/
Author: Your Name
Author URI: https://example.com/
Description: Lightweight, fast theme for wood & hanging wood products store.
Version: 1.3
License: GNU General Public License v2 or later
Text Domain: woodcraft-store
*/

:root {
  --bg: #faf7f2;
  --bg-alt: #f2ebe3;
  --primary: #8b5a2b;
  --primary-dark: #6b421b;
  --accent: #c89a67;
  --text: #2f2419;
  --muted: #7b6c5a;
  --radius: 16px;
  --shadow: 0 8px 24px rgba(0,0,0,0.06);
  --max-width: 1120px;
  --transition: all 0.25s ease;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

img { max-width:100%; height:auto; display:block; }

/* Layout container */
.container { width:100%; max-width:var(--max-width); margin:0 auto; padding:0 1.25rem; }

/* Header basics */
.site-header { position:sticky; top:0; z-index:50; background:rgba(250,247,242,0.96); border-bottom:1px solid rgba(0,0,0,0.04); }
.header-inner { display:flex; align-items:center; justify-content:space-between; padding:0.75rem 0; }

/* Buttons */
.btn { display:inline-flex; align-items:center; justify-content:center; border-radius:999px; padding:0.7rem 1.4rem; text-decoration:none; cursor:pointer; transition:var(--transition); }
.btn-primary { background:var(--primary); color:#fff; box-shadow:var(--shadow); }
.btn-primary:hover { background:var(--primary-dark); transform:translateY(-1px); }
.btn-ghost { background:transparent; border:1px solid rgba(0,0,0,0.08); color:var(--text); }

/* Top strip and hero */
.home-top-strip { background:var(--primary-dark); color:#fff; font-size:0.85rem; }
.home-top-strip-inner { display:flex; justify-content:space-between; padding:0.45rem 1.25rem; }

.home-hero { background:var(--bg-alt); padding:1.8rem 0; }
.home-hero-inner { display:grid; grid-template-columns:1.2fr 1fr; gap:1.5rem; align-items:center; }
.home-hero-title { font-size:2rem; margin:0 0 0.4rem; }
.home-hero-subtitle { color:var(--muted); margin-bottom:1rem; }

/* Category cards */
.home-cat-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:1rem; margin-top:1rem; }
.home-cat-card { background:#fff; border-radius:16px; overflow:hidden; box-shadow:0 8px 24px rgba(0,0,0,0.06); text-decoration:none; color:inherit; display:flex; flex-direction:column; }
.home-cat-image-wrap { width:100%; aspect-ratio:4/3; overflow:hidden; background:#e5d6c5; }
.home-cat-image-wrap img { width:100%; height:100%; object-fit:cover; display:block; }
.home-cat-info { padding:0.8rem; }

/* Home special offers */
.home-products-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:1rem; }
.home-product-card { background:#fff; border-radius:16px; padding:0.8rem; box-shadow:0 8px 24px rgba(0,0,0,0.06); display:flex; flex-direction:column; height:100%; }
.home-product-image { border-radius:12px; overflow:hidden; margin-bottom:0.5rem; background:#e5d6c5; aspect-ratio:4/3; }
.home-product-image img { width:100%; height:100%; object-fit:cover; display:block; }
.home-product-btn { display:inline-flex; align-items:center; justify-content:center; padding:0.4rem 0.9rem; border-radius:999px; background:var(--primary); color:#fff; text-decoration:none; }

/* Replace previous Woo grid with consistent 4/3/2 layout */
.woocommerce ul.products {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important; /* desktop */
  gap: 1.25rem !important;
  list-style: none;
  margin: 0;
  padding: 0;
}
.woocommerce ul.products::before,
.woocommerce ul.products::after { content: none !important; }

.woocommerce ul.products li.product {
  float: none !important;
  width: auto !important;
  margin: 0;
  border-radius: var(--radius);
  background: #fff;
  padding: 0.9rem;
  box-shadow: var(--shadow);
  text-align: left;
  box-sizing: border-box;
  display:flex;
  flex-direction:column;
}

.woocommerce ul.products li.product img {
  width:100% !important;
  height:auto;
  display:block;
  border-radius: calc(var(--radius) - 4px);
  margin-bottom: 0.6rem;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
  line-height:1.25;
  font-weight:600;
}
.woocommerce ul.products li.product .price {
  color: var(--primary-dark);
  font-weight:700;
  margin-bottom:0.45rem;
}
.woocommerce ul.products li.product a.button {
  margin-top: auto !important;
  display:inline-flex !important;
  align-items:center;
  justify-content:center;
  padding:0.35rem 0.8rem;
  border-radius:999px;
  background:var(--primary) !important;
  color:#fff !important;
  box-shadow:0 4px 12px rgba(0,0,0,0.12);
}

/* Responsive breakpoints */
@media (max-width: 1200px) {
  .woocommerce ul.products { grid-template-columns: repeat(3, minmax(0,1fr)) !important; }
}
@media (max-width: 900px) {
  .woocommerce ul.products { grid-template-columns: repeat(2, minmax(0,1fr)) !important; }
  .home-cat-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .home-products-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

/* sale badge */
.onsale { border-radius:999px; padding:0.12rem 0.4rem; font-weight:700; background:#c0392b; color:#fff; }

/* Footer */
.site-footer { padding:2rem 0 1rem; border-top:1px solid rgba(0,0,0,0.05); margin-top:2rem; font-size:0.8rem; }
