/* Abair Pharmacy — public storefront stylesheet. Plain CSS, no frameworks.
   Kept entirely separate from admin.css so the two surfaces never collide. */

:root {
    --shop-brand: #0f766e;
    --shop-brand-dark: #0b5750;
    --shop-brand-light: #ccfbf1;
    --shop-accent: #f59e0b;
    --shop-ink: #1f2937;
    --shop-muted: #6b7280;
    --shop-bg: #f7f9fa;
    --shop-card: #ffffff;
    --shop-border: #e5e7eb;
    --shop-danger: #dc2626;
    --shop-success: #16a34a;
    --shop-radius: 12px;
    --shop-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: "Plus Jakarta Sans", "Segoe UI", Roboto, Arial, sans-serif;
    background: var(--shop-bg);
    color: var(--shop-ink);
    line-height: 1.5;
}

.shop-main h1 { font-size: 26px; font-weight: 800; margin: 4px 0 18px; letter-spacing: -.01em; }
.shop-main h2 { font-size: 19px; font-weight: 700; }
.shop-main h3 { font-weight: 700; }

a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: 2px solid var(--shop-brand);
    outline-offset: 2px;
}

a { color: var(--shop-brand-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Header ---------- */
.shop-header {
    background: var(--shop-card);
    border-bottom: 1px solid var(--shop-border);
    position: sticky;
    top: 0;
    z-index: 10;
}
.shop-header__inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
    position: relative;
}
.shop-logo {
    font-size: 20px;
    font-weight: 700;
    color: var(--shop-brand-dark);
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}
.shop-logo:hover { text-decoration: none; }
.shop-logo__mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: var(--shop-brand);
    color: #fff;
    font-weight: 800;
}
.shop-search-form {
    flex: 1 1 320px;
    display: flex;
    max-width: 520px;
}
.shop-search-form input[type="search"] {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--shop-border);
    border-right: none;
    border-radius: 8px 0 0 8px;
    font-size: 14px;
}
.shop-search-form button {
    padding: 0 18px;
    border: none;
    border-radius: 0 8px 8px 0;
    background: var(--shop-brand);
    color: #fff;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
}
.shop-search-form button:hover { background: var(--shop-brand-dark); }
.shop-nav-toggle {
    display: none;
    margin-left: auto;
    background: none;
    border: 1px solid var(--shop-border);
    border-radius: 8px;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    color: var(--shop-ink);
    cursor: pointer;
    flex-shrink: 0;
}
.shop-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-left: auto;
    font-size: 14px;
    font-weight: 600;
}
.shop-nav__cta {
    background: var(--shop-brand);
    color: #fff;
    padding: 9px 16px;
    border-radius: 8px;
}
.shop-nav__cta:hover { background: var(--shop-brand-dark); text-decoration: none; }
.shop-nav__staff {
    color: var(--shop-muted);
    font-weight: 500;
    font-size: 13px;
}

/* ---------- Hero ---------- */
.shop-hero {
    background: linear-gradient(120deg, var(--shop-brand-dark), var(--shop-brand) 70%);
    color: #fff;
    padding: 56px 20px;
}
.shop-hero__inner {
    max-width: 1180px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    flex-wrap: wrap;
}
.shop-hero h1 {
    font-size: 34px;
    margin: 0 0 12px;
    max-width: 560px;
}
.shop-hero p {
    max-width: 520px;
    color: var(--shop-brand-light);
    margin: 0 0 20px;
    font-size: 16px;
}
.shop-hero__actions { display: flex; gap: 12px; flex-wrap: wrap; }
.btn-hero {
    display: inline-block;
    padding: 12px 22px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 15px;
}
.btn-hero--primary { background: var(--shop-accent); color: #1f2937; }
.btn-hero--primary:hover { background: #d97706; text-decoration: none; }
.btn-hero--ghost { background: rgba(255,255,255,0.15); color: #fff; border: 1px solid rgba(255,255,255,0.5); }
.btn-hero--ghost:hover { background: rgba(255,255,255,0.25); text-decoration: none; }
.shop-hero__badge {
    background: rgba(255,255,255,0.12);
    border-radius: var(--shop-radius);
    padding: 22px 26px;
    min-width: 220px;
    text-align: center;
    backdrop-filter: blur(2px);
}
.shop-hero__badge strong { display: block; font-size: 28px; }

/* ---------- Layout shell ---------- */
.shop-main { max-width: 1180px; margin: 0 auto; padding: 32px 20px 64px; }
.shop-section-title {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin: 8px 0 20px;
    flex-wrap: wrap;
    gap: 10px;
}
.shop-section-title h2 { margin: 0; font-size: 22px; }

/* ---------- Category pills ---------- */
.shop-categories { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; }
.shop-pill {
    padding: 7px 16px;
    border-radius: 999px;
    background: var(--shop-card);
    border: 1px solid var(--shop-border);
    font-size: 13px;
    font-weight: 600;
    color: var(--shop-ink);
}
.shop-pill:hover { border-color: var(--shop-brand); text-decoration: none; }
.shop-pill.is-active { background: var(--shop-brand); border-color: var(--shop-brand); color: #fff; }

/* ---------- Product grid ---------- */
.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}
.shop-card {
    background: var(--shop-card);
    border: 1px solid var(--shop-border);
    border-radius: var(--shop-radius);
    box-shadow: var(--shop-shadow);
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: transform .12s ease, box-shadow .12s ease;
}
.shop-card:hover { transform: translateY(-3px); box-shadow: 0 8px 22px rgba(15,23,42,0.10); }
@media (prefers-reduced-motion: no-preference) {
    .shop-card { animation: shop-fade-in .4s ease both; }
    .shop-card:nth-child(2) { animation-delay: .03s; }
    .shop-card:nth-child(3) { animation-delay: .06s; }
    .shop-card:nth-child(4) { animation-delay: .09s; }
    .shop-card:nth-child(5) { animation-delay: .12s; }
    .shop-card:nth-child(n+6) { animation-delay: .15s; }
}
@keyframes shop-fade-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
.shop-card__thumb {
    height: 96px;
    border-radius: 8px;
    background: var(--shop-brand-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    color: var(--shop-brand-dark);
    font-weight: 800;
}
.shop-card__category { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--shop-muted); font-weight: 700; }
.shop-card__name { font-size: 16px; font-weight: 700; color: var(--shop-ink); margin: 0; }
.shop-card__name a { color: inherit; }
.shop-card__name a:hover { color: var(--shop-brand-dark); }
.shop-card__price { font-size: 18px; font-weight: 800; color: var(--shop-brand-dark); }
.shop-card__price small { font-size: 12px; color: var(--shop-muted); font-weight: 500; }
.shop-card__footer { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; }

/* ---------- Stock badges ---------- */
.stock-badge { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; display: inline-block; }
.stock-badge--in { background: #dcfce7; color: #166534; }
.stock-badge--low { background: #fef3c7; color: #92400e; }
.stock-badge--out { background: #fee2e2; color: #991b1b; }

/* ---------- Buttons ---------- */
.btn-shop {
    display: inline-block;
    background: var(--shop-brand);
    color: #fff;
    border: none;
    padding: 9px 16px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    text-align: center;
}
.btn-shop:hover { background: var(--shop-brand-dark); text-decoration: none; color: #fff; }
.btn-shop--outline { background: #fff; color: var(--shop-brand-dark); border: 1px solid var(--shop-brand); }
.btn-shop--outline:hover { background: var(--shop-brand-light); color: var(--shop-brand-dark); }
.btn-shop--danger { background: #fff; color: var(--shop-danger); border: 1px solid #fecaca; }
.btn-shop--danger:hover { background: #fee2e2; color: var(--shop-danger); }
.btn-shop--block { display: block; width: 100%; text-align: center; }
.btn-shop[disabled] { background: var(--shop-border); color: var(--shop-muted); cursor: not-allowed; }

/* ---------- Split-screen auth pages (sign in / register) ---------- */
.authsplit { display: grid; grid-template-columns: 1fr 1fr; min-height: 100vh; }
.authsplit__art {
    background: linear-gradient(150deg, var(--shop-brand-dark), var(--shop-brand) 80%);
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 40px;
    position: relative;
    overflow: hidden;
}
.authsplit__brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    font-size: 19px;
    font-weight: 700;
}
.authsplit__brand:hover { text-decoration: none; color: #fff; }
.authsplit__illustration {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
}
.authsplit__illustration svg { width: min(360px, 80%); height: auto; }
.authsplit__copy { max-width: 420px; }
.authsplit__copy h2 { font-size: 26px; margin: 0 0 8px; }
.authsplit__copy p { color: var(--shop-brand-light); margin: 0; font-size: 15px; }

.authsplit__panel { display: flex; align-items: center; justify-content: center; padding: 40px 24px; overflow-y: auto; }
.authsplit__panel-inner { width: 100%; max-width: 380px; }
.authsplit__panel-inner h1 { margin: 0 0 4px; font-size: 26px; }
.authsplit__panel-inner > p:first-of-type { color: var(--shop-muted); margin: 0 0 26px; }

@media (max-width: 860px) {
    .authsplit { grid-template-columns: 1fr; }
    .authsplit__art { padding: 24px 20px 32px; min-height: 0; }
    .authsplit__illustration { display: none; }
    .authsplit__copy h2 { font-size: 20px; }
    .authsplit__copy p { font-size: 13px; }
    .authsplit__panel { padding: 32px 20px 48px; }
}

/* ---------- Cards / panels ---------- */
.shop-panel {
    background: var(--shop-card);
    border: 1px solid var(--shop-border);
    border-radius: var(--shop-radius);
    box-shadow: var(--shop-shadow);
    padding: 24px;
}
.shop-panel + .shop-panel { margin-top: 20px; }

/* ---------- Forms ---------- */
.shop-form-group { margin-bottom: 16px; }
.shop-form-group label { display: block; font-weight: 700; font-size: 13px; margin-bottom: 6px; color: var(--shop-ink); }
.shop-form-group input[type="text"],
.shop-form-group input[type="tel"],
.shop-form-group input[type="password"],
.shop-form-group input[type="number"],
.shop-form-group select,
.shop-form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--shop-border);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
}
.shop-form-group small.error { color: var(--shop-danger); display: block; margin-top: 4px; }
.shop-form-row { display: flex; gap: 16px; flex-wrap: wrap; }
.shop-form-row .shop-form-group { flex: 1 1 200px; }

/* ---------- Alerts ---------- */
.shop-alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 18px; font-size: 14px; font-weight: 600; }
.shop-alert--success { background: #dcfce7; color: #166534; }
.shop-alert--error { background: #fee2e2; color: #991b1b; }

/* ---------- Product detail ---------- */
.shop-detail { display: grid; grid-template-columns: 320px 1fr; gap: 32px; }
.shop-detail__thumb {
    height: 260px;
    border-radius: var(--shop-radius);
    background: var(--shop-brand-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 72px;
    color: var(--shop-brand-dark);
    font-weight: 800;
}
.shop-detail__price { font-size: 30px; font-weight: 800; color: var(--shop-brand-dark); margin: 12px 0; }
.shop-detail__meta { color: var(--shop-muted); font-size: 14px; margin-bottom: 4px; }

/* ---------- Tables (cart / orders) ---------- */
.shop-table { width: 100%; border-collapse: collapse; }
.shop-table th, .shop-table td { padding: 12px 10px; border-bottom: 1px solid var(--shop-border); text-align: left; font-size: 14px; }
.shop-table th { color: var(--shop-muted); font-size: 12px; text-transform: uppercase; letter-spacing: .03em; }
.shop-table .qty-input { width: 70px; padding: 6px 8px; border: 1px solid var(--shop-border); border-radius: 6px; }
.shop-table tfoot td { font-weight: 800; font-size: 16px; border-bottom: none; }

.shop-order-status {
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    text-transform: capitalize;
    display: inline-block;
}
.shop-order-status--pending { background: #fef3c7; color: #92400e; }
.shop-order-status--processing { background: #dbeafe; color: #1e40af; }
.shop-order-status--shipped { background: #ede9fe; color: #5b21b6; }
.shop-order-status--delivered { background: #dcfce7; color: #166534; }
.shop-order-status--cancelled { background: #fee2e2; color: #991b1b; }

/* ---------- Footer ---------- */
.shop-footer { background: var(--shop-ink); color: #d1d5db; margin-top: 48px; }
.shop-footer__inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 40px 20px 16px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 24px;
}
.shop-footer__inner strong { color: #fff; display: block; margin-bottom: 10px; }
.shop-footer__inner a { display: block; color: #9ca3af; margin-bottom: 6px; }
.shop-footer__inner a:hover { color: #fff; }
.shop-footer__copy { text-align: center; padding: 16px 20px; font-size: 12px; color: #6b7280; border-top: 1px solid #374151; margin: 0; }

/* ---------- Category thumbnails (product visual, replaces a plain letter) ---------- */
.shop-thumb {
    height: 96px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.shop-thumb svg { width: 40%; height: 40%; }
.shop-thumb--lg { height: 260px; border-radius: var(--shop-radius); }
.shop-thumb--lg svg { width: 34%; height: 34%; }
.tone-blue { background: #dbeafe; color: #1d4ed8; }
.tone-amber { background: #fef3c7; color: #b45309; }
.tone-violet { background: #ede9fe; color: #6d28d9; }
.tone-rose { background: #ffe4e6; color: #be123c; }
.tone-teal { background: var(--shop-brand-light); color: var(--shop-brand-dark); }

/* ---------- Trust bar ---------- */
.shop-trustbar {
    max-width: 1180px;
    margin: -22px auto 28px;
    background: var(--shop-card);
    border: 1px solid var(--shop-border);
    border-radius: var(--shop-radius);
    box-shadow: var(--shop-shadow);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    position: relative;
    z-index: 1;
}
.shop-trustbar__item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 18px;
    font-size: 13px;
    font-weight: 600;
    color: var(--shop-ink);
    border-right: 1px solid var(--shop-border);
}
.shop-trustbar__item:last-child { border-right: none; }
.shop-trustbar__item svg { width: 22px; height: 22px; color: var(--shop-brand); flex-shrink: 0; }

/* ---------- Empty states ---------- */
.shop-empty { text-align: center; padding: 48px 20px; }
.shop-empty__icon {
    width: 64px; height: 64px; margin: 0 auto 16px;
    border-radius: 50%; background: var(--shop-brand-light); color: var(--shop-brand-dark);
    display: flex; align-items: center; justify-content: center;
}
.shop-empty__icon svg { width: 28px; height: 28px; }
.shop-empty h3 { margin: 0 0 6px; }
.shop-empty p { color: var(--shop-muted); margin: 0 0 20px; }

/* ---------- Checkout step indicator ---------- */
.shop-steps { display: flex; align-items: center; gap: 10px; margin: -8px 0 24px; flex-wrap: wrap; }
.shop-steps__item { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--shop-muted); }
.shop-steps__dot {
    width: 22px; height: 22px; border-radius: 50%; background: var(--shop-border); color: #fff;
    display: flex; align-items: center; justify-content: center; font-size: 11px;
}
.shop-steps__item.is-active { color: var(--shop-ink); }
.shop-steps__item.is-active .shop-steps__dot { background: var(--shop-brand); }
.shop-steps__item.is-done .shop-steps__dot { background: var(--shop-success); }
.shop-steps__item:not(:last-child)::after { content: ''; width: 24px; height: 1px; background: var(--shop-border); margin-left: 2px; }

/* ---------- Breadcrumb ---------- */
.shop-breadcrumb { display: inline-block; margin-bottom: 14px; font-size: 13px; font-weight: 600; color: var(--shop-muted); }
.shop-breadcrumb:hover { color: var(--shop-brand-dark); }

@media (max-width: 900px) {
    .shop-trustbar { grid-template-columns: repeat(2, 1fr); }
    .shop-trustbar__item:nth-child(2) { border-right: none; }
}

@media (max-width: 720px) {
    .shop-detail { grid-template-columns: 1fr; }
    .shop-hero__inner { flex-direction: column; align-items: flex-start; }
    .shop-header__inner { gap: 12px; }
    .shop-nav-toggle { display: flex; }
    .shop-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--shop-card);
        border-bottom: 1px solid var(--shop-border);
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        padding: 10px 20px 16px;
        margin-left: 0;
    }
    .shop-nav.is-open { display: flex; }
    .shop-nav a { padding: 10px 4px; border-bottom: 1px solid var(--shop-border); }
    .shop-nav a:last-child { border-bottom: none; }
    .shop-trustbar { grid-template-columns: 1fr 1fr; margin-top: -14px; }
    .shop-trustbar__item { border-right: none; border-bottom: 1px solid var(--shop-border); }
}
