:root {
    --sh-blue: #007aff;
    --sh-blue-dark: #0062cc;
    --sh-blue-light: #e9f2ff;
    --sh-ink: #1f2a37;
    --sh-muted: #6b7785;
    --sh-line: #e7ebf0;
    --sh-bg: #f4f6f9;
    --sh-green: #18b663;
}

/* Figma demo pages don't load the usashop header-sizing JS, so the
   position:fixed header would overlap content. Keep it in normal flow
   (sticky) on these pages — no overlap, still pins on scroll. */
.figma-page .header { position: sticky; }
.figma-page .main-content { padding-top: 0; }
.figma-page { background: #fff; }

/* Home/landing: show only the header-top tab bar (hide the categories/search
   row and the category nav below it). */
.figma-home .header-mid,
.figma-home .header-bottom { display: none; }

.fg-main { background: #fff; }
.fg-wrap { max-width: 1280px; margin: 0 auto; padding: 0 16px; }
.fg-text-blue { color: var(--sh-blue) !important; }

.fg-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    background: var(--sh-blue); color: #fff; border: 0; border-radius: 10px;
    padding: 12px 22px; font-weight: 600; cursor: pointer; transition: background .15s;
    text-decoration: none;
}
.fg-btn:hover { background: var(--sh-blue-dark); color: #fff; }
.fg-btn-light { background: var(--sh-blue-light); color: var(--sh-blue); }
.fg-btn-light:hover { background: #d8e8ff; color: var(--sh-blue); }
.fg-btn-outline { background: #fff; color: var(--sh-blue); border: 1px solid var(--sh-blue); }
.fg-btn-outline:hover { background: var(--sh-blue); color: #fff; }
.fg-btn-block { width: 100%; }

/* ===== HOME split hero ===== */
.fg-split { display: grid; grid-template-columns: 1fr 1fr; height: 800px; }
.fg-split-panel { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding: 60px 48px 40px; text-align: center; color: #fff; overflow: hidden; }
.fg-split-panel .fg-panel-content { position: relative; z-index: 2; max-width: 480px; }
.fg-split-sub { display: block; font-size: 1.05rem; opacity: .92; margin-bottom: 10px; }
.fg-split-panel h2 { font-size: 2.4rem; font-weight: 800; margin: 0 0 18px; letter-spacing: .5px; }
.fg-split-panel .fg-tag { display: inline-block; background: rgba(0,0,0,.6); color: #fff; border-radius: 8px; padding: 7px 16px; font-size: .9rem; margin-bottom: 22px; }
.fg-split-panel p { opacity: .95; line-height: 1.65; margin-bottom: 28px; }
.fg-split-img { display: none; }
.fg-split-costco {
    background-color: #0d62a7;
    background-image: url('../images/landing/landing-costco.webp');
    background-size: cover;
    background-position: bottom center;
    background-repeat: no-repeat;
}
.fg-split-shiply {
    background-color: #01b5fc;
    background-image: url('../images/landing/landing-shiply.webp');
    background-size: cover;
    background-position: bottom center;
    background-repeat: no-repeat;
    padding-top: 130px;
}
.fg-split-panel .fg-btn { background: #1570ef; color: #fff; padding: 13px 26px; font-weight: 700; text-transform: uppercase; font-size: .82rem; letter-spacing: .4px; gap: 10px; }
.fg-split-panel .fg-btn:hover { background: #0d5fd6; color: #fff; }
.fg-hero-icon { font-size: 7rem; opacity: .9; margin-bottom: 8px; }

/* ===== Page shell with category sidebar ===== */
.fg-breadcrumb { padding: 16px 0; color: var(--sh-muted); font-size: .9rem; }
.fg-breadcrumb a { color: var(--sh-muted); text-decoration: none; }
.fg-layout { display: grid; grid-template-columns: 230px 1fr; gap: 28px; padding-bottom: 60px; }
.fg-layout-3 { display: grid; grid-template-columns: 230px 1fr 300px; gap: 24px; padding-bottom: 60px; }

.fg-cat-title { font-weight: 700; font-size: .95rem; margin: 18px 0 10px; }
.fg-cat-list { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.fg-cat-item { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--sh-line); border-radius: 10px; color: var(--sh-ink); text-decoration: none; font-size: .9rem; background: #fff; }
.fg-cat-item i { color: var(--sh-muted); width: 18px; text-align: center; }
.fg-cat-item:hover { border-color: var(--sh-blue); color: var(--sh-blue); }
.fg-cat-item.active { background: var(--sh-blue-light); border-color: var(--sh-blue); color: var(--sh-blue); font-weight: 600; }
.fg-cat-item.active i { color: var(--sh-blue); }
.fg-cat-sub { display: flex; align-items: center; gap: 8px; padding: 7px 12px 7px 28px; color: var(--sh-muted); font-size: .85rem; text-decoration: none; }
.fg-cat-sub.active { color: var(--sh-blue); font-weight: 600; }
.fg-filter-check { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border: 1px solid var(--sh-line); border-radius: 10px; margin-bottom: 6px; font-size: .9rem; }

/* ===== Page banner ===== */
.fg-banner { border-radius: 14px; overflow: hidden; color: #fff; padding: 38px 40px; margin: 8px 0 24px; background: linear-gradient(110deg, #0a3a6b, #1f7fd6); position: relative; }
.fg-banner h1 { font-weight: 800; font-size: 1.9rem; margin: 8px 0 6px; }
.fg-banner p { opacity: .9; margin: 0; max-width: 520px; font-size: .92rem; }
.fg-banner-logo { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; opacity: .95; }
.fg-banner-logo img { height: 22px; filter: brightness(0) invert(1); }

/* ===== Store logo grid ===== */
.fg-store-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.fg-store-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.fg-store-cell { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--sh-line); border-radius: 12px; padding: 22px 10px; text-decoration: none; transition: box-shadow .15s, border-color .15s; min-height: 92px; background: #fff; }
.fg-store-cell:hover { border-color: var(--sh-blue); box-shadow: 0 6px 18px rgba(0,122,255,.1); }
.fg-store-logo { font-weight: 800; font-size: 1.1rem; color: var(--sh-ink); letter-spacing: -.5px; }
.fg-store-name { font-size: .8rem; color: var(--sh-muted); }

/* ===== Product cards grid ===== */
.fg-products { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.fg-products-4 { grid-template-columns: repeat(4, 1fr); }
.fg-pcard { border: 1px solid var(--sh-line); border-radius: 12px; overflow: hidden; background: #fff; display: flex; flex-direction: column; transition: box-shadow .15s; text-decoration: none; color: inherit; position: relative; }
.fg-pcard:hover { box-shadow: 0 8px 22px rgba(0,0,0,.08); }
.fg-pcard.selected { border-color: var(--sh-blue); box-shadow: 0 0 0 2px rgba(0,122,255,.25); }
.fg-pcard-img { aspect-ratio: 1; background: #f7f8fa; display: flex; align-items: center; justify-content: center; font-size: 2.4rem; color: #c7ced6; position: relative; }
.fg-pcard-img img { width: 100%; height: 100%; object-fit: contain; padding: 14px; }
.fg-pcard-tag { position: absolute; top: 8px; left: 8px; background: var(--sh-blue); color: #fff; font-size: .65rem; padding: 3px 8px; border-radius: 6px; display: inline-flex; align-items: center; gap: 4px; }
.fg-pcard-tag.orange { background: #f59c36; }
.fg-pcard-body { padding: 12px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.fg-pcard-cat { font-size: .72rem; color: var(--sh-muted); }
.fg-pcard-title { font-size: .85rem; font-weight: 600; line-height: 1.3; min-height: 2.2em; }
.fg-pcard-rate { font-size: .72rem; color: #f5a623; }
.fg-pcard-rate span { color: var(--sh-muted); }
.fg-pcard-by { font-size: .72rem; color: var(--sh-muted); }
.fg-pcard-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 6px; }
.fg-pcard-price { font-weight: 800; color: var(--sh-blue); }
.fg-qty { display: inline-flex; align-items: center; border: 1px solid var(--sh-line); border-radius: 8px; overflow: hidden; }
.fg-qty button { border: 0; background: #fff; width: 28px; height: 28px; color: var(--sh-ink); cursor: pointer; }
.fg-qty span { width: 28px; text-align: center; font-size: .85rem; }

/* ===== Link order box ===== */
.fg-linkbox-wrap { background: linear-gradient(160deg, #2ea0ff, #007aff); border-radius: 14px; padding: 40px; display: flex; flex-direction: column; align-items: center; }
.fg-linkbox { background: #fff; border-radius: 12px; padding: 18px; width: 100%; max-width: 440px; box-shadow: 0 18px 40px rgba(0,0,0,.18); }
.fg-link-input { display: flex; align-items: center; gap: 8px; border: 1px solid var(--sh-line); border-radius: 9px; padding: 10px 12px; color: var(--sh-muted); }
.fg-link-input input { border: 0; outline: 0; flex: 1; font-size: .9rem; }
.fg-store-tabs { display: flex; gap: 8px; margin: 12px 0; }
.fg-store-tab { flex: 1; border: 1px solid var(--sh-line); border-radius: 9px; padding: 10px; text-align: center; font-size: .8rem; font-weight: 600; cursor: pointer; }
.fg-store-tab.active { border-color: var(--sh-blue); background: var(--sh-blue-light); color: var(--sh-blue); }
.fg-field { margin-bottom: 10px; }
.fg-field label { font-size: .8rem; color: var(--sh-muted); display: block; margin-bottom: 4px; }
.fg-field input, .fg-field textarea, .fg-field select { width: 100%; border: 1px solid var(--sh-line); border-radius: 8px; padding: 10px; font-size: .9rem; }
.fg-linkbox-empty { display: flex; flex-direction: column; align-items: center; color: #fff; padding: 30px 0 0; }
.fg-linkbox-empty i { font-size: 4rem; }

/* ===== Right tutorial sidebar ===== */
.fg-side-card { border: 1px solid var(--sh-line); border-radius: 12px; padding: 16px; margin-bottom: 16px; }
.fg-side-title { font-weight: 700; font-size: .9rem; margin-bottom: 12px; }
.fg-promo { background: linear-gradient(160deg, #2ea0ff, #007aff); border-radius: 12px; padding: 22px; color: #fff; text-align: center; margin-bottom: 16px; }
.fg-promo h3 { font-weight: 800; font-size: 1.1rem; }
.fg-step { display: flex; gap: 10px; margin-bottom: 14px; }
.fg-step-num { flex: 0 0 24px; height: 24px; border-radius: 50%; background: var(--sh-blue-light); color: var(--sh-blue); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .8rem; }
.fg-step-body { font-size: .82rem; color: var(--sh-muted); }
.fg-step-body b { color: var(--sh-ink); display: block; margin-bottom: 4px; }
.fg-step-img { width: 100%; height: 70px; background: #e7ebf0; border-radius: 8px; margin-top: 8px; }

/* ===== Product detail ===== */
.fg-pd { display: grid; grid-template-columns: 90px 1fr 320px; gap: 24px; padding: 24px 0; }
.fg-pd-thumbs { display: flex; flex-direction: column; gap: 10px; }
.fg-pd-thumb { aspect-ratio: 1; border: 1px solid var(--sh-line); border-radius: 8px; display: flex; align-items: center; justify-content: center; color: #c7ced6; cursor: pointer; }
.fg-pd-thumb.active { border-color: var(--sh-blue); }
.fg-pd-main { border: 1px solid var(--sh-line); border-radius: 12px; aspect-ratio: 1; display: flex; align-items: center; justify-content: center; font-size: 5rem; color: #c7ced6; }
.fg-pd-info h1 { font-size: 1.3rem; font-weight: 700; line-height: 1.4; }
.fg-pd-buy { border: 1px solid var(--sh-line); border-radius: 12px; padding: 20px; position: sticky; top: 90px; }
.fg-pd-price { font-size: 1.8rem; font-weight: 800; color: var(--sh-blue); }
.fg-pd-row { display: flex; justify-content: space-between; padding: 7px 0; font-size: .85rem; color: var(--sh-muted); border-bottom: 1px dashed var(--sh-line); }
.fg-spec-table { width: 100%; border-collapse: collapse; margin: 16px 0; }
.fg-spec-table td { padding: 9px 12px; border: 1px solid var(--sh-line); font-size: .85rem; }
.fg-spec-table td:first-child { background: #fafbfc; color: var(--sh-muted); width: 38%; }
.fg-section-h { font-weight: 700; font-size: 1.05rem; margin: 28px 0 14px; }

/* ===== Cart ===== */
.fg-cart { display: grid; grid-template-columns: 1fr 320px; gap: 24px; padding: 20px 0 60px; }
.fg-cart-card { border: 1px solid var(--sh-line); border-radius: 12px; padding: 16px; margin-bottom: 14px; }
.fg-cart-bar { display: flex; align-items: center; justify-content: space-between; border: 1px solid var(--sh-line); border-radius: 12px; padding: 14px 16px; margin-bottom: 12px; font-size: .9rem; }
.fg-cart-item { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--sh-line); }
.fg-cart-item:last-child { border-bottom: 0; }
.fg-cart-thumb { flex: 0 0 84px; height: 84px; border-radius: 10px; background: #f0f3f7; display: flex; align-items: center; justify-content: center; font-size: 2rem; color: #c7ced6; }
.fg-cart-meta { flex: 1; font-size: .82rem; color: var(--sh-muted); display: flex; flex-direction: column; gap: 6px; }
.fg-cart-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.fg-cart-pill { background: #f0f3f7; border-radius: 6px; padding: 3px 8px; font-size: .72rem; color: var(--sh-ink); }
.fg-cart-price { font-weight: 800; font-size: 1.05rem; white-space: nowrap; }
.fg-summary { border: 1px solid var(--sh-line); border-radius: 12px; padding: 18px; position: sticky; top: 90px; }
.fg-sum-row { display: flex; justify-content: space-between; padding: 8px 0; font-size: .88rem; color: var(--sh-muted); }
.fg-sum-total { display: flex; justify-content: space-between; align-items: center; padding: 14px; background: var(--sh-blue-light); border-radius: 10px; margin: 12px 0; }
.fg-sum-total b { font-size: 1.4rem; color: var(--sh-blue); }

/* ===== Account / orders ===== */
.fg-acct { display: grid; grid-template-columns: 240px 1fr; gap: 24px; padding-bottom: 60px; }
.fg-acct-side .fg-bal { background: linear-gradient(150deg, #2ea0ff, #007aff); color: #fff; border-radius: 12px; padding: 18px; margin-bottom: 14px; }
.fg-acct-side .fg-bal b { font-size: 1.6rem; }
.fg-acct-nav { list-style: none; margin: 0; padding: 0; border: 1px solid var(--sh-line); border-radius: 12px; overflow: hidden; }
.fg-acct-nav a { display: flex; align-items: center; gap: 10px; padding: 12px 16px; color: var(--sh-ink); text-decoration: none; font-size: .88rem; border-bottom: 1px solid var(--sh-line); }
.fg-acct-nav a:last-child { border-bottom: 0; }
.fg-acct-nav a.active, .fg-acct-nav a:hover { background: var(--sh-blue-light); color: var(--sh-blue); }
.fg-order-card { border: 1px solid var(--sh-line); border-radius: 12px; margin-bottom: 18px; overflow: hidden; }
.fg-order-head { display: flex; justify-content: space-between; align-items: center; background: #f7f8fa; padding: 12px 16px; font-size: .82rem; color: var(--sh-muted); }
.fg-order-body { padding: 18px 16px; }
.fg-track { display: flex; justify-content: space-between; position: relative; margin: 10px 0 18px; }
.fg-track::before { content: ""; position: absolute; top: 11px; left: 5%; right: 5%; height: 3px; background: var(--sh-green); border-radius: 2px; }
.fg-track-step { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 6px; flex: 1; }
.fg-track-dot { width: 24px; height: 24px; border-radius: 50%; background: var(--sh-green); color: #fff; display: flex; align-items: center; justify-content: center; font-size: .7rem; }
.fg-track-step span { font-size: .72rem; color: var(--sh-muted); }
.fg-order-note { background: #eafaf1; border-radius: 8px; padding: 12px; font-size: .82rem; color: #166c43; margin-bottom: 12px; }
.fg-order-items { display: flex; align-items: center; gap: 8px; }
.fg-order-thumb { width: 40px; height: 40px; border-radius: 8px; background: #f0f3f7; display: flex; align-items: center; justify-content: center; color: #c7ced6; }

@media (max-width: 991.98px) {
    .fg-split { grid-template-columns: 1fr; height: auto; }
    .fg-split-panel, .fg-split-shiply { padding: 52px 24px 36px; min-height: 72vh; }
    .fg-split-panel h2 { font-size: 1.9rem; }
    .fg-split-panel p { font-size: .95rem; }
    .fg-split-sub { font-size: .95rem; }
    .fg-layout, .fg-layout-3, .fg-pd, .fg-cart, .fg-acct { grid-template-columns: 1fr; }
    .fg-products, .fg-products-4, .fg-store-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 767.98px) {
    /* top tab bar: let the 4 brand tabs scroll horizontally instead of overflowing */
    .header-tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
    .header-tabs::-webkit-scrollbar { display: none; }
    .header-tab-item { flex: 0 0 auto; }
    .fg-split-panel, .fg-split-shiply { padding: 40px 20px 28px; min-height: 64vh; }
    .fg-split-panel h2 { font-size: 1.55rem; }
    .fg-split-panel .fg-tag, .fg-split-panel p { font-size: .88rem; }
    .fg-split-panel .fg-btn { width: auto; }
}
