/* ===== Grammar Index brand tokens (mirrored from GrammarIndex.Website/wwwroot/css/site.css) ===== */
:root {
    --primary: #1B5E9E;
    --primary-dark: #14486F;
    --primary-light: #2980C4;
    --bg: #F5F6FA;
    --bg-card: #FFFFFF;
    --text: #2C3E50;
    --text-muted: #6C7A89;
    --border: #E0E4EB;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.12);
    --radius: 8px;
    --radius-lg: 16px;
    --radius-pill: 50px;
    --success: #27AE60;
    --danger: #E74C3C;
    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-family);
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* FocusOnNavigate focuses the page <h1> for screen-reader/keyboard users on each
   navigation; the browser then draws a focus ring on it. Headings are never Tab
   stops (focused only programmatically via tabindex="-1"), so hiding the ring
   here is safe and does NOT affect keyboard focus on links/buttons/inputs.
   See Web-Header-Focus-Outline-Fix.md. */
h1:focus,
[tabindex="-1"]:focus { outline: none; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.content-narrow { max-width: 760px; }
.content-pad { padding-top: 48px; padding-bottom: 64px; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
.muted { color: var(--text-muted); }
.small { font-size: 13px; }

/* ===== Layout shell ===== */
.site-wrapper { display: flex; flex-direction: column; min-height: 100vh; }
.site-content { flex: 1; }

/* ===== Header ===== */
.site-header { background: var(--bg-card); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; }
.site-nav { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.site-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.site-logo:hover { text-decoration: none; }
.logo-icon { width: 38px; height: 38px; border-radius: var(--radius); object-fit: contain; }
.logo-text { font-size: 20px; font-weight: 700; color: var(--text); }
.logo-tm { font-size: 0.55em; font-weight: 500; vertical-align: super; margin-left: 1px; color: var(--text-muted); }
.nav-links { display: flex; align-items: center; gap: 8px; }
.nav-link { padding: 8px 16px; border-radius: var(--radius-pill); color: var(--text-muted); font-weight: 500; font-size: 15px; transition: all 0.2s; }
.nav-link:hover { color: var(--primary); background: var(--bg); text-decoration: none; }
.nav-basket { position: relative; }
.currency-select { display: inline-flex; border: 1px solid var(--border); border-radius: var(--radius-pill); overflow: hidden; margin-left: 6px; }
/* Language picker (DevExpress DxComboBox) — keep it compact in the nav. */
.lang-combo { width: 150px; }
.currency-opt { display: inline-block; padding: 6px 12px; font-size: 13px; font-weight: 600; color: var(--text-muted); text-decoration: none; transition: all 0.15s; }
.currency-opt:hover { background: var(--bg); color: var(--primary); text-decoration: none; }
.currency-opt.active { background: var(--primary); color: #fff; }
.currency-opt.active:hover { background: var(--primary); color: #fff; }
.basket-count { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; margin-left: 6px; background: var(--primary); color: #fff; border-radius: var(--radius-pill); font-size: 12px; font-weight: 700; }

/* ===== Footer ===== */
.site-footer { background: var(--text); color: rgba(255,255,255,0.8); padding: 40px 0; margin-top: 48px; }
.footer-bottom { text-align: center; font-size: 14px; }
.footer-bottom p { margin: 4px 0; }
.footer-bottom a { color: #fff; }
.footer-build { margin-top: 12px !important; font-size: 12px; opacity: 0.45; font-family: ui-monospace, "Cascadia Code", Consolas, monospace; }

/* ===== Homepage greeting-cards section ===== */
.card-section { padding: 8px 24px 72px; }
.section-title { font-size: 28px; font-weight: 800; color: var(--text); margin-bottom: 6px; }
.section-sub { color: var(--text-muted); margin-bottom: 28px; max-width: 640px; }

/* ===== FAQ ===== */
.faq-section { margin: 36px 0 8px; font-size: 18px; color: var(--primary); }
.faq { border-bottom: 1px solid var(--border); }
.faq summary { padding: 16px 28px 16px 0; font-weight: 600; cursor: pointer; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 14px; font-size: 20px; font-weight: 400; color: var(--text-muted); transition: transform 0.2s; }
.faq[open] summary::after { content: "\2212"; }
.faq summary:hover { color: var(--primary); }
.faq p { margin: 0 0 18px; color: var(--text-muted); line-height: 1.6; }
.faq-foot { margin-top: 36px; font-size: 13px; }

/* ===== Order tracking ===== */
.track-form { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0; }
.track-input { flex: 1 1 220px; padding: 11px 14px; border: 1px solid var(--border); border-radius: var(--radius); font-size: 15px; }
.track-error { color: #b4232a; margin-top: 12px; }
.track-status { margin: 20px 0; padding: 18px 22px; border-radius: var(--radius-lg); border: 1px solid var(--border); background: var(--bg); }
.track-status-label { font-size: 19px; font-weight: 700; }
.track-prep { border-left: 4px solid #9aa3ad; }
.track-ship { border-left: 4px solid #1B5E9E; }
.track-done { border-left: 4px solid #2f8a4e; }
.track-err  { border-left: 4px solid #b4232a; }
.track-parcel { padding: 14px 0; border-bottom: 1px solid var(--border); }
.track-items { color: var(--text-muted); line-height: 1.7; }
.track-foot { margin-top: 32px; }

/* ===== Admin pricing table ===== */
.admin-table-wrap { overflow-x: auto; margin-top: 20px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th, .admin-table td { padding: 10px 14px; text-align: left; border-bottom: 1px solid #e5e8ec; white-space: nowrap; }
.admin-table th { font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: #6b7480; }
.admin-table tbody tr:hover { background: #f7f9fb; }
.admin-price { width: 96px; padding: 6px 10px; }
.admin-thin { color: #c0392b; font-weight: 600; }
.admin-note { margin-left: 6px; color: #6b7480; cursor: help; font-size: 12px; }

/* ===== Page hero ===== */
.page-hero { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); color: #fff; padding: 64px 0; text-align: center; }
.page-hero h1 { font-size: 40px; font-weight: 800; margin-bottom: 14px; }
.page-hero p { font-size: 18px; opacity: 0.92; max-width: 640px; margin: 0 auto; }

/* ===== Buttons ===== */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 12px 28px; border-radius: var(--radius); font-size: 15px; font-weight: 600; cursor: pointer; border: 2px solid transparent; transition: all 0.2s ease; text-decoration: none; gap: 8px; }
.btn:hover { text-decoration: none; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }
.btn-outline { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-lg { padding: 16px 36px; font-size: 17px; }
.btn-block { width: 100%; }

/* ===== Catalogue grid ===== */
.shop-grid-wrap { padding: 48px 24px 72px; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 28px; }
.product-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); transition: box-shadow 0.3s, transform 0.3s; display: flex; flex-direction: column; color: var(--text); }
.product-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-3px); text-decoration: none; }
.product-art { position: relative; background: #fff; padding: 10px; display: flex; align-items: center; justify-content: center; aspect-ratio: 1 / 1; border-bottom: 1px solid var(--border); }
.product-art img { max-width: 100%; max-height: 100%; height: auto; display: block; }
.mockup { width: 100%; height: 100%; display: block; }
.mockup-photo { width: 100%; height: 100%; object-fit: contain; display: block; }
.badge-seasonal { position: absolute; top: 12px; right: 12px; background: var(--primary); color: #fff; font-size: 12px; font-weight: 600; padding: 4px 12px; border-radius: var(--radius-pill); }
.product-meta { padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.product-cat { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.6px; color: var(--primary); }
.product-meta h3 { font-size: 17px; font-weight: 700; }
.product-tagline { color: var(--text-muted); font-size: 14px; flex: 1; }
.product-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; padding-top: 12px; border-top: 1px solid var(--border); }
.product-price { font-weight: 700; }
.product-types { font-size: 12px; color: var(--text-muted); }

/* ===== Product detail ===== */
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.product-detail-art { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow); display: flex; align-items: center; justify-content: center; }
.product-detail-art img { max-width: 100%; height: auto; }
.product-detail-art .mockup { max-width: 460px; }
.product-detail-info h1 { font-size: 32px; font-weight: 800; margin: 6px 0 10px; }
.product-tagline-lg { color: var(--text-muted); font-size: 17px; margin-bottom: 28px; }
.option-block { margin-bottom: 22px; }
.option-block label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 8px; }
.option-pills { display: flex; flex-wrap: wrap; gap: 10px; }
.pill { padding: 10px 16px; border: 2px solid var(--border); background: #fff; border-radius: var(--radius); cursor: pointer; font-size: 14px; font-weight: 600; color: var(--text); transition: all 0.15s; }
.pill:hover { border-color: var(--primary-light); }
.pill-on { border-color: var(--primary); background: var(--primary); color: #fff; }
.form-select, .form-input { padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius); font-size: 15px; font-family: inherit; background: #fff; color: var(--text); width: 100%; max-width: 280px; }
.form-select:focus, .form-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(27, 94, 158, .15); }
.qty-input { max-width: 100px; }
.price-row { margin: 24px 0 16px; }
.price-big { font-size: 32px; font-weight: 800; }
.added-note { margin-top: 14px; color: var(--success); font-weight: 600; }
.ship-note { margin-top: 18px; color: var(--text-muted); font-size: 14px; }

/* ===== Basket ===== */
.basket-list { display: flex; flex-direction: column; gap: 12px; margin: 24px 0; }
.basket-row { display: grid; grid-template-columns: 72px 1fr auto auto auto; align-items: center; gap: 16px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px; }
.basket-thumb { width: 72px; height: 72px; object-fit: contain; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 6px; }
.basket-row-info h3 { font-size: 16px; }
.basket-row-total { font-weight: 700; min-width: 70px; text-align: right; }
.link-remove { background: none; border: none; color: var(--text-muted); font-size: 16px; cursor: pointer; padding: 8px; }
.link-remove:hover { color: var(--danger); }
.basket-summary { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; margin-top: 16px; }
.basket-total-row { display: flex; justify-content: space-between; font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.basket-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 20px; }

/* ===== Checkout ===== */
.checkout-summary { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; margin: 20px 0; }
.checkout-line { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 15px; }
.checkout-line-total { font-weight: 700; font-size: 18px; border-bottom: none; padding-top: 14px; }
.checkout-back { display: inline-block; margin-top: 16px; }

/* ===== Success ===== */
.success-card { max-width: 600px; margin: 0 auto; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 48px 40px; text-align: center; box-shadow: var(--shadow); }
.success-icon { display: inline-flex; align-items: center; justify-content: center; width: 64px; height: 64px; border-radius: 50%; background: var(--success); color: #fff; font-size: 32px; margin-bottom: 24px; }
.promo-box { background: var(--bg); border: 1px dashed var(--border); border-radius: var(--radius-lg); padding: 24px; margin: 28px 0; }
.promo-code { display: inline-block; font-size: 22px; font-weight: 700; letter-spacing: 2px; color: var(--primary); margin: 10px 0; }

/* ===== Misc ===== */
.empty-state { text-align: center; padding: 64px 0; }
.empty-state p { margin-bottom: 20px; color: var(--text-muted); }
.alert { padding: 14px 18px; border-radius: var(--radius); margin: 16px 0; font-size: 14px; }
.alert-error { background: #FEF2F2; color: var(--danger); border: 1px solid #FECACA; }
.alert-success { background: #F0FDF4; color: #166534; border: 1px solid #BBF7D0; }
.alert code { background: rgba(0,0,0,0.06); padding: 2px 6px; border-radius: 4px; }

/* ===== Blazor error UI ===== */
#blazor-error-ui { display: none; position: fixed; bottom: 0; width: 100%; z-index: 1000; padding: 12px; background: var(--danger); color: #fff; text-align: center; }
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: 12px; top: 8px; }

/* ===== Responsive ===== */
@media (max-width: 860px) {
    .product-detail { grid-template-columns: 1fr; gap: 28px; }
    .page-hero h1 { font-size: 30px; }
    .basket-row { grid-template-columns: 56px 1fr auto; grid-template-areas: "img info total" "img qty remove"; }
    .basket-thumb { width: 56px; height: 56px; }
}
