/*
Theme Name: Chuskies Theme
Theme URI: https://chuskies.com
Author: Chuskies
Author URI: https://chuskies.com
Description: Lightweight, plugin-free D2C e-commerce theme for Chuskies. Custom product post type, AJAX cart drawer, INR/USD/THB geo-pricing, and Razorpay/Stripe checkout hooks. Red and white minimalist design.
Version: 1.0.0
Requires at least: 6.3
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: chuskies
*/

/* ==========================================================================
   1. DESIGN TOKENS
   ========================================================================== */
:root {
  --chk-red: #DC2626;
  --chk-red-dark: #B91C1C;
  --chk-red-soft: #FEF2F2;
  --chk-white: #FFFFFF;
  --chk-off: #F9FAFB;
  --chk-ink: #111827;
  --chk-muted: #6B7280;
  --chk-line: #E5E7EB;

  --chk-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --chk-radius: 14px;
  --chk-radius-sm: 8px;
  --chk-shadow: 0 10px 30px -12px rgba(17, 24, 39, .18);
  --chk-wrap: 1240px;
  --chk-gap: clamp(16px, 2.2vw, 28px);
  --chk-space: clamp(48px, 7vw, 96px);
}

/* ==========================================================================
   2. RESET & TYPOGRAPHY
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--chk-white); color: var(--chk-ink);
  font-family: var(--chk-font); font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--chk-red); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--chk-red); outline-offset: 2px; }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.1; letter-spacing: -.025em; font-weight: 800; }
h1 { font-size: clamp(2.4rem, 6vw, 4.8rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); }
h3 { font-size: 1.15rem; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* ==========================================================================
   3. LAYOUT & GRID
   ========================================================================== */
.chk-wrap { width: 100%; max-width: var(--chk-wrap); margin: 0 auto; padding: 0 20px; }
.chk-section { padding: var(--chk-space) 0; }
.chk-section--off { background: var(--chk-off); }
.chk-section__head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 32px; }
.chk-section__head h2 { margin: 0; }
.chk-grid { display: grid; gap: var(--chk-gap); grid-template-columns: repeat(2, 1fr); }
@media (min-width: 720px)  { .chk-grid--3, .chk-grid--4 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .chk-grid--4 { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 480px)  { .chk-grid { gap: 12px; } }

/* ==========================================================================
   4. BUTTONS & FORMS
   ========================================================================== */
.chk-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 28px; border: 2px solid var(--chk-red); border-radius: 999px;
  background: var(--chk-red); color: #fff; font-weight: 700; line-height: 1;
  transition: background .2s, color .2s, transform .1s;
}
.chk-btn:hover { background: var(--chk-red-dark); border-color: var(--chk-red-dark); color: #fff; }
.chk-btn:active { transform: scale(.98); }
.chk-btn--ghost { background: transparent; color: var(--chk-red); }
.chk-btn--ghost:hover { background: var(--chk-red); color: #fff; }
.chk-btn--block { display: flex; width: 100%; }
.chk-btn[disabled] { opacity: .55; pointer-events: none; }
.chk-input, .chk-select {
  width: 100%; padding: 13px 14px; border: 1px solid var(--chk-line);
  border-radius: var(--chk-radius-sm); background: #fff;
}
.chk-input:focus, .chk-select:focus { border-color: var(--chk-red); outline: none; box-shadow: 0 0 0 3px var(--chk-red-soft); }
.chk-field { margin-bottom: 14px; }
.chk-field label { display: block; font-size: .875rem; font-weight: 600; margin-bottom: 6px; }
.chk-row { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 600px) { .chk-row--2 { grid-template-columns: 1fr 1fr; } }

/* ==========================================================================
   5. HEADER
   ========================================================================== */
.chk-announce { background: var(--chk-red); color: #fff; text-align: center; font-size: .875rem; padding: 8px 12px; }
.chk-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--chk-line); }
.chk-header__bar { display: flex; align-items: center; gap: 20px; height: 68px; }
.chk-logo { font-size: 1.7rem; font-weight: 900; letter-spacing: -.04em; color: var(--chk-red); }
.chk-logo:hover { color: var(--chk-red-dark); }
.chk-logo img { max-height: 36px; width: auto; }
.chk-nav { margin-left: 12px; flex: 1; }
.chk-nav ul { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; }
.chk-nav a { font-weight: 600; font-size: .95rem; }
.chk-header__tools { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.chk-icon-btn { position: relative; display: grid; place-items: center; width: 42px; height: 42px; border: 0; border-radius: 50%; background: transparent; }
.chk-icon-btn:hover { background: var(--chk-red-soft); color: var(--chk-red); }
.chk-icon-btn svg { width: 22px; height: 22px; }
.chk-badge { position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--chk-red); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
.chk-badge:empty, .chk-badge[data-count="0"] { display: none; }
.chk-burger { display: none; }
@media (max-width: 860px) {
  .chk-burger { display: grid; }
  .chk-nav { position: absolute; top: 100%; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--chk-line); padding: 12px 20px 20px; display: none; margin: 0; }
  .chk-nav.is-open { display: block; }
  .chk-nav ul { flex-direction: column; gap: 14px; }
}

/* Region / currency switcher */
.chk-region { position: relative; }
.chk-region__btn { display: flex; align-items: center; gap: 6px; padding: 8px 12px; border: 1px solid var(--chk-line); border-radius: 999px; background: #fff; font-size: .85rem; font-weight: 600; }
.chk-region__menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 210px; padding: 6px; background: #fff; border: 1px solid var(--chk-line); border-radius: var(--chk-radius-sm); box-shadow: var(--chk-shadow); list-style: none; margin: 0; display: none; }
.chk-region.is-open .chk-region__menu { display: block; }
.chk-region__menu button { width: 100%; text-align: left; padding: 10px 12px; border: 0; background: none; border-radius: 6px; }
.chk-region__menu button:hover, .chk-region__menu button[aria-current="true"] { background: var(--chk-red-soft); color: var(--chk-red); }

/* ==========================================================================
   6. HERO & HOME
   ========================================================================== */
.chk-hero { background: var(--chk-off); overflow: hidden; }
.chk-hero__inner { display: grid; gap: 40px; align-items: center; padding: clamp(40px, 7vw, 96px) 20px; }
@media (min-width: 900px) { .chk-hero__inner { grid-template-columns: 1.1fr .9fr; } }
.chk-hero h1 { margin-bottom: 20px; }
.chk-hero h1 em { font-style: normal; color: var(--chk-red); }
.chk-hero p { font-size: 1.15rem; color: var(--chk-muted); max-width: 46ch; }
.chk-hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.chk-hero__media { position: relative; aspect-ratio: 1; border-radius: 32px; background: var(--chk-red); overflow: hidden; }
.chk-hero__media img { width: 100%; height: 100%; object-fit: cover; }

.chk-cat { position: relative; display: block; aspect-ratio: 4/5; border-radius: var(--chk-radius); overflow: hidden; background: var(--chk-red-soft); }
.chk-cat img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.chk-cat:hover img { transform: scale(1.05); }
.chk-cat__label { position: absolute; left: 12px; right: 12px; bottom: 12px; padding: 12px 16px; border-radius: var(--chk-radius-sm); background: #fff; display: flex; justify-content: space-between; font-weight: 700; }
.chk-cat__label span { color: var(--chk-muted); font-weight: 500; }

.chk-perks { display: grid; gap: 20px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 900px) { .chk-perks { grid-template-columns: repeat(4, 1fr); } }
.chk-perk strong { display: block; }
.chk-perk span { color: var(--chk-muted); font-size: .9rem; }

/* ==========================================================================
   7. PRODUCT CARD & SINGLE
   ========================================================================== */
.chk-card { position: relative; display: flex; flex-direction: column; }
.chk-card__img { position: relative; aspect-ratio: 1; border-radius: var(--chk-radius); overflow: hidden; background: var(--chk-off); }
.chk-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.chk-card:hover .chk-card__img img { transform: scale(1.04); }
.chk-card__tag { position: absolute; top: 10px; left: 10px; padding: 4px 10px; border-radius: 999px; background: var(--chk-red); color: #fff; font-size: .75rem; font-weight: 700; }
.chk-card__body { padding: 14px 2px 0; flex: 1; }
.chk-card__title { font-size: 1rem; font-weight: 700; margin: 0 0 4px; }
.chk-card__add { margin-top: 12px; }
.chk-price { font-weight: 800; }
.chk-price del { color: var(--chk-muted); font-weight: 400; margin-right: 6px; }
.chk-price ins { text-decoration: none; color: var(--chk-red); }

.chk-single { display: grid; gap: 40px; padding: 40px 0 var(--chk-space); }
@media (min-width: 900px) { .chk-single { grid-template-columns: 1.1fr .9fr; gap: 64px; } }
.chk-gallery__main { aspect-ratio: 1; border-radius: var(--chk-radius); overflow: hidden; background: var(--chk-off); }
.chk-gallery__main img { width: 100%; height: 100%; object-fit: cover; }
.chk-gallery__thumbs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-top: 10px; }
.chk-gallery__thumbs button { padding: 0; aspect-ratio: 1; border: 2px solid transparent; border-radius: var(--chk-radius-sm); overflow: hidden; background: var(--chk-off); }
.chk-gallery__thumbs button.is-active { border-color: var(--chk-red); }
.chk-gallery__thumbs img { width: 100%; height: 100%; object-fit: cover; }
.chk-single__price { font-size: 1.8rem; margin: 8px 0 20px; }
.chk-buy { display: flex; gap: 12px; margin: 24px 0; }
.chk-qty { display: inline-flex; align-items: center; border: 1px solid var(--chk-line); border-radius: 999px; }
.chk-qty button { width: 42px; height: 48px; border: 0; background: none; font-size: 1.2rem; }
.chk-qty input { width: 40px; text-align: center; border: 0; background: none; font-weight: 700; -moz-appearance: textfield; }
.chk-qty input::-webkit-outer-spin-button, .chk-qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.chk-buy .chk-btn { flex: 1; }
.chk-meta { list-style: none; padding: 20px 0 0; margin: 0; border-top: 1px solid var(--chk-line); color: var(--chk-muted); font-size: .9rem; }

/* ==========================================================================
   8. CART DRAWER
   ========================================================================== */
.chk-overlay { position: fixed; inset: 0; z-index: 90; background: rgba(17,24,39,.5); opacity: 0; visibility: hidden; transition: opacity .25s; }
.chk-drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 100; display: flex; flex-direction: column; width: min(420px, 100%); background: #fff; transform: translateX(100%); transition: transform .3s cubic-bezier(.2,.8,.2,1); }
body.cart-open .chk-overlay { opacity: 1; visibility: visible; }
body.cart-open .chk-drawer { transform: none; }
body.cart-open { overflow: hidden; }
.chk-drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--chk-line); }
.chk-drawer__head h2 { font-size: 1.25rem; margin: 0; }
.chk-drawer__body { flex: 1; overflow-y: auto; padding: 8px 20px; }
.chk-drawer__foot { padding: 20px; border-top: 1px solid var(--chk-line); background: var(--chk-off); }
.chk-line { display: grid; grid-template-columns: 72px 1fr auto; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--chk-line); }
.chk-line img { width: 72px; height: 72px; object-fit: cover; border-radius: var(--chk-radius-sm); background: var(--chk-off); }
.chk-line__title { font-weight: 700; font-size: .95rem; line-height: 1.3; }
.chk-line .chk-qty button { height: 32px; width: 30px; }
.chk-line .chk-qty input { height: 32px; width: 28px; }
.chk-line__rm { border: 0; background: none; color: var(--chk-muted); font-size: .8rem; text-decoration: underline; padding: 0; }
.chk-empty { text-align: center; color: var(--chk-muted); padding: 48px 0; }
.chk-sum { display: flex; justify-content: space-between; margin-bottom: 6px; }
.chk-sum--total { font-size: 1.15rem; font-weight: 800; padding-top: 10px; border-top: 1px solid var(--chk-line); margin-top: 10px; }

.chk-toast { position: fixed; left: 50%; bottom: 24px; z-index: 120; transform: translate(-50%, 20px); padding: 12px 20px; border-radius: 999px; background: var(--chk-ink); color: #fff; font-size: .9rem; opacity: 0; pointer-events: none; transition: .25s; }
.chk-toast.show { opacity: 1; transform: translate(-50%, 0); }
.chk-toast.error { background: var(--chk-red); }

/* ==========================================================================
   9. CHECKOUT
   ========================================================================== */
.chk-checkout { display: grid; gap: 40px; padding: 40px 0 var(--chk-space); }
@media (min-width: 960px) { .chk-checkout { grid-template-columns: 1.2fr .8fr; } }
.chk-panel { padding: 24px; border: 1px solid var(--chk-line); border-radius: var(--chk-radius); background: #fff; margin-bottom: 20px; }
.chk-panel h2 { font-size: 1.2rem; }
.chk-summary { position: sticky; top: 90px; align-self: start; background: var(--chk-off); }
.chk-pay-opt { display: flex; align-items: center; gap: 12px; padding: 14px; border: 2px solid var(--chk-line); border-radius: var(--chk-radius-sm); margin-bottom: 10px; }
.chk-pay-opt.is-active { border-color: var(--chk-red); background: var(--chk-red-soft); }
.chk-region-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.chk-region-tabs button { padding: 8px 16px; border: 1px solid var(--chk-line); border-radius: 999px; background: #fff; font-weight: 600; }
.chk-region-tabs button[aria-current="true"] { background: var(--chk-red); border-color: var(--chk-red); color: #fff; }
.chk-notice { padding: 14px 16px; border-radius: var(--chk-radius-sm); background: var(--chk-red-soft); color: var(--chk-red-dark); margin-bottom: 16px; }
.chk-notice--ok { background: #ECFDF5; color: #065F46; }

/* ==========================================================================
   10. FOOTER & GENERIC CONTENT
   ========================================================================== */
.chk-footer { background: var(--chk-ink); color: #D1D5DB; padding: 64px 0 24px; }
.chk-footer a:hover { color: #fff; }
.chk-footer__grid { display: grid; gap: 40px; grid-template-columns: 1fr; }
@media (min-width: 800px) { .chk-footer__grid { grid-template-columns: 1.4fr 1fr 1fr 1.4fr; } }
.chk-footer h3 { color: #fff; }
.chk-footer ul { list-style: none; margin: 0; padding: 0; }
.chk-footer li { margin-bottom: 8px; }
.chk-news { display: flex; gap: 8px; }
.chk-news .chk-input { background: #1F2937; border-color: #374151; color: #fff; }
.chk-footer__legal { margin-top: 48px; padding-top: 20px; border-top: 1px solid #374151; font-size: .85rem; color: #9CA3AF; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.chk-content { max-width: 760px; margin: 0 auto; padding: 48px 20px var(--chk-space); }
.chk-page-title { padding: 40px 0 0; }

/* ==========================================================================
   11. v1.1 ADDITIONS: veg mark, free-shipping bar, details, sticky buy bar, banner, sort
   ========================================================================== */
.chk-veg { display: inline-block; width: 14px; height: 14px; margin-right: 8px; vertical-align: middle; border: 2px solid #16A34A; border-radius: 2px; position: relative; }
.chk-veg::after { content: ""; position: absolute; inset: 2px; border-radius: 50%; background: #16A34A; }
.chk-ship { padding: 14px 0 6px; font-size: .9rem; }
.chk-ship p { margin: 0 0 8px; }
.chk-ship__bar { height: 6px; border-radius: 3px; background: var(--chk-line); overflow: hidden; }
.chk-ship__bar span { display: block; height: 100%; background: var(--chk-red); transition: width .3s; }
.chk-details { margin: 20px 0 0; border-top: 1px solid var(--chk-line); }
.chk-details details { border-bottom: 1px solid var(--chk-line); padding: 14px 0; }
.chk-details summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; }
.chk-details summary::-webkit-details-marker { display: none; }
.chk-details summary::after { content: "+"; color: var(--chk-red); font-size: 1.3rem; line-height: 1; }
.chk-details details[open] summary::after { content: "−"; }
.chk-details ul { margin: 10px 0 0; padding-left: 18px; color: var(--chk-muted); }
.chk-details p { margin: 10px 0 0; color: var(--chk-muted); }
.chk-banner { display: grid; gap: 24px; align-items: center; padding: clamp(28px, 5vw, 56px); border-radius: 28px; background: var(--chk-red); color: #fff; }
.chk-banner h2 { margin-bottom: 8px; }
.chk-banner p { margin-bottom: 20px; opacity: .9; }
.chk-banner img { width: 100%; max-height: 320px; object-fit: cover; border-radius: var(--chk-radius); }
@media (min-width: 800px) { .chk-banner { grid-template-columns: 1.2fr .8fr; } }
.chk-btn--light { background: #fff; border-color: #fff; color: var(--chk-red); }
.chk-btn--light:hover { background: var(--chk-red-soft); border-color: var(--chk-red-soft); color: var(--chk-red-dark); }
.chk-sort { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding-top: 16px; }
.chk-sort .chk-select { width: auto; }
.chk-sticky { display: none; }
@media (max-width: 899px) {
  .chk-sticky { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--chk-line); font-size: .85rem; }
  .chk-sticky strong { display: block; max-width: 48vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  body.single-product .chk-footer { padding-bottom: 96px; }
}
