/* ============================================================
   ShopCraft – Storefront stylesheet
   A refined, editorial aesthetic with warm neutrals.
   Theme colors are injected via CSS variables in header.php.
   ============================================================ */

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-b);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; height: auto; }
a { color: inherit; text-decoration: none; transition: color .2s ease, opacity .2s ease; }
a:hover { opacity: .7; }
button { font-family: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
input, select, textarea {
  font-family: inherit; font-size: 1rem; color: inherit;
}
h1,h2,h3,h4,h5 {
  font-family: var(--font-h);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin: 0 0 .5em;
}
p { margin: 0 0 1em; }

/* ---------- Layout helpers ---------- */
.container { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 1.25rem; }
@media (min-width: 768px) { .container { padding: 0 2rem; } }

.site-main { min-height: 60vh; }

/* ---------- Announcement bar ---------- */
.announce-bar {
  background: var(--primary);
  color: #fff;
  font-size: .8125rem;
  letter-spacing: .04em;
  text-align: center;
  padding: .55rem 0;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid rgba(0,0,0,.06);
  backdrop-filter: saturate(180%) blur(8px);
  -webkit-backdrop-filter: saturate(180%) blur(8px);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 1.1rem 0;
}
.logo-link {
  font-family: var(--font-h);
  font-size: 1.4rem; font-weight: 500;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}
.logo-img { max-height: 38px; width: auto; }
.logo-text { color: var(--primary); }

.main-nav { display: none; gap: 1.75rem; flex: 1; justify-content: center; }
.nav-link {
  font-size: .9rem; font-weight: 400;
  letter-spacing: .02em;
  position: relative;
}
.nav-link::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -6px;
  height: 1px; background: var(--accent);
  transform: scaleX(0); transform-origin: left;
  transition: transform .3s ease;
}
.nav-link:hover::after { transform: scaleX(1); opacity: 1; }

@media (min-width: 1024px) { .main-nav { display: flex; } }

.header-actions { display: flex; align-items: center; gap: .25rem; }
.icon-btn {
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  position: relative;
  color: var(--text);
  border-radius: 50%;
  transition: background .2s ease;
}
.icon-btn:hover { background: rgba(0,0,0,.05); opacity: 1; }
.badge {
  position: absolute; top: 4px; right: 4px;
  min-width: 18px; height: 18px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent); color: #fff;
  border-radius: 999px; font-size: .68rem; font-weight: 600;
  padding: 0 5px;
}
.nav-toggle { display: inline-flex; }
@media (min-width: 1024px) { .nav-toggle { display: none; } }

/* ---------- Search panel ---------- */
.search-panel {
  position: absolute; top: 100%; left: 0; right: 0;
  background: var(--bg);
  border-bottom: 1px solid rgba(0,0,0,.06);
  max-height: 0; overflow: hidden;
  transition: max-height .3s ease;
}
body.search-open .search-panel { max-height: 120px; }
.search-form {
  display: flex; gap: .75rem; align-items: center; padding: 1rem 1.25rem;
}
.search-form input {
  flex: 1; padding: .75rem 1rem;
  background: transparent;
  border: 0; border-bottom: 1px solid rgba(0,0,0,.2);
  font-size: 1.1rem; outline: none;
  font-family: var(--font-h);
}
.search-form input:focus { border-color: var(--primary); }

/* ---------- Mobile nav drawer ---------- */
.mobile-nav {
  position: fixed; top: 0; left: 0; bottom: 0;
  width: 85%; max-width: 320px;
  background: var(--bg);
  z-index: 100;
  padding: 1.5rem;
  transform: translateX(-100%);
  transition: transform .3s ease;
  box-shadow: 0 0 40px rgba(0,0,0,.1);
  overflow-y: auto;
}
body.nav-open .mobile-nav { transform: translateX(0); }
.mobile-nav .close-btn { margin-left: auto; display: block; }
.mobile-nav-inner { display: flex; flex-direction: column; gap: 1rem; margin-top: 1rem; }
.mobile-nav-inner a {
  font-family: var(--font-h); font-size: 1.4rem;
  padding: .35rem 0;
}
.mobile-nav-inner hr { border: 0; border-top: 1px solid rgba(0,0,0,.08); margin: 1rem 0; }
.overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.4);
  opacity: 0; pointer-events: none;
  transition: opacity .3s ease;
  z-index: 99;
}
body.nav-open .overlay,
body.search-open .overlay { opacity: 1; pointer-events: auto; }

/* ---------- Flash messages ---------- */
.flash { padding: .85rem 0; font-size: .9rem; text-align: center; }
.flash-success { background: #e8f5ec; color: #1b5e20; }
.flash-error   { background: #fde7e7; color: #b71c1c; }
.flash-info    { background: #e8f0fe; color: #1565c0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .5rem;
  padding: .85rem 1.75rem;
  font-size: .9rem;
  font-weight: 500;
  letter-spacing: .05em;
  text-transform: uppercase;
  border-radius: 0;
  cursor: pointer;
  transition: all .25s ease;
  border: 1px solid transparent;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--accent); opacity: 1; }
.btn-secondary {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
}
.btn-secondary:hover { background: var(--primary); color: #fff; opacity: 1; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { opacity: .85; }
.btn-sm { padding: .55rem 1.1rem; font-size: .78rem; }
.btn-block { width: 100%; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 5rem 0 6rem;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 20% 30%, rgba(200,155,60,.08), transparent 60%);
  pointer-events: none;
}
.hero-inner {
  display: grid; gap: 3rem;
  grid-template-columns: 1fr;
  align-items: center;
  position: relative;
}
@media (min-width: 900px) {
  .hero { padding: 7rem 0 8rem; }
  .hero-inner { grid-template-columns: 1.1fr .9fr; gap: 5rem; }
}
.hero-title {
  font-family: var(--font-h);
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 400;
  font-style: italic;
  line-height: 1;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
  white-space: pre-line;
}
.hero-subtitle {
  font-size: 1.1rem;
  max-width: 480px;
  margin-bottom: 2rem;
  opacity: .75;
}
.hero-image {
  aspect-ratio: 4 / 5;
  background: linear-gradient(135deg, #efebe2, #d9d3c4);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 20px 60px -20px rgba(0,0,0,.2);
}
.hero-image img { width: 100%; height: 100%; object-fit: cover; }
.hero-image::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(0,0,0,.15));
}

/* ---------- Section base ---------- */
.section { padding: 5rem 0; }
.section-sm { padding: 3rem 0; }
.section-header {
  display: flex; align-items: end; justify-content: space-between;
  margin-bottom: 3rem; gap: 1rem; flex-wrap: wrap;
}
.section-title {
  font-family: var(--font-h);
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  margin: 0;
}
.section-subtitle {
  margin: .5rem 0 0;
  opacity: .65;
  font-size: 1.05rem;
}
.section-link { font-size: .88rem; letter-spacing: .08em; text-transform: uppercase; }
.section-link::after { content: ' →'; transition: margin .2s ease; }
.section-link:hover::after { margin-left: .25rem; }

/* ---------- Product grid ---------- */
.product-grid {
  display: grid; gap: 2rem 1.5rem;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 640px)  { .product-grid { grid-template-columns: repeat(3, 1fr); gap: 2.5rem 2rem; } }
@media (min-width: 1024px) { .product-grid { grid-template-columns: repeat(4, 1fr); } }

.product-card { position: relative; }
.product-card-link { display: block; }
.product-image {
  position: relative;
  aspect-ratio: 3 / 4;
  background: #f1ede4;
  overflow: hidden;
  margin-bottom: 1rem;
}
.product-image img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .6s cubic-bezier(.2,.7,.3,1);
}
.product-card:hover .product-image img { transform: scale(1.05); }
.product-image-placeholder {
  width: 100%; height: 100%;
  display: grid; place-items: center;
  font-family: var(--font-h); font-size: 1.2rem;
  color: rgba(0,0,0,.25); font-style: italic;
  background: linear-gradient(135deg, #efebe2, #e2dccd);
}
.product-badges {
  position: absolute; top: .75rem; left: .75rem;
  display: flex; flex-direction: column; gap: .35rem;
}
.product-badge {
  background: #fff; color: var(--primary);
  font-size: .68rem; font-weight: 500;
  letter-spacing: .1em; text-transform: uppercase;
  padding: .3rem .55rem; border-radius: 0;
}
.product-badge.sale { background: var(--primary); color: #fff; }
.product-badge.new  { background: var(--accent); color: #fff; }

.product-quick-add {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: var(--primary); color: #fff;
  padding: .85rem; text-align: center;
  font-size: .82rem; letter-spacing: .1em; text-transform: uppercase;
  transform: translateY(100%);
  transition: transform .3s ease;
}
.product-card:hover .product-quick-add { transform: translateY(0); }

.product-name {
  font-family: var(--font-h);
  font-size: 1.05rem;
  font-weight: 400;
  margin: 0 0 .25rem;
  letter-spacing: -0.005em;
}
.product-price {
  display: flex; gap: .65rem; align-items: baseline;
  font-size: .95rem;
  margin: 0;
}
.product-price .original {
  text-decoration: line-through;
  opacity: .4; font-size: .85rem;
}
.product-price .sale { color: #b71c1c; font-weight: 500; }

/* ---------- Category grid (image cards) ---------- */
.category-grid {
  display: grid; gap: 1.5rem;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 768px) { .category-grid { grid-template-columns: repeat(4, 1fr); } }
.category-card {
  position: relative;
  aspect-ratio: 1; overflow: hidden;
  background: #efebe2;
}
.category-card img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .8s ease;
}
.category-card:hover img { transform: scale(1.06); }
.category-card-overlay {
  position: absolute; inset: 0;
  display: flex; align-items: end; padding: 1.5rem;
  background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,.55));
  color: #fff;
}
.category-card-name {
  font-family: var(--font-h); font-size: 1.35rem; font-weight: 500;
  margin: 0;
}

/* ---------- Image-text section ---------- */
.image-text {
  display: grid; gap: 3rem;
  grid-template-columns: 1fr;
  align-items: center;
}
@media (min-width: 800px) { .image-text { grid-template-columns: 1fr 1fr; gap: 5rem; } }
.image-text--reverse .image-text-img { order: 2; }
.image-text-img {
  aspect-ratio: 4 / 5;
  background: linear-gradient(135deg, #efebe2, #d9d3c4);
  overflow: hidden;
}
.image-text-content h2 {
  font-size: clamp(1.75rem, 4vw, 3rem);
  font-weight: 400;
  font-style: italic;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
}

/* ---------- Newsletter section ---------- */
.newsletter-section {
  background: var(--primary);
  color: #fff;
  padding: 5rem 0;
  text-align: center;
}
.newsletter-section h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400; font-style: italic;
  margin-bottom: .75rem;
}
.newsletter-section p { opacity: .75; max-width: 480px; margin: 0 auto 2rem; }
.newsletter-section-form {
  display: flex; max-width: 460px; margin: 0 auto;
  gap: .5rem; flex-wrap: wrap; justify-content: center;
}
.newsletter-section-form input {
  flex: 1; min-width: 220px;
  padding: .9rem 1rem;
  background: transparent;
  color: #fff;
  border: 0; border-bottom: 1px solid rgba(255,255,255,.3);
  outline: none;
}
.newsletter-section-form input::placeholder { color: rgba(255,255,255,.5); }

/* ---------- Footer ---------- */
.site-footer {
  background: #1a1a1a;
  color: #e6e2d6;
  margin-top: 4rem;
  padding-top: 4rem;
}
.footer-grid {
  display: grid; gap: 3rem;
  grid-template-columns: 1fr;
}
@media (min-width: 700px)  { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1.5fr; gap: 4rem; } }
.footer-logo {
  font-family: var(--font-h);
  font-size: 1.75rem; font-weight: 500;
  color: #fff; margin: 0 0 .5rem;
}
.footer-tagline { opacity: .55; max-width: 280px; }
.footer-col h4 {
  font-family: var(--font-b);
  font-size: .8rem; font-weight: 500;
  letter-spacing: .15em; text-transform: uppercase;
  margin: 0 0 1.25rem;
  color: #fff;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .65rem; }
.footer-col li a { color: rgba(255,255,255,.65); font-size: .92rem; }
.footer-col li a:hover { color: var(--accent); opacity: 1; }
.footer-social { display: flex; gap: .5rem; margin-top: 1rem; }
.footer-social a {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 50%; font-size: .85rem;
  transition: all .2s;
}
.footer-social a:hover { background: var(--accent); border-color: var(--accent); opacity: 1; }

.newsletter-form {
  display: flex; gap: .5rem; margin-top: .75rem;
}
.newsletter-form input {
  flex: 1; padding: .7rem .85rem;
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 0;
  outline: none;
}
.newsletter-form input:focus { border-color: var(--accent); }
.newsletter-form button {
  padding: .7rem 1.25rem; background: var(--accent); color: #fff;
  font-size: .78rem; letter-spacing: .1em; text-transform: uppercase;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  margin-top: 3rem; padding: 1.5rem 0;
}
.footer-bottom .container {
  display: flex; justify-content: space-between; gap: 1rem;
  flex-wrap: wrap; font-size: .8rem; opacity: .5;
}

/* ---------- Product detail ---------- */
.product-detail {
  display: grid; gap: 3rem;
  grid-template-columns: 1fr;
  padding: 3rem 0;
}
@media (min-width: 900px) { .product-detail { grid-template-columns: 1.1fr 1fr; gap: 5rem; padding: 4rem 0; } }
.product-gallery-main { aspect-ratio: 4 / 5; background: #efebe2; overflow: hidden; }
.product-gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.product-gallery-thumbs { display: flex; gap: .5rem; margin-top: .75rem; flex-wrap: wrap; }
.product-gallery-thumbs button {
  width: 70px; aspect-ratio: 1; padding: 0; border: 1px solid transparent;
  background: #efebe2; overflow: hidden; cursor: pointer;
}
.product-gallery-thumbs button.active { border-color: var(--primary); }
.product-gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }

.product-info h1 {
  font-family: var(--font-h);
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 400;
  margin-bottom: 1rem;
}
.product-info .price-block {
  display: flex; align-items: baseline; gap: 1rem;
  font-size: 1.5rem; margin-bottom: 1.5rem;
}
.product-info .price-block .original {
  text-decoration: line-through; opacity: .4; font-size: 1.05rem;
}
.product-info .short-desc { opacity: .8; margin-bottom: 2rem; }
.product-info .form-row {
  display: flex; gap: .75rem; margin-bottom: 1.25rem; flex-wrap: wrap;
}
.qty-control {
  display: inline-flex; align-items: center;
  border: 1px solid var(--primary);
}
.qty-control button { width: 44px; height: 48px; font-size: 1.1rem; }
.qty-control input {
  width: 50px; height: 48px;
  text-align: center;
  border: 0; outline: none; background: transparent;
  font-size: 1rem;
}
.product-meta { font-size: .88rem; opacity: .7; margin-top: 1.5rem; }
.product-meta span { display: block; margin-bottom: .25rem; }
.product-description { margin-top: 3rem; }
.product-description h3 {
  font-size: 1.1rem; letter-spacing: .1em; text-transform: uppercase;
  font-family: var(--font-b); font-weight: 500;
  border-bottom: 1px solid rgba(0,0,0,.1); padding-bottom: .75rem;
  margin-bottom: 1.25rem;
}
.product-description ul { padding-left: 1.25rem; }

/* ---------- Reviews ---------- */
.review { padding: 1.5rem 0; border-top: 1px solid rgba(0,0,0,.08); }
.review:first-child { border-top: 0; }
.review-head { display: flex; justify-content: space-between; margin-bottom: .5rem; }
.review-name { font-weight: 500; }
.stars { color: var(--accent); letter-spacing: .15em; }
.stars-empty { color: rgba(0,0,0,.2); }

/* ---------- Cart ---------- */
.cart-page { padding: 3rem 0; }
.cart-grid { display: grid; gap: 3rem; grid-template-columns: 1fr; }
@media (min-width: 900px) { .cart-grid { grid-template-columns: 1.7fr 1fr; gap: 4rem; } }
.cart-item {
  display: grid; grid-template-columns: 90px 1fr auto;
  gap: 1.25rem; padding: 1.5rem 0;
  border-bottom: 1px solid rgba(0,0,0,.08);
  align-items: center;
}
.cart-item-img { aspect-ratio: 3/4; background: #efebe2; overflow: hidden; }
.cart-item-img img { width: 100%; height: 100%; object-fit: cover; }
.cart-item-name { font-family: var(--font-h); font-size: 1.05rem; margin: 0 0 .25rem; }
.cart-item-price { opacity: .65; font-size: .9rem; }
.cart-item-actions { display: flex; align-items: center; gap: 1rem; }
.cart-summary {
  background: #fff; padding: 2rem;
  border: 1px solid rgba(0,0,0,.08);
  position: sticky; top: 100px; height: fit-content;
}
.summary-row { display: flex; justify-content: space-between; padding: .65rem 0; }
.summary-row.total {
  border-top: 1px solid rgba(0,0,0,.1); margin-top: .5rem; padding-top: 1rem;
  font-family: var(--font-h); font-size: 1.3rem;
}
.coupon-form { display: flex; gap: .5rem; margin: 1.25rem 0; }
.coupon-form input {
  flex: 1; padding: .65rem .85rem;
  border: 1px solid rgba(0,0,0,.15); background: transparent;
}

/* ---------- Forms (general) ---------- */
.form-card {
  max-width: 480px; margin: 4rem auto;
  background: #fff; padding: 2.5rem;
  border: 1px solid rgba(0,0,0,.08);
}
.form-card h1 {
  font-size: 1.75rem; margin-bottom: 1.5rem; text-align: center;
}
.field { margin-bottom: 1.25rem; }
.field label {
  display: block;
  font-size: .78rem; letter-spacing: .1em;
  text-transform: uppercase; margin-bottom: .4rem; opacity: .75;
}
.field input, .field select, .field textarea {
  width: 100%; padding: .85rem 1rem;
  background: transparent;
  border: 1px solid rgba(0,0,0,.15);
  outline: none; border-radius: 0;
  transition: border-color .2s;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--primary); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-meta { text-align: center; margin-top: 1.5rem; font-size: .9rem; opacity: .75; }

/* ---------- Filters / shop sidebar ---------- */
.shop-layout { display: grid; gap: 2.5rem; grid-template-columns: 1fr; padding: 2.5rem 0; }
@media (min-width: 900px) { .shop-layout { grid-template-columns: 240px 1fr; gap: 3rem; } }
.shop-sidebar h3 {
  font-size: .78rem; letter-spacing: .1em; text-transform: uppercase;
  font-family: var(--font-b); font-weight: 500;
  margin: 0 0 1rem;
}
.shop-sidebar ul { list-style: none; padding: 0; margin: 0 0 2rem; display: flex; flex-direction: column; gap: .5rem; }
.shop-sidebar a { font-size: .95rem; opacity: .75; }
.shop-sidebar a.active, .shop-sidebar a:hover { opacity: 1; color: var(--accent); }
.shop-toolbar {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(0,0,0,.06);
  flex-wrap: wrap; gap: 1rem;
}
.shop-toolbar select {
  padding: .5rem .75rem; border: 1px solid rgba(0,0,0,.15); background: transparent;
}
.results-count { font-size: .9rem; opacity: .65; }

/* ---------- Pagination ---------- */
.pagination {
  display: flex; justify-content: center; gap: .5rem; margin: 3rem 0 1rem;
  list-style: none; padding: 0;
}
.pagination a, .pagination span {
  min-width: 40px; height: 40px;
  display: inline-grid; place-items: center;
  font-size: .9rem;
  border: 1px solid rgba(0,0,0,.1);
}
.pagination .active span { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ---------- Empty state ---------- */
.empty-state {
  text-align: center; padding: 5rem 1rem;
}
.empty-state h2 { font-size: 2rem; font-weight: 400; font-style: italic; margin-bottom: .75rem; }
.empty-state p { opacity: .65; margin-bottom: 2rem; }

/* ---------- Blog ---------- */
.blog-grid {
  display: grid; gap: 3rem;
  grid-template-columns: 1fr;
}
@media (min-width: 700px) { .blog-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px){ .blog-grid { grid-template-columns: repeat(3, 1fr); } }
.blog-card-img { aspect-ratio: 16/10; overflow: hidden; background: #efebe2; margin-bottom: 1.25rem; }
.blog-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.blog-card:hover .blog-card-img img { transform: scale(1.04); }
.blog-card-meta { font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; opacity: .55; margin-bottom: .5rem; }
.blog-card h2 { font-size: 1.4rem; font-weight: 500; margin-bottom: .5rem; }
.blog-article { max-width: 760px; margin: 0 auto; padding: 4rem 0; }
.blog-article h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 400; font-style: italic; }
.blog-article .blog-meta { opacity: .55; font-size: .85rem; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 2rem; }
.blog-article .blog-content { font-size: 1.08rem; line-height: 1.75; }

/* ---------- FAQ accordion ---------- */
.faq-item {
  border-bottom: 1px solid rgba(0,0,0,.08);
  padding: 1.5rem 0;
}
.faq-question {
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-h); font-size: 1.15rem; cursor: pointer; gap: 1rem;
}
.faq-question::after {
  content: '+';
  font-size: 1.4rem; opacity: .5;
  transition: transform .25s ease;
}
.faq-item.open .faq-question::after { transform: rotate(45deg); }
.faq-answer {
  max-height: 0; overflow: hidden;
  transition: max-height .3s ease;
  opacity: .8;
}
.faq-item.open .faq-answer { max-height: 1000px; padding-top: 1rem; }

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.mt-2 { margin-top: 2rem; }
.mb-2 { margin-bottom: 2rem; }
.italic { font-style: italic; }

/* ============================================================
   v1.1 — UI polish, product card actions, Buy Now, checkout
   ============================================================ */

/* ---------- Buttons (refined) ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .75rem 1.5rem;
  font-size: .92rem;
  font-weight: 500;
  letter-spacing: .02em;
  border-radius: 4px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease, transform .1s ease, box-shadow .15s ease;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
}
.btn:hover { opacity: 1; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

.btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.btn-primary:hover {
  background: #000;
  color: #fff;
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--text);
}
.btn-secondary:hover {
  background: var(--text);
  color: var(--bg);
}

.btn-accent {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-accent:hover {
  background: #b58722;
  color: #fff;
  border-color: #b58722;
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: rgba(0,0,0,.18);
}
.btn-outline:hover {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: transparent;
}
.btn-ghost:hover {
  background: rgba(0,0,0,.04);
}

.btn-sm { padding: .55rem 1rem; font-size: .82rem; }
.btn-lg { padding: .95rem 2rem; font-size: 1rem; }
.btn-block { display: flex; width: 100%; }

/* ---------- Product card actions (Add to cart + Buy now overlay) ---------- */
.product-card { position: relative; display: flex; flex-direction: column; }
.product-card-link { display: block; }

.product-card-actions {
  display: flex;
  flex-direction: column;
  gap: .4rem;
  margin-top: .85rem;
  opacity: 1;
}
.product-card-form { margin: 0; }

/* On desktop, hide actions until hover (cleaner look) */
@media (min-width: 768px) {
  .product-card-actions {
    opacity: 0;
    transform: translateY(4px);
    transition: opacity .2s ease, transform .2s ease;
    margin-top: .6rem;
  }
  .product-card:hover .product-card-actions {
    opacity: 1;
    transform: translateY(0);
  }
}

/* On mobile, always show but compact */
@media (max-width: 767px) {
  .product-card-actions { flex-direction: row; }
  .product-card-actions form { flex: 1; }
}

/* Card itself a bit more refined */
.product-card .product-image {
  border-radius: 6px;
  overflow: hidden;
  background: var(--surface, #f4f1ea);
  transition: transform .35s ease;
}
.product-card:hover .product-image img { transform: scale(1.04); }
.product-card .product-image img { transition: transform .5s ease; }

.product-card .product-name {
  font-size: 1rem;
  margin: .85rem 0 .25rem;
  letter-spacing: -0.005em;
}
.product-card .product-price {
  margin: 0;
  font-size: .92rem;
  font-weight: 500;
}

.product-badge.oos {
  background: rgba(0,0,0,.7);
  color: #fff;
}

/* ---------- Product detail page polish ---------- */
.qty-row {
  display: flex;
  gap: .65rem;
  align-items: stretch;
  margin-bottom: .75rem;
}
.qty-control {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(0,0,0,.18);
  border-radius: 4px;
  overflow: hidden;
  height: 48px;
}
.qty-control button {
  width: 38px;
  height: 100%;
  background: transparent;
  font-size: 1.15rem;
  cursor: pointer;
  color: var(--text);
  transition: background .15s;
}
.qty-control button:hover { background: rgba(0,0,0,.05); }
.qty-control input {
  width: 50px;
  height: 100%;
  text-align: center;
  border: 0;
  border-left: 1px solid rgba(0,0,0,.1);
  border-right: 1px solid rgba(0,0,0,.1);
  background: transparent;
  font-weight: 500;
}
.qty-control input::-webkit-outer-spin-button,
.qty-control input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty-control input { -moz-appearance: textfield; }

/* Product detail meta */
.product-detail .price-block strong {
  font-size: 1.85rem;
  font-weight: 500;
  letter-spacing: -0.015em;
}
.product-detail .price-block .original {
  font-size: 1.15rem;
  opacity: .55;
  text-decoration: line-through;
  margin-left: .65rem;
}
.product-detail .short-desc {
  font-size: 1.04rem;
  line-height: 1.7;
  opacity: .82;
  margin: 1rem 0 1.5rem;
}
.product-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(0,0,0,.08);
  font-size: .85rem;
  opacity: .7;
}

/* ---------- Cart page polish ---------- */
.cart-table {
  border-collapse: collapse;
  width: 100%;
}
.cart-table th, .cart-table td {
  padding: 1.25rem .85rem;
  border-bottom: 1px solid rgba(0,0,0,.08);
  vertical-align: middle;
}
.cart-table th {
  text-align: left;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  opacity: .55;
  font-weight: 600;
  padding-bottom: .85rem;
  padding-top: .85rem;
}
.cart-item-img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 4px;
  background: var(--surface, #f4f1ea);
}
.cart-item-title {
  font-family: var(--font-h);
  font-size: 1.05rem;
  margin: 0 0 .15rem;
  line-height: 1.3;
}
.cart-item-sub { font-size: .82rem; opacity: .55; }

/* ---------- Checkout polish ---------- */
.checkout-layout {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 2.5rem;
  align-items: start;
}
@media (max-width: 900px) { .checkout-layout { grid-template-columns: 1fr; gap: 1.5rem; } }

.checkout-main { min-width: 0; }
.form-section {
  background: #fff;
  border: 1px solid rgba(0,0,0,.07);
  border-radius: 6px;
  padding: 1.75rem;
  margin-bottom: 1.25rem;
}
.form-section h2 {
  font-size: 1.15rem;
  margin: 0 0 1.25rem;
  padding-bottom: .85rem;
  border-bottom: 1px solid rgba(0,0,0,.06);
}
.form-input {
  width: 100%;
  padding: .75rem .9rem;
  border: 1px solid rgba(0,0,0,.15);
  border-radius: 4px;
  font-size: .95rem;
  background: #fff;
  font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0,0,0,.05);
}
.form-input.has-error { border-color: #b71c1c; }
.form-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.form-row .form-group { flex: 1; min-width: 0; }
.form-group { margin-bottom: 1rem; }
.form-group label {
  display: block;
  font-size: .82rem;
  font-weight: 500;
  margin-bottom: .4rem;
}
.form-group label small { opacity: .55; font-weight: 400; }
.form-hint { font-size: .8rem; opacity: .7; }
.form-hint a { text-decoration: underline; }

/* Radio cards on checkout */
.radio-card {
  display: flex;
  align-items: flex-start;
  gap: .9rem;
  padding: 1rem 1.15rem;
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 5px;
  margin-bottom: .6rem;
  cursor: pointer;
  transition: border-color .12s, background .12s;
}
.radio-card:hover { border-color: rgba(0,0,0,.3); }
.radio-card:has(input:checked) {
  border-color: var(--primary);
  background: rgba(0,0,0,.02);
}
.radio-card input[type=radio] {
  margin-top: .25rem;
  accent-color: var(--primary);
}
.radio-card span strong { display: block; font-weight: 500; }
.radio-card span small { display: block; opacity: .65; font-size: .82rem; margin-top: .2rem; }
.radio-card-highlight {
  background: rgba(200, 155, 60, .06);
  border-color: rgba(200, 155, 60, .35);
}
.discount-pill {
  background: var(--accent);
  color: #fff;
  font-size: .68rem;
  padding: .15rem .5rem;
  border-radius: 3px;
  margin-left: .4rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  font-weight: 700;
  vertical-align: middle;
}

/* Order summary sidebar */
.checkout-summary {
  background: #fff;
  border: 1px solid rgba(0,0,0,.07);
  border-radius: 6px;
  padding: 1.5rem 1.65rem;
  position: sticky;
  top: 100px;
  align-self: start;
}
.checkout-summary h3 {
  font-size: 1.05rem;
  margin: 0 0 1rem;
  padding-bottom: .85rem;
  border-bottom: 1px solid rgba(0,0,0,.06);
}
.checkout-items {
  display: flex;
  flex-direction: column;
  gap: .85rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgba(0,0,0,.06);
}
.checkout-item {
  display: flex;
  gap: .85rem;
  align-items: center;
}
.checkout-item-image {
  position: relative;
  width: 54px;
  height: 54px;
  border-radius: 5px;
  background: var(--surface, #f4f1ea);
  flex-shrink: 0;
  overflow: hidden;
}
.checkout-item-image img { width: 100%; height: 100%; object-fit: cover; }
.checkout-item-image .badge-qty {
  position: absolute;
  top: -6px; right: -6px;
  background: var(--primary);
  color: #fff;
  font-size: .7rem;
  font-weight: 600;
  height: 20px;
  min-width: 20px;
  border-radius: 99px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
}
.checkout-item-info {
  flex: 1;
  font-size: .88rem;
  line-height: 1.3;
}
.checkout-item-info strong { font-weight: 500; }
.checkout-item-price {
  font-size: .88rem;
  font-weight: 500;
  text-align: right;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .35rem 0;
  font-size: .9rem;
}
.summary-row.hidden { display: none; }
.summary-row.summary-discount { color: var(--accent); font-weight: 500; }
.summary-row.summary-total {
  border-top: 1px solid rgba(0,0,0,.08);
  margin-top: .65rem;
  padding-top: .85rem;
  font-size: 1.05rem;
  font-weight: 600;
}

.checkout-trust {
  margin-top: 1rem;
  text-align: center;
  opacity: .55;
}

/* Advance discount banner */
.advance-banner {
  display: flex;
  align-items: center;
  gap: .85rem;
  background: linear-gradient(135deg, rgba(200,155,60,.12), rgba(200,155,60,.04));
  border: 1px solid rgba(200,155,60,.3);
  border-radius: 6px;
  padding: .9rem 1.15rem;
  margin-bottom: 1.5rem;
  font-size: .92rem;
}
.advance-icon {
  background: var(--accent);
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 99px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .92rem;
  flex-shrink: 0;
}

/* Order success page */
.success-card {
  text-align: center;
  padding: 3rem 1.5rem 2rem;
  background: #fff;
  border-radius: 6px;
  border: 1px solid rgba(0,0,0,.06);
  margin-bottom: 1.5rem;
}
.success-icon {
  width: 64px; height: 64px;
  margin: 0 auto 1.25rem;
  background: rgba(45, 122, 79, .12);
  color: #2d7a4f;
  border-radius: 99px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}
.success-card h1 {
  font-size: 1.85rem;
  margin: 0 0 .5rem;
}
.success-sub { font-size: 1.05rem; opacity: .75; }

.order-detail-card {
  background: #fff;
  border: 1px solid rgba(0,0,0,.07);
  border-radius: 6px;
  padding: 1.65rem;
  margin-bottom: 1.25rem;
}
.order-detail-card h2 {
  font-size: 1.1rem;
  margin: 0 0 1rem;
  padding-bottom: .75rem;
  border-bottom: 1px solid rgba(0,0,0,.06);
}
.bank-details {
  background: rgba(0,0,0,.03);
  border: 1px dashed rgba(0,0,0,.18);
  border-radius: 5px;
  padding: 1rem 1.15rem;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: .88rem;
  white-space: pre-wrap;
  margin: .75rem 0;
}
.note-success {
  background: rgba(45, 122, 79, .08);
  color: #1d6336;
  padding: .65rem 1rem;
  border-radius: 5px;
  font-size: .9rem;
  margin: .85rem 0;
}
.order-table {
  width: 100%;
  border-collapse: collapse;
}
.order-table thead th {
  text-align: left;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  opacity: .55;
  font-weight: 600;
  padding: .55rem .35rem .75rem;
  border-bottom: 1px solid rgba(0,0,0,.08);
}
.order-table tbody td { padding: .85rem .35rem; border-bottom: 1px solid rgba(0,0,0,.05); }
.order-table tfoot td { padding: .45rem .35rem; font-size: .9rem; }
.order-table .right { text-align: right; }
.order-table .total-row td {
  border-top: 1px solid rgba(0,0,0,.08);
  padding-top: .85rem;
  font-size: 1.05rem;
}

/* Container variant */
.container-narrow { max-width: 760px; }
.page-section { padding: 3rem 0 4rem; }
.page-section .page-header { margin-bottom: 2rem; }
.page-section .page-header h1 {
  font-size: 2.25rem;
  margin: 0;
}
.mt-lg { margin-top: 2rem; }

/* Alerts */
.alert {
  padding: .9rem 1.15rem;
  border-radius: 5px;
  margin-bottom: 1rem;
  font-size: .92rem;
  border: 1px solid transparent;
}
.alert-success { background: rgba(45, 122, 79, .08); color: #1d6336; border-color: rgba(45, 122, 79, .2); }
.alert-error   { background: rgba(183, 28, 28, .07); color: #962b22; border-color: rgba(183, 28, 28, .18); }
.alert-info    { background: rgba(33, 99, 168, .07); color: #1565a8; border-color: rgba(33, 99, 168, .18); }

/* ============================================================
   v1.2 — WhatsApp FAB, Popups, Mobile optimization
   ============================================================ */

/* ---------- WhatsApp floating button ---------- */
.whatsapp-fab {
  position: fixed;
  bottom: 20px;
  z-index: 999;
  display: flex;
  align-items: center;
  gap: .55rem;
  background: #25D366;
  color: #fff;
  padding: 12px 16px 12px 14px;
  border-radius: 999px;
  font-size: .95rem;
  font-weight: 600;
  box-shadow: 0 6px 24px rgba(37, 211, 102, .35), 0 2px 6px rgba(0,0,0,.12);
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease, background .15s ease;
  opacity: 1;
  cursor: pointer;
}
.whatsapp-fab.whatsapp-right { right: 20px; }
.whatsapp-fab.whatsapp-left  { left: 20px; }
.whatsapp-fab:hover {
  background: #1da851;
  color: #fff;
  transform: scale(1.05);
  box-shadow: 0 8px 28px rgba(37, 211, 102, .45), 0 3px 8px rgba(0,0,0,.18);
  text-decoration: none;
  opacity: 1;
}
.whatsapp-fab svg {
  flex-shrink: 0;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.1));
}

/* Subtle pulse to draw attention */
.whatsapp-fab::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 999px;
  background: rgba(37, 211, 102, .35);
  z-index: -1;
  animation: wa-pulse 2.5s ease-out infinite;
}
@keyframes wa-pulse {
  0%   { transform: scale(1);   opacity: .6; }
  70%  { transform: scale(1.2); opacity: 0; }
  100% { transform: scale(1.2); opacity: 0; }
}

@media (max-width: 640px) {
  .whatsapp-fab {
    padding: 12px;
    bottom: 16px;
  }
  .whatsapp-fab.whatsapp-right { right: 16px; }
  .whatsapp-fab.whatsapp-left  { left: 16px; }
  .whatsapp-label { display: none; }
}

/* ---------- Popup notifications ---------- */
.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .55);
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  animation: popup-fade .25s ease;
  backdrop-filter: blur(2px);
}
@keyframes popup-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.popup-card {
  position: relative;
  max-width: 480px;
  width: 100%;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0,0,0,.3);
  animation: popup-slide-up .35s cubic-bezier(.16,1,.3,1);
}
@keyframes popup-slide-up {
  from { opacity: 0; transform: translateY(20px) scale(.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.popup-image img {
  width: 100%;
  max-height: 260px;
  object-fit: cover;
}
.popup-body { padding: 1.75rem 1.85rem 1.85rem; }
.popup-title {
  font-size: 1.4rem;
  margin: 0 0 .65rem;
  letter-spacing: -0.01em;
  font-weight: 600;
}
.popup-message {
  font-size: 1rem;
  line-height: 1.55;
  opacity: .85;
  margin-bottom: 1.25rem;
}
.popup-button {
  display: inline-block;
  background: var(--primary, #1a1a1a);
  color: #fff;
  padding: .85rem 1.65rem;
  border-radius: 5px;
  font-weight: 500;
  text-decoration: none;
  transition: opacity .15s ease, transform .1s ease;
  font-size: .95rem;
}
.popup-button:hover {
  opacity: .9;
  color: #fff;
  text-decoration: none;
}
.popup-close {
  position: absolute;
  top: .65rem;
  right: .85rem;
  background: rgba(0,0,0,.06);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1.5rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 0;
  color: inherit;
  opacity: .8;
  transition: opacity .15s, background .15s, transform .15s;
}
.popup-close:hover { opacity: 1; background: rgba(0,0,0,.12); transform: scale(1.1); }

/* Popup style variants */
.popup-bottom, .popup-top, .popup-corner {
  max-width: 380px;
  border-radius: 10px;
}
.popup-overlay:has(.popup-bottom),
.popup-overlay:has(.popup-corner) {
  align-items: flex-end;
  background: transparent;
  pointer-events: none;
}
.popup-overlay:has(.popup-bottom) { justify-content: center; }
.popup-overlay:has(.popup-corner) { justify-content: flex-end; padding: 1.5rem; }
.popup-overlay:has(.popup-top) { align-items: flex-start; }

.popup-bottom, .popup-corner {
  pointer-events: auto;
  box-shadow: 0 12px 32px rgba(0,0,0,.18);
  animation: popup-slide-from-bottom .35s cubic-bezier(.16,1,.3,1);
}
@keyframes popup-slide-from-bottom {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Popup on mobile */
@media (max-width: 640px) {
  .popup-card, .popup-bottom, .popup-top, .popup-corner {
    max-width: 100%;
    width: calc(100% - 2rem);
  }
  .popup-body { padding: 1.25rem 1.35rem 1.5rem; }
  .popup-title { font-size: 1.2rem; }
  .popup-message { font-size: .95rem; }
  .popup-image img { max-height: 200px; }
}

/* ============================================================
   MOBILE OPTIMIZATION PASS
   ============================================================ */

/* Larger tap targets, no hover-reveal */
@media (max-width: 767px) {

  /* Hide cursor-hover interactions on touch */
  .product-card:hover .product-image img { transform: none; }

  /* Header tweaks */
  .site-header { padding: .85rem 0; }
  .site-header .logo { font-size: 1.2rem; }
  .site-nav { display: none; }
  .header-actions .icon-btn {
    width: 42px; height: 42px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  /* Announcement bar smaller */
  .announce-bar { font-size: .72rem; padding: .45rem 0; }

  /* Hero typography */
  .hero h1, .hero-title { font-size: 2rem !important; line-height: 1.15; }
  .hero p, .hero-sub    { font-size: 1rem !important; }
  .hero { padding: 2.5rem 0 !important; min-height: auto !important; }

  /* Product grid: 2 columns on phones */
  .product-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1rem !important;
  }
  .product-card .product-name {
    font-size: .88rem;
    margin-top: .5rem;
  }
  .product-card .product-price { font-size: .82rem; }
  .product-card .product-image { aspect-ratio: 1; }

  /* Product card actions always visible, compact */
  .product-card-actions {
    flex-direction: column !important;
    gap: .35rem !important;
    opacity: 1 !important;
    transform: none !important;
    margin-top: .55rem !important;
  }
  .product-card-actions .btn-sm {
    font-size: .75rem;
    padding: .5rem .65rem;
  }

  /* Buttons need tap-friendly padding */
  .btn { min-height: 44px; padding: .85rem 1.25rem; }
  .btn-sm { min-height: 38px; padding: .55rem 1rem; font-size: .82rem; }
  .btn-lg { min-height: 52px; padding: 1rem 1.5rem; }

  /* Forms */
  .form-input, .form-input[type=text], .form-input[type=email], .form-input[type=password], .form-input[type=tel] {
    font-size: 16px !important; /* prevents iOS zoom */
    padding: .9rem 1rem;
  }
  .form-row { flex-direction: column; gap: 0; }

  /* Section titles */
  .section-title { font-size: 1.6rem !important; }
  .page-header h1 { font-size: 1.75rem !important; }
  .page-section { padding: 2rem 0 2.5rem; }

  /* Cart table → card layout */
  .cart-table thead { display: none; }
  .cart-table, .cart-table tbody, .cart-table tr, .cart-table td { display: block; }
  .cart-table tr {
    border-bottom: 1px solid rgba(0,0,0,.08);
    padding: 1rem 0;
    margin-bottom: .5rem;
  }
  .cart-table td {
    border: 0;
    padding: .35rem 0;
    text-align: left;
  }
  .cart-table td.right { text-align: left; }
  .cart-item-img { width: 64px; height: 64px; }

  /* Checkout layout */
  .checkout-layout { gap: 1rem; }
  .form-section { padding: 1.25rem; margin-bottom: 1rem; }
  .form-section h2 { font-size: 1rem; padding-bottom: .65rem; margin-bottom: 1rem; }
  .checkout-summary {
    position: relative;
    top: 0;
    padding: 1.25rem 1.35rem;
  }

  /* Footer compact */
  .site-footer { padding: 2rem 0 1rem !important; font-size: .88rem; }
  .footer-cols { grid-template-columns: 1fr 1fr !important; gap: 1.25rem !important; }
  .footer-bottom { font-size: .75rem; }
  .footer-bottom .container { flex-direction: column; gap: .5rem; text-align: center; }

  /* Page section padding */
  .page-section { padding-left: 0; padding-right: 0; }
  .container, .container-narrow { padding-left: 1rem; padding-right: 1rem; }

  /* Product detail */
  .product-detail-grid {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }
  .product-detail .price-block strong { font-size: 1.5rem; }
  .product-detail .short-desc { font-size: .95rem; }
  .qty-row { gap: .5rem; flex-wrap: wrap; }
  .qty-row .btn { flex: 1 1 100%; }
  .qty-control { flex-shrink: 0; }

  /* Sticky add-to-cart on mobile product page */
  .product-mobile-sticky {
    position: sticky;
    bottom: 0;
    background: var(--bg);
    padding: .85rem 1rem;
    margin: 0 -1rem;
    border-top: 1px solid rgba(0,0,0,.08);
    z-index: 10;
  }

  /* Empty state padding */
  .empty-state { padding: 2rem 1rem; }

  /* Order success */
  .success-card { padding: 2rem 1.25rem 1.5rem; }
  .success-card h1 { font-size: 1.5rem; }
  .order-detail-card { padding: 1.25rem; }

  /* Blog */
  .blog-grid { grid-template-columns: 1fr !important; gap: 1.5rem !important; }
}

/* Extra small screens (< 380px) */
@media (max-width: 380px) {
  .product-grid { grid-template-columns: 1fr !important; }
  .container, .container-narrow { padding-left: .85rem; padding-right: .85rem; }
}

/* ============================================================
   v1.3 — Variants, size chart, mobile overflow fixes
   ============================================================ */

/* ---------- Product variants ---------- */
.variant-group { margin-bottom: 1.25rem; }
.variant-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: .85rem;
  font-weight: 600;
  margin-bottom: .6rem;
}
.size-chart-trigger {
  background: none;
  border: 0;
  color: var(--accent, #c89b3c);
  font-size: .82rem;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
  font-family: inherit;
}
.size-chart-trigger:hover { color: var(--primary); }

.variant-options {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
}

.variant-option {
  position: relative;
  cursor: pointer;
}
.variant-option input { position: absolute; opacity: 0; pointer-events: none; }

.size-option > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  height: 42px;
  padding: 0 .85rem;
  border: 1px solid rgba(0,0,0,.15);
  border-radius: 4px;
  font-size: .88rem;
  font-weight: 500;
  background: #fff;
  transition: all .15s ease;
}
.size-option input:checked + span {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.size-option:hover > span { border-color: var(--primary); }

.color-option {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: .25rem;
}
.color-swatch {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(0,0,0,.18);
  transition: box-shadow .15s ease, transform .15s ease;
}
.color-option input:checked + .color-swatch {
  box-shadow: 0 0 0 2px var(--primary);
  transform: scale(1.05);
}
.color-option:hover .color-swatch { box-shadow: 0 0 0 1.5px var(--primary); }
.color-name { font-size: .72rem; opacity: .75; }

/* ---------- Size chart modal ---------- */
.size-chart-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  z-index: 9997;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: popup-fade .2s ease;
}
.size-chart-card {
  position: relative;
  background: #fff;
  border-radius: 8px;
  max-width: 640px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  padding: 2rem 2.25rem;
  animation: popup-slide-up .25s ease;
}
.size-chart-card h3 { margin: 0 0 1rem; }
.size-chart-close {
  position: absolute;
  top: .85rem;
  right: 1rem;
  background: none;
  border: 0;
  font-size: 1.8rem;
  cursor: pointer;
  line-height: 1;
  opacity: .6;
}
.size-chart-close:hover { opacity: 1; }
.size-chart-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
}
.size-chart-table th, .size-chart-table td {
  padding: .75rem 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(0,0,0,.08);
}
.size-chart-table th {
  background: rgba(0,0,0,.03);
  font-weight: 600;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .05em;
}

/* ============================================================
   MOBILE OVERFLOW FIXES — critical
   ============================================================ */

html, body {
  overflow-x: hidden;
  max-width: 100vw;
}
* { max-width: 100%; }
img, video, iframe { max-width: 100%; height: auto; }
table { max-width: 100%; }
pre, code {
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Containers never blow out */
.container, .container-narrow {
  max-width: 100%;
  padding-left: 1rem;
  padding-right: 1rem;
  box-sizing: border-box;
}

@media (min-width: 640px) {
  .container, .container-narrow {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}
@media (min-width: 1024px) {
  .container { max-width: 1240px; margin-left: auto; margin-right: auto; padding-left: 2rem; padding-right: 2rem; }
  .container-narrow { max-width: 820px; margin-left: auto; margin-right: auto; padding-left: 2rem; padding-right: 2rem; }
}

/* Long product names don't blow card width */
.product-card .product-name,
.gallery-card-title {
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
}

/* Form inputs never exceed container */
input, select, textarea, .form-input {
  max-width: 100%;
  box-sizing: border-box;
}

/* Search panel + mobile drawer */
.search-panel, .mobile-nav {
  max-width: 100vw;
  box-sizing: border-box;
}

/* Tables that don't fit gracefully scroll */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 767px) {
  /* Hero/section padding doesn't push content past viewport */
  .hero { padding-left: 1rem; padding-right: 1rem; box-sizing: border-box; }
  .hero-content { max-width: 100%; }

  /* Section titles wrap */
  h1, h2, h3 { word-wrap: break-word; overflow-wrap: break-word; }

  /* Buttons don't force horizontal scroll */
  .btn { white-space: normal; word-break: keep-all; }

  /* Footer columns */
  .footer-cols { padding-left: 0; padding-right: 0; }

  /* Checkout / cart prevent horizontal scroll */
  .checkout-layout, .cart-table, .product-detail-grid {
    max-width: 100%;
    box-sizing: border-box;
  }

  /* Long descriptions break correctly */
  .short-desc, .product-description, .message-body {
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  /* Variant options wrap properly */
  .variant-options { gap: .35rem; }
  .size-option > span { min-width: 44px; height: 40px; padding: 0 .75rem; }
}

/* ============================================================
   THEME: Dark mode support (auto-applied for dark themes)
   ============================================================ */
body[data-theme-dark] {
  --surface: #1a1a1c;
  --border-soft: rgba(255,255,255,.08);
}
body[data-theme-dark] .product-image { background: rgba(255,255,255,.05); }
body[data-theme-dark] .form-input {
  background: rgba(255,255,255,.04);
  border-color: rgba(255,255,255,.15);
  color: inherit;
}
body[data-theme-dark] .form-section,
body[data-theme-dark] .order-detail-card,
body[data-theme-dark] .success-card,
body[data-theme-dark] .checkout-summary,
body[data-theme-dark] .form-section {
  background: rgba(255,255,255,.03);
  border-color: rgba(255,255,255,.08);
}
body[data-theme-dark] .panel,
body[data-theme-dark] .alert,
body[data-theme-dark] .radio-card {
  background: rgba(255,255,255,.04);
  border-color: rgba(255,255,255,.1);
}
