/*
Theme Name: Haoweya Sudan
Theme URI: https://haoweya.com
Author: ATC Group
Description: Hand-coded bilingual (AR/EN) theme for Haoweya Trading. No page builder, no starter template, own header and footer.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: haoweya
*/

/* ========== 1. BRAND TOKENS - change colours here only ========== */
:root{
  --hib:#8C1D40;      /* Hibiscus - primary */
  --hib-d:#5E1229;    /* Hibiscus dark */
  --gold:#D4A23C;     /* Sesame gold - accent */
  --sand:#F5EDE0;     /* Baobab sand - background */
  --cream:#FBF7F0;
  --nile:#1E4B3A;     /* Nile green - secondary */
  --ink:#231815;      /* Text */
  --mut:#6B5E57;
  --line:#E4D8C6;
  --r:14px;
  --pat:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48'%3E%3Cpath d='M24 4l20 20-20 20L4 24z' fill='none' stroke='%23D4A23C' stroke-opacity='.38' stroke-width='1.2'/%3E%3Cpath d='M24 15l9 9-9 9-9-9z' fill='%23D4A23C' fill-opacity='.2'/%3E%3C/svg%3E");
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;background:var(--cream);color:var(--ink);font-family:'Cairo',system-ui,sans-serif;line-height:1.75;-webkit-font-smoothing:antialiased}
a{color:inherit;text-decoration:none}
img{max-width:100%;height:auto}
h1,h2,h3,h4{margin:0 0 .5em;line-height:1.25;font-weight:800}
p{margin:0 0 1em}
.hw-wrap{width:min(1180px,calc(100% - 40px));margin-inline:auto}
.screen-reader-text{position:absolute;left:-9999px}

/* ========== 2. HEADER (custom, not WordPress default) ========== */
.hw-top{background:var(--hib-d);color:#f3e6d3;font-size:13px}
.hw-top .hw-wrap{display:flex;justify-content:space-between;gap:16px;padding:7px 0;flex-wrap:wrap}
.hw-top a:hover{color:var(--gold)}
.hw-head{position:sticky;top:0;z-index:50;background:rgba(251,247,240,.96);backdrop-filter:blur(8px);border-bottom:1px solid var(--line)}
.admin-bar .hw-head{top:32px}
.hw-bar{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:12px 0}
.hw-logo{display:flex;align-items:center;gap:10px;font-weight:900;font-size:22px;color:var(--hib);letter-spacing:.02em}
.hw-logo img{max-height:46px;width:auto}
.hw-mark{width:40px;height:40px;border-radius:50% 50% 50% 6px;background:var(--hib);position:relative;flex:none}
.hw-mark:after{content:"";position:absolute;inset:11px;background:var(--gold);transform:rotate(45deg);border-radius:3px}
.hw-nav{display:flex;align-items:center;gap:4px}
.hw-nav>li{position:relative;list-style:none}
.hw-nav ul{margin:0;padding:0}
.hw-nav a{display:block;padding:8px 12px;font-weight:600;font-size:15px;border-radius:8px}
.hw-nav a:hover,.hw-nav .on>a{color:var(--hib);background:var(--sand)}
.hw-sub{position:absolute;inset-inline-start:0;top:100%;min-width:230px;background:#fff;border:1px solid var(--line);border-radius:12px;padding:8px;display:none;box-shadow:0 18px 40px rgba(35,24,21,.12)}
.hw-nav li:hover>.hw-sub,.hw-nav li:focus-within>.hw-sub{display:block}
.hw-tools{display:flex;align-items:center;gap:8px}
.hw-lang{border:1px solid var(--line);border-radius:999px;padding:5px 13px;font-weight:700;font-size:13px;background:#fff}
.hw-lang:hover{border-color:var(--hib);color:var(--hib)}
.hw-burger{display:none;background:none;border:1px solid var(--line);border-radius:10px;width:42px;height:42px;font-size:20px;cursor:pointer}

/* ========== 3. BUTTONS ========== */
.btn{display:inline-flex;align-items:center;gap:8px;padding:12px 24px;border-radius:999px;font-weight:700;font-size:15px;border:2px solid var(--hib);background:var(--hib);color:#fff;cursor:pointer;font-family:inherit;transition:.2s}
.btn:hover{background:var(--hib-d);border-color:var(--hib-d);transform:translateY(-2px)}
.btn.alt{background:transparent;color:var(--hib)}
.btn.alt:hover{background:var(--hib);color:#fff}
.btn.gold{background:var(--gold);border-color:var(--gold);color:var(--ink)}
.btn.gold:hover{background:#e6b64f;border-color:#e6b64f}
.btn.wa{background:#1f8f4e;border-color:#1f8f4e}

/* ========== 4. HERO ========== */
.hw-hero{position:relative;background:linear-gradient(135deg,var(--hib-d) 0%,var(--hib) 52%,#a92a52 100%);color:#fff;overflow:hidden}
.hw-hero:before{content:"";position:absolute;inset:0;background:var(--pat);opacity:.55}
.hw-hero:after{content:"";position:absolute;inset-inline-end:-120px;bottom:-160px;width:520px;height:520px;border-radius:50%;background:radial-gradient(circle,rgba(212,162,60,.45),transparent 65%)}
.hw-hero .hw-wrap{position:relative;z-index:1;padding:90px 0 100px;max-width:900px;margin-inline:0}
[dir=rtl] .hw-hero .hw-wrap{margin-inline-start:auto;margin-inline-end:max(20px,calc((100% - 1180px)/2))}
[dir=ltr] .hw-hero .hw-wrap{margin-inline-start:max(20px,calc((100% - 1180px)/2))}
.hw-kick{display:inline-block;font-size:13px;font-weight:700;letter-spacing:.1em;color:var(--gold);margin-bottom:14px}
.hw-hero h1{font-size:clamp(34px,5.6vw,64px);letter-spacing:-.01em}
.hw-hero p.lead{font-size:19px;max-width:620px;color:#f6e9dc}
.hw-cta{display:flex;gap:12px;flex-wrap:wrap;margin-top:28px}
.hw-hero .btn.alt{color:#fff;border-color:#fff}
.hw-hero .btn.alt:hover{background:#fff;color:var(--hib)}
.page-hero .hw-wrap{padding:64px 0 70px}
.page-hero h1{font-size:clamp(30px,4.4vw,48px)}

/* ========== 5. SECTIONS ========== */
.hw-sec{padding:76px 0}
.hw-sec.sand{background:var(--sand)}
.hw-sec.nile{background:var(--nile);color:#f1ede4}
.hw-sec.nile .hw-sub-t{color:#cfe0d4}
.hw-sec h2{font-size:clamp(26px,3.4vw,38px)}
.hw-sub-t{color:var(--mut);max-width:680px;margin-bottom:34px}
.hw-eyebrow{color:var(--hib);font-weight:800;font-size:13px;letter-spacing:.1em;margin-bottom:8px;display:block}
.nile .hw-eyebrow{color:var(--gold)}
.hw-grid{display:grid;gap:20px}
.g2{grid-template-columns:repeat(2,1fr)}.g3{grid-template-columns:repeat(3,1fr)}.g4{grid-template-columns:repeat(4,1fr)}
.hw-card{background:#fff;border:1px solid var(--line);border-radius:var(--r);padding:26px;transition:.25s}
a.hw-card:hover{transform:translateY(-5px);border-color:var(--hib);box-shadow:0 14px 34px rgba(140,29,64,.1)}
.hw-card h3{font-size:20px}
.hw-card p{color:var(--mut);margin:0}
.hw-pill{display:flex;align-items:center;gap:12px;padding:16px 18px;border-radius:var(--r);background:#fff;border:1px solid var(--line);font-weight:700}
.hw-pill i{width:12px;height:12px;background:var(--gold);transform:rotate(45deg);flex:none;border-radius:2px}
.hw-cat{position:relative;overflow:hidden;min-height:190px;display:flex;flex-direction:column;justify-content:flex-end;color:#fff;border-radius:var(--r);padding:24px;background:var(--hib)}
.hw-cat:before{content:"";position:absolute;inset:0;background:var(--pat);opacity:.6}
.hw-cat>*{position:relative}
.hw-cat h3{margin-bottom:4px}
.hw-cat p{color:#f6e9dc;margin:0;font-size:14px}
.c-drinks{background:linear-gradient(150deg,#8C1D40,#5E1229)}
.c-spices{background:linear-gradient(150deg,#B8741A,#7d4b0c)}
.c-pantry{background:linear-gradient(150deg,#1E4B3A,#12301f)}
.c-beauty{background:linear-gradient(150deg,#7a4a6b,#4d2c44)}
.c-crops{background:linear-gradient(150deg,#8a6a1e,#5a430e)}

/* ========== 6. PRODUCTS ========== */
.hw-filter{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:26px}
.hw-filter a{padding:8px 16px;border:1px solid var(--line);border-radius:999px;font-weight:700;font-size:14px;background:#fff}
.hw-filter a.on,.hw-filter a:hover{background:var(--hib);border-color:var(--hib);color:#fff}
.hw-prod{background:#fff;border:1px solid var(--line);border-radius:var(--r);overflow:hidden;display:flex;flex-direction:column}
.hw-pack{aspect-ratio:4/3;display:grid;place-items:center;position:relative;color:#fff;text-align:center;padding:14px}
.hw-pack:before{content:"";position:absolute;inset:0;background:var(--pat);opacity:.5}
.hw-pack img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.hw-pack b{position:relative;font-size:26px;line-height:1.2}
.hw-pack small{position:relative;display:block;font-weight:600;opacity:.85}
.hw-pbody{padding:20px;display:flex;flex-direction:column;gap:10px;flex:1}
.hw-pbody h3{font-size:18px;margin:0}
.hw-pbody p{color:var(--mut);margin:0;font-size:14px}
.hw-meta{display:flex;gap:8px;flex-wrap:wrap;font-size:12px}
.hw-meta span{background:var(--sand);padding:3px 10px;border-radius:999px;color:var(--mut)}
.hw-pbody .btn{margin-top:auto;justify-content:center;padding:10px 18px;font-size:14px}

/* ========== 7. FORMS ========== */
.hw-form{background:#fff;border:1px solid var(--line);border-radius:var(--r);padding:30px;display:grid;grid-template-columns:repeat(2,1fr);gap:16px}
.hw-form .full{grid-column:1/-1}
.hw-form label{font-weight:700;font-size:14px;display:block;margin-bottom:4px}
.hw-form input,.hw-form select,.hw-form textarea{width:100%;padding:12px 14px;border:1px solid var(--line);border-radius:10px;font:inherit;background:var(--cream)}
.hw-form input:focus,.hw-form select:focus,.hw-form textarea:focus{outline:2px solid var(--gold);border-color:var(--gold)}
.hw-form textarea{min-height:120px}
.hw-chk{display:flex;gap:10px;align-items:flex-start;font-weight:500!important}
.hw-chk input{width:auto;margin-top:6px}
.hw-hp{position:absolute!important;left:-9999px!important}
.hw-note{padding:14px 18px;border-radius:12px;margin-bottom:20px;font-weight:600}
.hw-note.ok{background:#e4f3ea;color:#14532d}
.hw-note.err{background:#fde8ec;color:#7f1d1d}
.hw-warn{background:#fff6e0;border:1px solid #efd9a1;border-radius:12px;padding:14px 18px;font-size:14px;color:#6b4e0a}

/* ========== 8. STEPS / FAQ / STOCKISTS ========== */
.hw-steps{counter-reset:s;display:grid;gap:14px}
.hw-steps li{list-style:none;counter-increment:s;background:#fff;border:1px solid var(--line);border-radius:var(--r);padding:18px 20px 18px 66px;position:relative}
[dir=rtl] .hw-steps li{padding:18px 66px 18px 20px}
.hw-steps li:before{content:counter(s);position:absolute;inset-inline-start:18px;top:16px;width:34px;height:34px;border-radius:50%;background:var(--hib);color:#fff;display:grid;place-items:center;font-weight:800}
.hw-faq details{background:#fff;border:1px solid var(--line);border-radius:12px;padding:16px 20px;margin-bottom:10px}
.hw-faq summary{font-weight:800;cursor:pointer}
.hw-faq details p{margin:10px 0 0;color:var(--mut)}
.hw-ul{padding-inline-start:20px;margin:0 0 1em}
.hw-ul li{margin-bottom:6px}

/* ========== 9. FOOTER ========== */
.hw-foot{background:var(--ink);color:#d9cdbd;padding:60px 0 0;margin-top:0}
.hw-foot h4{color:#fff;font-size:16px}
.hw-foot a:hover{color:var(--gold)}
.hw-foot ul{list-style:none;margin:0;padding:0}
.hw-foot li{margin-bottom:8px}
.hw-fg{display:grid;grid-template-columns:1.6fr 1fr 1fr 1.2fr;gap:36px;padding-bottom:40px}
.hw-fb{border-top:1px solid #3a2e29;padding:18px 0;font-size:13px;display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;color:#9c8f81}
.hw-wa{position:fixed;inset-inline-end:18px;bottom:18px;z-index:60;background:#1f8f4e;color:#fff;border-radius:999px;padding:12px 20px;font-weight:800;box-shadow:0 10px 26px rgba(0,0,0,.25)}
.hw-wa:hover{background:#17773f}

/* ========== 10. RESPONSIVE ========== */
@media(max-width:960px){
  .g3,.g4{grid-template-columns:repeat(2,1fr)}
  .hw-fg{grid-template-columns:1fr 1fr}
  .hw-burger{display:block}
  .hw-nav{position:absolute;inset-inline:0;top:100%;background:var(--cream);border-bottom:1px solid var(--line);flex-direction:column;align-items:stretch;padding:12px 20px;display:none}
  .hw-nav.open{display:flex}
  .hw-sub{position:static;display:block;border:0;box-shadow:none;padding:0 14px;background:transparent}
}
@media(max-width:640px){
  .g2,.g3,.g4,.hw-form,.hw-fg{grid-template-columns:1fr}
  .hw-sec{padding:54px 0}
  .hw-top .hw-wrap{justify-content:center}
}
