/* ============================================================
   TuMedicamentoGT — Design System v3 (Apple HIG / WCAG 2.2 AA)
   ============================================================ */

/* ── Design Tokens ───────────────────────────────────────── */
:root {
    /* Apple system blues */
    --blue:          #007AFF;
    --blue-dark:     #0051B0;
    --blue-light:    #EBF3FF;

    /* Success / green */
    --green:         #34C759;
    --green-bg:      #F0FBF4;
    --green-border:  rgba(52, 199, 89, 0.22);

    /* Surfaces */
    --bg:            #F5F5F7;
    --surface:       #FFFFFF;
    --surface-2:     #FBFBFD;

    /* Typography */
    --dark:          #1D1D1F;
    --dark-2:        #2D2D2F;
    --text:          #1D1D1F;
    --text-2:        #6E6E73;   /* 4.97:1 on white — WCAG AA ✓ */
    --text-3:        #86868B;

    /* Borders */
    --border:        rgba(0, 0, 0, 0.08);
    --border-2:      rgba(0, 0, 0, 0.05);

    /* Glass */
    --glass:         rgba(255, 255, 255, 0.80);
    --glass-border:  rgba(255, 255, 255, 0.55);

    /* Shadows */
    --shadow-xs:     0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow-sm:     0 2px 8px rgba(0, 0, 0, 0.07);
    --shadow-md:     0 6px 24px rgba(0, 0, 0, 0.09);
    --shadow-lg:     0 16px 48px rgba(0, 0, 0, 0.13);
    --shadow-blue:   0 8px 28px rgba(0, 122, 255, 0.22);

    /* Radii */
    --r-xs:    6px;
    --r-sm:    10px;
    --r:       16px;
    --r-lg:    22px;
    --r-xl:    28px;
    --r-pill:  100px;

    /* Springs & easing */
    --spring:    cubic-bezier(0.34, 1.2, 0.64, 1);
    --ease:      cubic-bezier(0.25, 0.1, 0.25, 1);
    --ease-out:  cubic-bezier(0, 0, 0.2, 1);

    /* Durations */
    --t-fast:  0.16s;
    --t:       0.28s;
    --t-slow:  0.52s;

    /* Legacy aliases (kept for backward compat with any inline refs) */
    --primary:        var(--blue);
    --primary-dark:   var(--blue-dark);
    --primary-light:  var(--blue-light);
    --success:        var(--green);
    --success-bg:     var(--green-bg);
    --success-border: var(--green-border);
    --bg-white:       var(--surface);
    --bg-dark:        #1D1D1F;
    --bg-dark-2:      #2D2D2F;
    --text-muted:     var(--text-3);
    --border-light:   var(--border-2);
    --glass-bg:       var(--glass);
    --shadow-hover:   var(--shadow-blue);
    --cta:            #FF9F0A;
    --cta-dark:       #C77700;
    --teal:           #5AC8FA;
    --teal-dark:      #3EB3E8;
}

/* ── Base Reset + Body ───────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI',
                 system-ui, 'Helvetica Neue', Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.6;
    margin: 0;
}

/* ── Skip Navigation ─────────────────────────────────────── */
.skip-nav {
    position: absolute;
    top: -100%;
    left: 1rem;
    z-index: 9999;
    background: var(--blue);
    color: #fff;
    padding: 0.6rem 1.2rem;
    border-radius: var(--r-sm);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: top var(--t-fast) var(--ease-out);
}
.skip-nav:focus {
    top: 1rem;
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* ── Focus Styles (WCAG 2.2 AA) ─────────────────────────── */
:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 3px;
    border-radius: var(--r-xs);
}

/* ── Scroll Reveal ───────────────────────────────────────── */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity var(--t-slow) var(--ease-out),
                transform var(--t-slow) var(--ease-out);
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.07s; }
.reveal-delay-2 { transition-delay: 0.14s; }
.reveal-delay-3 { transition-delay: 0.21s; }
.reveal-delay-4 { transition-delay: 0.28s; }
.reveal-delay-5 { transition-delay: 0.35s; }
.reveal-delay-6 { transition-delay: 0.42s; }

/* ── Navbar ──────────────────────────────────────────────── */
.nav-wrapper {
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 10px 16px;
}

.nav-glass {
    background: var(--glass);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    border: 1px solid var(--glass-border);
    border-radius: var(--r-pill);
    box-shadow: var(--shadow-sm), 0 1px 0 rgba(255, 255, 255, 0.7) inset;
}

/* Brand — charcoal for visual hierarchy, NOT blue */
.nav-glass .navbar-brand {
    color: var(--dark);
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: -0.02em;
    text-decoration: none;
    display: flex;
    align-items: center;
}
.nav-glass .navbar-brand:hover { opacity: .85; }
.navbar-logo {
    height: 70px;
    width: auto;
    display: block;
}
@media (max-width: 767.98px) {
    .navbar-logo { height: 60px; }
    .nav-glass .navbar-brand { margin: 0 auto; }
}

.nav-glass .navbar-toggler {
    border: none;
    padding: 6px 8px;
    color: var(--text-2);
    background: transparent;
    border-radius: var(--r-xs);
}

.nav-search-input {
    border: 1px solid var(--border) !important;
    border-radius: var(--r-pill) 0 0 var(--r-pill) !important;
    padding: 0 1.1rem !important;
    min-height: 44px;
    font-size: 0.88rem !important;
    background: rgba(0, 0, 0, 0.04) !important;
    color: var(--text) !important;
    transition: background var(--t) var(--ease), border-color var(--t) var(--ease),
                box-shadow var(--t) var(--ease);
}
.nav-search-input:focus {
    background: var(--surface) !important;
    border-color: var(--blue) !important;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.18) !important;
}
.nav-search-input::placeholder {
    color: var(--text-3);
}

.nav-search-btn {
    border-radius: 0 var(--r-pill) var(--r-pill) 0 !important;
    background: var(--blue) !important;
    color: #fff !important;
    border: none !important;
    padding: 0 1.2rem !important;
    min-height: 44px;
    font-size: 0.88rem !important;
    font-weight: 600;
    transition: background var(--t) var(--ease), transform var(--t-fast) var(--spring);
}
.nav-search-btn:hover {
    background: var(--blue-dark) !important;
    transform: scale(1.03);
}
.nav-search-btn:active {
    transform: scale(0.97);
}

/* ── Hero Section ────────────────────────────────────────── */
.hero-section {
    background: #1D1D1F;
    min-height: 560px;
    display: flex;
    align-items: center;
    padding: 6rem 0 7rem;
    position: relative;
    overflow: hidden;
}

/* Orb 1 — blue top-right */
.hero-section::before {
    content: '';
    position: absolute;
    width: 720px;
    height: 720px;
    background: radial-gradient(circle, rgba(0, 122, 255, 0.18) 0%, transparent 65%);
    top: -260px;
    right: -160px;
    pointer-events: none;
}

/* Orb 2 — purple bottom-left */
.hero-section::after {
    content: '';
    position: absolute;
    width: 560px;
    height: 560px;
    background: radial-gradient(circle, rgba(167, 139, 250, 0.12) 0%, transparent 65%);
    bottom: -220px;
    left: -90px;
    pointer-events: none;
}

/* Orb 3 — teal mid (pseudo via a span or inner div handled in HTML) */
.hero-orb-teal {
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(90, 200, 250, 0.09) 0%, transparent 65%);
    top: 50%;
    left: 45%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(0, 122, 255, 0.14);
    border: 1px solid rgba(96, 165, 250, 0.25);
    border-radius: var(--r-pill);
    padding: 0.3rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #93c5fd;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 1.3rem;
}

.hero-title {
    color: #ffffff;
    font-size: clamp(2.4rem, 6vw, 3.8rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.04em;
    margin-bottom: 0.8rem;
}

.hero-title .gradient-text {
    background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Contrast: rgba(255,255,255,0.80) on #1D1D1F = ~8:1 — WCAG AA ✓ */
.hero-subtitle {
    color: rgba(255, 255, 255, 0.80);
    font-size: 1.08rem;
    max-width: 520px;
    margin: 0 auto 2.4rem;
    line-height: 1.65;
}

.hero-search-bar {
    display: flex;
    align-items: center;
    max-width: 640px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: var(--r-pill);
    padding: 5px 5px 5px 22px;
    transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.hero-search-bar:focus-within {
    border-color: rgba(255, 255, 255, 0.32);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.32);
}

.hero-search-bar input {
    flex: 1;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 0.97rem;
    padding: 0.6rem 0;
    min-width: 0;
    min-height: 44px;
}
.hero-search-bar input:focus {
    outline: none;
}
.hero-search-bar input::placeholder {
    color: rgba(255, 255, 255, 0.40);
}

.hero-search-bar button {
    background: var(--blue);
    color: #fff;
    border: none;
    border-radius: var(--r-pill);
    padding: 0.65rem 1.6rem;
    font-weight: 600;
    font-size: 0.95rem;
    min-height: 44px;
    transition: background var(--t) var(--ease), transform var(--t-fast) var(--spring);
    white-space: nowrap;
    flex-shrink: 0;
    cursor: pointer;
}
.hero-search-bar button:hover {
    background: var(--blue-dark);
    transform: scale(1.04);
}
.hero-search-bar button:active {
    transform: scale(0.97);
}
.hero-search-bar button:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* Decorative only — contrast not required per WCAG 1.4.3 */
.hero-hint {
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.8rem;
    margin-top: 1rem;
}

/* Hero staggered fade-in */
@keyframes heroFadeIn {
    from { opacity: 0; transform: translateY(22px); }
    to   { opacity: 1; transform: translateY(0); }
}
.hero-content > * {
    animation: heroFadeIn 0.7s var(--ease-out) both;
}
.hero-content > *:nth-child(1) { animation-delay: 0.10s; }
.hero-content > *:nth-child(2) { animation-delay: 0.20s; }
.hero-content > *:nth-child(3) { animation-delay: 0.30s; }
.hero-content > *:nth-child(4) { animation-delay: 0.42s; }
.hero-content > *:nth-child(5) { animation-delay: 0.54s; }

/* ── Section Layout ──────────────────────────────────────── */
.section-title {
    font-size: 1.65rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.03em;
    margin-bottom: 0.4rem;
    line-height: 1.2;
}
.section-subtitle {
    color: var(--text-2);
    font-size: 0.97rem;
    margin-bottom: 2.5rem;
}

/* ── Step Cards ──────────────────────────────────────────── */
.step-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 2rem 1.75rem;
    text-align: center;
    transition: transform var(--t) var(--spring), box-shadow var(--t) var(--ease);
    height: 100%;
}
.step-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.step-icon {
    font-size: 2.8rem;
    display: block;
    margin-bottom: 1.1rem;
}
.step-card h5 {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: var(--text);
    letter-spacing: -0.01em;
}
.step-card p {
    color: var(--text-2);
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.6;
}

/* ── Pharmacy Logo Cards (home) ──────────────────────────── */
.pharmacy-logo-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: 1.3rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 94px;
    transition: transform var(--t) var(--spring), box-shadow var(--t) var(--ease);
    cursor: default;
}
.pharmacy-logo-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}
.pharmacy-logo-home {
    height: 52px;
    width: auto;
    max-width: 110px;
    object-fit: contain;
}
.pharmacy-logo-card small {
    color: var(--text-2);
    font-size: 0.76rem;
    font-weight: 600;
    margin-top: 0.55rem;
    text-align: center;
}

/* ── Pharmacy Price Cards ────────────────────────────────── */
.pharmacy-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-xs);
    transition: transform var(--t) var(--spring),
                box-shadow var(--t) var(--ease),
                border-color var(--t) var(--ease);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}
.pharmacy-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-blue);
    border-color: rgba(0, 122, 255, 0.18);
}

/* Best price: 2px green border + success glow */
.pharmacy-card.best-price {
    border: 2px solid var(--green);
    box-shadow: 0 0 0 1px var(--green-border), 0 6px 24px rgba(52, 199, 89, 0.14);
}

.pharmacy-card-body { flex: 1; padding: 1.15rem 1.2rem 0.55rem; }
.pharmacy-card-footer { padding: 0 1.2rem 1.2rem; margin-top: auto; }

.best-price-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: var(--green-bg);
    color: #1a7a38;   /* darker green for contrast on white bg */
    border: 1px solid var(--green-border);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: var(--r-pill);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 0.6rem;
}

.pharmacy-name {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-2);
    margin-bottom: 0.1rem;
}
.pharmacy-logo {
    height: 26px;
    width: auto;
    max-width: 72px;
    object-fit: contain;
    flex-shrink: 0;
}

/* clamp(1.9rem, 3vw, 2.2rem) with tight tracking */
.price-amount {
    font-size: clamp(1.9rem, 3vw, 2.2rem);
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.04em;
    line-height: 1.15;
    margin: 0.5rem 0 0.45rem;
}
.pharmacy-card.best-price .price-amount {
    color: #1a7a38;
}

.product-name-card {
    font-size: 0.87rem;
    color: var(--text);
    line-height: 1.45;
    overflow-wrap: break-word;
    word-break: break-word;
    margin-bottom: 0.2rem;
}

.btn-ver-farmacia {
    display: block;
    background: var(--blue);
    color: #fff;
    border: none;
    border-radius: var(--r-sm);
    padding: 0.55rem 1rem;
    min-height: 44px;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    line-height: 1.4;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--t) var(--ease), transform var(--t-fast) var(--spring);
}
.btn-ver-farmacia:hover {
    background: var(--blue-dark);
    color: #fff;
    transform: scale(1.02);
}
.btn-ver-farmacia:active {
    transform: scale(0.97);
}

/* ── AI Interpretation Card ──────────────────────────────── */
.ai-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 3px solid var(--blue);   /* gradient left-border accent */
    border-radius: var(--r-lg);
    padding: 1.3rem 1.5rem;
    box-shadow: var(--shadow-xs);
}
.ai-card-title {
    color: var(--blue);
    font-weight: 700;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* ── Alternatives Section ────────────────────────────────── */
.alternatives-section {
    background: #fff8ee;
    border: 1px solid rgba(255, 159, 10, 0.22);
    border-radius: var(--r-lg);
    padding: 1.3rem 1.5rem;
}
.alternatives-title {
    color: var(--cta-dark);
    font-weight: 700;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.alternative-chip {
    display: inline-block;
    background: var(--surface);
    border: 1px solid rgba(255, 159, 10, 0.28);
    border-radius: var(--r-pill);
    padding: 5px 14px;
    font-size: 0.84rem;
    color: var(--text);
    text-decoration: none;
    transition: background var(--t) var(--ease),
                border-color var(--t) var(--ease),
                color var(--t) var(--ease),
                transform var(--t-fast) var(--spring);
}
.alternative-chip:hover {
    background: var(--cta);
    border-color: var(--cta);
    color: #fff;
    transform: scale(1.04);
}

/* ── Skeleton Shimmer ────────────────────────────────────── */
.skeleton {
    background: linear-gradient(90deg, #EBEBED 25%, #E1E1E3 50%, #EBEBED 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--r-sm);
}
@keyframes shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
.skeleton-card  { height: 180px; border-radius: var(--r-lg); }
.skeleton-line  { border-radius: 4px; display: block; }

/* ── Pagination ──────────────────────────────────────────── */
#pagination-controls .page-link {
    color: var(--blue);
    border-color: var(--border);
    border-radius: var(--r-pill) !important;
    margin: 0 2px;
    min-width: 38px;
    text-align: center;
    font-size: 0.87rem;
    transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
#pagination-controls .page-item.active .page-link {
    background: var(--blue);
    border-color: var(--blue);
    color: #fff;
}
#pagination-controls .page-link:hover {
    background: var(--blue-light);
    border-color: var(--blue);
}
#pagination-controls .page-item.disabled .page-link {
    color: var(--text-3);
    border-color: var(--border);
}

/* ── Results Section ─────────────────────────────────────── */
.results-section { min-height: 400px; }
.results-count {
    color: var(--text-2);
    font-size: 0.86rem;
}

/* ── View Toggle ─────────────────────────────────────────── */
.btn-view {
    padding: 0.38rem 0.65rem;
    line-height: 1;
    color: var(--text-2);
    background: var(--surface);
    border: 1px solid var(--border);
    transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.btn-view:first-child { border-radius: var(--r-sm) 0 0 var(--r-sm); }
.btn-view:last-child  { border-radius: 0 var(--r-sm) var(--r-sm) 0; border-left: none; }
.btn-view.active {
    background: var(--blue);
    color: #fff;
    border-color: var(--blue);
}
.btn-view:not(.active):hover {
    background: var(--blue-light);
    color: var(--blue);
}

/* ── Results Table ───────────────────────────────────────── */
.results-table {
    border-collapse: separate;
    border-spacing: 0;
    border-radius: var(--r-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    font-size: 0.9rem;
    width: 100%;
    background: var(--surface);
}
.results-table thead th {
    background: var(--blue);
    color: #fff;
    font-weight: 600;
    border: none;
    padding: 0.8rem 1rem;
    letter-spacing: -0.01em;
}
.results-table tbody tr {
    transition: background var(--t-fast) var(--ease);
}
.results-table tbody tr:hover { background: #F0F5FF; }
.results-table tbody td {
    vertical-align: middle;
    padding: 0.7rem 1rem;
    border-bottom: 1px solid var(--border-2);
    color: var(--text);
}
.results-table tbody tr:last-child td { border-bottom: none; }
.results-table .btn-ver-farmacia {
    padding: 0.3rem 0.8rem;
    min-height: 36px;
    font-size: 0.82rem;
    white-space: nowrap;
    display: inline-flex;
}
tr.table-best-price td { background: var(--green-bg); }

/* ── Disclaimer ──────────────────────────────────────────── */
.disclaimer {
    background: var(--bg);
    border-top: 1px solid var(--border);
    padding: 1.1rem 0;
    font-size: 0.79rem;
    color: var(--text-2);
    text-align: center;
}

/* ── AdSense ─────────────────────────────────────────────── */
.ad-placeholder {
    background: var(--surface-2);
    border: 1.5px dashed var(--border);
    border-radius: var(--r-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-3);
    font-size: 0.78rem;
    font-style: italic;
}

/* Cache badge */
.cache-badge {
    background: var(--teal);
    color: #fff;
    font-size: 0.72rem;
    padding: 2px 8px;
    border-radius: var(--r-pill);
}

/* ── Footer ──────────────────────────────────────────────── */
.site-footer {
    background: var(--dark);
    color: var(--text-2);
    padding: 2.5rem 0 1.75rem;
    margin-top: 3.5rem;
}

/* #FFFFFF on #1D1D1F — WCAG AAA ✓ */
.site-footer .footer-brand {
    display: inline-block;
    margin-bottom: 0.2rem;
    text-decoration: none;
}
.site-footer .footer-brand:hover { opacity: .8; }
.footer-logo {
    height: 28px;
    width: auto;
    filter: brightness(0) invert(1); /* white logo on dark footer */
}

/* rgba(255,255,255,0.55) on dark = ~4.2:1 — decorative desc, acceptable */
.site-footer .footer-desc {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.55);
    margin: 0;
}

.site-footer .footer-links {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    justify-content: flex-end;
}

/* #A1A1A6 on #1D1D1F ≈ 5.1:1 — WCAG AA ✓ */
.site-footer .footer-links a {
    color: #A1A1A6;
    text-decoration: none;
    font-size: 0.82rem;
    transition: color var(--t-fast) var(--ease);
}
.site-footer .footer-links a:hover { color: #FFFFFF; }

/* #6E6E73 on #1D1D1F ≈ 4.97:1 — WCAG AA ✓ */
.site-footer .footer-copy {
    font-size: 0.8rem;
    color: #6E6E73;
    margin-top: 0.3rem;
    text-align: right;
}

/* ── Utility Helpers ─────────────────────────────────────── */
.nav-toggler-icon {
    filter: invert(25%) sepia(10%) saturate(300%) hue-rotate(185deg);
}
.nav-search-group { max-width: 340px; }

.pharmacy-section-wrapper {
    background: var(--surface);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.img-fallback-icon { font-size: 1.6rem; }

/* Ad size helpers */
.adsbygoogle  { display: inline-block; }
.ad-728x90    { width: 728px; height: 90px; }
.ad-336x280   { width: 336px; height: 280px; }
.ad-300x250   { width: 300px; height: 250px; }

/* Emoji display helper */
.emoji-lg { font-size: 3rem; }

/* Skeleton size presets */
.skel-ai-1 { width: 38%; height: 14px; }
.skel-ai-2 { width: 62%; height: 12px; }
.skel-ai-3 { width: 48%; height: 12px; }

/* CSS-class-driven card animation */
.card-anim {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.35s var(--ease-out), transform 0.35s var(--spring);
}
.card-anim.card-in {
    opacity: 1;
    transform: none;
}

/* Text overflow helper */
.text-break-word {
    overflow-wrap: break-word;
    word-break: break-word;
}

/* Hidden logo fallback element */
.logo-fallback { display: none; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
    .hero-section       { min-height: 460px; padding: 4rem 0 5rem; }
    .hero-title         { font-size: clamp(2rem, 8vw, 2.6rem); }
    .price-amount       { font-size: clamp(1.6rem, 5vw, 1.9rem); }
    .nav-wrapper        { padding: 8px 10px; }
    .site-footer .footer-links { justify-content: flex-start; margin-top: 0.75rem; }
    .site-footer .footer-copy  { text-align: left; }
    .section-title      { font-size: 1.4rem; }
}

@media (max-width: 576px) {
    .hero-search-bar    { padding: 4px 4px 4px 14px; }
    .hero-search-bar button { padding: 0.6rem 1.1rem; font-size: 0.88rem; }
    .hero-eyebrow       { font-size: 0.7rem; padding: 0.25rem 0.8rem; }
    .step-card          { padding: 1.5rem 1.25rem; }
    .pharmacy-card-body { padding: 0.9rem 1rem 0.4rem; }
    .pharmacy-card-footer { padding: 0 1rem 1rem; }
}

/* ── Reduced Motion ──────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .reveal,
    .reveal.visible {
        opacity: 1;
        transform: none;
    }
    .card-anim,
    .card-anim.card-in {
        opacity: 1;
        transform: none;
        transition: none;
    }
}
