/* ============================================================
   WhatMobiles.com.pk — Public theme (Phase 1)
   Pure CSS, no build step. Mobile-first responsive.
   ============================================================ */

:root {
    --wm-header: #0e3060;
    --wm-header-2: #0a2549;
    --wm-nav: #2f6db8;
    --wm-nav-dark: #245089;
    --wm-primary: #2f6db8;
    --wm-primary-dark: #1d4f8c;
    --wm-accent: #f0b543;
    --wm-bg: #e7edf5;
    --wm-card: #ffffff;
    --wm-text: #21303f;
    --wm-muted: #67788c;
    --wm-border: #d9e2ee;
    --wm-footer: #0d2b52;
    --wm-footer-2: #081d3a;
    --wm-danger: #e2574c;
    --wm-radius: 10px;
    --wm-shadow: 0 1px 3px rgba(14, 48, 96, .10);
    --wm-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body.wm-body { margin: 0; font-family: var(--wm-font); background: var(--wm-bg); color: var(--wm-text); font-size: 14.5px; line-height: 1.55; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--wm-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.3; }

.wm-container { max-width: 1280px; margin: 0 auto; padding: 0 14px; }
.wm-main { min-height: 55vh; }

.wm-visually-hidden {
    position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.wm-skip-link {
    position: absolute; left: -9999px; top: 0; background: #fff; color: var(--wm-primary-dark);
    padding: 10px 18px; z-index: 300; border-radius: 0 0 8px 0; font-weight: 700;
}
.wm-skip-link:focus { left: 0; }

/* ============ HEADER ============ */
.wm-header { position: sticky; top: 0; z-index: 200; box-shadow: 0 2px 10px rgba(10, 37, 73, .25); }
.wm-header-inner {
    display: flex; align-items: center; gap: 18px; padding-top: 10px; padding-bottom: 10px;
    background: linear-gradient(180deg, var(--wm-header), var(--wm-header-2));
}
.wm-header-inner { max-width: none; padding-left: max(14px, calc((100% - 1280px) / 2 + 14px)); padding-right: max(14px, calc((100% - 1280px) / 2 + 14px)); }
.wm-logo { flex-shrink: 0; display: block; }
.wm-logo img { width: 230px; height: auto; }

.wm-search { flex: 1; display: flex; max-width: 560px; margin: 0 auto; }
.wm-search input {
    flex: 1; min-width: 0; border: 0; border-radius: 8px 0 0 8px; padding: 11px 16px;
    font-family: inherit; font-size: 14px; background: #fff; color: var(--wm-text);
}
.wm-search input:focus { outline: 2px solid var(--wm-accent); outline-offset: -2px; }
.wm-search button {
    border: 0; background: var(--wm-nav); color: #fff; padding: 0 18px; border-radius: 0 8px 8px 0;
    cursor: pointer; display: flex; align-items: center;
}
.wm-search button:hover { background: var(--wm-primary-dark); }

.wm-header-links { display: flex; gap: 22px; flex-shrink: 0; }
.wm-header-links a { display: flex; align-items: center; gap: 7px; color: #dbe7f6; font-size: 13.5px; font-weight: 600; }
.wm-header-links a:hover { color: #fff; text-decoration: none; }

/* ============ NAV ============ */
.wm-nav { background: var(--wm-nav); }
.wm-nav-inner { display: flex; align-items: stretch; gap: 2px; }
.wm-nav-link {
    color: #eaf2fb; font-size: 14px; font-weight: 600; padding: 11px 18px; display: inline-flex;
    align-items: center; gap: 6px; transition: background .15s;
}
.wm-nav-link:hover { background: var(--wm-nav-dark); color: #fff; text-decoration: none; }
.wm-nav-link.is-active { background: var(--wm-nav-dark); color: #fff; }
.wm-nav-home { padding: 11px 16px; }
.wm-burger { display: none; background: none; border: 0; cursor: pointer; padding: 6px; flex-shrink: 0; }
.wm-burger span { display: block; width: 24px; height: 2.5px; background: #fff; margin: 5px 0; border-radius: 2px; }
.wm-nav-overlay { display: none; }

/* ============ 3-COLUMN LAYOUT ============ */
.wm-layout-3col {
    display: grid; grid-template-columns: 200px minmax(0, 1fr) 240px;
    gap: 16px; padding-top: 16px; padding-bottom: 30px; align-items: start;
}

/* ============ SIDE BLOCKS ============ */
.wm-side-block { background: var(--wm-card); border: 1px solid var(--wm-border); border-radius: var(--wm-radius); overflow: hidden; margin-bottom: 16px; box-shadow: var(--wm-shadow); }
.wm-side-title { margin: 0; background: var(--wm-nav); color: #fff; font-size: 13.5px; font-weight: 700; padding: 10px 14px; }
.wm-side-list { list-style: none; margin: 0; padding: 6px 0; }
.wm-side-list li a {
    display: flex; justify-content: space-between; align-items: center; gap: 8px;
    padding: 7px 14px; color: var(--wm-text); font-size: 13px; border-bottom: 1px solid #eef3f9;
}
.wm-side-list li:last-child a { border-bottom: 0; }
.wm-side-list li a:hover { background: #f2f7fd; color: var(--wm-primary); text-decoration: none; }
.wm-side-list li a span { color: #b3c2d6; }

/* ============ HERO ============ */
.wm-hero {
    position: relative; border-radius: 12px; overflow: hidden; margin-bottom: 18px;
    background: radial-gradient(120% 160% at 85% 20%, #2f6db8 0%, #16407c 45%, #0d2b52 100%);
    min-height: 230px; box-shadow: var(--wm-shadow);
}
.wm-hero-slide {
    display: none; align-items: center; gap: 20px; padding: 26px 70px; min-height: 230px;
    color: #fff;
}
.wm-hero-slide.is-active { display: flex; }
.wm-hero-slide:hover { text-decoration: none; }
.wm-hero-art { width: 240px; height: auto; flex-shrink: 0; filter: drop-shadow(0 12px 18px rgba(0, 0, 0, .35)); }
.wm-hero-text { display: flex; flex-direction: column; align-items: center; text-align: center; flex: 1; gap: 10px; }
.wm-hero-heading {
    font-size: clamp(24px, 4vw, 38px); font-weight: 800; letter-spacing: 3px; text-transform: uppercase;
    color: var(--wm-accent); text-shadow: 0 2px 10px rgba(0, 0, 0, .35);
}
.wm-hero-sub { font-size: clamp(13px, 2vw, 17px); letter-spacing: 4px; text-transform: uppercase; color: #dbe7f6; }
.wm-hero-chip {
    background: #fff; color: var(--wm-primary-dark); font-size: clamp(16px, 2.4vw, 22px); font-weight: 800;
    padding: 9px 30px; border-radius: 9px; margin-top: 6px; box-shadow: 0 6px 16px rgba(0, 0, 0, .3);
}
.wm-hero-arrow {
    position: absolute; top: 50%; transform: translateY(-50%); z-index: 5; width: 38px; height: 38px;
    border-radius: 50%; border: 0; background: rgba(255, 255, 255, .16); color: #fff; font-size: 22px;
    cursor: pointer; line-height: 1; transition: background .15s;
}
.wm-hero-arrow:hover { background: rgba(255, 255, 255, .32); }
.wm-hero-prev { left: 14px; }
.wm-hero-next { right: 14px; }
.wm-hero-dots { position: absolute; bottom: 12px; left: 0; right: 0; display: flex; justify-content: center; gap: 8px; z-index: 5; }
.wm-hero-dot { width: 9px; height: 9px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .4); cursor: pointer; padding: 0; }
.wm-hero-dot.is-active { background: #fff; }

/* ============ SECTIONS ============ */
.wm-section { background: var(--wm-card); border: 1px solid var(--wm-border); border-radius: var(--wm-radius); padding: 16px; margin-bottom: 18px; box-shadow: var(--wm-shadow); }
.wm-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; border-bottom: 2px solid #eef3f9; padding-bottom: 10px; }
.wm-section-head h2 { margin: 0; font-size: 16.5px; font-weight: 700; }
.wm-view-all { font-size: 13px; font-weight: 700; white-space: nowrap; }

/* Phone grid */
.wm-phone-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
/* min-width:0 lets a long phone name shrink instead of widening its track. */
.wm-phone-grid > * { min-width: 0; }
.wm-phone-card {
    display: flex; flex-direction: column; align-items: center; text-align: center; gap: 7px;
    border: 1px solid var(--wm-border); border-radius: 9px; padding: 12px 8px; background: #fff;
    transition: box-shadow .15s, transform .15s, border-color .15s;
}
.wm-phone-card:hover { text-decoration: none; border-color: var(--wm-primary); box-shadow: 0 6px 16px rgba(14, 48, 96, .12); transform: translateY(-2px); }
/* Fills the wider card without ever forcing the track open. */
.wm-phone-card img { width: 100%; max-width: 96px; height: 128px; object-fit: contain; }
.wm-phone-name { font-size: 12px; color: var(--wm-text); min-height: 2.6em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wm-phone-price { font-size: 13px; font-weight: 800; color: var(--wm-primary-dark); }

/* News */
.wm-news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.wm-news-grid > * { min-width: 0; }
.wm-news-card a { display: block; color: var(--wm-text); }
.wm-news-card a:hover { text-decoration: none; }
.wm-news-card a:hover h3 { color: var(--wm-primary); }
.wm-news-card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 8px; border: 1px solid var(--wm-border); }
.wm-news-card h3 { font-size: 12.5px; font-weight: 600; margin: 8px 0 4px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.wm-news-card time { font-size: 11.5px; color: var(--wm-muted); }

/* Price table + coming soon */
.wm-table-coming { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.wm-price-table-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 22px; }
.wm-price-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.wm-price-table th { text-align: left; color: var(--wm-muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: .6px; padding: 7px 4px; border-bottom: 2px solid var(--wm-border); }
.wm-price-table td { padding: 8px 4px; border-bottom: 1px solid #eef3f9; }
.wm-price-table td a { color: var(--wm-text); }
.wm-price-table td a:hover { color: var(--wm-primary); }
.wm-price { font-weight: 700; color: var(--wm-primary-dark); white-space: nowrap; }
.wm-table-cta { text-align: center; margin: 16px 0 0; }
.wm-btn-primary {
    display: inline-block; background: var(--wm-primary); color: #fff; font-weight: 700; font-size: 14px;
    padding: 10px 26px; border-radius: 8px; transition: background .15s;
}
.wm-btn-primary:hover { background: var(--wm-primary-dark); color: #fff; text-decoration: none; }

.wm-coming-list { display: flex; flex-direction: column; gap: 12px; }
.wm-coming-card {
    display: flex; gap: 12px; align-items: center; border: 1px solid var(--wm-border); border-radius: 9px;
    padding: 10px; background: #fff; transition: border-color .15s, box-shadow .15s;
}
.wm-coming-card:hover { text-decoration: none; border-color: var(--wm-primary); box-shadow: 0 4px 12px rgba(14, 48, 96, .1); }
.wm-coming-card img { width: 62px; height: 84px; object-fit: contain; flex-shrink: 0; }
.wm-coming-meta { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.wm-coming-name { font-size: 13.5px; font-weight: 700; color: var(--wm-text); }
.wm-coming-price { font-size: 11.5px; color: var(--wm-muted); line-height: 1.35; }
.wm-coming-price strong { color: var(--wm-primary-dark); font-size: 13px; }
.wm-coming-badge {
    align-self: flex-start; background: #fdeeec; color: var(--wm-danger); font-size: 10.5px; font-weight: 800;
    text-transform: uppercase; letter-spacing: .5px; padding: 2px 9px; border-radius: 20px;
}

/* Discover more */
.wm-discover-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.wm-discover-card {
    display: flex; align-items: center; gap: 12px; border: 1px solid var(--wm-border); border-radius: 10px;
    padding: 14px; background: linear-gradient(135deg, #f6f9fd, #eef3fa); transition: border-color .15s, box-shadow .15s;
}
.wm-discover-card:hover { text-decoration: none; border-color: var(--wm-primary); box-shadow: 0 4px 14px rgba(14, 48, 96, .12); }
.wm-discover-icon {
    width: 46px; height: 46px; border-radius: 10px; background: var(--wm-primary); color: #fff;
    display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.wm-discover-title { display: block; font-weight: 700; font-size: 14px; color: var(--wm-text); }
.wm-discover-text { display: block; font-size: 12px; color: var(--wm-muted); margin-top: 2px; }
.wm-discover-arrow { margin-left: auto; color: #b3c2d6; font-size: 22px; }

/* Breadcrumbs / placeholder */
.wm-breadcrumbs { padding: 14px 0 4px; font-size: 13px; color: var(--wm-muted); }
.wm-breadcrumbs a { color: var(--wm-primary); }
.wm-placeholder { background: var(--wm-card); border: 1px solid var(--wm-border); border-radius: var(--wm-radius); box-shadow: var(--wm-shadow); text-align: center; padding: 60px 24px; margin: 12px 0 40px; }
.wm-placeholder h1 { margin: 0 0 10px; font-size: 26px; }
.wm-placeholder p { max-width: 520px; margin: 0 auto 10px; color: var(--wm-muted); }
.wm-placeholder-note { font-size: 12.5px; }
.wm-placeholder .wm-btn-primary { margin-top: 18px; }

/* ============ FOOTER ============ */
.wm-footer { background: linear-gradient(180deg, var(--wm-footer), var(--wm-footer-2)); color: #b9c9e0; margin-top: 10px; }
.wm-footer-grid {
    display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr 1.2fr; gap: 26px;
    padding-top: 34px; padding-bottom: 28px;
}
.wm-footer-col h2 { color: #fff; font-size: 14px; text-transform: uppercase; letter-spacing: 1px; margin: 0 0 14px; }
.wm-footer-col ul { list-style: none; margin: 0; padding: 0; }
.wm-footer-col li { margin-bottom: 8px; font-size: 13px; }
.wm-footer-col a { color: #b9c9e0; }
.wm-footer-col a:hover { color: #fff; }
.wm-footer-2col { columns: 2; column-gap: 18px; }
.wm-footer-about p { font-size: 13px; line-height: 1.65; margin: 14px 0; }
.wm-footer-about img { width: 190px; }
.wm-social { display: flex; gap: 10px; }
.wm-social a {
    width: 34px; height: 34px; border-radius: 50%; background: rgba(255, 255, 255, .1); color: #dbe7f6;
    display: inline-flex; align-items: center; justify-content: center; transition: background .15s;
}
.wm-social a:hover { background: var(--wm-primary); color: #fff; }
.wm-footer-contact li { line-height: 1.5; }
.wm-footer-bottom { border-top: 1px solid rgba(255, 255, 255, .12); }
.wm-footer-bottom-inner {
    display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
    padding-top: 14px; padding-bottom: 14px; font-size: 12.5px;
}
.wm-footer-bottom-inner p { margin: 0; }
.wm-footer-bottom-inner nav { display: flex; gap: 8px; flex-wrap: wrap; }
.wm-footer-bottom-inner nav a { color: #b9c9e0; padding: 0 8px; border-right: 1px solid rgba(255, 255, 255, .18); }
.wm-footer-bottom-inner nav a:last-child { border-right: 0; }
.wm-footer-bottom-inner nav a:hover { color: #fff; }

/* ============ RESPONSIVE ============ */
@media (max-width: 1150px) {
    .wm-layout-3col { grid-template-columns: minmax(0, 1fr) 240px; }
    .wm-sidebar-left { display: none; }
}
@media (max-width: 900px) {
    .wm-layout-3col { grid-template-columns: 1fr; }
    .wm-sidebar-right { order: 3; }
    .wm-table-coming { grid-template-columns: 1fr; }
    .wm-footer-grid { grid-template-columns: 1fr 1fr; }
    .wm-header-links span { display: none; }
    .wm-header-links { gap: 16px; }
    .wm-logo img { width: 180px; }

    /* Mobile drawer nav */
    .wm-burger { display: block; }
    .wm-nav {
        position: fixed; top: 0; left: 0; bottom: 0; width: 270px; z-index: 260;
        transform: translateX(-100%); transition: transform .22s ease; overflow-y: auto;
        background: var(--wm-header-2); padding-top: 12px;
    }
    .wm-nav.is-open { transform: none; }
    .wm-nav-inner { flex-direction: column; align-items: stretch; padding: 0; }
    .wm-nav-link { padding: 13px 20px; border-bottom: 1px solid rgba(255, 255, 255, .07); font-size: 15px; }
    .wm-nav-overlay { display: block; position: fixed; inset: 0; background: rgba(8, 20, 40, .55); z-index: 250; }
    .wm-nav-overlay[hidden] { display: none; }
}
@media (max-width: 640px) {
    .wm-header-inner { flex-wrap: wrap; gap: 10px; padding-top: 8px; padding-bottom: 10px; }
    .wm-logo { order: 1; margin-right: auto; }
    .wm-burger { order: 0; }
    .wm-header-links { order: 2; }
    .wm-search { order: 3; flex-basis: 100%; max-width: none; }
    .wm-phone-grid { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 8px; }
    .wm-discover-grid { grid-template-columns: 1fr; }
    .wm-price-table-cols { grid-template-columns: 1fr; }
    .wm-footer-grid { grid-template-columns: 1fr; gap: 20px; }
    .wm-hero-slide { padding: 22px 46px; flex-direction: column; }
    .wm-hero-art { width: 150px; }
    .wm-phone-card img { max-width: 84px; height: 112px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
    html { scroll-behavior: auto; }
}

/* ============ PHASE 2: CATALOG PAGES ============ */
.wm-phone-page { margin-bottom: 30px; }
.wm-phone-head { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 24px; }
.wm-phone-gallery { text-align: center; }
.wm-phone-gallery > img { margin: 0 auto; width: 220px; height: auto; }
.wm-phone-thumbs { display: flex; gap: 8px; justify-content: center; margin-top: 12px; }
.wm-phone-thumbs img { width: 52px; height: 70px; object-fit: contain; border: 1px solid var(--wm-border); border-radius: 6px; padding: 3px; }
.wm-phone-summary h1 { margin: 0 0 10px; font-size: 24px; }
.wm-phone-priceline { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 6px; }
/* Scoped to the phone page: unscoped this stole the 13px card price and burst every card. */
.wm-phone-priceline .wm-phone-price { font-size: 26px; font-weight: 800; color: var(--wm-primary-dark); }
.wm-phone-was { color: var(--wm-muted); text-decoration: line-through; }
.wm-phone-meta { color: var(--wm-muted); font-size: 13px; margin: 0 0 14px; }
.wm-quickspecs { width: 100%; border-collapse: collapse; font-size: 13.5px; margin-bottom: 16px; }
.wm-quickspecs th { text-align: left; width: 34%; color: var(--wm-muted); font-weight: 600; padding: 7px 8px 7px 0; border-bottom: 1px solid #eef3f9; vertical-align: top; }
.wm-quickspecs td { padding: 7px 0; border-bottom: 1px solid #eef3f9; }
.wm-variants h2 { font-size: 15px; margin: 4px 0 8px; }
.wm-phone-ctas { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin: 16px 0 0; }
.wm-btn-ghostlink { font-weight: 700; font-size: 14px; }
.wm-phone-desc h2 { font-size: 17px; margin-top: 0; }
.wm-specs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.wm-spec-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.wm-spec-table caption { text-align: left; background: var(--wm-nav); color: #fff; font-weight: 700; font-size: 13.5px; padding: 8px 12px; border-radius: 8px 8px 0 0; }
.wm-spec-table th { text-align: left; width: 38%; color: var(--wm-muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid #eef3f9; vertical-align: top; }
.wm-spec-table td { padding: 8px 10px; border-bottom: 1px solid #eef3f9; overflow-wrap: anywhere; }
.wm-history-table { max-width: 480px; }
.wm-updated { color: var(--wm-muted); font-size: 12.5px; }
.wm-listing-title { font-size: 20px; margin: 0; }
.wm-listing-intro { color: var(--wm-muted); margin-top: 0; }
.wm-phone-grid-listing { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.wm-empty-note { color: var(--wm-muted); padding: 24px 0; }
.wm-sort-form select { padding: 8px 12px; border: 1px solid var(--wm-border); border-radius: 8px; font-family: inherit; font-size: 13px; background: #fff; }
.wm-brand-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.wm-brand-grid > * { min-width: 0; }
.wm-brand-card { display: flex; flex-direction: column; align-items: center; gap: 4px; border: 1px solid var(--wm-border); border-radius: 10px; padding: 18px 10px; background: #fff; transition: border-color .15s, box-shadow .15s; }
.wm-brand-card:hover { text-decoration: none; border-color: var(--wm-primary); box-shadow: 0 4px 14px rgba(14,48,96,.12); }
.wm-brand-name { font-weight: 800; font-size: 15px; color: var(--wm-primary-dark); }
.wm-brand-count { font-size: 12px; color: var(--wm-muted); }
.wm-search-page { max-width: 560px; margin-bottom: 22px; }
.wm-search-page input { border: 1px solid var(--wm-border); }
.wm-search-page button { padding: 0 22px; font-weight: 700; font-family: inherit; }
.wm-search-subhead { font-size: 16px; margin: 22px 0 10px; }

/* Autocomplete */
.wm-search { position: relative; }
.wm-suggest { position: absolute; top: calc(100% + 4px); left: 0; right: 0; background: #fff; border: 1px solid var(--wm-border); border-radius: 10px; box-shadow: 0 12px 30px rgba(14,48,96,.18); z-index: 300; overflow: hidden; }
.wm-suggest[hidden] { display: none; }
.wm-suggest a { display: flex; justify-content: space-between; gap: 10px; padding: 10px 14px; font-size: 13.5px; color: var(--wm-text); border-bottom: 1px solid #f2f6fb; }
.wm-suggest a:last-child { border-bottom: 0; }
.wm-suggest a:hover, .wm-suggest a.is-active { background: #f2f7fd; text-decoration: none; }
.wm-suggest .s-meta { color: var(--wm-primary-dark); font-weight: 700; white-space: nowrap; }

@media (max-width: 900px) {
    .wm-phone-head { grid-template-columns: 1fr; }
    .wm-specs-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .wm-phone-summary h1 { font-size: 20px; }
}

/* ============ PHASE 3: NEWS / ARTICLES / PAGES ============ */
.wm-article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 16px; align-items: start; padding-bottom: 30px; }
.wm-post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.wm-post-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; border: 1px solid var(--wm-border); }
.wm-post-card h2 { font-size: 15.5px; margin: 10px 0 6px; color: var(--wm-text); }
.wm-post-card a:hover h2 { color: var(--wm-primary); }
.wm-post-card a { text-decoration: none; }
.wm-post-card p { font-size: 13px; color: var(--wm-muted); margin: 0 0 6px; }
.wm-post-meta { font-size: 12.5px; color: var(--wm-muted); }
.wm-article h1 { font-size: 26px; margin: 0 0 8px; }
.wm-article-hero { width: 100%; max-height: 380px; object-fit: cover; border-radius: 10px; margin: 14px 0 18px; border: 1px solid var(--wm-border); }
.wm-article-lead { font-size: 16px; color: var(--wm-text); font-weight: 600; line-height: 1.6; }
.wm-article-body { font-size: 15px; line-height: 1.75; max-width: 78ch; }
.wm-article-body h2 { font-size: 19px; margin: 26px 0 10px; }
.wm-article-body h3 { font-size: 16.5px; margin: 22px 0 8px; }
.wm-article-body p { margin: 0 0 14px; }
.wm-article-body ul, .wm-article-body ol { margin: 0 0 16px; padding-left: 22px; }
.wm-article-body li { margin-bottom: 7px; }
.wm-page .wm-article-body { max-width: 82ch; }

@media (max-width: 900px) {
    .wm-article-layout { grid-template-columns: 1fr; }
    .wm-post-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
    .wm-post-grid { grid-template-columns: 1fr; }
    .wm-article h1 { font-size: 21px; }
}

/* ============ PHASE 5: ACCOUNTS & COMMENTS ============ */
.wm-auth-wrap { max-width: 520px; margin: 24px auto 40px; }
.wm-auth-card h1 { font-size: 23px; margin: 0 0 6px; }
.wm-auth-sub { color: var(--wm-muted); margin: 0 0 18px; font-size: 14px; }
.wm-auth-foot { margin-top: 16px; text-align: center; font-size: 13.5px; color: var(--wm-muted); }
.wm-field { margin-bottom: 14px; }
.wm-field label { display: block; font-weight: 600; font-size: 13.5px; margin-bottom: 5px; }
.wm-field small { display: block; color: var(--wm-muted); font-size: 12px; margin-top: 4px; }
.wm-field input[type="text"], .wm-field input[type="email"], .wm-field input[type="password"],
.wm-field input[type="tel"], .wm-field input[type="url"], .wm-field textarea, .wm-field select {
    width: 100%; padding: 10px 13px; border: 1px solid var(--wm-border); border-radius: 8px;
    font-family: inherit; font-size: 14.5px; background: #fff; color: var(--wm-text);
}
.wm-field select { appearance: none; -webkit-appearance: none; padding-right: 34px; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='%235b6b7f' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 13px center; background-size: 11px; }
.wm-field input:focus, .wm-field textarea:focus, .wm-field select:focus { outline: 2px solid rgba(47,109,184,.35); border-color: var(--wm-primary); }
.wm-optional { color: var(--wm-muted); font-weight: 400; font-size: 12.5px; }
.wm-check { display: flex; align-items: center; gap: 8px; font-size: 13.5px; margin-bottom: 14px; cursor: pointer; }
.wm-btn-block { width: 100%; border: 0; cursor: pointer; font-family: inherit; }
.wm-btn-outline { display: inline-block; border: 1px solid var(--wm-primary); color: var(--wm-primary); background: #fff; font-weight: 700; font-size: 14px; padding: 9px 20px; border-radius: 8px; cursor: pointer; font-family: inherit; }
.wm-btn-outline:hover { background: var(--wm-primary); color: #fff; text-decoration: none; }
.wm-link-btn { background: none; border: 0; color: var(--wm-primary); cursor: pointer; font-family: inherit; font-size: 13.5px; padding: 0; }
.wm-link-btn:hover { text-decoration: underline; }
.wm-otp-input { letter-spacing: 8px; font-size: 22px !important; text-align: center; font-weight: 700; }
.wm-inline-form { display: inline; }

.wm-alert { border-radius: 8px; padding: 12px 15px; margin-bottom: 16px; font-size: 13.5px; }
.wm-alert ul { margin: 0; padding-left: 18px; }
.wm-alert-error { background: #fdecec; border: 1px solid #f5c2c2; color: #8f1d1d; }
.wm-alert-ok { background: #e9f9ef; border: 1px solid #b7e4c7; color: #14803c; }
.wm-alert-warn { background: #fff6e5; border: 1px solid #f2d9a8; color: #8a5a00; }
.wm-badge-ok { display: inline-block; background: #e9f9ef; color: #14803c; font-size: 11.5px; font-weight: 700; padding: 2px 9px; border-radius: 20px; }
.wm-badge-warn { display: inline-block; background: #fff6e5; color: #8a5a00; font-size: 11.5px; font-weight: 700; padding: 2px 9px; border-radius: 20px; }
.wm-badge-muted { display: inline-block; background: #eef2f7; color: var(--wm-muted); font-size: 11.5px; font-weight: 700; padding: 2px 9px; border-radius: 20px; }

.wm-account-nav { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0 16px; }
.wm-account-nav a { padding: 8px 16px; border: 1px solid var(--wm-border); border-radius: 8px; background: #fff; font-size: 13.5px; font-weight: 600; color: var(--wm-text); }
.wm-account-nav a.is-active, .wm-account-nav a:hover { background: var(--wm-primary); border-color: var(--wm-primary); color: #fff; text-decoration: none; }
.wm-account-grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 16px; align-items: start; padding-bottom: 30px; }
.wm-account-h2 { font-size: 16px; margin: 26px 0 12px; padding-top: 16px; border-top: 1px solid #eef3f9; }
.wm-account-stats { list-style: none; margin: 0 0 6px; padding: 0; font-size: 13.5px; }
.wm-account-stats li { padding: 6px 0; border-bottom: 1px solid #eef3f9; }
.wm-verify-status p { margin: 4px 0; font-size: 14px; }
.wm-inline-verify { margin: 14px 0; }
.wm-inline-verify-row { display: flex; gap: 8px; align-items: center; }
.wm-inline-verify-row input { max-width: 180px; }
.wm-my-comment { border-bottom: 1px solid #eef3f9; padding: 14px 0; }
.wm-my-comment:last-child { border-bottom: 0; }
.wm-my-comment-meta { font-size: 12.5px; color: var(--wm-muted); margin: 0 0 6px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.wm-comment-form textarea { width: 100%; padding: 11px 13px; border: 1px solid var(--wm-border); border-radius: 8px; font-family: inherit; font-size: 14.5px; resize: vertical; }
.wm-comment-form-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 10px; flex-wrap: wrap; font-size: 12.5px; }
.wm-comment-signin { background: #f2f7fd; border: 1px solid #d7e6f8; border-radius: 8px; padding: 12px 15px; font-size: 14px; }
.wm-comment-count { color: var(--wm-muted); font-weight: 400; font-size: 14px; }
.wm-comment-list { list-style: none; margin: 20px 0 0; padding: 0; }
.wm-comment { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid #eef3f9; }
.wm-comment:last-child { border-bottom: 0; }
.wm-comment-avatar { width: 38px; height: 38px; flex-shrink: 0; border-radius: 50%; background: var(--wm-primary); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; }
.wm-comment-head { margin: 0 0 4px; font-size: 13px; color: var(--wm-muted); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.wm-comment-head strong { color: var(--wm-text); font-size: 14px; }
.wm-verified-badge { background: #e9f9ef; color: #14803c; font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 20px; }
.wm-comment-body { margin: 0; font-size: 14.5px; line-height: 1.65; overflow-wrap: anywhere; }

@media (max-width: 900px) {
    .wm-account-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   Phase 7 — advertising slots
   Every box reserves its height before the ad script runs, so
   nothing on the page moves while an ad loads (zero CLS).
   ============================================================ */
.wm-ad { margin: 16px auto; text-align: center; max-width: 1280px; padding: 0 12px; }
.wm-ad-label {
    display: block; font-size: 10px; letter-spacing: 1.2px; text-transform: uppercase;
    color: #94a3b8; margin-bottom: 4px;
}
.wm-ad-box {
    min-height: var(--wm-ad-h, 280px);
    display: flex; align-items: center; justify-content: center;
    background: #f6f8fb; border-radius: 8px; overflow: hidden;
}
.wm-ad-box .adsbygoogle { display: block; width: 100%; }
.wm-ad-sidebar_top, .wm-ad-sidebar_bottom { padding: 0; margin: 0 0 16px; }
.wm-ad-header { margin-top: 12px; }
.wm-ad-footer { margin-bottom: 20px; }
.wm-ad-desktop { display: block; }
.wm-ad-mobile { display: none; }

@media (max-width: 900px) {
    .wm-ad-box { min-height: var(--wm-ad-h-m, 250px); }
    .wm-ad-desktop { display: none; }
    .wm-ad-mobile { display: block; }
}

/* Printing an ad box wastes ink and looks broken. */
@media print { .wm-ad { display: none; } }

/* ============================================================
   Phase 9 — PWA: offline page and install prompt
   ============================================================ */
.wm-offline { max-width: 620px; margin: 40px auto; text-align: center; }
.wm-offline h1 { font-size: 26px; margin: 0 0 14px; }
.wm-offline-lead { font-size: 16px; color: var(--wm-muted); }
.wm-offline p { margin: 12px 0; line-height: 1.7; }
.wm-offline .wm-btn-primary,
.wm-offline .wm-btn-ghost { margin: 6px 4px 0; }

.wm-btn-primary { border: 0; cursor: pointer; font-family: inherit; }
.wm-btn-ghost {
    display: inline-block; background: #fff; border: 1px solid var(--wm-border); color: var(--wm-text);
    font-weight: 700; font-size: 14px; padding: 9px 24px; border-radius: 8px; cursor: pointer; font-family: inherit;
}
.wm-btn-ghost:hover { border-color: var(--wm-primary); color: var(--wm-primary); text-decoration: none; }

/* Install banner: only appears when the browser says installation is possible. */
.wm-install {
    position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 60;
    display: none; align-items: center; gap: 12px;
    background: #fff; border: 1px solid var(--wm-border); border-radius: 12px;
    box-shadow: 0 8px 30px rgba(15, 26, 49, .18); padding: 12px 14px; max-width: 460px; margin: 0 auto;
}
.wm-install.is-visible { display: flex; }
.wm-install-icon { width: 40px; height: 40px; flex-shrink: 0; border-radius: 9px; }
.wm-install-text { flex: 1; min-width: 0; font-size: 13.5px; line-height: 1.4; }
.wm-install-text strong { display: block; font-size: 14.5px; }
.wm-install-text span { color: var(--wm-muted); }
.wm-install-actions { display: flex; gap: 6px; flex-shrink: 0; }
.wm-install-actions button {
    border: 0; border-radius: 7px; padding: 8px 14px; font-family: inherit; font-size: 13px;
    font-weight: 700; cursor: pointer;
}
.wm-install-add { background: var(--wm-primary); color: #fff; }
.wm-install-no { background: #f1f5f9; color: var(--wm-muted); }

@media print { .wm-install { display: none !important; } }

/* Account verification — one button per available channel */
.wm-verify-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 10px; }
.wm-verify-actions form { margin: 0; }
.wm-verify-hint { margin: 0; font-size: 13.5px; }

/* Contact Us — enquiry form */
.wm-contact-intro { color: var(--wm-muted); font-size: 14px; margin: 0 0 18px; }
.wm-field-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.wm-contact-resend { margin-top: 12px; }
.wm-contact-privacy { color: var(--wm-muted); font-size: 12.5px; margin: 14px 0 0; }
@media (max-width: 640px) {
    .wm-field-2col { grid-template-columns: 1fr; }
}

/* ============ Compare phones ============ */
.wm-suggest button {
    display: flex; justify-content: space-between; gap: 10px; width: 100%; text-align: left;
    padding: 10px 14px; font-size: 13.5px; font-family: inherit; color: var(--wm-text);
    background: #fff; border: 0; border-bottom: 1px solid #f2f6fb; cursor: pointer;
}
.wm-suggest button:last-child { border-bottom: 0; }
.wm-suggest button:hover { background: #f2f7fd; }

.wm-compare-intro { color: var(--wm-muted); font-size: 14px; margin: 0 0 16px; }
.wm-compare-picker { margin-top: 4px; }
.wm-compare-slots { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin-bottom: 16px; }
.wm-compare-slot { position: relative; }
.wm-compare-slot label { display: block; font-weight: 600; font-size: 13.5px; margin-bottom: 5px; }
.wm-compare-search {
    width: 100%; padding: 10px 13px; border: 1px solid var(--wm-border); border-radius: 8px;
    font-family: inherit; font-size: 14.5px; background: #fff; color: var(--wm-text);
}
.wm-compare-slot.is-chosen .wm-compare-search { border-color: var(--wm-primary); background: #f7fbff; }
.wm-compare-slot small { display: block; color: var(--wm-muted); font-size: 12px; margin-top: 4px; }
.wm-compare-slot.is-chosen small { color: var(--wm-primary-dark); font-weight: 600; }
button.wm-phone-card { font-family: inherit; cursor: pointer; }

.wm-compare-heads {
    display: grid; grid-template-columns: repeat(var(--wm-compare-cols, 2), minmax(0, 1fr));
    gap: 12px; margin-bottom: 18px;
}
.wm-compare-head {
    text-align: center; border: 1px solid var(--wm-border); border-radius: 10px; padding: 14px 10px; background: #fff;
}
.wm-compare-head a { display: block; }
.wm-compare-head img { display: block; margin: 0 auto; width: 100%; max-width: 96px; height: 128px; object-fit: contain; }
.wm-compare-head-name { display: block; font-size: 13.5px; font-weight: 700; margin-top: 6px; }
.wm-compare-head-price { display: block; font-size: 15px; font-weight: 800; color: var(--wm-primary-dark); margin-top: 6px; }
.wm-compare-remove { display: inline-block; margin-top: 8px; font-size: 12px; color: var(--wm-muted); }

.wm-compare-table { width: 100%; border-collapse: collapse; margin: 0 0 18px; font-size: 13.5px; }
.wm-compare-table caption {
    text-align: left; font-weight: 700; font-size: 15px; padding: 10px 12px;
    background: var(--wm-primary); color: #fff; border-radius: 8px 8px 0 0;
}
.wm-compare-table th, .wm-compare-table td {
    border: 1px solid var(--wm-border); padding: 9px 12px; text-align: left; vertical-align: top;
    overflow-wrap: anywhere;
}
.wm-compare-table thead th { background: #f4f8fd; font-size: 13px; }
.wm-compare-table .wm-compare-label { width: 26%; font-weight: 600; background: #fafcfe; }
.wm-compare-table tr.is-different td { background: #fffdf3; }
.wm-compare-unknown { color: var(--wm-muted); font-style: italic; }
.wm-compare-foot { margin: 4px 0 0; }

/* ============ PTA tax calculator ============ */
.wm-pta-form { max-width: 420px; margin-bottom: 20px; }
.wm-pta-h2 { font-size: 17px; margin: 26px 0 12px; }
.wm-pta-result { border: 1px solid #b7e4c7; background: #f2fbf5; border-radius: 12px; padding: 18px; margin-bottom: 20px; }
.wm-pta-result-title { font-size: 16px; margin: 0 0 14px; }
.wm-pta-result-sub { color: var(--wm-muted); font-weight: 400; }
.wm-pta-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.wm-pta-card { background: #fff; border: 1px solid var(--wm-border); border-radius: 10px; padding: 14px; }
.wm-pta-card-label { display: block; font-size: 13px; color: var(--wm-muted); }
.wm-pta-card-amount { display: block; font-size: 26px; font-weight: 800; color: var(--wm-primary-dark); margin: 4px 0; }
.wm-pta-card-note { display: block; font-size: 12px; color: var(--wm-muted); }
.wm-pta-slab { margin: 14px 0 0; font-size: 13.5px; }
.wm-pta-table th, .wm-pta-table td { vertical-align: top; }
.wm-pta-source { font-size: 12.5px; color: var(--wm-muted); margin: 12px 0 0; line-height: 1.6; }
.wm-pta-note { margin-top: 18px; }
