/*
Theme Name: HealthWay COD Landing
Theme URI: https://v0.app
Author: v0
Description: Arabic RTL cash-on-delivery landing page theme for the HealthWay portable female urination kit. Includes built-in order form, order management in WP admin, and email notifications.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: healthway-cod
*/

/* ==========================================================
   Design tokens
   ========================================================== */
:root {
  --hw-primary: #d63384;        /* rose brand */
  --hw-primary-dark: #ab296a;
  --hw-accent: #7c3aed;         /* purple accent (product color) */
  --hw-bg: #fff7fa;
  --hw-surface: #ffffff;
  --hw-text: #2d2233;
  --hw-muted: #7a6b80;
  --hw-success: #16a34a;
  --hw-radius: 14px;
}

/* ==========================================================
   Base
   ========================================================== */
* { box-sizing: border-box; margin: 0; padding: 0; }

html { background: var(--hw-bg); scroll-behavior: smooth; }

body {
  font-family: "Cairo", "Segoe UI", Tahoma, sans-serif;
  direction: rtl;
  color: var(--hw-text);
  background: var(--hw-bg);
  line-height: 1.6;
  font-size: 16px;
}

img { max-width: 100%; height: auto; display: block; }

.hw-container {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ==========================================================
   Announcement bar + header
   ========================================================== */
.hw-topbar {
  background: var(--hw-primary);
  color: #fff;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  padding: 8px 12px;
}

.hw-header {
  background: var(--hw-surface);
  border-bottom: 1px solid #f3d4e3;
  padding: 12px 0;
}

.hw-header .hw-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hw-logo {
  font-size: 20px;
  font-weight: 900;
  color: var(--hw-primary);
  text-decoration: none;
}

.hw-header-badge {
  font-size: 13px;
  background: #fdf2f8;
  color: var(--hw-primary-dark);
  border: 1px solid #f9c8dd;
  border-radius: 999px;
  padding: 4px 12px;
  font-weight: 700;
}

/* ==========================================================
   Hero
   ========================================================== */
.hw-hero {
  padding: 32px 0 24px;
  text-align: center;
}

.hw-hero h1 {
  font-size: 28px;
  font-weight: 900;
  line-height: 1.35;
  text-wrap: balance;
  margin-bottom: 12px;
}

.hw-hero h1 span { color: var(--hw-primary); }

.hw-hero-sub {
  color: var(--hw-muted);
  font-size: 16px;
  margin-bottom: 20px;
  text-wrap: pretty;
}

.hw-hero-img {
  border-radius: var(--hw-radius);
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(214, 51, 132, 0.18);
  margin-bottom: 20px;
}

.hw-price-row {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 12px;
  margin-bottom: 8px;
}

.hw-price {
  font-size: 34px;
  font-weight: 900;
  color: var(--hw-primary);
}

.hw-price-old {
  font-size: 20px;
  color: var(--hw-muted);
  text-decoration: line-through;
}

.hw-shipping-note {
  color: var(--hw-success);
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 16px;
}

/* ==========================================================
   Buttons
   ========================================================== */
.hw-btn {
  display: inline-block;
  background: var(--hw-primary);
  color: #fff;
  font-family: inherit;
  font-size: 18px;
  font-weight: 900;
  border: none;
  border-radius: 999px;
  padding: 16px 40px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.1s ease;
  box-shadow: 0 6px 20px rgba(214, 51, 132, 0.35);
}

.hw-btn:hover { background: var(--hw-primary-dark); }
.hw-btn:active { transform: scale(0.98); }

.hw-btn-block { display: block; width: 100%; text-align: center; }

/* Sticky mobile CTA */
.hw-sticky-cta {
  position: fixed;
  bottom: 0;
  right: 0;
  left: 0;
  background: var(--hw-surface);
  border-top: 1px solid #f3d4e3;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  z-index: 50;
}

.hw-sticky-cta .hw-btn { padding: 12px 24px; font-size: 16px; }
.hw-sticky-price { font-weight: 900; color: var(--hw-primary); font-size: 18px; }

body { padding-bottom: 72px; } /* room for sticky bar */

/* ==========================================================
   Sections
   ========================================================== */
.hw-section { padding: 32px 0; }
.hw-section-alt { background: var(--hw-surface); }

.hw-section h2 {
  font-size: 22px;
  font-weight: 900;
  text-align: center;
  margin-bottom: 20px;
  text-wrap: balance;
}

.hw-section h2 span { color: var(--hw-primary); }

/* Problem cards */
.hw-cards { display: flex; flex-direction: column; gap: 12px; }

.hw-card {
  background: var(--hw-surface);
  border: 1px solid #f3d4e3;
  border-radius: var(--hw-radius);
  padding: 16px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.hw-section-alt .hw-card { background: var(--hw-bg); }

.hw-card-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #fdf2f8;
  color: var(--hw-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hw-card-icon svg { width: 24px; height: 24px; }

.hw-card h3 { font-size: 16px; font-weight: 800; margin-bottom: 2px; }
.hw-card p { font-size: 14px; color: var(--hw-muted); }

/* Kit pieces */
.hw-kit-grid { display: flex; flex-direction: column; gap: 16px; }

.hw-kit-item {
  background: var(--hw-surface);
  border: 1px solid #f3d4e3;
  border-radius: var(--hw-radius);
  overflow: hidden;
}

.hw-kit-item img { width: 100%; object-fit: cover; }
.hw-kit-item-body { padding: 14px 16px; }
.hw-kit-item-body h3 { font-size: 16px; font-weight: 800; color: var(--hw-primary-dark); }
.hw-kit-item-body p { font-size: 14px; color: var(--hw-muted); }

/* Testimonials */
.hw-review {
  background: var(--hw-surface);
  border: 1px solid #f3d4e3;
  border-radius: var(--hw-radius);
  padding: 16px;
}

.hw-review-stars { color: #f59e0b; font-size: 15px; margin-bottom: 6px; letter-spacing: 2px; }
.hw-review p { font-size: 14px; margin-bottom: 8px; }
.hw-review-name { font-size: 13px; font-weight: 700; color: var(--hw-muted); }

/* FAQ */
.hw-faq details {
  background: var(--hw-surface);
  border: 1px solid #f3d4e3;
  border-radius: var(--hw-radius);
  padding: 14px 16px;
  margin-bottom: 10px;
}

.hw-faq summary { font-weight: 800; cursor: pointer; font-size: 15px; }
.hw-faq details p { margin-top: 8px; font-size: 14px; color: var(--hw-muted); }

/* Guarantee strip */
.hw-guarantees {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  text-align: center;
}

.hw-guarantee {
  background: var(--hw-surface);
  border: 1px solid #f3d4e3;
  border-radius: var(--hw-radius);
  padding: 14px 8px;
  font-size: 13px;
  font-weight: 700;
}

.hw-guarantee svg { width: 26px; height: 26px; color: var(--hw-primary); margin: 0 auto 6px; }

/* ==========================================================
   Order form
   ========================================================== */
.hw-order {
  background: var(--hw-surface);
  border: 2px solid var(--hw-primary);
  border-radius: var(--hw-radius);
  padding: 24px 20px;
  box-shadow: 0 12px 40px rgba(214, 51, 132, 0.15);
}

.hw-order h2 { margin-bottom: 4px; }

.hw-order-sub {
  text-align: center;
  color: var(--hw-muted);
  font-size: 14px;
  margin-bottom: 20px;
}

.hw-field { margin-bottom: 14px; }

.hw-field label {
  display: block;
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 6px;
}

.hw-field input,
.hw-field select {
  width: 100%;
  font-family: inherit;
  font-size: 16px;
  padding: 12px 14px;
  border: 1.5px solid #e8cbd9;
  border-radius: 10px;
  background: #fff;
  color: var(--hw-text);
}

.hw-field input:focus,
.hw-field select:focus {
  outline: 2px solid var(--hw-primary);
  outline-offset: 1px;
  border-color: var(--hw-primary);
}

/* Offer radio cards */
.hw-offers { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }

.hw-offer {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1.5px solid #e8cbd9;
  border-radius: 12px;
  padding: 14px;
  cursor: pointer;
  background: #fff;
}

.hw-offer input { position: absolute; opacity: 0; }

.hw-offer:has(input:checked) {
  border-color: var(--hw-primary);
  background: #fdf2f8;
  box-shadow: 0 0 0 1px var(--hw-primary);
}

.hw-offer-radio {
  width: 20px;
  height: 20px;
  border: 2px solid #d9b3c6;
  border-radius: 50%;
  flex-shrink: 0;
  position: relative;
}

.hw-offer:has(input:checked) .hw-offer-radio { border-color: var(--hw-primary); }

.hw-offer:has(input:checked) .hw-offer-radio::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--hw-primary);
}

.hw-offer-body { flex: 1; }
.hw-offer-title { font-weight: 800; font-size: 15px; }
.hw-offer-note { font-size: 13px; color: var(--hw-muted); }
.hw-offer-price { font-weight: 900; color: var(--hw-primary); font-size: 17px; white-space: nowrap; }

.hw-offer-badge {
  position: absolute;
  top: -10px;
  right: 14px;
  background: var(--hw-accent);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  border-radius: 999px;
  padding: 2px 10px;
}

/* Summary */
.hw-summary {
  background: var(--hw-bg);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 16px;
  font-size: 14px;
}

.hw-summary-row { display: flex; justify-content: space-between; padding: 3px 0; }
.hw-summary-row.total { font-weight: 900; font-size: 16px; color: var(--hw-primary); border-top: 1px dashed #e8cbd9; margin-top: 6px; padding-top: 8px; }

/* Form messages */
.hw-form-msg { display: none; border-radius: 10px; padding: 14px; margin-bottom: 14px; font-weight: 700; font-size: 14px; }
.hw-form-msg.success { display: block; background: #f0fdf4; color: var(--hw-success); border: 1px solid #bbf7d0; }
.hw-form-msg.error { display: block; background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }

.hw-cod-note {
  text-align: center;
  font-size: 13px;
  color: var(--hw-muted);
  margin-top: 12px;
}

/* Spinner on submit */
.hw-btn[disabled] { opacity: 0.7; cursor: wait; }

/* ==========================================================
   Footer
   ========================================================== */
.hw-footer {
  background: var(--hw-text);
  color: #d8ccdd;
  text-align: center;
  padding: 24px 16px;
  font-size: 13px;
  margin-top: 32px;
}

.hw-footer a { color: #f9c8dd; text-decoration: none; }

/* ==========================================================
   Desktop
   ========================================================== */
@media (min-width: 768px) {
  .hw-container { max-width: 720px; }
  .hw-hero h1 { font-size: 34px; }
  .hw-kit-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
  .hw-sticky-cta { display: none; }
  body { padding-bottom: 0; }
}
