/*
Theme Name: Rama Wood Crafts
Theme URI: https://ramawoodcrafts.com/
Author: Rama Wood Crafts
Description: Custom theme for Rama Wood Crafts - modular kitchens, wardrobes, doors, railings and complete interiors. Brand palette taken from the company logo: red brush script and near-black serif. Products, gallery projects and all contact details are editable from the dashboard.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.8
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: rama-wood-crafts
Tags: business, custom-menu, featured-images, translation-ready
*/
/* ============================================================
   RAMA WOOD CRAFTS — Design System
   Palette drawn from timber tones: espresso walnut, warm teak,
   brass hardware, sage upholstery. Signature motif: the "joinery
   seam" — a zigzag divider modeled on a dovetail joint, used
   wherever sections meet, echoing how the business actually
   joins wood.
   ============================================================ */


:root {
  /* Brand palette, sampled from the logo: red brush script + near-black serif. */
  --red: #EB3037;           /* the logo red — accents, eyebrows, the joinery seam */
  --red-btn: #D9272E;       /* button fill behind white text (4.9:1, passes AA) */
  --red-dark: #B81E25;      /* hover and pressed states */

  --ink: #1A1718;           /* near-black — hero, footer, dark bands */
  --ink-soft: #383032;      /* secondary dark surface */
  --paper: #F7F5F3;         /* page background, and light text on dark */
  --surface: #FFFFFF;       /* cards and the header */
  --text: #1F1C1D;          /* body text */
  --text-soft: #5A5354;     /* secondary text */
  --hairline: #E4DEDA;      /* borders on light */
  --hairline-dark: rgba(255, 255, 255, 0.16); /* borders on dark */

  /* The original build used timber names throughout the markup and this
     stylesheet. They now alias the brand palette so existing rules and the
     inline style="color:var(--brass)" attributes keep working. */
  --walnut: var(--ink);
  --teak: var(--ink-soft);
  --ivory: var(--paper);
  --cream-card: var(--surface);
  --brass: var(--red);
  --brass-dark: var(--red-dark);
  --sage: var(--text-soft);
  --charcoal: var(--text);
  --charcoal-soft: var(--text-soft);
  --line: var(--hairline);
  --line-dark: var(--hairline-dark);

  /* Type */
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Inter', -apple-system, sans-serif;

  /* Layout */
  --max-width: 1180px;
  --radius: 3px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--ivory);
  color: var(--charcoal);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--walnut);
  line-height: 1.15;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2.4rem, 5vw, 4.2rem); font-weight: 500; }
h2 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); }

p { margin: 0 0 1em; color: var(--charcoal-soft); }

.eyebrow {
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--brass);
  margin: 0 0 0.9em;
  display: inline-block;
}

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

section { padding: 88px 0; }
@media (max-width: 640px) { section { padding: 56px 0; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease;
}
.btn:hover { transform: translateY(-1px); }
/* Buttons use the slightly deepened red so white label text clears WCAG AA. */
.btn-primary { background: var(--red-btn); color: #FFFFFF; }
.btn-primary:hover { background: var(--red-dark); }
.btn-ghost { background: transparent; border-color: var(--walnut); color: var(--walnut); }
.btn-ghost:hover { background: var(--walnut); color: var(--ivory); }
.btn-ghost-light { background: transparent; border-color: var(--line-dark); color: var(--ivory); }
.btn-ghost-light:hover { background: var(--ivory); color: var(--walnut); }
.btn-block { width: 100%; justify-content: center; }

/* ---------- Header / Nav ---------- */
/* The logo is red-and-black artwork on white, so the header is light and the
   hero below it carries the dark weight instead. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--hairline);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px;
  max-width: var(--max-width);
  margin: 0 auto;
}
.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}
.brand-logo { display: block; height: 44px; width: auto; }
@media (max-width: 880px) { .brand-logo { height: 36px; } }
@media (max-width: 400px) { .brand-logo { height: 30px; } }
.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  opacity: 0.78;
  transition: opacity 0.2s, color 0.2s;
  position: relative;
}
.nav-links a:hover, .nav-links a.active { opacity: 1; color: var(--red-dark); }
.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--brass);
}
.nav-cta { display: flex; align-items: center; gap: 14px; }
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--hairline);
  color: var(--text);
  padding: 8px 12px;
  border-radius: var(--radius);
  cursor: pointer;
}
@media (max-width: 880px) {
  .nav-links { position: absolute; top: 100%; left: 0; right: 0; background: var(--surface); flex-direction: column; gap: 0; padding: 8px 0; border-bottom: 1px solid var(--hairline); box-shadow: 0 12px 24px rgba(26, 23, 24, 0.12); display: none; }
  .nav-links.open { display: flex; }
  .nav-links a { display: block; padding: 14px 28px; }
  .nav-toggle { display: block; }
  .nav-cta .btn span.hide-mobile { display: none; }
}

/* ---------- Joinery divider (signature element) ---------- */
.joinery {
  height: 22px;
  width: 100%;
  background-repeat: repeat-x;
  background-size: 44px 22px;
}
.joinery-on-ivory {
  background-image: linear-gradient(135deg, var(--walnut) 25%, transparent 25%),
                     linear-gradient(225deg, var(--walnut) 25%, transparent 25%);
  background-position: 0 0, 22px 0;
  opacity: 0.9;
}
.joinery-on-walnut {
  background-image: linear-gradient(135deg, var(--brass) 25%, transparent 25%),
                     linear-gradient(225deg, var(--brass) 25%, transparent 25%);
  background-position: 0 0, 22px 0;
  opacity: 0.85;
}

/* ---------- Hero ---------- */
.hero {
  background: var(--walnut);
  color: var(--ivory);
  position: relative;
  overflow: hidden;
  padding: 110px 0 90px;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(100deg, rgba(169,122,62,0.07) 0px, rgba(169,122,62,0.07) 2px, transparent 2px, transparent 46px);
  pointer-events: none;
}
.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 56px;
  align-items: center;
}
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }
.hero h1 { color: var(--ivory); }
.hero p.lead { color: rgba(239,230,214,0.82); font-size: 1.15rem; max-width: 52ch; }
.hero-actions { display: flex; gap: 16px; margin-top: 32px; flex-wrap: wrap; }
.hero-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--line-dark);
}
.stat-num { font-family: var(--font-display); font-size: 2.1rem; color: var(--brass); font-weight: 600; }
.stat-label { font-size: 0.82rem; color: rgba(239,230,214,0.68); text-transform: uppercase; letter-spacing: 0.08em; }

.hero-panel {
  background: rgba(239,230,214,0.06);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  padding: 32px;
  position: relative;
}
.grain-block {
  aspect-ratio: 4/3;
  border-radius: var(--radius);
  background:
    repeating-linear-gradient(95deg, rgba(0,0,0,0.14) 0px, rgba(0,0,0,0.14) 1px, transparent 1px, transparent 9px),
    linear-gradient(135deg, var(--brass) 0%, var(--teak) 55%, var(--walnut) 100%);
}

/* ---------- Section headers ---------- */
.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

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

.card {
  background: var(--cream-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.card:hover { border-color: var(--brass); transform: translateY(-3px); }
.card .icon-tile {
  width: 44px; height: 44px;
  border-radius: var(--radius);
  background: var(--walnut);
  color: var(--brass);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin-bottom: 18px;
}
.tag {
  display: inline-block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  color: var(--sage);
  background: rgba(116,128,106,0.12);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}

.product-thumb {
  aspect-ratio: 4/3;
  border-radius: var(--radius) var(--radius) 0 0;
  background: linear-gradient(120deg, var(--teak), var(--walnut));
  position: relative;
  overflow: hidden;
}
/* Grain overlay is a stand-in for a missing photo — drop it once a real one is in. */
.product-thumb:not(:has(img))::after {
  content: '';
  position: absolute; inset: 0;
  background: repeating-linear-gradient(100deg, rgba(239,230,214,0.08) 0px, rgba(239,230,214,0.08) 1px, transparent 1px, transparent 10px);
}
.product-thumb img, .grain-block img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.grain-block:has(img) { background: none; }
.product-card { background: var(--cream-card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.product-card .p-body { padding: 20px; }
.product-card h3 { margin-bottom: 6px; font-size: 1.15rem; }
.product-card .p-meta { font-size: 0.85rem; color: var(--sage); font-weight: 600; }

/* ---------- Testimonial / quote ---------- */
.pull-quote {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.4vw, 1.8rem);
  color: var(--walnut);
  font-weight: 500;
  line-height: 1.4;
  max-width: 760px;
}

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--walnut);
  color: var(--ivory);
  text-align: center;
}
.cta-band h2 { color: var(--ivory); }
.cta-band p { color: rgba(239,230,214,0.78); }

/* ---------- Forms ---------- */
.form-wrap {
  background: var(--cream-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 40px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--walnut);
  margin-bottom: 6px;
}
input, select, textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.95rem;
  background: #fff;
  color: var(--charcoal);
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--brass);
  box-shadow: 0 0 0 3px rgba(169,122,62,0.15);
}
.field { margin-bottom: 20px; }
.form-tabs { display: flex; gap: 8px; margin-bottom: 28px; border-bottom: 1px solid var(--line); }
.form-tab {
  padding: 12px 4px;
  margin-right: 24px;
  background: none;
  border: none;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--charcoal-soft);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.form-tab.active { color: var(--walnut); border-bottom-color: var(--brass); }
.form-panel { display: none; }
.form-panel.active { display: block; }
.form-note { font-size: 0.82rem; color: var(--charcoal-soft); margin-top: 14px; }
.success-box {
  display: none;
  background: rgba(116,128,106,0.12);
  border: 1px solid var(--sage);
  border-radius: var(--radius);
  padding: 18px 20px;
  color: var(--walnut);
  font-weight: 500;
  margin-top: 20px;
}
.success-box.show { display: block; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--walnut);
  color: rgba(239,230,214,0.75);
  padding: 64px 0 32px;
}
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 48px; }
@media (max-width: 1050px) { .footer-grid { grid-template-columns: 1fr 1fr 1fr; } }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-grid h4 { color: var(--ivory); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; font-family: var(--font-body); font-weight: 600; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 10px; }
.footer-grid a { color: rgba(239,230,214,0.75); text-decoration: none; font-size: 0.92rem; }
.footer-grid a:hover { color: var(--brass); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 28px;
  border-top: 1px solid var(--line-dark);
  font-size: 0.82rem;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- Breadcrumb / page header ---------- */
.page-hero {
  background: var(--walnut);
  color: var(--ivory);
  padding: 64px 0 56px;
}
.page-hero h1 { color: var(--ivory); margin-bottom: 12px; }
.page-hero p { color: rgba(239,230,214,0.78); max-width: 60ch; }

/* ---------- Filters (products page) ---------- */
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 40px; }
.filter-chip {
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--cream-card);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--charcoal-soft);
  cursor: pointer;
}
.filter-chip.active { background: var(--walnut); color: var(--ivory); border-color: var(--walnut); }

/* ---------- Gallery ---------- */
.gallery-item { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 1; }
.gallery-caption {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: linear-gradient(0deg, rgba(43,29,20,0.85), transparent);
  color: var(--ivory);
  padding: 18px;
  font-size: 0.85rem;
  font-weight: 600;
}

/* ---------- Payment page ---------- */
.pay-card {
  background: var(--cream-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
}
.pay-card h3 { margin-bottom: 4px; }
.pay-price { font-family: var(--font-display); font-size: 2.4rem; color: var(--walnut); margin: 10px 0 6px; }
.pay-list { list-style: none; padding: 0; margin: 18px 0; }
.pay-list li { padding: 8px 0; border-top: 1px dashed var(--line); font-size: 0.92rem; color: var(--charcoal-soft); }
.pay-list li:first-child { border-top: none; }
.trust-row { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; margin-top: 24px; font-size: 0.8rem; color: var(--charcoal-soft); }
.trust-row span { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- Utility ---------- */
.mb-0 { margin-bottom: 0; }
.text-center { text-align: center; }
.mt-lg { margin-top: 48px; }

/* ---------- Footer logo (knockout artwork for the dark footer) ---------- */
.site-footer .brand-logo { height: 48px; margin-bottom: 14px; }
@media (max-width: 640px) { .site-footer .brand-logo { height: 40px; } }

/* ---------- WhatsApp click-to-chat ---------- */
.wa-float {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 90;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25D366;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(43, 29, 20, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.wa-float svg { width: 30px; height: 30px; fill: currentColor; display: block; }
.wa-float:hover, .wa-float:focus-visible {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 10px 26px rgba(43, 29, 20, 0.38);
}
@media (max-width: 640px) {
  .wa-float { right: 16px; bottom: 16px; width: 52px; height: 52px; }
  .wa-float svg { width: 27px; height: 27px; }
}
@media (prefers-reduced-motion: reduce) {
  .wa-float { transition: none; }
  .wa-float:hover, .wa-float:focus-visible { transform: none; }
}
/* ---------- WordPress-specific additions ---------- */
.nav-links .current-menu-item > a,
.nav-links .current_page_item > a { opacity: 1; color: var(--red-dark); }
.nav-links .current-menu-item > a::after,
.nav-links .current_page_item > a::after {
  content: '';
  position: absolute;
  bottom: -8px; left: 0; right: 0;
  height: 2px;
  background: var(--red);
}
@media (max-width: 880px) {
  .nav-links .current-menu-item > a::after,
  .nav-links .current_page_item > a::after { display: none; }
}
.nav-links li { margin: 0; }
.admin-bar .site-header { top: 32px; }
@media screen and (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
.screen-reader-text {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.screen-reader-text:focus {
  position: fixed; top: 12px; left: 12px;
  width: auto; height: auto; clip: auto;
  z-index: 200; padding: 12px 20px;
  background: var(--surface); color: var(--text);
  border: 2px solid var(--red); border-radius: var(--radius);
}
.rwc-form-error {
  background: #FCEDED;
  border: 1px solid #E9B7B9;
  border-radius: var(--radius);
  color: #8C1D23;
  padding: 14px 18px;
  margin-top: 16px;
  font-size: 0.9rem;
  display: none;
}
.rwc-form-error.show { display: block; }
.rwc-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.rwc-empty { color: var(--text-soft); padding: 32px 0; }