/* ===== CSS Variables ===== */
:root {
    --bg: #fafaf8;
    --surface: #ffffff;
    --text: #1a1a1a;
    --text-2: #555;
    --text-3: #888;
    --accent: #e85d26;
    --accent-light: #fff4ef;
    --green: #0d7c3e;
    --green-light: #e8f5ec;
    --blue: #2563eb;
    --blue-light: #eff4ff;
    --border: #e8e8e5;
    --radius: 12px;
    --shadow: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
    --shadow-lg: 0 10px 40px rgba(0,0,0,.08);
    --red: #dc2626;
    --red-light: #fef2f2;
    --yellow: #d97706;
    --yellow-light: #fffbeb;
}

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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: 'Noto Sans Thai', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

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

/* ===== Navigation ===== */
nav {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
}

.nav-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--text);
    text-decoration: none;
    letter-spacing: -.5px;
}

.logo span {
    color: var(--accent);
}

.logo:hover {
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 6px;
}

.nav-links a {
    font-size: .82rem;
    color: var(--text-2);
    text-decoration: none;
    padding: 6px 14px;
    border-radius: 8px;
    transition: all .2s;
}

.nav-links a:hover {
    background: var(--accent-light);
    color: var(--accent);
    text-decoration: none;
}

.nav-links a.active {
    background: var(--accent);
    color: #fff;
}

/* ===== Language Switcher ===== */
.lang-switch {
    position: relative;
    margin-left: 12px;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 6px 12px;
    font-size: .82rem;
    font-weight: 500;
    color: var(--text-2);
    cursor: pointer;
    transition: all .2s;
}

.lang-btn:hover {
    background: var(--surface);
    border-color: var(--accent);
    color: var(--accent);
}

.lang-code {
    font-size: .75rem;
    font-weight: 600;
}

.lang-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    min-width: 160px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all .2s;
    z-index: 200;
    max-height: 320px;
    overflow-y: auto;
}

.lang-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    color: var(--text-2);
    text-decoration: none;
    transition: all .15s;
    font-size: .85rem;
}

.lang-option:hover {
    background: var(--accent-light);
    color: var(--accent);
    text-decoration: none;
}

.lang-option.active {
    background: var(--accent-light);
    color: var(--accent);
    font-weight: 600;
}

.lang-flag {
    font-size: 1.1rem;
}

.lang-name {
    flex: 1;
}

@media (max-width: 640px) {
    .lang-code {
        display: none;
    }

    .lang-btn {
        padding: 6px 10px;
    }

    .lang-dropdown {
        right: -12px;
    }
}

/* ===== Hero ===== */
.hero {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    padding: 60px 24px 70px;
    text-align: center;
    color: #fff;
}

.hero-inner {
    max-width: 800px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,.1);
    color: rgba(255,255,255,.9);
    font-size: .75rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 20px;
    margin-bottom: 20px;
    border: 1px solid rgba(255,255,255,.15);
}

.hero-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--green);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .4; }
}

h1 {
    font-family: 'Prompt', sans-serif;
    font-weight: 600;
    font-size: clamp(2.2rem, 5vw, 3.2rem);
    line-height: 1.25;
    margin-bottom: 16px;
    letter-spacing: -.5px;
}

.hero-sub {
    font-size: 1.05rem;
    color: rgba(255,255,255,.7);
    max-width: 600px;
    margin: 0 auto 32px;
}

.hero-sub strong {
    color: #fff;
}

/* ===== Search Box ===== */
.search-container {
    max-width: 560px;
    margin: 0 auto;
    position: relative;
}

.search-box {
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 18px 24px 18px 56px;
    border: none;
    border-radius: 16px;
    font-size: 1.05rem;
    background: #fff;
    box-shadow: 0 10px 40px rgba(0,0,0,.2);
    transition: all .2s;
}

.search-box input:focus {
    outline: none;
    box-shadow: 0 10px 50px rgba(0,0,0,.25), 0 0 0 3px var(--accent);
}

.search-box input::placeholder {
    color: var(--text-3);
}

.search-box .search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.3rem;
}

.search-hint {
    font-size: .78rem;
    color: rgba(255,255,255,.5);
    margin-top: 14px;
}

/* ===== Search Results Dropdown ===== */
.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 12px;
    margin-top: 8px;
    box-shadow: var(--shadow-lg);
    max-height: 400px;
    overflow-y: auto;
    display: none;
    z-index: 200;
}

.search-results.show {
    display: block;
}

.search-result-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    text-decoration: none;
    color: var(--text);
    border-bottom: 1px solid var(--border);
    transition: all .15s;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: var(--accent-light);
    text-decoration: none;
}

.search-result-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-result-brand {
    font-size: .72rem;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: .5px;
}

.search-result-name {
    font-weight: 600;
}

.search-result-status {
    font-size: .72rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
}

.search-result-status.yes {
    background: var(--green-light);
    color: var(--green);
}

.search-result-status.no {
    background: var(--red-light);
    color: var(--red);
}

.search-no-results {
    padding: 20px;
    text-align: center;
    color: var(--text-3);
}

/* ===== Stats Bar ===== */
.stats-bar {
    max-width: 1100px;
    margin: -36px auto 0;
    padding: 0 24px;
    position: relative;
    z-index: 10;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 24px;
    box-shadow: var(--shadow);
    text-align: center;
}

.stat-card .value {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -1px;
    margin-bottom: 4px;
}

.stat-card .value.green {
    color: var(--green);
}

.stat-card .value.accent {
    color: var(--accent);
}

.stat-card .value.red {
    color: var(--red);
}

.stat-card .value.blue {
    color: var(--blue);
}

.stat-card .label {
    font-size: .78rem;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: .5px;
}

/* ===== Main ===== */
.main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 48px 24px 60px;
}

/* ===== Section Header ===== */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.section-title {
    font-family: 'Prompt', sans-serif;
    font-size: 1.6rem;
    font-weight: 400;
}

.section-link {
    font-size: .85rem;
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}

.section-link:hover {
    text-decoration: underline;
}

/* ===== Brand Grid ===== */
.brand-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
    margin-bottom: 48px;
}

.brand-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 20px;
    box-shadow: var(--shadow);
    text-align: center;
    text-decoration: none;
    color: var(--text);
    transition: all .25s;
}

.brand-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
    border-color: var(--accent);
    text-decoration: none;
}

.brand-logo {
    font-size: 2.5rem;
    margin-bottom: 12px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-logo img {
    max-width: 72px;
    max-height: 36px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.brand-name {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 6px;
}

.brand-stats {
    font-size: .75rem;
    color: var(--text-3);
}

.brand-stats .esim-count {
    color: var(--green);
    font-weight: 600;
}

/* ===== Category Grid ===== */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
    margin-bottom: 48px;
}

.category-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    text-decoration: none;
    color: var(--text);
    transition: all .25s;
    display: flex;
    align-items: center;
    gap: 16px;
}

.category-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
    border-color: var(--accent);
    text-decoration: none;
}

.category-icon {
    font-size: 2.2rem;
}

.category-name {
    font-weight: 700;
    font-size: 1rem;
}

.category-count {
    font-size: .82rem;
    color: var(--text-3);
}

/* ===== Device Grid ===== */
.device-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
    margin-bottom: 32px;
}

.popular-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 48px;
}

/* ===== Device Card ===== */
.device-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px;
    box-shadow: var(--shadow);
    transition: all .25s;
    text-decoration: none;
    color: var(--text);
    display: block;
}

.device-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
    border-color: var(--accent);
    text-decoration: none;
}

.device-card-inner {
    display: flex;
    gap: 14px;
    align-items: center;
}

.device-thumb {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    border-radius: 8px;
    overflow: hidden;
}

.device-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.device-thumb-placeholder {
    font-size: 1.8rem;
    opacity: 0.5;
}

.device-card-content {
    flex: 1;
    min-width: 0;
}

.device-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
}

.device-brand {
    font-size: .72rem;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 2px;
}

.device-name {
    font-weight: 700;
    font-size: 1rem;
}

.device-year {
    font-size: .72rem;
    color: var(--text-3);
    margin-top: 2px;
}

.device-status {
    font-size: .72rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    white-space: nowrap;
}

.device-status.yes {
    background: var(--green-light);
    color: var(--green);
}

.device-status.no {
    background: var(--red-light);
    color: var(--red);
}

.device-specs {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.device-spec {
    font-size: .75rem;
    color: var(--text-3);
}

.device-spec strong {
    color: var(--text-2);
}

.device-info {
    font-size: .82rem;
    color: var(--text-2);
    margin-top: 8px;
}

.device-esim-info {
    font-size: .72rem;
    color: var(--text-3);
    margin-top: 4px;
}

/* ===== How Section ===== */
.how-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 40px;
    margin-bottom: 48px;
}

.how-section h2 {
    font-family: 'Prompt', sans-serif;
    font-size: 1.5rem;
    font-weight: 400;
    text-align: center;
    margin-bottom: 32px;
}

.how-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 32px;
}

.how-step {
    text-align: center;
}

.how-num {
    width: 48px;
    height: 48px;
    background: var(--accent);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    margin: 0 auto 16px;
}

.how-title {
    font-weight: 700;
    margin-bottom: 8px;
}

.how-desc {
    font-size: .85rem;
    color: var(--text-2);
}

/* ===== CTA Banner ===== */
.cta-banner {
    background: linear-gradient(135deg, var(--accent) 0%, #d14d1a 100%);
    border-radius: var(--radius);
    padding: 48px 40px;
    color: #fff;
    text-align: center;
    margin-bottom: 48px;
}

.cta-banner h2 {
    font-family: 'Prompt', sans-serif;
    font-size: 1.8rem;
    font-weight: 400;
    margin-bottom: 12px;
    color: #fff;
}

.cta-banner p {
    font-size: 1rem;
    color: rgba(255,255,255,.85);
    margin-bottom: 24px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.cta-btn {
    display: inline-block;
    background: #fff;
    color: var(--accent);
    font-size: .9rem;
    font-weight: 700;
    padding: 14px 32px;
    border-radius: 10px;
    text-decoration: none;
    transition: all .2s;
}

.cta-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(0,0,0,.2);
    text-decoration: none;
}

/* ===== Footer ===== */
footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 40px 24px;
}

.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
}

.footer-brand .logo {
    font-size: 1.3rem;
}

.footer-brand p {
    font-size: .82rem;
    color: var(--text-3);
    margin-top: 12px;
    line-height: 1.6;
}

.footer-col h4 {
    font-size: .82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--text-3);
    margin-bottom: 16px;
}

.footer-col a {
    display: block;
    font-size: .88rem;
    color: var(--text-2);
    text-decoration: none;
    margin-bottom: 10px;
}

.footer-col a:hover {
    color: var(--accent);
}

.footer-bottom {
    max-width: 1100px;
    margin: 32px auto 0;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    font-size: .75rem;
    color: var(--text-3);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.footer-bottom a {
    color: var(--text-3);
    text-decoration: none;
}

.footer-bottom a:hover {
    color: var(--accent);
}

/* ===== Breadcrumb ===== */
.breadcrumb {
    max-width: 1100px;
    margin: 0 auto;
    padding: 16px 24px 0;
    font-size: .78rem;
    color: var(--text-3);
}

.breadcrumb a {
    color: var(--text-3);
    text-decoration: none;
}

.breadcrumb a:hover {
    color: var(--accent);
    text-decoration: underline;
}

/* ===== Page Hero (Brand/Device) ===== */
.page-hero {
    max-width: 1100px;
    margin: 0 auto;
    padding: 28px 24px 36px;
}

.brand-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 16px;
}

.brand-logo-large {
    width: 72px;
    height: 72px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    box-shadow: var(--shadow);
}

.brand-logo-large img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.page-hero h1 {
    font-family: 'Prompt', sans-serif;
    font-weight: 400;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    line-height: 1.15;
    letter-spacing: -.5px;
    color: var(--text);
    margin-bottom: 8px;
}

.hero-sub-dark {
    font-size: .95rem;
    color: var(--text-2);
    max-width: 700px;
}

.hero-sub-dark strong {
    color: var(--text);
}

.update-note {
    font-size: .75rem;
    color: var(--text-3);
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ===== Quick Stats ===== */
.quick-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-top: 24px;
}

.quick-stats .stat-card {
    padding: 16px 18px;
    text-align: left;
}

.quick-stats .stat-card .label {
    font-size: .72rem;
    margin-bottom: 4px;
}

.quick-stats .stat-card .value {
    font-size: 1.35rem;
    margin-bottom: 0;
}

/* ===== Main Layout (2-column) ===== */
.main-layout {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px 60px;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 32px;
}

.content {
    min-width: 0;
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ===== Filter Tabs ===== */
.filter-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-tab {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: .82rem;
    font-weight: 600;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-2);
    cursor: pointer;
    transition: all .2s;
}

.filter-tab:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.filter-tab.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.filter-tab.active-green {
    background: var(--green);
    color: #fff;
    border-color: var(--green);
}

.filter-tab.active-red {
    background: var(--red);
    color: #fff;
    border-color: var(--red);
}

/* ===== Category Section ===== */
.category-section {
    margin-bottom: 32px;
}

.category-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-2);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.category-title .icon {
    font-size: 1.2rem;
}

/* ===== Sidebar Card ===== */
.sidebar-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
}

.sidebar-card h3 {
    font-size: .9rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.tip-item {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
    font-size: .82rem;
    color: var(--text-2);
    line-height: 1.5;
}

.tip-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
    margin-top: 1px;
}

/* ===== Sidebar CTA Banner ===== */
.sidebar .cta-banner {
    padding: 24px;
    margin-bottom: 0;
}

.sidebar .cta-banner h3 {
    font-family: 'Prompt', sans-serif;
    font-size: 1.2rem;
    font-weight: 400;
    margin-bottom: 8px;
    color: #fff;
}

.sidebar .cta-banner p {
    font-size: .82rem;
    margin-bottom: 14px;
}

.sidebar .cta-btn {
    font-size: .82rem;
    padding: 10px 24px;
}

/* ===== Brand Grid in Sidebar ===== */
.sidebar .brand-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-top: 12px;
    margin-bottom: 0;
}

.brand-item {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
    text-decoration: none;
    color: var(--text);
    font-size: .82rem;
    font-weight: 500;
    transition: all .2s;
    text-align: center;
}

.brand-item:hover {
    border-color: var(--accent);
    background: var(--accent-light);
    text-decoration: none;
}

.brand-item .brand-icon {
    font-size: 1.3rem;
    display: block;
    margin-bottom: 4px;
}

.brand-item .brand-count {
    font-size: .68rem;
    color: var(--text-3);
    display: block;
}

/* ===== Device Page Hero ===== */
.device-hero {
    max-width: 1100px;
    margin: 0 auto;
    padding: 28px 24px 36px;
}

.device-hero h1 {
    font-family: 'Prompt', sans-serif;
    font-weight: 400;
    font-size: clamp(2rem, 4vw, 2.8rem);
    line-height: 1.15;
    margin-bottom: 12px;
    letter-spacing: -.5px;
    color: var(--text);
}

.hero-badge-large {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    font-weight: 700;
    padding: 12px 24px;
    border-radius: 12px;
    margin: 16px 0 20px;
}

.hero-badge-large.supported {
    background: linear-gradient(135deg, var(--green) 0%, #059669 100%);
    color: #fff;
    box-shadow: 0 4px 14px rgba(13, 124, 62, 0.3);
}

.hero-badge-large.supported::before {
    content: '\2713';
    font-size: 1.2rem;
}

.hero-badge-large.unsupported {
    background: linear-gradient(135deg, var(--red) 0%, #b91c1c 100%);
    color: #fff;
    box-shadow: 0 4px 14px rgba(220, 38, 38, 0.3);
}

.hero-badge-large.unsupported::before {
    content: '\2717';
    font-size: 1.2rem;
}

.device-hero .hero-sub-dark {
    max-width: 640px;
}

.device-hero-inner {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.device-hero-thumb {
    width: 120px;
    height: 160px;
    flex-shrink: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.device-hero-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 8px;
}

.device-hero-thumb .thumb-placeholder {
    font-size: 3rem;
    opacity: 0.4;
}

.device-hero-info {
    flex: 1;
    min-width: 0;
}

/* ===== FAQ Inline (Device Page Main Content) ===== */
.faq-list-inline {
    display: grid;
    gap: 12px;
}

.faq-list-inline .faq-item {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 0;
    box-shadow: none;
}

.faq-list-inline .faq-question {
    font-size: .92rem;
    margin-bottom: 8px;
}

.faq-list-inline .faq-answer {
    font-size: .85rem;
}

@media (max-width: 768px) {
    .device-hero-inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .device-hero-thumb {
        width: 100px;
        height: 130px;
    }

    .device-hero-info {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
}

/* ===== Content Section ===== */
.content-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
}

.content-section h2 {
    font-family: 'Prompt', sans-serif;
    font-size: 1.3rem;
    font-weight: 400;
    margin-bottom: 14px;
}

.content-section p {
    font-size: .88rem;
    color: var(--text-2);
    margin-bottom: 12px;
    line-height: 1.7;
}

.content-section ul,
.content-section ol {
    padding-left: 20px;
    margin-bottom: 12px;
}

.content-section li {
    font-size: .85rem;
    color: var(--text-2);
    margin-bottom: 8px;
    line-height: 1.6;
}

/* ===== Specs Table ===== */
.specs-table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    font-size: .85rem;
}

.specs-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
}

.specs-table td:first-child {
    font-weight: 600;
    color: var(--text-3);
    width: 40%;
    background: var(--bg);
}

.specs-table tr:last-child td {
    border-bottom: none;
}

/* ===== Warning Box ===== */
.warning-box {
    background: #fffbeb;
    border: 1px solid #fcd34d;
    border-radius: var(--radius);
    padding: 16px 20px;
    margin: 16px 0;
    display: flex;
    gap: 12px;
}

.warning-box .icon {
    font-size: 1.2rem;
}

.warning-box .text {
    font-size: .85rem;
    color: #92400e;
}

/* ===== Info Box ===== */
.info-box {
    background: var(--blue-light);
    border: 1px solid #93c5fd;
    border-radius: var(--radius);
    padding: 16px 20px;
    margin: 16px 0;
    display: flex;
    gap: 12px;
}

.info-box .icon {
    font-size: 1.2rem;
}

.info-box .text {
    font-size: .85rem;
    color: #1e40af;
}

/* ===== Step Cards ===== */
.step-card {
    display: flex;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}

.step-card:last-child {
    border-bottom: none;
}

.step-num {
    width: 32px;
    height: 32px;
    background: var(--accent);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: .85rem;
    flex-shrink: 0;
}

.step-content {
    flex: 1;
}

.step-content strong {
    display: block;
    margin-bottom: 4px;
}

.step-content p {
    font-size: .85rem;
    color: var(--text-2);
    margin: 0;
}

/* ===== FAQ ===== */
.faq-item {
    margin-bottom: 14px;
}

.faq-q {
    font-weight: 600;
    font-size: .85rem;
    margin-bottom: 4px;
    cursor: pointer;
}

.faq-q::before {
    content: 'Q. ';
    color: var(--accent);
    font-weight: 700;
}

.faq-a {
    font-size: .82rem;
    color: var(--text-2);
    line-height: 1.55;
    padding-left: 20px;
}

/* ===== FAQ Section (Brand Page) ===== */
.faq-section {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px 60px;
}

.faq-section h2 {
    font-family: 'Prompt', sans-serif;
    font-size: 1.6rem;
    font-weight: 400;
    margin-bottom: 24px;
}

.faq-list {
    display: grid;
    gap: 16px;
}

.faq-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 24px;
    box-shadow: var(--shadow);
}

.faq-question {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text);
}

.faq-answer {
    font-size: .88rem;
    color: var(--text-2);
    line-height: 1.65;
}

/* ===== Related Grid ===== */
.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
    margin-top: 16px;
}

.related-item {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
    text-decoration: none;
    color: var(--text);
    font-size: .82rem;
    font-weight: 500;
    transition: all .2s;
    text-align: center;
}

.related-item:hover {
    border-color: var(--accent);
    background: var(--accent-light);
    text-decoration: none;
}

.related-item .ri-status {
    font-size: .68rem;
    display: block;
    margin-top: 4px;
}

.related-item .ri-status.yes {
    color: var(--green);
}

.related-item .ri-status.no {
    color: var(--red);
}

/* ===== Alternative Cards (Unsupported Device) ===== */
.alt-card {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 12px;
    transition: all .25s;
    position: relative;
}

.alt-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
    border-color: var(--green);
}

.alt-card.recommended {
    border-color: var(--green);
    background: linear-gradient(135deg, var(--green-light) 0%, var(--surface) 100%);
}

.alt-card.recommended::before {
    content: 'Recommended';
    position: absolute;
    top: -10px;
    left: 18px;
    background: var(--green);
    color: #fff;
    font-size: .68rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 6px;
    letter-spacing: .3px;
}

.alt-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.alt-name {
    font-weight: 700;
    font-size: 1rem;
}

.alt-brand {
    font-size: .78rem;
    color: var(--text-3);
}

.alt-price {
    text-align: right;
}

.alt-price-value {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--accent);
}

.alt-price-label {
    font-size: .68rem;
    color: var(--text-3);
}

.alt-specs {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.alt-spec {
    font-size: .78rem;
    color: var(--text-2);
}

.alt-spec strong {
    color: var(--text);
}

.alt-esim {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--green-light);
    color: var(--green);
    font-size: .72rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
    margin-top: 10px;
}

/* ===== Search Box (in page) ===== */
.page-search-box {
    position: relative;
    margin-bottom: 20px;
}

.page-search-box input {
    width: 100%;
    padding: 12px 16px 12px 44px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: .9rem;
    background: var(--surface);
    transition: all .2s;
}

.page-search-box input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}

.page-search-box::before {
    content: '\1F50D';
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
}

/* ===== Responsive ===== */
@media (max-width: 860px) {
    .main-layout {
        grid-template-columns: 1fr;
    }

    .footer-inner {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .nav-inner {
        padding: 12px 16px;
    }

    .nav-links a {
        padding: 4px 10px;
        font-size: .75rem;
    }

    .hero {
        padding: 40px 16px 50px;
    }

    .stats-bar {
        margin-top: -24px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .brand-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .device-grid,
    .popular-grid {
        grid-template-columns: 1fr;
    }

    .how-grid {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }

    .cta-banner {
        padding: 32px 24px;
    }

    .content-section {
        padding: 20px;
    }

    .quick-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .footer-inner {
        grid-template-columns: 1fr;
    }

    .how-grid {
        grid-template-columns: 1fr;
    }

    .brand-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ===== Content Pages (About, Privacy, Contact) ===== */
.content-page {
    max-width: 800px;
    margin: 0 auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 40px 48px;
}

.content-page h2 {
    font-family: 'Prompt', sans-serif;
    font-size: 1.4rem;
    font-weight: 500;
    color: var(--text);
    margin: 32px 0 16px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.content-page h2:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.content-page h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    margin: 24px 0 12px;
}

.content-page p {
    color: var(--text-2);
    margin-bottom: 16px;
    line-height: 1.7;
}

.content-page ul, .content-page ol {
    color: var(--text-2);
    margin-bottom: 16px;
    padding-left: 24px;
    line-height: 1.8;
}

.content-page li {
    margin-bottom: 8px;
}

.content-page a {
    color: var(--accent);
}

.content-page a:hover {
    text-decoration: underline;
}

/* Contact Cards */
.contact-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin: 32px 0;
}

.contact-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    transition: all .2s;
}

.contact-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow);
}

.contact-icon {
    font-size: 2rem;
    margin-bottom: 12px;
}

.contact-card h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 8px;
    padding: 0;
    border: none;
}

.contact-card p {
    font-size: .85rem;
    color: var(--text-3);
    margin-bottom: 12px;
}

.contact-link {
    display: inline-block;
    font-size: .85rem;
    font-weight: 500;
    color: var(--accent);
    word-break: break-all;
}

@media (max-width: 640px) {
    .content-page {
        padding: 24px 20px;
    }

    .contact-cards {
        grid-template-columns: 1fr;
    }
}
