/* Hair Crib NG — main stylesheet
   Brand colours are injected as CSS variables from includes/header.php:
   --accent (#e2a518 gold), --accent-dark (#35371d), --accent-soft (#a2aebb) */

* { box-sizing: border-box; }

:root {
  --bg: #0f0f0d;
  --surface: #1a1a16;
  --surface-2: #201f1a;
  --text: #f5f3ee;
  --text-muted: #a2aebb;
  --border: #33322b;
  --radius: 10px;
  --maxw: 1200px;
}

html { scroll-padding-top: 90px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.6;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

h1, h2, h3, h4, h5 { font-family: 'Playfair Display', Georgia, serif; font-weight: 700; line-height: 1.2; }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ---------- Header ---------- */
.topbar {
  background: var(--accent-dark);
  color: var(--accent);
  text-align: center;
  font-size: 12px;
  letter-spacing: .06em;
  padding: 6px 12px;
}
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(15,15,13,.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 20px; flex-wrap: wrap; }
.logo img { height: 44px; width: auto; }
.main-nav { display: flex; gap: 22px; flex-wrap: wrap; }
.main-nav a { font-weight: 500; font-size: 15px; }
.main-nav a:hover { color: var(--accent); }
.header-actions { display: flex; align-items: center; gap: 18px; }
.cart-badge { background: var(--accent); color: #1e1e1e; border-radius: 50%; padding: 1px 7px; font-size: 12px; font-weight: 700; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; padding: 12px 24px; border-radius: 999px;
  font-weight: 600; font-size: 14px; letter-spacing: .02em; border: 1px solid transparent;
  cursor: pointer; transition: transform .15s ease, opacity .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-accent { background: var(--accent); color: #1e1e0f; }
.btn-outline { background: transparent; border-color: var(--accent); color: var(--accent); }
.btn-outline-light { background: transparent; border-color: var(--text-muted); color: var(--text); }
.btn-block { width: 100%; text-align: center; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(180deg, rgba(15,15,13,.2), rgba(15,15,13,.9)), var(--surface);
  background-size: cover; background-position: center;
  padding: 100px 20px; text-align: center;
}
.hero h1 { font-size: clamp(32px, 5vw, 56px); margin: 0 0 16px; }
.hero p { color: var(--text-muted); max-width: 560px; margin: 0 auto 28px; font-size: 17px; }
.hero-ctas { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------- Feature strip ---------- */
.feature-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; padding: 40px 20px; max-width: var(--maxw); margin: 0 auto; }
.feature-strip .feature { text-align: center; padding: 16px; }
.feature .icon { font-size: 28px; margin-bottom: 8px; }
.feature h5 { margin: 0 0 4px; }
.feature p { color: var(--text-muted); font-size: 14px; margin: 0; }

/* ---------- Section heading ---------- */
.section { padding: 50px 20px; max-width: var(--maxw); margin: 0 auto; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 26px; flex-wrap: wrap; gap: 10px; }
.section-head h2 { margin: 0; font-size: 28px; }
.section-head a { color: var(--accent); font-weight: 600; font-size: 14px; }
.eyebrow { text-transform: uppercase; font-size: 12px; letter-spacing: .12em; color: var(--accent); font-weight: 600; }

/* ---------- Grids ---------- */
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 992px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 576px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* ---------- Category card ---------- */
.category-card { position: relative; border-radius: var(--radius); overflow: hidden; height: 200px; }
.category-card img { width: 100%; height: 100%; object-fit: cover; }
.category-card .label {
  position: absolute; inset: auto 0 0 0; padding: 14px;
  background: linear-gradient(0deg, rgba(0,0,0,.75), transparent);
  font-weight: 600;
}

/* ---------- Product card ---------- */
.product-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.product-card .thumb { position: relative; aspect-ratio: 1/1.05; overflow: hidden; background: #111; }
.product-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.badge-ribbon { position: absolute; top: 10px; left: 10px; background: var(--accent); color: #1e1e0f; font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 999px; text-transform: uppercase; }
.product-card .body { padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.product-card .chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { background: var(--surface-2); color: var(--text-muted); font-size: 11px; padding: 3px 9px; border-radius: 999px; }
.product-card h4 { margin: 0; font-size: 16px; }
.price-row { display: flex; align-items: baseline; gap: 8px; margin-top: auto; }
.price { color: var(--accent); font-weight: 700; font-size: 17px; }
.price-old { color: var(--text-muted); text-decoration: line-through; font-size: 13px; }
.product-actions { display: flex; gap: 8px; }
.product-actions form { flex: 1; }

/* ---------- Service card ---------- */
.service-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.service-card img { height: 170px; width: 100%; object-fit: cover; }
.service-card .body { padding: 16px 18px; }
.service-card .meta { color: var(--text-muted); font-size: 13px; margin: 6px 0 12px; }

/* ---------- Testimonials ---------- */
.testimonial { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.testimonial .stars { color: var(--accent); letter-spacing: 2px; margin-bottom: 10px; }
.testimonial .who { color: var(--text-muted); font-size: 13px; margin-top: 12px; }

/* ---------- Blog card ---------- */
.blog-card { border-radius: var(--radius); overflow: hidden; background: var(--surface); border: 1px solid var(--border); }
.blog-card img { height: 180px; width: 100%; object-fit: cover; }
.blog-card .body { padding: 16px 18px; }
.blog-card .cat { color: var(--accent); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }

/* ---------- Forms ---------- */
input, select, textarea, button {
  font-family: inherit; font-size: 15px;
}
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label { font-size: 13px; color: var(--text-muted); }
input[type=text], input[type=email], input[type=tel], input[type=password],
input[type=number], input[type=date], input[type=time], select, textarea {
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  padding: 12px 14px; border-radius: 8px; width: 100%;
}
textarea { min-height: 120px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
.form-row { display: flex; gap: 16px; flex-wrap: wrap; }
.form-row > .field { flex: 1; min-width: 200px; }
.form-msg { font-size: 14px; margin-top: 10px; }
.form-msg.success { color: #7fd88f; }
.form-msg.error { color: #ff8a8a; }

/* ---------- Newsletter block ---------- */
.newsletter-block { background: var(--accent-dark); padding: 46px 20px; text-align: center; }
.newsletter-block h3 { margin: 0 0 8px; }
.newsletter-block p { color: var(--accent-soft); margin: 0 0 20px; }
#newsletter-form { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; max-width: 460px; margin: 0 auto; }
#newsletter-form input { flex: 1; }

/* ---------- Footer ---------- */
.site-footer { background: #0a0a09; border-top: 1px solid var(--border); padding: 50px 20px 20px; }
.footer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; }
.footer-grid h4 { margin: 0 0 14px; font-size: 15px; color: var(--accent); }
.footer-grid a, .footer-grid p { display: block; color: var(--text-muted); font-size: 14px; margin-bottom: 8px; }
.social-row { display: flex; gap: 10px; margin-top: 8px; }
.social-icon { background: var(--surface); border-radius: 50%; width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; }
.footer-bottom { text-align: center; padding-top: 26px; margin-top: 26px; border-top: 1px solid var(--border); color: var(--text-muted); font-size: 13px; }
@media (max-width: 768px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Floating widgets ---------- */
.whatsapp-widget {
  position: fixed; right: 20px; bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  width: 56px; height: 56px; border-radius: 50%; background: #25D366;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 18px rgba(0,0,0,.35); z-index: 50;
  animation: wa-pulse 2.4s ease-in-out 3;
}
@keyframes wa-pulse { 0%,100%{transform:scale(1)} 50%{transform:scale(1.08)} }

.ig-widget { position: fixed; left: 0; top: 40%; z-index: 49; display: flex; }
.ig-tab {
  writing-mode: vertical-rl; background: var(--accent); color: #1e1e0f; border: none;
  padding: 14px 8px; border-radius: 0 8px 8px 0; font-weight: 700; cursor: pointer; letter-spacing: .05em;
}
.ig-panel {
  position: absolute; left: 0; top: 0; width: 220px; background: var(--surface);
  border: 1px solid var(--border); border-left: none; border-radius: 0 10px 10px 0;
  padding: 16px; transform: translateX(-100%); transition: transform .25s ease;
}
.ig-panel.open { transform: translateX(40px); }
.ig-thumb { border-radius: 8px; margin-bottom: 10px; aspect-ratio: 1/1; object-fit: cover; }
.ig-close { position: absolute; top: 6px; right: 10px; background: none; border: none; color: var(--text-muted); font-size: 18px; cursor: pointer; }
@media (max-width: 576px) { .ig-widget { display: none; } }

/* ---------- Cart / checkout ---------- */
.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th, .cart-table td { text-align: left; padding: 14px 10px; border-bottom: 1px solid var(--border); }
.cart-row-thumb { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; }
.qty-control { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: 999px; }
.qty-control button { background: none; border: none; color: var(--text); width: 32px; height: 32px; cursor: pointer; font-size: 16px; }
.qty-control input { width: 40px; text-align: center; background: none; border: none; color: var(--text); }
.order-summary { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.order-summary .row { display: flex; justify-content: space-between; margin-bottom: 10px; color: var(--text-muted); }
.order-summary .row.total { color: var(--text); font-weight: 700; font-size: 18px; border-top: 1px solid var(--border); padding-top: 12px; }
.free-ship-bar { height: 6px; background: var(--surface-2); border-radius: 999px; overflow: hidden; margin: 10px 0; }
.free-ship-bar span { display: block; height: 100%; background: var(--accent); }

.payment-option { display: block; border: 1px solid var(--border); border-radius: 8px; padding: 14px; margin-bottom: 10px; cursor: pointer; }
.payment-option input { margin-right: 10px; }
.payment-option.selected { border-color: var(--accent); }

/* ---------- Misc pages ---------- */
.breadcrumbs { color: var(--text-muted); font-size: 13px; margin-bottom: 20px; }
.breadcrumbs a { color: var(--text-muted); }
.faq-item { border-bottom: 1px solid var(--border); padding: 16px 0; }
.faq-item summary { cursor: pointer; font-weight: 600; }
.sidebar-filter { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.sidebar-filter h5 { margin: 18px 0 10px; }
.sidebar-filter h5:first-child { margin-top: 0; }
.sidebar-filter label { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-muted); margin-bottom: 8px; }
.shop-layout { display: grid; grid-template-columns: 260px 1fr; gap: 30px; align-items: start; }
@media (max-width: 900px) { .shop-layout { grid-template-columns: 1fr; } }
.sort-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; flex-wrap: wrap; gap: 10px; }
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 30px; }
.pagination a, .pagination span { padding: 8px 14px; border: 1px solid var(--border); border-radius: 6px; }
.pagination .current { background: var(--accent); color: #1e1e0f; border-color: var(--accent); }

.gallery-main { border-radius: var(--radius); overflow: hidden; margin-bottom: 12px; }
.gallery-thumbs { display: flex; gap: 8px; }
.gallery-thumbs img { width: 70px; height: 70px; object-fit: cover; border-radius: 6px; cursor: pointer; border: 2px solid transparent; }
.gallery-thumbs img.active { border-color: var(--accent); }
.spec-table { width: 100%; border-collapse: collapse; margin: 16px 0; }
.spec-table td { padding: 8px 0; border-bottom: 1px solid var(--border); color: var(--text-muted); }
.spec-table td:first-child { color: var(--text); font-weight: 600; width: 40%; }

.overflow-x { overflow-x: auto; }


/* ---------- Inclusive hero (text on a solid surface, real <img> panels) ---------- */
.hero-inclusive { background: radial-gradient(1200px 500px at 85% 0%, rgba(226,165,24,.12), transparent 60%), var(--accent-dark); padding: 56px 0 64px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.hero-copy h1 { font-size: clamp(30px, 4.4vw, 52px); margin: 10px 0 16px; }
.hero-copy p { color: #d8dde3; font-size: 17px; max-width: 540px; margin: 0 0 26px; }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-textures { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.hero-textures a { border: 1px solid rgba(162,174,187,.5); color: #e9ecef; padding: 6px 14px; border-radius: 999px; font-size: 13px; }
.hero-textures a:hover, .hero-textures a:focus-visible { border-color: var(--accent); color: var(--accent); }
.hero-collage { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.hero-panel { margin: 0; border-radius: 16px; overflow: hidden; background: #111; aspect-ratio: 5 / 6; }
.hero-panel img { width: 100%; height: 100%; object-fit: cover; }
.hero-collage-4 .hero-panel-2, .hero-collage-3 .hero-panel-2 { transform: translateY(24px); }
.hero-collage-4 .hero-panel-4 { transform: translateY(24px); }
.hero-collage-1 { grid-template-columns: 1fr; }
.hero-collage-2 .hero-panel-2 { transform: translateY(24px); }
a:focus-visible, button:focus-visible, .btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 30px; }
  .hero-panel { aspect-ratio: 1 / 1.1; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
