@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --sf-blue: #2874f0;
    --sf-blue-dark: #1c5bd0;
    --sf-yellow: #ff9f00;
    --sf-green: #388e3c;
    --sf-bg: #f1f3f6;
    --sf-text: #212121;
    --sf-muted: #878787;
    --sf-font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html, body {
    overflow-x: clip;
    max-width: 100%;
}

.sf-body {
    margin: 0;
    background: var(--sf-bg);
    color: var(--sf-text);
    font-family: var(--sf-font);
    font-size: 14px;
    overflow-x: clip;
    max-width: 100%;
}

.sf-main {
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
}

/* ── Header ─────────────────────────────── */
.sf-header {
    background: var(--sf-blue);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.sf-header-inner {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 10px 16px;
}
.sf-logo { text-decoration: none; color: #fff; line-height: 1; display: flex; flex-direction: column; }
.sf-logo-main { font-size: 20px; font-weight: 700; font-style: italic; }
.sf-logo-sub { font-size: 11px; font-style: italic; color: #f0f0f0; }
.sf-plus { color: var(--sf-yellow); font-weight: 700; }

.sf-search {
    flex: 1;
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 3px;
    overflow: hidden;
    max-width: 620px;
    height: 38px;
}
.sf-search-icon {
    border: 0;
    background: transparent;
    padding: 0 12px;
    font-size: 15px;
    cursor: pointer;
    color: var(--sf-blue);
}
.sf-search input {
    border: 0;
    outline: 0;
    flex: 1;
    height: 100%;
    font-size: 14px;
    padding-right: 12px;
    background: transparent;
}

.sf-header-actions { display: flex; align-items: center; gap: 22px; }
.sf-login-btn {
    background: #fff;
    color: var(--sf-blue);
    font-weight: 600;
    padding: 7px 36px;
    border-radius: 3px;
    text-decoration: none;
}
.sf-action-link, .sf-cart { color: #fff; text-decoration: none; font-weight: 500; position: relative; }
.sf-cart-icon { font-size: 15px; }
.sf-cart-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    margin-left: 2px;
    background: var(--sf-yellow);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    border-radius: 9px;
    vertical-align: top;
}

/* ── Toast ──────────────────────────────── */
.sf-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #212121;
    color: #fff;
    padding: 12px 22px;
    border-radius: 4px;
    font-size: 14px;
    box-shadow: 0 4px 16px rgba(0,0,0,.3);
    opacity: 0;
    transition: opacity .25s, transform .25s;
    z-index: 2000;
}
.sf-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── Cart page ──────────────────────────── */
.sf-cart-layout { display: grid; grid-template-columns: 1fr 320px; gap: 16px; align-items: start; }
.sf-cart-list { background: #fff; }
.sf-cart-item {
    display: grid;
    grid-template-columns: 70px 1fr auto auto;
    grid-template-areas: "thumb info qty line" "thumb remove remove remove";
    gap: 6px 14px;
    align-items: center;
    padding: 14px 4px;
    border-bottom: 1px solid #f0f0f0;
}
.sf-cart-thumb { grid-area: thumb; width: 70px; height: 70px; display: flex; align-items: center; justify-content: center; }
.sf-cart-thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.sf-cart-noimg {
    width: 56px; height: 56px; border-radius: 50%;
    background: linear-gradient(135deg, #dfe9ff, #b9d0ff);
    color: var(--sf-blue); font-weight: 700; font-size: 24px;
    display: flex; align-items: center; justify-content: center;
}
.sf-cart-info { grid-area: info; }
.sf-cart-name { font-weight: 500; }
.sf-cart-unit { color: var(--sf-muted); font-size: 13px; }
.sf-cart-qty { grid-area: qty; display: inline-flex; align-items: center; gap: 0; border: 1px solid #ddd; border-radius: 4px; overflow: hidden; }
.sf-cart-qty button { width: 30px; height: 30px; border: 0; background: #f5f5f5; font-size: 16px; cursor: pointer; }
.sf-cart-qty button:hover { background: #e8e8e8; }
.sf-cart-qty span { min-width: 34px; text-align: center; font-weight: 600; }
.sf-cart-line { grid-area: line; font-weight: 700; font-size: 15px; }
.sf-cart-remove { grid-area: remove; justify-self: start; border: 0; background: transparent; color: var(--sf-muted); font-weight: 600; cursor: pointer; padding: 0; text-transform: uppercase; font-size: 12px; }
.sf-cart-remove:hover { color: #ff5252; }

.sf-cart-summary { background: #fff; border: 1px solid #f0f0f0; border-radius: 6px; padding: 16px; position: sticky; top: 80px; }
.sf-cart-summary h6 { color: var(--sf-muted); text-transform: uppercase; font-size: 13px; border-bottom: 1px solid #f0f0f0; padding-bottom: 10px; }
.sf-summary-row { display: flex; justify-content: space-between; margin: 10px 0; font-size: 14px; }
.sf-free { color: var(--sf-green); font-weight: 600; }
.sf-summary-divider { border-top: 1px dashed #ddd; margin: 12px 0; }
.sf-summary-total { font-weight: 700; font-size: 16px; }
.sf-checkout-btn { width: 100%; border: 0; background: var(--sf-yellow); color: #fff; font-weight: 700; padding: 12px; border-radius: 3px; cursor: pointer; margin-top: 12px; }
.sf-checkout-btn:hover { background: #f08c00; }
.sf-continue { display: block; text-align: center; margin-top: 12px; color: var(--sf-blue); text-decoration: none; font-size: 13px; }

@media (max-width: 768px) {
    .sf-cart-layout { grid-template-columns: 1fr; }
}

/* ── Category strip ─────────────────────── */
.sf-catbar {
    background: #fff;
    box-shadow: 0 1px 1px rgba(0,0,0,.1);
}
.sf-catbar-inner {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    gap: 6px;
    padding: 6px 16px;
    overflow-x: auto;
}
.sf-cat {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 14px;
    text-decoration: none;
    color: var(--sf-text);
    font-weight: 500;
    font-size: 13px;
    border-radius: 6px;
    white-space: nowrap;
}
.sf-cat:hover { color: var(--sf-blue); background: #f5f7ff; }
.sf-cat.active { color: var(--sf-blue); }
.sf-cat.active .sf-cat-ico { transform: translateY(-1px); }
.sf-cat-ico { font-size: 24px; height: 28px; display: flex; align-items: center; justify-content: center; }
.sf-cat-ico img { width: 28px; height: 28px; object-fit: contain; border-radius: 4px; }

/* ── Hero carousel ──────────────────────── */
.sf-hero {
    width: calc(100% - 24px);
    max-width: 1280px;
    margin: 12px auto 0;
    border-radius: 4px;
    overflow: hidden;
}

.sf-hero .carousel-inner,
.sf-hero .carousel-item {
    width: 100%;
}

.sf-hero-link {
    display: block;
    line-height: 0;
    text-decoration: none;
}

/* Image banners — scale with screen, full image visible (no fixed height) */
.sf-hero-img {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
    object-fit: contain;
    object-position: center top;
    background: #eef2f7;
}

/* Text / gradient slides only */
.sf-hero-slide {
    min-height: clamp(160px, 28vw, 320px);
    display: flex;
    align-items: center;
    padding: clamp(16px, 4vw, 56px);
    color: #fff;
}
.sf-hero-1 { background: linear-gradient(120deg, #2874f0, #5b9bff); }
.sf-hero-2 { background: linear-gradient(120deg, #7b2ff7, #f107a3); }
.sf-hero-3 { background: linear-gradient(120deg, #11998e, #38ef7d); }
.sf-hero-4 { background: linear-gradient(120deg, #f7971e, #ff5858); }
a.sf-hero-slide { text-decoration: none; }
.sf-hero-text h2 { font-size: clamp(1.25rem, 3.5vw, 2.375rem); font-weight: 800; margin: 0 0 8px; }
.sf-hero-text p { font-size: clamp(0.875rem, 2vw, 1.0625rem); margin: 0 0 18px; opacity: .95; }
.sf-hero-cta {
    display: inline-block;
    background: var(--sf-yellow);
    color: #fff;
    font-weight: 700;
    padding: 10px 26px;
    border-radius: 3px;
    text-decoration: none;
    cursor: pointer;
}

/* ── Section ────────────────────────────── */
.sf-section {
    width: calc(100% - 24px);
    max-width: 1280px;
    margin: 14px auto;
    background: #fff;
    border-radius: 4px;
    padding: 16px;
    box-sizing: border-box;
}
.sf-section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 14px;
}
.sf-section-head h3 { font-size: 22px; font-weight: 600; margin: 0; }
.sf-count { color: var(--sf-muted); font-size: 13px; }

/* ── Product grid ───────────────────────── */
.sf-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 160px), 1fr));
    gap: 8px;
    align-items: stretch;
}
.sf-card {
    border: 1px solid #f0f0f0;
    border-radius: 6px;
    background: #fff;
    transition: box-shadow .15s, transform .15s;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 100%;
    overflow: hidden;
}
.sf-card:hover {
    box-shadow: 0 4px 18px rgba(0,0,0,.12);
    transform: translateY(-2px);
}
.sf-card-img {
    position: relative;
    aspect-ratio: 1 / 1;
    max-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    background: #fff;
}
.sf-card-img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.sf-noimg {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: linear-gradient(135deg, #dfe9ff, #b9d0ff);
    color: var(--sf-blue);
    font-size: 46px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}
.sf-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--sf-green);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 3px;
}
.sf-card-body {
    padding: 10px 12px 14px;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    gap: 4px;
    min-height: 0;
}
.sf-brand { font-size: 12px; color: var(--sf-muted); font-weight: 500; }
.sf-name {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.3;
    height: 2.6em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.sf-price-row { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
.sf-price { font-size: 17px; font-weight: 700; }
.sf-mrp { font-size: 13px; color: var(--sf-muted); text-decoration: line-through; }
.sf-off { font-size: 13px; color: var(--sf-green); font-weight: 600; }
.sf-cat-tag { font-size: 11px; color: var(--sf-muted); }
.sf-add-btn {
    margin-top: 8px;
    border: 0;
    background: var(--sf-yellow);
    color: #fff;
    font-weight: 600;
    padding: 8px;
    border-radius: 3px;
    cursor: pointer;
}
.sf-add-btn:hover { background: #f08c00; }
.sf-name-link { text-decoration: none; color: var(--sf-text); display: block; }
.sf-name-link:hover { color: var(--sf-blue); }
.sf-know-btn {
    display: block;
    text-align: center;
    text-decoration: none;
    background: var(--sf-blue);
    margin-top: auto;
    flex-shrink: 0;
}
.sf-know-btn:hover { background: var(--sf-blue-dark); }
a.sf-card-img { display: flex; text-decoration: none; }

/* ── Product detail page ────────────────── */
.sf-pd-wrap { max-width: 1280px; margin: 14px auto; padding: 0 16px; }
.sf-pd-back { display: inline-block; margin-bottom: 12px; color: var(--sf-blue); text-decoration: none; font-weight: 500; }
.sf-pd {
    display: grid;
    grid-template-columns: 440px 1fr;
    gap: 24px;
    background: #fff;
    border-radius: 6px;
    padding: 20px;
    align-items: start;
}
.sf-pd-gallery { position: sticky; top: 80px; }
.sf-pd-main {
    position: relative;
    border: 1px solid #f0f0f0;
    border-radius: 6px;
    height: 380px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.sf-pd-main img { max-width: 100%; max-height: 100%; object-fit: contain; }
.sf-pd-noimg {
    width: 180px; height: 180px; border-radius: 50%;
    background: linear-gradient(135deg, #dfe9ff, #b9d0ff);
    color: var(--sf-blue); font-size: 72px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}
.sf-pd-badge { top: 12px; left: 12px; font-size: 12px; }
.sf-pd-thumbs { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.sf-pd-thumb {
    width: 56px; height: 56px; border: 1px solid #ddd; border-radius: 4px;
    background: #fff; cursor: pointer; padding: 4px; display: flex; align-items: center; justify-content: center;
}
.sf-pd-thumb.active, .sf-pd-thumb:hover { border-color: var(--sf-blue); }
.sf-pd-thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.sf-pd-actions { display: flex; gap: 12px; margin-top: 18px; }
.sf-pd-add, .sf-pd-buy {
    flex: 1; text-align: center; text-decoration: none;
    border: 0; padding: 15px; border-radius: 3px; font-weight: 700; font-size: 15px; cursor: pointer; color: #fff;
}
.sf-pd-add { background: var(--sf-yellow); }
.sf-pd-add:hover { background: #f08c00; }
.sf-pd-buy { background: #fb641b; display: flex; align-items: center; justify-content: center; }
.sf-pd-buy:hover { background: #e0590f; color: #fff; }

.sf-pd-brand { color: var(--sf-muted); font-weight: 500; }
.sf-pd-title { font-size: 22px; font-weight: 500; margin: 4px 0 2px; line-height: 1.3; }
.sf-pd-code { color: var(--sf-muted); font-size: 13px; margin-bottom: 14px; }
.sf-pd-price-block { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.sf-pd-price { font-size: 28px; font-weight: 700; }
.sf-pd-mrp { font-size: 16px; color: var(--sf-muted); text-decoration: line-through; }
.sf-pd-off { font-size: 16px; color: var(--sf-green); font-weight: 600; }
.sf-pd-save { color: var(--sf-green); font-weight: 600; margin-top: 4px; }
.sf-pd-tax { color: var(--sf-muted); font-size: 12px; margin-top: 2px; }
.sf-pd-section { margin-top: 22px; }
.sf-pd-section h5 { font-size: 16px; font-weight: 600; margin-bottom: 10px; }
.sf-pd-specs { width: 100%; border-collapse: collapse; }
.sf-pd-specs td { padding: 7px 10px; border-bottom: 1px solid #f3f3f3; font-size: 14px; vertical-align: top; }
.sf-pd-spec-k { color: var(--sf-muted); width: 160px; }
.sf-pd-spec-v { font-weight: 500; }
.sf-pd-desc { color: #333; line-height: 1.6; white-space: pre-line; }

@media (max-width: 860px) {
    .sf-pd { grid-template-columns: 1fr; }
    .sf-pd-gallery { position: static; }
}

/* ── Empty ──────────────────────────────── */
.sf-empty { text-align: center; padding: 50px 10px; color: var(--sf-muted); }
.sf-empty-ico { font-size: 48px; margin-bottom: 8px; }

/* ── Footer ─────────────────────────────── */
.sf-footer { background: #172337; color: #fff; margin-top: 24px; }
.sf-footer-cols {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    padding: 32px 16px;
}
.sf-footer-col h6 { color: var(--sf-muted); text-transform: uppercase; font-size: 12px; margin-bottom: 12px; }
.sf-footer-col a { display: block; color: #fff; text-decoration: none; font-size: 13px; margin-bottom: 8px; opacity: .9; }
.sf-footer-col a:hover { opacity: 1; text-decoration: underline; }
.sf-footer-bottom {
    border-top: 1px solid #2a3b57;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding: 16px;
    font-size: 12px;
    color: var(--sf-muted);
}
.sf-footer-admin {
    color: #fff;
    text-decoration: none;
    border: 1px solid #3a4d6b;
    border-radius: 4px;
    padding: 4px 12px;
    opacity: .9;
}
.sf-footer-admin:hover { opacity: 1; background: #2a3b57; }

/* ── Auth cards / orders / tracking ─────── */
.sf-auth-card {
    max-width: 420px;
    margin: 24px auto;
    background: #fff;
    border: 1px solid var(--sf-border, #e0e0e0);
    border-radius: 10px;
    padding: 28px;
    box-shadow: 0 2px 10px rgba(0,0,0,.05);
}
.sf-auth-card h3 { margin-bottom: 4px; }
.sf-auth-sub { color: var(--sf-muted, #878787); font-size: 13px; margin-bottom: 18px; }
.sf-auth-foot { margin-top: 16px; font-size: 13px; text-align: center; }
.sf-checkout-btn { border: none; }

.sf-orders { display: flex; flex-direction: column; gap: 12px; }
.sf-order-card {
    display: block; text-decoration: none; color: inherit;
    border: 1px solid var(--sf-border, #e0e0e0); border-radius: 8px;
    padding: 14px 16px; background: #fff; transition: box-shadow .15s;
}
.sf-order-card:hover { box-shadow: 0 3px 12px rgba(0,0,0,.08); }
.sf-order-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.sf-order-code { font-weight: 600; }
.sf-order-meta { display: flex; gap: 18px; color: var(--sf-muted, #878787); font-size: 13px; }

.sf-track { display: flex; justify-content: space-between; position: relative; margin: 18px 0; }
.sf-track::before {
    content: ""; position: absolute; top: 16px; left: 8%; right: 8%; height: 3px; background: #e0e0e0; z-index: 0;
}
.sf-track-step { position: relative; z-index: 1; text-align: center; flex: 1; }
.sf-track-dot {
    width: 32px; height: 32px; border-radius: 50%; background: #e0e0e0; color: #fff;
    display: flex; align-items: center; justify-content: center; margin: 0 auto 6px; font-weight: 700;
}
.sf-track-step.done .sf-track-dot { background: #2874f0; }
.sf-track-label { font-size: 12px; color: var(--sf-muted, #878787); }
.sf-track-step.done .sf-track-label { color: #172337; font-weight: 600; }
.sf-order-times { font-size: 13px; line-height: 1.9; color: #444; }

/* ── Order-confirmed overlay ─────────────────────────────── */
.sf-order-overlay {
    position: fixed; inset: 0; z-index: 3000;
    background: rgba(23, 35, 55, .55);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: opacity .2s ease;
}
.sf-order-overlay.show { opacity: 1; }
.sf-order-box {
    background: #fff; border-radius: 14px; padding: 32px 28px;
    max-width: 380px; width: 90%; text-align: center;
    box-shadow: 0 12px 40px rgba(0,0,0,.25);
    transform: translateY(12px); transition: transform .2s ease;
}
.sf-order-overlay.show .sf-order-box { transform: translateY(0); }
.sf-order-check { font-size: 52px; line-height: 1; }
.sf-order-box h4 { margin: 10px 0 6px; color: #172337; font-weight: 700; }
.sf-order-box p { font-size: 14px; color: #555; margin-bottom: 16px; }
.sf-order-spin {
    width: 26px; height: 26px; margin: 0 auto;
    border: 3px solid #e3e8ef; border-top-color: #2874f0; border-radius: 50%;
    animation: sf-spin .8s linear infinite;
}
@keyframes sf-spin { to { transform: rotate(360deg); } }

@media (max-width: 768px) {
    .sf-header-inner { flex-wrap: wrap; padding: 8px 12px; gap: 10px; }
    .sf-search { order: 3; max-width: 100%; flex-basis: 100%; }
    .sf-action-link { display: none; }
    .sf-login-btn { padding: 7px 16px; font-size: 13px; }
    .sf-hero { width: calc(100% - 16px); margin-top: 8px; }
    .sf-hero-slide { min-height: 140px; padding: 16px 20px; }
    .sf-section { width: calc(100% - 16px); padding: 12px; margin: 10px auto; }
    .sf-section-head { flex-wrap: wrap; gap: 4px; }
    .sf-section-head h3 { font-size: 18px; }
    .sf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
    .sf-card-img { max-height: 160px; padding: 8px; }
    .sf-noimg { width: 72px; height: 72px; font-size: 32px; }
    .sf-footer-cols { grid-template-columns: 1fr 1fr; gap: 16px; padding: 24px 12px; }
    .sf-footer-bottom { flex-wrap: wrap; text-align: center; }
    .sf-pd-spec-k { width: auto; min-width: 0; }
    .sf-auth-card { margin: 16px 12px; max-width: calc(100% - 24px); padding: 20px; }
    .sf-order-meta { flex-wrap: wrap; gap: 8px; }
    .sf-track { flex-wrap: wrap; gap: 12px; }
    .sf-track::before { display: none; }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .sf-grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
}

@media (min-width: 1920px) {
    .sf-hero,
    .sf-section,
    .sf-header-inner,
    .sf-catbar-inner,
    .sf-footer-cols {
        max-width: 1440px;
    }
}
