/* ═══════════════════════════════════════════
   RESET & VARIABLES
═══════════════════════════════════════════ */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --primary: #1db968;
    --primary-dark: #15924f;
    --primary-light: #e6f9f1;
    --accent: #0fd980;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --navy: #0a2e1a;
    --slate: #1e4730;
    --muted: #4a7a60;
    --border: #d1ead9;
    --bg: #f4fbf7;
    --white: #ffffff;
    --card-shadow: 0 1px 3px rgba(0, 0, 0, .06), 0 4px 16px rgba(29, 185, 104, .08);
    --card-hover: 0 8px 32px rgba(29, 185, 104, .18);
    --radius: 16px;
    --radius-sm: 10px;
    --radius-xs: 6px;
    --font-body: 'Sarabun', sans-serif;
    --font-display: 'Prompt', sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--slate);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ═══════════════════════════════════════════
   NAVBAR
═══════════════════════════════════════════ */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 1px 0 rgba(29, 185, 104, .06);
}

.navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
    gap: 24px;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    flex-shrink: 0;
}

.brand-icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
    box-shadow: 0 4px 12px rgba(29, 185, 104, .35);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.brand-name {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 17px;
    color: var(--navy);
    letter-spacing: -0.3px;
}

.brand-sub {
    font-size: 11px;
    color: var(--muted);
    font-weight: 400;
}

.navbar-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
}

.navbar-nav a {
    text-decoration: none;
    color: var(--slate);
    font-size: 14px;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: var(--radius-xs);
    transition: all .2s;
}

.navbar-nav a:hover,
.navbar-nav a.active {
    color: var(--primary);
    background: var(--primary-light);
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.cart-btn {
    position: relative;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-xs);
    padding: 9px 18px;
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font-body);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all .2s;
    text-decoration: none;
}

.cart-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--danger);
    color: white;
    font-size: 11px;
    font-weight: 700;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    opacity: 0;
    transform: scale(0);
    transition: all .2s;
}

.cart-badge.show {
    opacity: 1;
    transform: scale(1);
}

/* ═══════════════════════════════════════════
   HERO SLIDER
═══════════════════════════════════════════ */
.hero {
    position: relative;
    overflow: hidden;
}

.hero-slides {
    display: flex;
    transition: transform 0.6s cubic-bezier(.4, 0, .2, 1);
}

.hero-slide {
    min-width: 100%;
    padding: 80px 0 72px;
    position: relative;
    overflow: hidden;
}

.hero-slide-1 {
    background:
        linear-gradient(135deg, rgba(7,43,22,.82) 0%, rgba(13,92,52,.75) 45%, rgba(26,155,88,.60) 80%, rgba(46,204,128,.45) 100%),
        url('https://images.unsplash.com/photo-1584118624012-df056829fbd0?w=1600&q=80&fit=crop') center/cover no-repeat;
}

.hero-slide-2 {
    background:
        linear-gradient(135deg, rgba(13,92,58,.85) 0%, rgba(30,143,87,.72) 55%, rgba(61,235,160,.50) 100%),
        url('https://images.unsplash.com/photo-1615461066841-6116e61058f4?w=1600&q=80&fit=crop') center/cover no-repeat;
}

.hero-slide-3 {
    background:
        linear-gradient(135deg, rgba(11,82,53,.85) 0%, rgba(22,143,80,.72) 55%, rgba(72,240,168,.50) 100%),
        url('https://images.unsplash.com/photo-1587854692152-cbe660dbde88?w=1600&q=80&fit=crop') center/cover no-repeat;
}

.hero-slide-4 {
    background:
        linear-gradient(135deg, rgba(5,40,25,.88) 0%, rgba(10,80,48,.78) 50%, rgba(20,130,75,.60) 100%),
        url('https://images.unsplash.com/photo-1579684385127-1ef15d508118?w=1600&q=80&fit=crop') center/cover no-repeat;
}

.hero-slide-5 {
    background:
        linear-gradient(135deg, rgba(8,50,30,.88) 0%, rgba(15,100,60,.78) 50%, rgba(30,160,95,.58) 100%),
        url('https://images.unsplash.com/photo-1576091160399-112ba8d25d1d?w=1600&q=80&fit=crop') center/cover no-repeat;
}

.hero-slide::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 600px 400px at 70% 50%, rgba(46, 204, 128, .15) 0%, transparent 70%),
        radial-gradient(ellipse 300px 300px at 10% 80%, rgba(15, 217, 128, .10) 0%, transparent 60%);
    pointer-events: none;
}

.hero-dots {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px);
    background-size: 28px 28px;
    pointer-events: none;
}

.hero-inner {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 60px;
    align-items: center;
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, .30);
    border: 1px solid rgba(255, 255, 255, .35);
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 100px;
    margin-bottom: 20px;
    text-shadow: 0 1px 4px rgba(0,0,0,.6);
}

.hero-tag-dot {
    width: 7px;
    height: 7px;
    background: #7fffbe;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(36px, 5vw, 56px);
    font-weight: 800;
    color: white;
    line-height: 1.15;
    margin-bottom: 18px;
    letter-spacing: -1px;
}

.hero-title-accent {
    background: linear-gradient(90deg, #2ecc80, #0fd980);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-desc {
    color: rgba(255, 255, 255, 0.95);
    font-size: 16px;
    line-height: 1.7;
    max-width: 480px;
    margin-bottom: 32px;
    text-shadow: 0 1px 4px rgba(0,0,0,.5);
}

.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.hero-slider-dots {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.hero-slider-dot {
    width: 8px;
    height: 8px;
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.35);
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    padding: 0;
}

.hero-slider-dot.active {
    background: #fff;
    width: 22px;
}

.hero-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    font-size: 15px;
    transition: background .2s;
}

.hero-arrow:hover {
    background: rgba(255, 255, 255, 0.3);
}

.hero-arrow-left { left: 14px; }
.hero-arrow-right { right: 14px; }

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all .2s;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    box-shadow: 0 4px 16px rgba(29, 185, 104, .4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(29, 185, 104, .5);
}

.btn-outline {
    background: rgba(255, 255, 255, .08);
    color: white;
    border: 1px solid rgba(255, 255, 255, .25);
    backdrop-filter: blur(8px);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, .15);
    transform: translateY(-2px);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

/* Stats Cards */
.hero-stats {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.stat-card {
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: var(--radius);
    padding: 20px 28px;
    text-align: center;
    backdrop-filter: blur(12px);
    min-width: 160px;
}

.stat-num {
    display: block;
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 800;
    color: white;
    line-height: 1;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 12px;
    color: rgba(255,255,255,0.90);
    font-weight: 500;
    text-shadow: 0 1px 3px rgba(0,0,0,.5);
}

/* ═══════════════════════════════════════════
   FILTER BAR
═══════════════════════════════════════════ */
.filter-section {
    background: white;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 68px;
    z-index: 900;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .04);
}

.filter-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 0;
    flex-wrap: wrap;
}

.filter-pills {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    border-radius: 100px;
    border: 1.5px solid var(--border);
    background: white;
    color: var(--slate);
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all .2s;
    white-space: nowrap;
}

.filter-pill:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}

.filter-pill.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    box-shadow: 0 2px 8px rgba(29, 185, 104, .3);
}

.pill-count {
    background: rgba(0, 0, 0, .08);
    border-radius: 100px;
    padding: 1px 7px;
    font-size: 11px;
    font-weight: 600;
}

.filter-pill.active .pill-count {
    background: rgba(255, 255, 255, .25);
}

.filter-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box i {
    position: absolute;
    left: 12px;
    color: var(--muted);
    font-size: 13px;
    pointer-events: none;
}

.search-box input {
    padding: 8px 12px 8px 34px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-xs);
    font-family: var(--font-body);
    font-size: 13px;
    color: var(--slate);
    background: var(--bg);
    width: 200px;
    transition: all .2s;
    outline: none;
}

.search-box input:focus {
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 3px rgba(29, 185, 104, .1);
}

.sort-select {
    padding: 8px 12px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-xs);
    font-family: var(--font-body);
    font-size: 13px;
    color: var(--slate);
    background: var(--bg);
    outline: none;
    cursor: pointer;
    transition: border-color .2s;
}

.sort-select:focus {
    border-color: var(--primary);
}

/* ═══════════════════════════════════════════
   VACCINES SECTION
═══════════════════════════════════════════ */
.vaccines-section {
    padding: 48px 0 80px;
}

.result-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
}

.result-text {
    font-size: 14px;
    color: var(--muted);
}

.result-text strong {
    color: var(--navy);
    font-weight: 700;
}

/* ═══════════════════════════════════════════
   VACCINE CARDS
═══════════════════════════════════════════ */
.vaccines-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.vaccine-card {
    background: white;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--card-shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all .3s cubic-bezier(.4, 0, .2, 1);
    position: relative;
    animation: fadeInUp .4s ease both;
    cursor: pointer;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.vaccine-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--card-hover);
    border-color: rgba(29, 185, 104, .2);
}

.badge-wrap {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 2;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .3px;
}

.badge-popular {
    background: #fff7ed;
    color: #ea580c;
    border: 1px solid #fed7aa;
}

.badge-new {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

.vaccine-img-wrap {
    height: 180px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.vaccine-img-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 60%, rgba(255, 255, 255, .5));
}

.vaccine-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s;
}

.vaccine-card:hover .vaccine-img {
    transform: scale(1.05);
}

.vaccine-icon-placeholder {
    font-size: 72px;
    line-height: 1;
    filter: drop-shadow(0 4px 12px rgba(29, 185, 104, .2));
    transition: transform .3s;
}

.vaccine-card:hover .vaccine-icon-placeholder {
    transform: scale(1.1) rotate(-5deg);
}

.vaccine-body {
    padding: 20px 20px 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.vaccine-dept {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    color: var(--primary);
    background: var(--primary-light);
    padding: 2px 10px;
    border-radius: 100px;
    letter-spacing: .3px;
}

.vaccine-name {
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 700;
    color: var(--navy);
    line-height: 1.3;
}

.vaccine-desc {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.6;
}

.vaccine-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
}

.vaccine-features li {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12.5px;
    color: var(--slate);
}

.vaccine-features li i {
    color: var(--success);
    font-size: 11px;
    flex-shrink: 0;
}

.feature-more {
    color: var(--primary) !important;
    font-weight: 600;
    font-size: 12px !important;
}

.vaccine-cat-tag {
    margin-top: auto;
}

.cat-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--muted);
    background: var(--bg);
    padding: 4px 10px;
    border-radius: 100px;
    border: 1px solid var(--border);
}

.vaccine-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: #fafcff;
}

.vaccine-price {
    display: flex;
    flex-direction: column;
}

.price-label {
    font-size: 10px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .5px;
    font-weight: 600;
}

.price-amount {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 800;
    color: var(--primary-dark);
    line-height: 1;
}

.add-cart-btn {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-xs);
    padding: 10px 16px;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all .2s;
    white-space: nowrap;
}

.add-cart-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(29, 185, 104, .35);
}

.add-cart-btn.added {
    background: var(--success);
    animation: pop .3s ease;
}

@keyframes pop {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.empty-state {
    grid-column: 1/-1;
    text-align: center;
    padding: 80px 24px;
    color: var(--muted);
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: .4;
    display: block;
}

.empty-state p {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--slate);
}

.empty-state small {
    font-size: 14px;
}

/* ═══════════════════════════════════════════
   WHY SECTION
═══════════════════════════════════════════ */
.why-section {
    background: white;
    padding: 72px 0;
    border-top: 1px solid var(--border);
}

.section-header {
    text-align: center;
    margin-bottom: 48px;
}

.section-title {
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 800;
    color: var(--navy);
    margin-bottom: 10px;
    letter-spacing: -0.5px;
}

.section-sub {
    color: var(--muted);
    font-size: 16px;
}

.why-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
}

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

.why-card:hover {
    border-color: var(--primary);
    background: var(--primary-light);
    transform: translateY(-4px);
    box-shadow: var(--card-hover);
}

.why-icon {
    font-size: 44px;
    margin-bottom: 16px;
    line-height: 1;
}

.why-card h4 {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 8px;
}

.why-card p {
    font-size: 13.5px;
    color: var(--muted);
    line-height: 1.6;
}

/* ═══════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════ */
.site-footer {
    background: #0f6b40;
    color: rgba(255, 255, 255, 0.75);
    padding: 48px 0 0;
}

.footer-inner {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
    gap: 40px;
    padding-bottom: 36px;
    border-bottom: 1px solid rgba(255, 255, 255, .12);
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-logo-icon {
    width: 42px;
    height: 42px;
    background: #1fa862;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.footer-logo-name {
    font-family: var(--font-display);
    font-weight: 700;
    color: white;
    font-size: 16px;
    line-height: 1.2;
    display: block;
}

.footer-logo-sub {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.55);
    display: block;
}

.footer-desc {
    font-size: 13px;
    line-height: 1.7;
    max-width: 260px;
    color: rgba(255, 255, 255, 0.72);
}

.footer-social {
    display: flex;
    gap: 9px;
}

.footer-social-btn {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 13px;
    cursor: pointer;
    text-decoration: none;
    transition: background .2s;
}

.footer-social-btn:hover {
    background: rgba(255, 255, 255, 0.22);
}

.footer-title {
    font-family: var(--font-display);
    color: #7fffc0;
    font-weight: 600;
    font-size: 11px;
    margin-bottom: 16px;
    letter-spacing: .7px;
    text-transform: uppercase;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links a {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.75);
    font-size: 13px;
    transition: color .2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-links a:hover {
    color: #7fffc0;
}

.footer-contact {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.75);
}

.contact-item i {
    color: #7fffc0;
    margin-top: 2px;
    font-size: 13px;
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.48);
    padding: 18px 0;
}

.footer-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.footer-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: rgba(255, 255, 255, 0.8);
    font-size: 11px;
    padding: 4px 11px;
    border-radius: 100px;
}

/* ═══════════════════════════════════════════
   CART DRAWER
═══════════════════════════════════════════ */
.cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .5);
    z-index: 9000;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s;
    backdrop-filter: blur(4px);
}

.cart-overlay.open {
    opacity: 1;
    pointer-events: all;
}

.cart-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 420px;
    max-width: 100vw;
    height: 100vh;
    background: white;
    z-index: 9001;
    transform: translateX(100%);
    transition: transform .35s cubic-bezier(.4, 0, .2, 1);
    display: flex;
    flex-direction: column;
    box-shadow: -8px 0 40px rgba(0, 0, 0, .12);
}

.cart-drawer.open {
    transform: translateX(0);
}

.cart-head {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cart-head h3 {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    color: var(--navy);
}

.cart-close {
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    transition: all .2s;
}

.cart-close:hover {
    background: var(--bg);
    color: var(--navy);
}

.cart-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.cart-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--muted);
    text-align: center;
}

.cart-empty i {
    font-size: 48px;
    opacity: .3;
}

.cart-empty p {
    font-size: 15px;
    font-weight: 500;
    color: var(--slate);
}

.cart-empty small {
    font-size: 13px;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.cart-item-icon {
    width: 48px;
    height: 48px;
    background: var(--primary-light);
    border-radius: var(--radius-xs);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.cart-item-info {
    flex: 1;
    min-width: 0;
}

.cart-item-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--navy);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cart-item-price {
    font-size: 13px;
    color: var(--primary-dark);
    font-weight: 700;
    font-family: var(--font-display);
}

.cart-item-qty {
    display: flex;
    align-items: center;
    gap: 8px;
}

.qty-btn {
    width: 28px;
    height: 28px;
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: var(--slate);
    transition: all .2s;
}

.qty-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.qty-num {
    font-size: 14px;
    font-weight: 700;
    color: var(--navy);
    min-width: 20px;
    text-align: center;
}

.remove-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: none;
    cursor: pointer;
    color: var(--muted);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-xs);
    transition: all .2s;
    font-size: 14px;
}

.remove-btn:hover {
    background: #fee2e2;
    color: var(--danger);
}

.cart-foot {
    padding: 20px 24px;
    border-top: 1px solid var(--border);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.cart-total-label {
    font-size: 15px;
    font-weight: 600;
    color: var(--slate);
}

.cart-total-amount {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 800;
    color: var(--navy);
}

.checkout-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all .2s;
    box-shadow: 0 4px 16px rgba(29, 185, 104, .35);
}

.checkout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(29, 185, 104, .45);
}

/* ═══════════════════════════════════════════
   TOAST
═══════════════════════════════════════════ */
.toast-wrap {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--navy);
    color: white;
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 8px 32px rgba(0, 0, 0, .2);
    animation: slideInRight .3s ease;
    max-width: 320px;
}

.toast i { font-size: 18px; }

.toast.success i { color: var(--success); }

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(40px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* ═══════════════════════════════════════════
   CHECKOUT MODAL
═══════════════════════════════════════════ */
.co-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 46, 26, 0.55);
    backdrop-filter: blur(4px);
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s;
}

.co-overlay.open {
    opacity: 1;
    pointer-events: all;
}

.co-modal {
    position: fixed;
    inset: 0;
    z-index: 2001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    pointer-events: none;
}

.co-modal.open { pointer-events: all; }

.co-box {
    background: var(--white);
    border-radius: 20px;
    width: 100%;
    max-width: 860px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 64px rgba(0, 0, 0, .22);
    transform: translateY(32px) scale(.97);
    opacity: 0;
    transition: transform .35s cubic-bezier(.4, 0, .2, 1), opacity .35s;
    overflow: hidden;
}

.co-overlay.open ~ .co-modal .co-box {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.co-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.co-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.co-header-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
}

.co-header h2 {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    color: var(--navy);
    margin: 0;
}

.co-header p {
    font-size: 12px;
    color: var(--muted);
    margin: 0;
}

.co-close {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: none;
    background: var(--bg);
    color: var(--muted);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
}

.co-close:hover {
    background: #fde8e8;
    color: var(--danger);
}

.co-steps {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
    background: white;
    gap: 0;
}

.co-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 600;
    color: var(--muted);
    text-align: center;
    line-height: 1.3;
    flex: 0 0 auto;
}

.co-step span {
    max-width: 90px;
    word-wrap: break-word;
}

.co-step-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2.5px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 800;
    color: var(--muted);
    transition: all .3s;
    flex-shrink: 0;
    background: white;
}

.co-step.active .co-step-circle {
    border-color: var(--primary);
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(29, 185, 104, .3);
}

.co-step.done .co-step-circle {
    border-color: var(--success);
    background: var(--success);
    color: white;
}

.co-step.active { 
    color: var(--primary); 
}

.co-step.done {
    color: var(--success);
}

.co-step-line {
    flex: 1;
    height: 3px;
    background: var(--border);
    margin: 0 8px;
    align-self: center;
    margin-bottom: 25px;
    min-width: 20px;
}

.co-step-line.done { 
    background: var(--success); 
}

.co-body {
    overflow-y: auto;
    flex: 1;
    padding: 20px 24px;
}

.co-layout {
    display: grid;
    grid-template-columns: 1fr 260px;
    gap: 20px;
    align-items: start;
}

.co-section { margin-bottom: 16px; }

.co-section-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--navy);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.co-section-title i { color: var(--primary); }

.co-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.co-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.co-group.full { grid-column: 1 / -1; }

.co-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--slate);
}

.co-label .req { color: var(--danger); }

.co-input, .co-select, .co-textarea {
    border: 1.5px solid var(--border);
    border-radius: 8px;
    padding: 9px 12px;
    font-family: var(--font-body);
    font-size: 13px;
    color: var(--slate);
    background: white;
    outline: none;
    transition: border-color .2s;
    width: 100%;
}

.co-input:focus, .co-select:focus, .co-textarea:focus {
    border-color: var(--primary);
}

.co-textarea {
    resize: vertical;
    min-height: 60px;
}

.co-payment-opts {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.co-pay-opt { display: none; }

.co-pay-label {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 2px solid var(--border);
    border-radius: 10px;
    padding: 10px 14px;
    cursor: pointer;
    transition: all .2s;
    font-size: 13px;
}

.co-pay-label:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.co-pay-opt:checked + .co-pay-label {
    border-color: var(--primary);
    background: var(--primary-light);
}

.co-pay-dot {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    flex-shrink: 0;
}

.co-pay-detail {
    display: none;
    padding: 14px;
    background: var(--primary-light);
    border: 1px solid var(--border);
    border-radius: 10px;
    text-align: center;
    margin-top: 4px;
    font-size: 13px;
}

.co-pay-detail.show { display: block; }

.co-qr-img {
    max-width: 160px;
    margin: 0 auto 8px;
    display: block;
    border-radius: 8px;
}

.co-summary {
    background: var(--bg);
    border-radius: 12px;
    padding: 16px;
    position: sticky;
    top: 0;
}

.co-summary-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 12px;
}

.co-sum-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    gap: 8px;
    font-size: 13px;
}

.co-sum-item:last-of-type { border-bottom: none; }

.co-sum-name {
    font-weight: 600;
    color: var(--navy);
}

.co-sum-sub {
    font-size: 11px;
    color: var(--muted);
}

.co-sum-price {
    font-weight: 700;
    white-space: nowrap;
}

.co-sum-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0 0;
    border-top: 2px solid var(--primary);
    margin-top: 4px;
}

.co-sum-total-label {
    font-size: 14px;
    font-weight: 700;
}

.co-sum-total-amount {
    font-size: 20px;
    font-weight: 800;
    color: var(--primary);
}

.co-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 12px;
    align-items: center;
    flex-shrink: 0;
    background: white;
}

.co-submit {
    flex: 1;
    padding: 14px 20px;
    min-height: 50px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all .2s;
    box-shadow: 0 4px 12px rgba(29, 185, 104, .35);
}

.co-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(29, 185, 104, .45);
}

.co-submit:active:not(:disabled) {
    transform: translateY(0);
}

.co-submit:disabled {
    opacity: .65;
    cursor: not-allowed;
    transform: none;
}

.co-cancel {
    padding: 14px 20px;
    min-height: 50px;
    border: 2px solid var(--border);
    border-radius: 12px;
    background: white;
    color: var(--slate);
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
    flex-shrink: 0;
}

.co-cancel:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}

.co-cancel:active {
    transform: scale(0.98);
}

.co-errors {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 16px;
}

.co-errors p {
    font-weight: 700;
    color: #b91c1c;
    font-size: 13px;
    margin-bottom: 6px;
}

.co-errors ul {
    padding-left: 16px;
    color: #b91c1c;
    font-size: 12px;
}

/* ═══════════════════════════════════════════
   VACCINE DETAIL MODAL
═══════════════════════════════════════════ */
.vd-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 46, 26, .55);
    backdrop-filter: blur(4px);
    z-index: 3000;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s;
}

.vd-overlay.open {
    opacity: 1;
    pointer-events: all;
}

.vd-modal {
    position: fixed;
    inset: 0;
    z-index: 3001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    pointer-events: none;
}

.vd-modal.open { pointer-events: all; }

.vd-box {
    background: var(--white);
    border-radius: 20px;
    width: 100%;
    max-width: 680px;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 64px rgba(0, 0, 0, .22);
    transform: translateY(28px) scale(.97);
    opacity: 0;
    transition: transform .32s cubic-bezier(.4, 0, .2, 1), opacity .32s;
    overflow: hidden;
}

.vd-overlay.open ~ .vd-modal .vd-box {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.vd-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: linear-gradient(135deg, var(--primary-light), #d4f5e3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 72px;
    flex-shrink: 0;
}

.vd-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vd-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 20px 24px 12px;
    gap: 12px;
    flex-shrink: 0;
}

.vd-head-info { flex: 1; }

.vd-dept {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    color: var(--primary);
    background: var(--primary-light);
    border-radius: 100px;
    padding: 3px 10px;
    margin-bottom: 6px;
}

.vd-name {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    color: var(--navy);
    margin: 0 0 4px;
}

.vd-price {
    font-size: 22px;
    font-weight: 800;
    color: var(--primary);
}

.vd-badge {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 100px;
    white-space: nowrap;
}

.vd-badge.popular {
    background: #fff3cd;
    color: #b45309;
}

.vd-badge.new {
    background: #e0f2fe;
    color: #0369a1;
}

.vd-close {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: none;
    background: var(--bg);
    color: var(--muted);
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
    flex-shrink: 0;
}

.vd-close:hover {
    background: #fde8e8;
    color: var(--danger);
}

.vd-body {
    overflow-y: auto;
    flex: 1;
    padding: 0 24px 20px;
}

.vd-desc {
    font-size: 14px;
    color: var(--muted);
    line-height: 1.7;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 16px;
}

.vd-features-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.vd-features-title i { color: var(--primary); }

.vd-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    list-style: none;
    padding: 0;
}

.vd-features li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    color: var(--slate);
    background: var(--bg);
    border-radius: 8px;
    padding: 8px 10px;
}

.vd-features li i {
    color: var(--primary);
    margin-top: 2px;
    flex-shrink: 0;
}

.vd-footer {
    padding: 14px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.vd-add-btn {
    flex: 1;
    padding: 13px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all .2s;
    box-shadow: 0 4px 12px rgba(29, 185, 104, .35);
}

.vd-add-btn:hover { transform: translateY(-1px); }
.vd-add-btn.added { background: var(--success); }

.vd-close-btn {
    padding: 13px 20px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    background: white;
    color: var(--muted);
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all .2s;
}

.vd-close-btn:hover { border-color: var(--muted); }

/* ═══════════════════════════════════════════
   SCREENING FORM (PANEL C)
═══════════════════════════════════════════ */
.screen-note {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 13px;
    color: #92400e;
    margin-bottom: 16px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.5;
}

.screen-note i {
    color: #f59e0b;
    margin-top: 2px;
    flex-shrink: 0;
}

.screen-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.screen-item {
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}

.screen-item:last-child { border-bottom: none; }
.screen-item--has-detail { padding-bottom: 10px; }

.screen-q {
    font-size: 13.5px;
    color: var(--slate);
    line-height: 1.55;
    margin-bottom: 10px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.screen-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    background: var(--primary-light);
    color: var(--primary-dark);
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 1px;
}

.screen-asterisk {
    color: var(--danger);
    font-weight: 700;
    font-size: 13px;
}

.screen-opts {
    display: flex;
    gap: 10px;
    padding-left: 30px;
}

.screen-radio {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.screen-radio input[type="radio"] { display: none; }

.screen-radio-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 64px;
    padding: 6px 14px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--muted);
    background: white;
    transition: all .2s;
    cursor: pointer;
}

.screen-radio:hover .screen-radio-box {
    border-color: var(--primary);
    color: var(--primary);
}

.screen-radio input[type="radio"]:checked + .screen-radio-box {
    border-color: var(--primary);
    background: var(--primary);
    color: white;
    font-weight: 600;
}

.screen-radio input[type="radio"][value="yes"]:checked + .screen-radio-box {
    border-color: #ef4444;
    background: #ef4444;
    color: white;
}

.screen-detail {
    margin-top: 10px;
    padding: 12px;
    background: #fef9e7;
    border: 1px dashed #fde68a;
    border-radius: 8px;
    margin-left: 30px;
    animation: fadeInDown .2s ease;
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════ */
@media (max-width: 900px) {
    .hero-inner {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .hero-stats {
        flex-direction: row;
        justify-content: center;
    }

    .stat-card {
        min-width: 120px;
        padding: 16px 20px;
    }

    .stat-num { font-size: 26px; }

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

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

    .hero { padding: 52px 0 48px; }
    .hero-title { font-size: 32px; }
    .hero-stats { gap: 8px; }
    .stat-card { padding: 12px 16px; }
    .stat-num { font-size: 22px; }

    .filter-inner {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-right { justify-content: space-between; }

    .search-box input { width: 100%; }

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

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

    .footer-bottom {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    .cart-drawer { width: 100vw; }

    .co-layout { grid-template-columns: 1fr; }
    .co-row { grid-template-columns: 1fr; }

    .co-box {
        border-radius: 16px 16px 0 0;
        max-height: 95vh;
    }

    .co-modal {
        align-items: flex-end;
        padding: 0;
    }

    /* ปรับ steps ให้สวยบนมือถือ */
    .co-steps {
        padding: 14px 12px;
    }

    .co-step {
        font-size: 10px;
        gap: 5px;
    }

    .co-step span {
        max-width: 70px;
    }

    .co-step-circle {
        width: 32px;
        height: 32px;
        font-size: 13px;
        border-width: 2px;
    }

    .co-step-line {
        margin: 0 4px;
        margin-bottom: 22px;
        min-width: 15px;
        height: 2.5px;
    }

    /* ปรับปุ่มให้สวยบนมือถือ */
    .co-footer {
        padding: 14px 16px;
        gap: 10px;
    }

    .co-submit,
    .co-cancel {
        padding: 13px 16px;
        min-height: 48px;
        font-size: 14px;
        border-radius: 10px;
    }

    .vd-features { grid-template-columns: 1fr; }

    .vd-box {
        border-radius: 16px 16px 0 0;
        max-height: 92vh;
    }

    .vd-modal {
        align-items: flex-end;
        padding: 0;
    }
}
/* ═══════════════════════════════════════════════════════════════
   VACCINEPLUS — BUTTON VISIBILITY FIX v2
   วางต่อท้าย assets/css/style.css

   แก้ปัญหา iPhone Safari: 100vh รวม browser bar ทำให้ปุ่มหาย
   วิธี: ใช้ CSS variable --vh ที่ JS คำนวณจาก window.innerHeight จริงๆ
═══════════════════════════════════════════════════════════════ */

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   PART 1: CART DRAWER
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.cart-drawer {
    /* --vh ถูก set โดย JS ด้านล่าง — ถ้า JS ยังไม่ทำงานให้ fallback เป็น 100dvh */
    height: calc(var(--vh, 1dvh) * 100) !important;
    max-height: calc(var(--vh, 1dvh) * 100) !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

.cart-head {
    flex-shrink: 0 !important;
}

.cart-body {
    flex: 1 1 0 !important;
    min-height: 0 !important;       /* ✅ key: ให้ shrink ได้ต่ำกว่า content */
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
}

.cart-foot {
    flex-shrink: 0 !important;      /* ✅ ไม่ยุบ ไม่หาย */
    background: white !important;
    border-top: 1px solid var(--border, #e5e7eb) !important;
    padding: 16px !important;
    box-sizing: border-box !important;
    width: 100% !important;
}

.checkout-btn {
    width: 100% !important;
    min-height: 48px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    padding: 14px 20px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    border: none !important;
    border-radius: 10px !important;
    cursor: pointer !important;
    box-sizing: border-box !important;
}


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   PART 2: CHECKOUT MODAL
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.co-modal {
    max-height: calc(var(--vh, 1dvh) * 95) !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

.co-box {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

.co-header,
.co-steps {
    flex-shrink: 0 !important;
}

.co-body {
    flex: 1 1 0 !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding-bottom: 16px !important;
}

.co-footer {
    flex-shrink: 0 !important;
    background: white !important;
    border-top: 1px solid var(--border, #e5e7eb) !important;
    padding: 12px 16px !important;
    gap: 10px !important;
    box-sizing: border-box !important;
    width: 100% !important;
    z-index: 10 !important;
    /* display จัดการโดย JS — ไม่ใส่ !important เพื่อให้ style attribute override ได้ */
    display: flex;
}

/* กรณี JS ใช้ hidden attribute */
.co-footer[hidden] {
    display: none !important;
}

.co-cancel,
.co-submit {
    flex: 1 !important;
    min-height: 48px !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    padding: 12px 16px !important;
    border: none !important;
    border-radius: 10px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    box-sizing: border-box !important;
}

/* ให้ JS สามารถซ่อนปุ่มได้ — display ต้องไม่ถูก !important override */
.co-submit[hidden],
.co-cancel[hidden] {
    display: none !important;
}

/* เมื่อปุ่มถูกแสดง ให้ใช้ flex */
.co-submit:not([hidden]),
.co-cancel:not([hidden]) {
    display: flex !important;
}


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   PART 3: RESPONSIVE
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

@media (max-width: 390px) {
    .co-steps {
        padding: 12px 8px !important;
    }

    .co-step {
        font-size: 9px !important;
        gap: 4px !important;
    }

    .co-step span {
        max-width: 60px !important;
    }

    .co-step-circle {
        width: 30px !important;
        height: 30px !important;
        font-size: 12px !important;
    }

    .co-step-line {
        margin: 0 3px !important;
        margin-bottom: 20px !important;
        min-width: 10px !important;
        height: 2px !important;
    }

    .co-footer { 
        padding: 12px 12px !important; 
        gap: 8px !important; 
    }

    .co-cancel, .co-submit, .checkout-btn {
        font-size: 13px !important;
        min-height: 46px !important;
        padding: 11px 14px !important;
        border-radius: 8px !important;
    }
}

@media (max-height: 500px) {
    .co-modal { max-height: calc(var(--vh, 1dvh) * 98) !important; }
    .co-steps  { 
        padding: 10px 8px !important; 
    }

    .co-step {
        font-size: 9px !important;
        gap: 3px !important;
    }

    .co-step-circle {
        width: 28px !important;
        height: 28px !important;
        font-size: 11px !important;
    }

    .co-step-line {
        margin-bottom: 18px !important;
        height: 2px !important;
    }

    .co-footer { 
        padding: 10px 12px !important; 
    }

    .co-cancel, .co-submit { 
        min-height: 44px !important; 
        font-size: 13px !important; 
        padding: 10px 12px !important;
    }
}

/* Ensure SweetAlert stays above checkout modal */
.swal2-container {
    z-index: 99999 !important;
}


.co-date-display {
    margin-top: 6px;
    font-size: 12px;
    color: var(--muted);
    line-height: 1.4;
    min-height: 18px;
}

.co-date-display.has-value {
    color: var(--primary-dark);
    font-weight: 600;
}


.co-date-input {
    cursor: pointer;
    background: #fff;
}

.co-date-input::placeholder {
    color: #9ca3af;
}

.flatpickr-calendar {
    border-radius: 16px !important;
    border: 1px solid var(--border) !important;
    box-shadow: 0 16px 40px rgba(0, 0, 0, .12) !important;
    font-family: var(--font-body) !important;
}

.flatpickr-months .flatpickr-month,
.flatpickr-current-month .flatpickr-monthDropdown-months,
.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
}

.flatpickr-day.today {
    border-color: var(--primary) !important;
}

.flatpickr-weekday {
    color: var(--muted) !important;
    font-weight: 700 !important;
}

.flatpickr-day:hover {
    background: var(--primary-light) !important;
    border-color: var(--primary-light) !important;
}









/* v13: stable Buddhist Era year dropdown */
.flatpickr-current-month {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
}

.flatpickr-current-month .flatpickr-monthDropdown-months {
    font-weight: 700 !important;
    color: var(--navy) !important;
}

.flatpickr-current-month .numInputWrapper,
.flatpickr-current-month input.cur-year {
    display: none !important;
}

.flatpickr-current-month .be-year-select {
    min-width: 86px;
    border: 0;
    background: transparent;
    color: var(--navy);
    font-weight: 700;
    font-size: 1.1rem;
    font-family: inherit;
    outline: none;
    cursor: pointer;
    text-align: center;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding: 0 18px 0 6px;
    line-height: 1.2;
}

.flatpickr-current-month .be-year-select option {
    color: #111827;
}

/* v15 polished BE dropdown to match green UI */
.flatpickr-calendar {
    border-radius: 18px !important;
    overflow: hidden !important;
    border: 1px solid var(--border) !important;
    box-shadow: 0 16px 40px rgba(16, 24, 40, 0.12) !important;
}

.flatpickr-months {
    background: linear-gradient(135deg, var(--primary), var(--accent)) !important;
    padding: 8px 10px !important;
}

.flatpickr-months .flatpickr-prev-month,
.flatpickr-months .flatpickr-next-month {
    color: #ffffff !important;
    fill: #ffffff !important;
    padding-top: 8px !important;
    opacity: 0.95 !important;
}

.flatpickr-months .flatpickr-prev-month:hover,
.flatpickr-months .flatpickr-next-month:hover {
    color: #ffffff !important;
    opacity: 1 !important;
}

.flatpickr-current-month.be-header-ready {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    width: auto !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    padding-top: 4px !important;
}

.flatpickr-current-month .flatpickr-monthDropdown-months {
    background: transparent !important;
    color: #ffffff !important;
    border: 0 !important;
    font-weight: 800 !important;
    font-size: 1.05rem !important;
    padding: 0 2px !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    line-height: 1.2 !important;
}

.flatpickr-current-month .be-year-select {
    min-width: 88px;
    height: 30px;
    border: 1px solid rgba(255,255,255,.28);
    border-radius: 999px;
    background-color: rgba(255,255,255,.16);
    color: #ffffff;
    font-weight: 800;
    font-size: 0.95rem;
    font-family: inherit;
    outline: none;
    cursor: pointer;
    text-align: center;
    text-align-last: center;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding: 0 26px 0 12px;
    line-height: 28px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
    background-image:
        linear-gradient(45deg, transparent 50%, #ffffff 50%),
        linear-gradient(135deg, #ffffff 50%, transparent 50%);
    background-position:
        calc(100% - 15px) 12px,
        calc(100% - 10px) 12px;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
    transition: background-color .18s ease, border-color .18s ease, transform .18s ease;
}

.flatpickr-current-month .be-year-select:hover {
    background-color: rgba(255,255,255,.24);
}

.flatpickr-current-month .be-year-select:focus {
    border-color: rgba(255,255,255,.55);
    background-color: rgba(255,255,255,.22);
}

.flatpickr-current-month .be-year-select option {
    color: #111827;
    background: #ffffff;
}

.flatpickr-weekdays {
    background: #ffffff !important;
}

.flatpickr-weekday {
    color: var(--muted) !important;
    font-weight: 700 !important;
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    box-shadow: 0 6px 14px rgba(29,185,104,.22);
}

.flatpickr-day.today {
    border-color: var(--primary) !important;
}


.co-service-mode {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.co-service-card {
    display: block;
    cursor: pointer;
}

.co-service-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.co-service-card-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 1.5px solid var(--border);
    border-radius: 14px;
    background: #fff;
    transition: all .2s ease;
    min-height: 74px;
}

.co-service-card:hover .co-service-card-inner {
    border-color: var(--primary);
    box-shadow: 0 6px 16px rgba(29,185,104,.10);
    transform: translateY(-1px);
}

.co-service-card input:checked + .co-service-card-inner {
    border-color: var(--primary);
    background: linear-gradient(135deg, rgba(29,185,104,.08), rgba(15,217,128,.04));
    box-shadow: 0 8px 18px rgba(29,185,104,.12);
}

.co-service-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-light);
    color: var(--primary-dark);
    font-size: 18px;
    flex-shrink: 0;
}

.co-service-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.co-service-text strong {
    color: var(--navy);
    font-size: 14px;
}

.co-service-text small {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.4;
}

@media (max-width: 640px) {
    .co-service-mode {
        grid-template-columns: 1fr;
    }
}
