/*
Theme Name: dawa4u
Theme URI: https://dawa4u.com/
Author: dawa4u
Description: Dark green and gold theme for dawa4u — medicines at your door in 15 minutes. Creates the Home, dawaPass, Partners, About, Help and Refunds pages on first use, and styles the WooCommerce medicine shop.
Version: 1.3.2
Requires at least: 6.3
Requires PHP: 7.4
License: GPLv2 or later
Text Domain: dawa4u
*/

:root {
  --bg: #0B1708;
  --card: #13230F;
  --card2: #1A2F15;
  --line: #24391E;
  --em: #2C6420;
  --em-hi: #367A28;
  --em-text: #8DCB7B;
  --ink: #F1ECD6;
  --mute: #A9B5A2;
  --gold: #E5CD82;
  --on-gold: #1E1A08;
  --radius: 22px;
  --wrap: 1120px;
  --header-bg: rgba(11, 23, 8, .88);
  --body-text: #D8DCCB;
  --outline: #4A6142;
  --hero-glow: #1F3D17;
  --foot-bg: #081206;
  --foot-link: #C9D2C2;
  color-scheme: dark;
  --serif: "Playfair Display", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--em-text); }
a:hover { color: var(--gold); }
img { max-width: 100%; height: auto; }
.screen-reader-text { position: absolute; left: -9999px; }
.skip-link:focus { left: 16px; top: 16px; z-index: 99; background: var(--gold); color: var(--on-gold); padding: 8px 14px; border-radius: 8px; }

/* ---------- header ---------- */
.d4-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.admin-bar .d4-header { top: 32px; }
.d4-header__in {
  max-width: var(--wrap); margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; gap: 24px;
}
.d4-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 800; font-size: 21px; letter-spacing: -.01em; }
.d4-brand:hover { color: var(--ink); }
.d4-brand b { color: var(--em-text); font-weight: 800; }
.d4-nav { margin-left: auto; order: 2; }
.d4-cta { order: 4; }
.d4-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.d4-nav a { display: block; padding: 8px 12px; border-radius: 10px; color: var(--ink); text-decoration: none; font-size: 15px; font-weight: 500; }
.d4-nav a:hover, .d4-nav .current-menu-item > a { background: var(--card); color: var(--em-text); }
.d4-cta { display: inline-flex; align-items: center; height: 42px; padding: 0 18px; border-radius: 12px; background: var(--gold); color: var(--on-gold); font-weight: 700; font-size: 15px; text-decoration: none; white-space: nowrap; }
.d4-cta:hover { background: #F0DB98; color: var(--on-gold); }
.d4-menu-toggle, .d4-menu-btn { display: none; }

@media (max-width: 860px) {
  .d4-header__in { flex-wrap: wrap; gap: 12px; }
  .d4-menu-btn { display: inline-flex; width: 42px; height: 42px; align-items: center; justify-content: center; border-radius: 12px; background: var(--card); cursor: pointer; color: var(--ink); }
  .d4-cta { height: 42px; padding: 0 14px; order: 1; }
  .d4-menu-btn { order: 2; margin-left: 8px; }
  .d4-brand { margin-right: auto; }
  .d4-nav { order: 5; width: 100%; margin: 0; display: none; }
  .d4-menu-toggle:checked ~ .d4-nav { display: block; }
  .d4-nav ul { flex-direction: column; padding-bottom: 8px; }
  .d4-nav a { padding: 12px; }
  .admin-bar .d4-header { top: 0; }
}

/* ---------- main ---------- */
.d4-main { max-width: var(--wrap); margin: 0 auto; padding: 48px 24px 72px; }
.d4-main > .entry-title, .d4-page-title {
  font-family: var(--serif); font-weight: 600; font-size: clamp(34px, 5vw, 52px); line-height: 1.1; margin: 8px 0 28px; letter-spacing: -.01em;
}
.entry-content > * { margin-block: 0 22px; }
.entry-content > .alignfull { margin-inline: calc(50% - 50vw); }
.entry-content h1, .entry-content h2, .entry-content h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; letter-spacing: -.01em; color: var(--ink); }
.entry-content h1 { font-size: clamp(38px, 6vw, 64px); margin-top: 0; }
.entry-content h2 { font-size: clamp(28px, 3.6vw, 40px); margin-top: 48px; }
.entry-content h3 { font-size: 22px; margin: 0 0 8px; }
.entry-content p, .entry-content li { color: var(--body-text); }
.entry-content em { color: var(--em-text); }
.entry-content ul { padding-left: 1.2em; }
.entry-content li { margin-bottom: 6px; }
.entry-content li::marker { color: var(--em-text); }

/* buttons */
.wp-block-buttons { display: flex; flex-wrap: wrap; gap: 12px; }
.wp-block-button__link, .wp-element-button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 50px; padding: 0 24px; border-radius: 14px;
  background: var(--em); color: #fff; font-weight: 700; font-size: 16px; text-decoration: none; border: 1.5px solid var(--em);
  transition: background .15s, transform .15s;
}
.wp-block-button__link:hover { background: var(--em-hi); color: #fff; transform: translateY(-1px); }
.wp-block-button.is-style-outline .wp-block-button__link { background: transparent; color: var(--ink); border-color: var(--outline); }
.wp-block-button.is-style-outline .wp-block-button__link:hover { border-color: var(--em-text); color: var(--em-text); }
.wp-block-button.d4-gold .wp-block-button__link { background: var(--gold); border-color: var(--gold); color: var(--on-gold); }
.wp-block-button.d4-gold .wp-block-button__link:hover { background: #F0DB98; }

/* columns */
.wp-block-columns { display: flex; flex-wrap: wrap; gap: 18px; }
.wp-block-column { flex: 1 1 220px; min-width: 0; }

/* cards & sections */
.d4-hero {
  background: radial-gradient(120% 140% at 100% 0%, var(--hero-glow) 0%, var(--card) 55%);
  border: 1px solid var(--line); border-radius: 28px; padding: clamp(28px, 5vw, 56px);
}
.d4-eyebrow { font-size: 13px !important; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--em-text) !important; margin-bottom: 14px !important; }
.d4-lead { font-size: 18px; max-width: 640px; margin-left: 0 !important; }
.d4-hero > *, .d4-pass > *, .d4-band > * { margin-left: 0 !important; }
.d4-pass > .d4-eyebrow { margin-bottom: 4px !important; }
.d4-hero h1 { margin-bottom: 16px; }

.d4-card, .d4-features .wp-block-column, .d4-steps .wp-block-column {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px;
}
.d4-features .wp-block-column p, .d4-steps .wp-block-column p { margin: 0; font-size: 15px; }
.d4-icon { font-size: 26px !important; line-height: 1 !important; margin: 0 0 14px !important; }
.d4-step-no { display: inline-flex !important; width: 38px; height: 38px; align-items: center; justify-content: center; border-radius: 50%; background: var(--em); color: #fff !important; font-weight: 800; margin: 0 0 14px !important; }

.d4-pass {
  background: linear-gradient(135deg, var(--em) 0%, #234F1A 100%);
  border-radius: 28px; padding: clamp(28px, 5vw, 48px); margin-top: 48px !important;
}
.d4-pass p, .d4-pass li { color: #E6EEDF; }
.d4-pass .d4-eyebrow { color: var(--gold) !important; }
.d4-price { font-size: clamp(44px, 7vw, 64px) !important; font-weight: 800; color: #fff !important; line-height: 1 !important; letter-spacing: -.02em; margin-bottom: 18px !important; }
.d4-price small { font-size: 20px; font-weight: 600; opacity: .8; }

.d4-band {
  border: 1px solid var(--line); border-radius: 28px; padding: clamp(26px, 4vw, 40px);
  background: var(--card); margin-top: 48px !important;
}
.d4-band h2 { margin-top: 0; }

.d4-note { font-size: 14px !important; color: var(--mute) !important; }

/* FAQ */
.wp-block-details {
  background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 18px 22px; margin-bottom: 12px !important;
}
.wp-block-details summary { cursor: pointer; font-weight: 700; font-size: 17px; color: var(--ink); }
.wp-block-details[open] summary { color: var(--em-text); margin-bottom: 8px; }
.wp-block-details p { margin: 0; }

/* ---------- footer ---------- */
.d4-footer { border-top: 1px solid var(--line); background: var(--foot-bg); }
.d4-footer__in { max-width: var(--wrap); margin: 0 auto; padding: 48px 24px 32px; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.d4-footer h4 { margin: 0 0 12px; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); }
.d4-footer ul { list-style: none; margin: 0; padding: 0; }
.d4-footer li { margin-bottom: 8px; }
.d4-footer a { color: var(--foot-link); text-decoration: none; }
.d4-footer a:hover { color: var(--em-text); }
.d4-footer p { color: var(--mute); font-size: 14px; margin: 12px 0 0; max-width: 420px; }
.d4-footer__base { max-width: var(--wrap); margin: 0 auto; padding: 18px 24px 32px; border-top: 1px solid var(--line); color: var(--mute); font-size: 13px; }
@media (max-width: 760px) { .d4-footer__in { grid-template-columns: 1fr; } }

/* blog list fallback */
.d4-post { padding: 22px 0; border-bottom: 1px solid var(--line); }
.d4-post h2 { font-family: var(--serif); margin: 0 0 6px; }
.d4-post h2 a { color: var(--ink); text-decoration: none; }

/* ---------- theme switch ---------- */
.d4-theme {
  width: 42px; height: 42px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--card); color: var(--ink); border: 1px solid var(--line); cursor: pointer; order: 3; flex: none;
}
.d4-theme:hover { color: var(--em-text); }
@media (max-width: 860px) { .d4-theme { order: 0; width: 40px; height: 40px; } }
@media (max-width: 480px) {
  .d4-header__in { padding: 12px 14px; gap: 8px; }
  .d4-brand { font-size: 19px; gap: 8px; }
  .d4-brand svg { width: 28px; height: 28px; }
  .d4-cta { padding: 0 12px; font-size: 14px; }
  .d4-menu-btn { margin-left: 0; width: 40px; height: 40px; }
}

/* ---------- light mode (set by the small script in <head>) ---------- */
:root[data-theme="light"] {
  --bg: #FFFBEA;
  --card: #FFFFFF;
  --card2: #FFF8E1;
  --line: #EDE3C3;
  --em: #15370D;
  --em-hi: #1F4D14;
  --em-text: #1F5216;
  --ink: #111827;
  --mute: #4B5563;
  --gold: #E5CD82;
  --on-gold: #1E1A08;
  --header-bg: rgba(255, 251, 234, .9);
  --body-text: #374151;
  --outline: #B9C7B3;
  --hero-glow: #EEF4E8;
  --foot-bg: #15370D;
  --foot-link: #E6EEDF;
  color-scheme: light;
}
:root[data-theme="light"] .d4-footer { color: #DCE6D9; }
:root[data-theme="light"] .d4-footer p, :root[data-theme="light"] .d4-footer__base { color: #C9D6C4; }
:root[data-theme="light"] .d4-footer .d4-brand span { color: #FFFBEA; }
:root[data-theme="light"] .d4-footer .d4-brand b { color: #A8D99A; }
:root[data-theme="light"] .d4-features .wp-block-column, :root[data-theme="light"] .d4-steps .wp-block-column,
:root[data-theme="light"] .d4-band, :root[data-theme="light"] .wp-block-details { box-shadow: 0 2px 10px rgba(17, 24, 39, .05); }
:root[data-theme="light"] .d4-step-no { color: #fff !important; }

/* ---------- Medicines short list (home) ---------- */
.d4m-more { margin-top: 14px !important; }
.d4m-more a { font-weight: 700; text-decoration: none; }

/* ---------- cart + account icons in the header ---------- */
.d4-cart, .d4-acct { order: 3; position: relative; flex: none; width: 42px; height: 42px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; background: var(--card); color: var(--ink); border: 1px solid var(--line); text-decoration: none; }
.d4-cart:hover, .d4-acct:hover { color: var(--em-text); }
.d4-cart-n { position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--gold); color: var(--on-gold); font-size: 12px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.d4-cart-n[hidden] { display: none; }
.d4-only-phone { display: none; }
@media (max-width: 860px) {
  .d4-cart, .d4-acct { order: 0; width: 40px; height: 40px; }
  .d4-only-phone { display: block; }
}
@media (max-width: 480px) {
  .d4-acct { display: none; }
}
