/*
Theme Name: PureWater Store
Theme URI: https://example.com/purewater
Author: Your Name
Description: One-page website for water purifier / RO businesses. Products are added in Dashboard → Products and ordered via WhatsApp — no WooCommerce needed. Hero slider, service banner, category blocks with product filter, product popup, about, why-us and a contact form that sends to WhatsApp. Edit everything in Appearance → Customize → PureWater Theme.
Version: 2.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: purewater
Tags: one-column, custom-logo, featured-images, business
*/

:root {
  --pw-primary: #0077c8;
  --pw-primary-dark: #005a99;
  --pw-accent: #00b4d8;
  --pw-wa: #25d366;
  --pw-wa-dark: #1da851;
  --pw-sale: #e63946;
  --pw-ink: #1d2b3a;
  --pw-muted: #5c6b7a;
  --pw-bg-soft: #eef7fc;
  --pw-border: #dde6ee;
  --pw-radius: 14px;
  --pw-max: 1240px;
  --pw-header-h: 76px;
  --pw-font: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { overflow-x: clip; margin: 0; font-family: var(--pw-font); color: var(--pw-ink); line-height: 1.6; background: #fff; }
body.pw-menu-open { overflow: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--pw-primary); text-decoration: none; }
a:hover { color: var(--pw-primary-dark); }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; }
[hidden] { display: none !important; }
.pw-container { max-width: var(--pw-max); margin: 0 auto; padding: 0 20px; }
.pw-narrow { max-width: 820px; }
.screen-reader-text { position: absolute !important; clip: rect(1px,1px,1px,1px); width: 1px; height: 1px; overflow: hidden; }
.screen-reader-text:focus { clip: auto; width: auto; height: auto; z-index: 999; background: #fff; padding: 8px 12px; }
section[id] { scroll-margin-top: calc(var(--pw-header-h) + 10px); }
.admin-bar section[id] { scroll-margin-top: calc(var(--pw-header-h) + 42px); }
.pw-eyebrow { color: var(--pw-primary); font-weight: 600; text-transform: uppercase; font-size: .8rem; letter-spacing: .12em; margin-bottom: .4em; }

/* Buttons */
.pw-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--pw-primary); color: #fff; padding: .7em 1.5em; border-radius: 999px; font-weight: 600; font-family: inherit; font-size: 1rem; border: 0; cursor: pointer; transition: background .2s, transform .2s; }
.pw-btn:hover { background: var(--pw-primary-dark); color: #fff; transform: translateY(-1px); }
.pw-btn svg { width: 20px; height: 20px; flex: none; }
.pw-btn--wa { background: var(--pw-wa); }
.pw-btn--wa:hover { background: var(--pw-wa-dark); }
.pw-btn--light { background: #fff; color: var(--pw-primary); }
.pw-btn--light:hover { background: var(--pw-bg-soft); color: var(--pw-primary-dark); }
.pw-btn--ghost { background: transparent; color: var(--pw-ink); border: 2px solid var(--pw-border); }
.pw-btn--ghost:hover { background: #fff; color: var(--pw-ink); }
.pw-btn--ghost svg { color: var(--pw-wa); }
.pw-btn--block { width: 100%; }

/* Promo */
.pw-promo { background: var(--pw-ink); color: #fff; font-size: .875rem; text-align: center; padding: .5em 1em; }

/* Header */
.pw-header { position: sticky; top: 0; z-index: 100; background: #fff; border-bottom: 1px solid var(--pw-border); }
.admin-bar .pw-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .pw-header { top: 46px; } }
@media (max-width: 600px) { .admin-bar .pw-header { top: 0; } }
.pw-header__inner { display: flex; align-items: center; gap: 24px; min-height: var(--pw-header-h); }
.pw-brand { display: flex; flex-direction: column; line-height: 1.2; }
.pw-brand__name { font-size: 1.35rem; font-weight: 700; color: var(--pw-ink); }
.pw-brand__tag { font-size: .75rem; color: var(--pw-muted); margin-top: 2px; }
.pw-brand img { max-height: 56px; width: auto; }
.pw-nav { margin-left: auto; }
.pw-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.pw-nav a { display: block; padding: .5em .9em; color: var(--pw-ink); font-weight: 500; font-size: .95rem; border-radius: 8px; }
.pw-nav a:hover, .pw-nav a.is-active { color: var(--pw-primary); background: var(--pw-bg-soft); }
.pw-header__tools { display: flex; align-items: center; gap: 10px; }
.pw-header__wa { padding: .55em 1.1em; font-size: .92rem; }
.pw-icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 50%; background: var(--pw-bg-soft); color: var(--pw-ink); border: 0; cursor: pointer; flex: none; }
.pw-icon-btn svg { width: 20px; height: 20px; }
.pw-menu-toggle, .pw-nav-close { display: none; }

/* Hero */
.pw-hero { position: relative; overflow: hidden; background: linear-gradient(120deg, var(--pw-bg-soft), #d9f1fb); }
.pw-hero__slide { display: none; min-height: 500px; align-items: center; }
.pw-hero__slide.is-active { display: flex; animation: pwFade .6s ease; }
.pw-hero__grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; width: 100%; padding: 56px 20px; }
.pw-hero h1 { font-size: clamp(2rem, 4.2vw, 3.3rem); }
.pw-hero p { color: var(--pw-muted); font-size: 1.08rem; max-width: 520px; }
.pw-hero__btns { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }
.pw-hero__img img { max-height: 420px; margin: 0 auto; object-fit: contain; }
.pw-hero__placeholder { aspect-ratio: 4/3; border-radius: 24px; background: radial-gradient(circle at 30% 30%, #fff, rgba(0,180,216,.35)); display: flex; align-items: center; justify-content: center; color: var(--pw-primary); }
.pw-hero__placeholder svg { width: 30%; height: auto; opacity: .55; }
.pw-hero__dots { position: absolute; bottom: 18px; left: 0; right: 0; display: flex; justify-content: center; gap: 8px; }
.pw-hero__dots button { width: 10px; height: 10px; border-radius: 5px; border: 0; background: rgba(0,0,0,.2); cursor: pointer; padding: 0; transition: width .3s; }
.pw-hero__dots button.is-active { background: var(--pw-primary); width: 28px; }
@keyframes pwFade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Service */
.pw-service { background: var(--pw-primary); color: #fff; }
.pw-service__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-top: 28px; padding-bottom: 28px; flex-wrap: wrap; }
.pw-service h2 { font-size: 1.35rem; margin: 0 0 .2em; }
.pw-service p { margin: 0; opacity: .9; max-width: 640px; }
.pw-service__btns { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.pw-service__phone { font-size: 1.35rem; font-weight: 700; color: #fff; display: inline-flex; align-items: center; gap: 8px; }
.pw-service__phone svg { width: 24px; height: 24px; }
.pw-service__phone:hover { color: #fff; opacity: .85; }
.pw-service .pw-btn--light svg { color: var(--pw-wa); }

/* Sections */
.pw-section { padding: 80px 0; }
.pw-section--soft { background: var(--pw-bg-soft); }
.pw-section__head { text-align: center; max-width: 680px; margin: 0 auto 40px; }
.pw-section__head h2, .pw-about h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); }
.pw-section__head p { color: var(--pw-muted); margin: 0; }

/* Categories */
.pw-cats { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 20px; }
.pw-cat { background: #fff; border: 1px solid var(--pw-border); border-radius: var(--pw-radius); overflow: hidden; display: flex; flex-direction: column; color: var(--pw-ink); transition: box-shadow .2s, transform .2s; }
.pw-cat:hover { box-shadow: 0 14px 34px rgba(0,60,100,.1); transform: translateY(-3px); color: var(--pw-ink); }
.pw-cat__img { aspect-ratio: 4/3; background: var(--pw-bg-soft); display: flex; align-items: center; justify-content: center; color: var(--pw-primary); }
.pw-cat__img img { width: 100%; height: 100%; object-fit: cover; }
.pw-cat__img svg { width: 56px; height: 56px; }
.pw-cat__body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.pw-cat__body strong { font-size: 1.05rem; }
.pw-cat__body span { color: var(--pw-muted); font-size: .9rem; flex: 1; }
.pw-cat__body em { font-style: normal; font-weight: 600; color: var(--pw-primary); font-size: .92rem; }

/* Product filters */
.pw-filters { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-bottom: 32px; }
.pw-filters button { font: inherit; font-size: .9rem; font-weight: 500; padding: .5em 1.1em; border-radius: 999px; border: 1px solid var(--pw-border); background: #fff; color: var(--pw-ink); cursor: pointer; }
.pw-filters button:hover { border-color: var(--pw-primary); }
.pw-filters button.is-active { background: var(--pw-primary); color: #fff; border-color: var(--pw-primary); }

/* Product cards */
.pw-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.pw-card { background: #fff; border: 1px solid var(--pw-border); border-radius: var(--pw-radius); overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .2s, transform .2s; }
.pw-card:hover { box-shadow: 0 14px 34px rgba(0,60,100,.1); transform: translateY(-2px); }
.pw-card__media { position: relative; display: block; width: 100%; aspect-ratio: 1; padding: 16px; border: 0; background: #fafcfe; cursor: pointer; }
.pw-card__media img { width: 100%; height: 100%; object-fit: contain; }
.pw-card__noimg { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; color: var(--pw-primary); opacity: .4; }
.pw-card__noimg svg { width: 64px; height: 64px; }
.pw-tag { position: absolute; top: 12px; font-size: .72rem; font-weight: 700; padding: .35em .75em; border-radius: 999px; color: #fff; letter-spacing: .02em; }
.pw-tag--off { left: 12px; background: var(--pw-sale); }
.pw-tag--badge { right: 12px; background: var(--pw-ink); }
.pw-card__body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.pw-card__body h3 { font-size: 1rem; margin: 0; }
.pw-feats { list-style: none; margin: 0; padding: 0; font-size: .85rem; color: var(--pw-muted); display: grid; gap: 3px; }
.pw-feats li { padding-left: 18px; position: relative; }
.pw-feats li::before { content: "✓"; position: absolute; left: 0; color: var(--pw-wa-dark); font-weight: 700; }
.pw-price { margin-top: auto; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.pw-price ins { text-decoration: none; font-size: 1.25rem; font-weight: 700; color: var(--pw-ink); }
.pw-price del { color: var(--pw-muted); font-size: .9rem; }


.pw-card__more { background: none; border: 0; font: inherit; font-size: .88rem; color: var(--pw-primary); cursor: pointer; padding: 0; }
.pw-card__more:hover { text-decoration: underline; }
.pw-empty, .pw-notice { text-align: center; padding: 24px; background: #fff8e5; border-radius: var(--pw-radius); margin: 20px 0 0; }

/* Product modal */
.pw-modal { border: 0; border-radius: 18px; padding: 0; width: min(900px, 94vw); max-height: 90vh; box-shadow: 0 30px 80px rgba(0,0,0,.25); }
.pw-modal::backdrop { background: rgba(15,28,41,.6); }
.pw-modal__close { position: absolute; top: 12px; right: 12px; z-index: 2; }
.pw-detail { display: grid; grid-template-columns: 1fr 1.1fr; gap: 28px; padding: 32px; }
.pw-detail__img { background: #fafcfe; border-radius: 12px; display: flex; align-items: center; justify-content: center; padding: 16px; }
.pw-detail__img:empty { display: none; }
.pw-detail__img img { max-height: 440px; object-fit: contain; }
.pw-detail__body { display: flex; flex-direction: column; gap: 14px; }
.pw-detail__body h3 { font-size: 1.4rem; margin: 0; padding-right: 40px; }
.pw-detail__body .pw-price { margin-top: 0; }
.pw-detail__body .pw-feats { font-size: .95rem; }
.pw-detail__text { color: var(--pw-muted); font-size: .95rem; }
.pw-detail__text > :first-child { margin-top: 0; }
.pw-detail__body .pw-btn { align-self: flex-start; }

/* About */
.pw-about { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: center; }
.pw-about__img img { border-radius: 20px; width: 100%; object-fit: cover; }
.pw-about__text { color: var(--pw-muted); }
.pw-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 24px; }
.pw-stats div { background: var(--pw-bg-soft); border-radius: 12px; padding: 16px; text-align: center; }
.pw-stats strong { display: block; font-size: 1.6rem; color: var(--pw-primary); line-height: 1.2; }
.pw-stats span { font-size: .82rem; color: var(--pw-muted); }

/* Why us */
.pw-trust { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 22px; }
.pw-trust__item { text-align: center; padding: 30px 22px; background: #fff; border-radius: var(--pw-radius); border: 1px solid var(--pw-border); }
.pw-trust__item svg { width: 46px; height: 46px; color: var(--pw-primary); margin: 0 auto 14px; display: block; }
.pw-trust__item h3 { font-size: 1.05rem; }
.pw-trust__item p { color: var(--pw-muted); margin: 0; font-size: .93rem; }

/* Contact */
.pw-contact { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; }
.pw-contact__info { display: grid; gap: 14px; }
.pw-contact__row { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border: 1px solid var(--pw-border); border-radius: 12px; color: var(--pw-ink); background: #fff; }
a.pw-contact__row:hover { border-color: var(--pw-primary); color: var(--pw-ink); }
.pw-contact__row > svg { width: 24px; height: 24px; color: var(--pw-primary); flex: none; margin-top: 2px; }
.pw-contact__row span { display: flex; flex-direction: column; font-size: .95rem; }
.pw-contact__row strong { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--pw-muted); }
.pw-contact__row small { color: var(--pw-muted); }
.pw-map { width: 100%; aspect-ratio: 16/10; border: 0; border-radius: 12px; }
.pw-form { background: var(--pw-bg-soft); border-radius: 18px; padding: 28px; display: grid; gap: 14px; }
.pw-form h3 { margin: 0; }
.pw-form label { display: grid; gap: 6px; font-size: .9rem; font-weight: 500; }
.pw-form input, .pw-form select, .pw-form textarea { font: inherit; font-weight: 400; padding: .7em .9em; border: 1px solid var(--pw-border); border-radius: 10px; background: #fff; width: 100%; }
.pw-form input:focus, .pw-form select:focus, .pw-form textarea:focus { outline: 2px solid var(--pw-primary); outline-offset: 1px; border-color: transparent; }
.pw-form__error { color: var(--pw-sale); margin: 0; font-size: .9rem; }
.pw-form__note { color: var(--pw-muted); text-align: center; }

/* Plain pages */
.pw-main { padding: 48px 0 72px; min-height: 50vh; }
.pw-page-title { font-size: clamp(1.6rem, 3vw, 2.4rem); margin-bottom: 24px; }

/* Footer */
.pw-footer { background: #0f1c29; color: #b8c4d0; font-size: .92rem; }
.pw-footer a { color: #b8c4d0; }
.pw-footer a:hover { color: #fff; }
.pw-footer__grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.2fr; gap: 32px; padding-top: 60px; padding-bottom: 40px; }
.pw-footer h4 { color: #fff; font-size: 1rem; margin-bottom: 14px; }
.pw-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pw-social { display: flex; gap: 10px; margin-top: 14px; }
.pw-social a { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.08); display: flex; align-items: center; justify-content: center; }
.pw-social svg { width: 18px; height: 18px; }
.pw-footer__bottom { border-top: 1px solid rgba(255,255,255,.08); padding-top: 18px; padding-bottom: 18px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.pw-footer__bottom ul { display: flex; flex-wrap: wrap; gap: 16px; }

/* Floating WhatsApp */
.pw-wa-float { position: fixed; right: 20px; bottom: 20px; z-index: 90; width: 58px; height: 58px; border-radius: 50%; background: var(--pw-wa); color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 24px rgba(37,211,102,.45); transition: transform .2s; }
.pw-wa-float:hover { color: #fff; transform: scale(1.08); }
.pw-wa-float svg { width: 32px; height: 32px; }

/* Responsive */
@media (max-width: 1100px) {
  .pw-grid { grid-template-columns: repeat(3, 1fr); }
  .pw-footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .pw-menu-toggle, .pw-nav-close { display: inline-flex; }
  .pw-nav { position: fixed; inset: 0 0 0 auto; width: min(300px, 85vw); background: #fff; padding: 76px 16px 20px; transform: translateX(100%); transition: transform .3s; box-shadow: -10px 0 30px rgba(0,0,0,.12); overflow-y: auto; z-index: 200; margin: 0; }
  .pw-nav.is-open { transform: none; }
  .pw-nav ul { flex-direction: column; }
  .pw-nav a { padding: .8em 1em; font-size: 1.05rem; }
  .pw-nav-close { position: absolute; top: 18px; right: 16px; }
  .pw-header__tools { margin-left: auto; }
  .pw-hero__grid { grid-template-columns: 1fr; text-align: center; padding-top: 32px; padding-bottom: 56px; gap: 20px; }
  .pw-hero__slide { min-height: 0; }
  .pw-hero p { margin-left: auto; margin-right: auto; }
  .pw-hero__btns { justify-content: center; }
  .pw-hero__img img { max-height: 260px; }
  .pw-hero__placeholder { max-width: 320px; margin: 0 auto; }
  .pw-about, .pw-contact, .pw-detail { grid-template-columns: 1fr; }
  .pw-about { gap: 32px; }
  .pw-detail { padding: 24px; }
}
@media (max-width: 640px) {
  .pw-header__wa span { display: none; }
  .pw-header__wa { padding: 0; width: 42px; height: 42px; }
  .pw-brand__name { font-size: 1.1rem; }
  .pw-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .pw-card__body { padding: 12px; gap: 8px; }
  .pw-card__body h3 { font-size: .92rem; }
  .pw-feats { display: none; }
  .pw-price ins { font-size: 1.05rem; }
  .pw-card .pw-btn { font-size: .82rem; padding: .65em .6em; gap: 5px; }
  .pw-card .pw-btn svg { width: 16px; height: 16px; }
  .pw-detail .pw-feats { display: grid; }
  .pw-section { padding: 56px 0; }
  .pw-service__inner { flex-direction: column; text-align: center; }
  .pw-service__btns { justify-content: center; }
  .pw-stats strong { font-size: 1.25rem; }
  .pw-footer__grid { grid-template-columns: 1fr; }
  .pw-form { padding: 20px; }
}

/* Card footer: price + order button pinned to the bottom so buttons line up */
.pw-card__foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.pw-card__foot .pw-price { margin-top: 0; }
.pw-card__more { align-self: flex-start; }

@media (max-width: 640px) {
  .pw-cats { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .pw-cat__img { aspect-ratio: 16/9; }
  .pw-cat__img svg { width: 36px; height: 36px; }
  .pw-cat__body { padding: 12px; }
  .pw-cat__body strong { font-size: .92rem; }
  .pw-cat__body span { display: none; }
  .pw-cat__body em { font-size: .82rem; }
  .pw-trust { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .pw-trust__item { padding: 20px 12px; }
  .pw-trust__item p { font-size: .82rem; }
}
