/* ============================================================
   Storefront CSS - Modern eCommerce Storefront
   Uses CSS custom properties: --sf-primary, --sf-accent
   (set dynamically from store settings)
   ============================================================ */

/* ---- Base & Typography ---- */
*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: #1a1a1a;
    background: #fafafa;
    margin: 0;
    -webkit-font-smoothing: antialiased;
}

.sf-container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ---- Announcement Bar ---- */
.sf-announcement {
    background: var(--sf-accent, #025B92);
    color: #fff;
    text-align: center;
    padding: 8px 20px;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.3px;
}

/* ---- Navbar — Centered Logo Layout ---- */
.sf-navbar {
    background: rgba(255,255,255,0.97);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid #e8e8e8;
    backdrop-filter: blur(12px);
}
.sf-navbar .sf-container {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    height: 80px;
    gap: 24px;
}
.sf-nav-left {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
}
.sf-nav-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}
.sf-brand {
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
}
.sf-brand:hover { text-decoration: none; }
.sf-logo {
    max-height: 60px;
    width: auto;
}
.sf-brand-text {
    color: #1a1a1a;
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.5px;
}
.sf-nav-link {
    color: #444;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.2s;
}
.sf-nav-link:hover {
    color: #1a1a1a;
    background: #f5f5f5;
    text-decoration: none;
}
.sf-cart-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 4px;
}
.sf-cart-count {
    background: var(--sf-primary, #E57E00);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* Inline expandable search — expands left from icon */
.sf-search-wrapper {
    display: flex;
    align-items: center;
    position: relative;
}
.sf-search-toggle {
    background: none;
    border: none;
    padding: 10px;
    cursor: pointer;
    color: #444;
    font-size: 18px;
    border-radius: 8px;
    transition: all 0.2s;
    position: relative;
    z-index: 2;
}
.sf-search-toggle:hover { color: #1a1a1a; background: #f5f5f5; }
.sf-search-inline {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    width: 0;
    overflow: hidden;
    opacity: 0;
    transition: width 0.3s ease, opacity 0.3s ease;
    z-index: 1;
}
.sf-search-inline.sf-search-open {
    width: 360px;
    opacity: 1;
}
.sf-search-input {
    flex: 1;
    padding: 10px 44px 10px 18px;
    border: 2px solid var(--sf-primary, #E57E00);
    border-radius: 50px;
    font-size: 14px;
    background: #fff;
    width: 100%;
    transition: all 0.2s;
}
.sf-search-input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(229, 126, 0, 0.08);
}
.sf-search-input::placeholder { color: #999; }
.sf-search-btn {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    padding: 6px 12px;
    border: none;
    background: transparent;
    color: var(--sf-primary, #E57E00);
    cursor: pointer;
    border-radius: 50%;
    font-size: 14px;
    transition: color 0.2s;
}
.sf-search-btn:hover { color: #cc6f00; }
/* Hide drawer — no longer used */
.sf-search-drawer { display: none; }

/* ---- Hero Banner ---- */
.sf-hero {
    position: relative;
    min-height: 420px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}
.sf-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.25) 0%, rgba(0,0,0,0.55) 100%);
}
.sf-hero-content {
    position: relative;
    z-index: 1;
    padding: 60px 24px;
    max-width: 700px;
}
.sf-hero-title {
    font-size: 48px;
    font-weight: 800;
    color: #fff;
    margin: 0 0 12px;
    letter-spacing: -1px;
    line-height: 1.1;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.sf-hero-subtitle {
    font-size: 18px;
    color: rgba(255,255,255,0.9);
    margin: 0 0 28px;
    font-weight: 400;
    line-height: 1.5;
    text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
.sf-hero-cta {
    display: inline-block;
    padding: 14px 40px;
    background: var(--sf-primary, #E57E00);
    color: #fff;
    text-decoration: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.3px;
    transition: all 0.3s;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}
.sf-hero-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(0,0,0,0.3);
    filter: brightness(1.1);
    color: #fff;
    text-decoration: none;
}

/* ---- Category Navigation Bar ---- */
.sf-catnav {
    background: var(--sf-accent, #025B92);
    position: relative;
    z-index: 900;
}
.sf-catnav .sf-container {
    display: flex;
    align-items: center;
    justify-content: center;
}
.sf-catnav-list {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0;
}
.sf-catnav-item {
    position: relative;
}
.sf-catnav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 14px 20px;
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.2s;
}
.sf-catnav-link:hover {
    color: #fff;
    background: rgba(255,255,255,0.1);
    text-decoration: none;
}
.sf-catnav-link.active {
    color: #fff;
    background: rgba(255,255,255,0.15);
}
.sf-catnav-arrow {
    font-size: 10px;
    transition: transform 0.2s;
}
.sf-catnav-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: #fff;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    list-style: none;
    margin: 0;
    padding: 8px 0;
    z-index: 1000;
}
.sf-has-dropdown:hover .sf-catnav-dropdown {
    display: block;
}
.sf-has-dropdown:hover .sf-catnav-arrow {
    transform: rotate(180deg);
}
.sf-catnav-dropdown li a {
    display: block;
    padding: 10px 20px;
    color: #444;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.15s;
}
.sf-catnav-dropdown li a:hover {
    background: #f5f5f5;
    color: var(--sf-accent, #025B92);
    text-decoration: none;
}
.sf-catnav-dropdown li a.active {
    color: var(--sf-accent, #025B92);
    font-weight: 700;
}
.sf-catnav-mobile-toggle {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: none;
    border: none;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    justify-content: center;
}

/* ---- Tagline ---- */
.sf-tagline {
    background: var(--sf-primary, #E57E00);
    color: #fff;
    text-align: center;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.2px;
}

/* ---- Main Layout ---- */
.sf-main {
    padding: 32px 24px;
    min-height: 60vh;
}
/* No sidebar — full-width product grid */

/* ---- Toolbar ---- */
.sf-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    flex-wrap: wrap;
    gap: 12px;
}
.sf-page-title {
    font-size: 28px;
    font-weight: 800;
    margin: 0;
    color: #1a1a1a;
    letter-spacing: -0.5px;
}
.sf-toolbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}
.sf-product-count {
    font-size: 14px;
    color: #888;
}
.sf-sort-select {
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 13px;
    background: #fff;
    color: #444;
    cursor: pointer;
    appearance: auto;
}
.sf-sort-select:focus {
    outline: none;
    border-color: var(--sf-primary, #E57E00);
}

/* ---- Product Grid ---- */
/* ---- Category Row (grouped homepage) ---- */
.sf-category-row {
    margin-bottom: 40px;
}
.sf-category-row-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #eee;
}
.sf-category-row-title {
    font-size: 22px;
    font-weight: 800;
    color: #1a1a1a;
    margin: 0;
    letter-spacing: -0.3px;
}
.sf-category-row-more {
    font-size: 14px;
    font-weight: 600;
    color: var(--sf-primary, #E57E00);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    transition: gap 0.2s;
}
.sf-category-row-more:hover {
    text-decoration: none;
    gap: 8px;
}
.sf-category-row-more i {
    font-size: 11px;
}

/* ---- Product Grid ---- */
.sf-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
}
.sf-product-grid-4 {
    grid-template-columns: repeat(4, 1fr);
}
.sf-product-card {
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    background: #fff;
    border: 1px solid transparent;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.sf-product-card:hover {
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
    transform: translateY(-4px);
    border-color: #e0e0e0;
}
.sf-product-card a { text-decoration: none; color: inherit; }
.sf-product-card a:hover { text-decoration: none; }
.sf-product-card a.sf-btn-add-cart { color: #fff; }
.sf-product-card a.sf-btn-add-cart:hover { color: #fff; }
.sf-product-card a.sf-btn-add-cart.sf-btn-options { color: var(--sf-primary, #E57E00); }
.sf-product-card a.sf-btn-add-cart.sf-btn-options:hover { color: #fff; }
.sf-product-image {
    position: relative;
    aspect-ratio: 1 / 1;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.sf-product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 16px;
    transition: transform 0.4s ease;
}
.sf-product-card:hover .sf-product-image img {
    transform: scale(1.05);
}
.sf-no-image {
    color: #ddd;
    font-size: 48px;
}
.sf-badge-sale {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #e53e3e;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.sf-badge-oos {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: rgba(0,0,0,0.75);
    color: #fff;
    font-size: 11px;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 6px;
}
/* Out of stock but still sellable ("continue selling when out of stock"). */
.sf-badge-lowstock {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: #e65100;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
}
.sf-product-info {
    padding: 16px 18px 8px;
}
.sf-product-name {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 4px;
    color: #1a1a1a;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.sf-product-category {
    font-size: 12px;
    color: #999;
    display: block;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}
.sf-product-sku {
    font-size: 11px;
    color: #777;
    display: block;
    margin-bottom: 4px;
}
.sf-product-price {
    font-size: 17px;
    font-weight: 700;
    color: #1a1a1a;
}
.sf-price-original {
    text-decoration: line-through;
    color: #bbb;
    font-weight: 400;
    font-size: 14px;
    margin-right: 6px;
}
.sf-price-sale {
    color: #e53e3e;
    font-weight: 700;
}
.sf-product-actions {
    padding: 8px 18px 18px;
}
.sf-btn-add-cart {
    display: block;
    width: 100%;
    padding: 10px 16px;
    border: none;
    border-radius: 10px;
    background: var(--sf-primary, #E57E00);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: all 0.2s;
    letter-spacing: 0.2px;
}
.sf-btn-add-cart:hover {
    filter: brightness(0.92);
    color: #fff;
    text-decoration: none;
    transform: translateY(-1px);
}
.sf-btn-add-cart:active {
    transform: translateY(0);
}
.sf-btn-add-cart.sf-btn-options {
    background: transparent;
    color: var(--sf-primary, #E57E00);
    border: 2px solid var(--sf-primary, #E57E00);
}
.sf-btn-add-cart.sf-btn-options:hover {
    background: var(--sf-primary, #E57E00);
    color: #fff;
}
.sf-btn-add-cart.sf-btn-disabled {
    background: #e8e8e8;
    cursor: not-allowed;
    color: #999;
}
.sf-btn-add-cart.sf-btn-disabled:hover {
    transform: none;
    filter: none;
}

/* ---- Pagination ---- */
.sf-pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 48px;
}
.sf-page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 8px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    color: #555;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}
.sf-page-link:hover {
    background: #f5f5f5;
    text-decoration: none;
    color: #1a1a1a;
    border-color: #ccc;
}
.sf-page-link.active {
    background: var(--sf-primary, #E57E00);
    color: #fff;
    border-color: var(--sf-primary, #E57E00);
}

/* ---- Empty State ---- */
.sf-empty {
    text-align: center;
    padding: 80px 20px;
    color: #999;
}
.sf-empty i {
    font-size: 56px;
    margin-bottom: 20px;
    opacity: 0.4;
}
.sf-empty p {
    font-size: 18px;
    font-weight: 500;
    color: #888;
}

/* ---- Breadcrumb ---- */
.sf-breadcrumb {
    padding: 20px 0 0;
    font-size: 13px;
    color: #999;
}
.sf-breadcrumb a {
    color: #888;
    text-decoration: none;
    transition: color 0.2s;
}
.sf-breadcrumb a:hover { color: var(--sf-primary, #E57E00); text-decoration: none; }
.sf-breadcrumb-sep {
    display: inline-block;
    margin: 0 10px;
    font-size: 9px;
    color: #ccc;
}
.sf-breadcrumb-current {
    color: #555;
    font-weight: 500;
}

/* ---- Product Detail ---- */
.sf-product-detail {
    margin-bottom: 40px;
}
.sf-product-detail .row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
}
.sf-detail-image {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    position: relative;
    max-height: 480px;
}
.sf-detail-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    padding: 16px;
}
.sf-no-image-lg {
    color: #e0e0e0;
    font-size: 80px;
}
.sf-variant-thumbnails {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
    padding-bottom: 4px;
}
.sf-variant-thumb {
    width: 56px;
    height: 56px;
    min-width: 56px;
    border: 2px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s ease, transform 0.15s ease;
}
.sf-variant-thumb:hover {
    border-color: #999;
    transform: translateY(-2px);
}
.sf-variant-thumb.active {
    border-color: #333;
}
.sf-variant-thumb img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
}
.sf-detail-info {
    padding: 8px 0;
}
.sf-detail-name {
    font-size: 32px;
    font-weight: 800;
    margin: 0 0 8px;
    color: #1a1a1a;
    line-height: 1.2;
    letter-spacing: -0.5px;
}
.sf-detail-sku {
    font-size: 13px;
    color: #aaa;
    margin-bottom: 20px;
    display: block;
}
.sf-detail-price {
    font-size: 32px;
    font-weight: 800;
    color: #1a1a1a;
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}
.sf-price-current { color: #1a1a1a; }
.sf-detail-stock { margin-bottom: 24px; }
.sf-stock-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
}
.sf-stock-in { background: #e6f7e6; color: #2d7a2d; }
.sf-stock-low { background: #fff3e0; color: #e65100; }
.sf-stock-out { background: #fde8e8; color: #c62828; }
.sf-stock-digital { background: #e3f2fd; color: #1565c0; }
.sf-digital-formats { display: block; font-size: 0.85em; color: #666; margin-top: 6px; }
.sf-badge-digital { position: absolute; top: 12px; right: 12px; background: #1565c0; color: #fff; padding: 4px 10px; border-radius: 4px; font-size: 0.75em; font-weight: 600; z-index: 1; }

/* ---- Digital Download Links ---- */
.sf-downloads-section { margin-top: 30px; padding: 20px; background: #f8f9fa; border-radius: 8px; border: 1px solid #e0e0e0; }
.sf-downloads-section h3 { font-size: 1.1em; margin-bottom: 15px; color: #333; }
.sf-download-item { display: flex; align-items: center; justify-content: space-between; padding: 10px 15px; background: #fff; border: 1px solid #e0e0e0; border-radius: 6px; margin-bottom: 8px; }
.sf-download-item .sf-download-info { display: flex; align-items: center; gap: 10px; min-width: 0; }
.sf-download-item .sf-download-name { display: block; overflow-wrap: break-word; }
.sf-download-item .sf-download-meta { display: block; overflow-wrap: break-word; }
.sf-download-item .sf-download-info i { color: var(--sf-accent); font-size: 1.2em; }
.sf-download-item .sf-download-name { font-weight: 600; }
.sf-download-item .sf-download-meta { font-size: 0.85em; color: #888; }
.sf-download-btn { padding: 6px 16px; border-radius: 6px; font-size: 0.85em; font-weight: 600; text-decoration: none; border: none; cursor: pointer; }
.sf-download-btn-active { background: var(--sf-primary); color: #fff; }
.sf-download-btn-active:hover { opacity: 0.9; color: #fff; text-decoration: none; }
.sf-download-btn-disabled { background: #e0e0e0; color: #999; cursor: not-allowed; }

/* ---- Variant Selector ---- */
.sf-variant-selectors { margin-bottom: 24px; }
.sf-variant-group { margin-bottom: 12px; }
.sf-variant-label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    color: #555;
}
.sf-variant-select {
    width: 100%;
    max-width: 360px;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 14px;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s;
}
.sf-variant-select:focus {
    border-color: var(--sf-primary, #E57E00);
    outline: none;
    box-shadow: 0 0 0 3px rgba(229, 126, 0, 0.08);
}

/* ---- Quantity & Add to Cart ---- */
.sf-add-to-cart-row {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    margin-top: 28px;
    margin-bottom: 28px;
}
.sf-qty-wrapper { display: flex; flex-direction: column; }
.sf-qty-label {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #555;
    margin-bottom: 8px;
}
.sf-qty-input {
    width: 72px;
    padding: 12px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    transition: border-color 0.2s;
}
.sf-qty-input:focus {
    border-color: var(--sf-primary, #E57E00);
    outline: none;
    box-shadow: 0 0 0 3px rgba(229, 126, 0, 0.08);
}
.sf-qty-input::-webkit-outer-spin-button,
.sf-qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.sf-btn-add-cart {
    padding: 14px 32px;
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 12px;
    font-weight: 700;
    letter-spacing: 0.2px;
}

/* ---- Product Description ---- */
.sf-detail-description {
    margin-top: 36px;
    padding-top: 28px;
    border-top: 1px solid #eee;
}
.sf-detail-section-title {
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #333;
    margin: 0 0 16px;
}
.sf-detail-desc-content {
    font-size: 15px;
    line-height: 1.8;
    color: #666;
}

/* ---- Product Toast (inline) ---- */
#productToast {
    margin-top: 12px;
    padding: 0;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.3s ease;
}
#productToast.show {
    padding: 12px 18px;
    max-height: 60px;
    opacity: 1;
}
#productToast.success { background: #e6f7e6; color: #2d7a2d; }
#productToast.danger { background: #fde8e8; color: #c62828; }
#productToast.warning { background: #fff3e0; color: #e65100; }
#productToast.info { background: #e3f2fd; color: #1565c0; }

/* ---- Buttons ---- */
.sf-btn {
    display: inline-block;
    padding: 12px 28px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    text-align: center;
    letter-spacing: 0.2px;
}
.sf-btn:hover { text-decoration: none; filter: brightness(0.92); }
.sf-btn-primary {
    background: var(--sf-primary, #E57E00);
    color: #fff;
}
.sf-btn-primary:hover { color: #fff; }
.sf-btn-accent {
    background: var(--sf-accent, #025B92);
    color: #fff;
}
.sf-btn-outline {
    background: transparent;
    border: 2px solid var(--sf-primary, #E57E00);
    color: var(--sf-primary, #E57E00);
}
.sf-btn-outline:hover { background: var(--sf-primary, #E57E00); color: #fff; }
.sf-btn-danger { background: #e53e3e; color: #fff; }
.sf-btn-block { display: block; width: 100%; }
.sf-btn-sm { padding: 6px 14px; font-size: 13px; }
.sf-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---- Cart Page ---- */
.sf-cart-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 40px;
    align-items: start;
}
.sf-cart-table {
    width: 100%;
    border-collapse: collapse;
}
.sf-cart-th-image { width: 80px; }
.sf-cart-th-product { }
.sf-cart-th-price { width: 90px; }
.sf-cart-th-qty { width: 140px; }
.sf-cart-th-total { width: 90px; }
.sf-cart-th-remove { width: 50px; }
.sf-cart-table th {
    text-align: left;
    padding: 12px;
    border-bottom: 2px solid #eee;
    font-size: 11px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
}
.sf-cart-table td {
    padding: 16px 12px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}
.sf-cart-thumb {
    width: 70px;
    height: 70px;
    object-fit: contain;
    border-radius: 8px;
    background: #f8f8f8;
    display: block;
}
.sf-cart-no-image {
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    border-radius: 8px;
    color: #ccc;
    font-size: 24px;
}
.sf-cart-product-name {
    font-weight: 600;
    color: #1a1a1a;
    display: block;
    font-size: 14px;
}
.sf-cart-variant {
    font-size: 12px;
    color: #888;
    display: block;
    margin-top: 2px;
}
.sf-qty-spinner {
    display: inline-flex;
    align-items: center;
    gap: 0;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}
.sf-qty-btn {
    width: 34px;
    height: 34px;
    border: none;
    background: #f5f5f5;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
    transition: background 0.15s;
}
.sf-qty-btn:hover { background: #e8e8e8; }
.sf-cart-cell-price, .sf-cart-cell-total {
    font-weight: 600;
    font-size: 14px;
    color: #333;
}
.sf-cart-remove-btn {
    color: #ccc;
    cursor: pointer;
    background: none;
    border: none;
    font-size: 16px;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.15s;
}
.sf-cart-remove-btn:hover { color: #e53e3e; background: #fde8e8; }

/* ---- Cart Summary ---- */
.sf-cart-summary {
    padding: 28px;
    background: #fff;
    border-radius: 16px;
    border: 1px solid #eee;
    position: sticky;
    top: 96px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.sf-cart-tax-note {
    font-size: 13px;
    color: #888;
    margin: 12px 0 0;
    text-align: center;
}
.sf-total-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 15px;
}
.sf-total-grand {
    font-weight: 800;
    font-size: 18px;
    border-top: 2px solid #eee;
    padding-top: 12px;
    margin-top: 4px;
}

/* ---- Checkout Page ---- */
.sf-checkout-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 40px;
}
.sf-checkout-section {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 28px;
    margin-bottom: 20px;
}
.sf-checkout-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 16px;
    color: #1a1a1a;
}
.sf-order-summary-sidebar {
    position: sticky;
    top: 96px;
}
.sf-checkout-summary {
    position: sticky;
    top: 96px;
}
.sf-summary-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.sf-summary-title {
    font-size: 18px;
    font-weight: 800;
    margin: 0 0 20px;
    color: #1a1a1a;
}
.sf-summary-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #eee;
}
.sf-summary-item {
    display: flex;
    align-items: center;
    gap: 12px;
}
.sf-summary-item-image {
    position: relative;
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    border-radius: 10px;
    overflow: hidden;
    background: #f5f5f5;
    border: 1px solid #eee;
}
.sf-summary-item-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.sf-summary-item-noimage {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
    font-size: 20px;
}
.sf-summary-item-qty {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #666;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.sf-summary-item-details {
    flex: 1;
    min-width: 0;
}
.sf-summary-item-name {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sf-summary-item-variant {
    display: block;
    font-size: 12px;
    color: #888;
}
.sf-summary-item-price {
    font-size: 14px;
    font-weight: 600;
    color: #222;
    flex-shrink: 0;
}
.sf-summary-totals {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}
.sf-summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: #555;
}
.sf-summary-total {
    font-weight: 800;
    font-size: 16px;
    color: #1a1a1a;
    padding-top: 10px;
    border-top: 2px solid #eee;
    margin-top: 4px;
}
.sf-checkout-back-link {
    display: block;
    text-align: center;
    margin-top: 12px;
    font-size: 13px;
    color: var(--sf-primary, #E57E00);
    text-decoration: none;
}
.sf-checkout-back-link:hover { text-decoration: underline; }
.sf-btn-lg { padding: 16px 24px; font-size: 16px; }

/* ---- Forms ---- */
.sf-form-group { margin-bottom: 16px; }
.sf-form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #444;
}
.sf-input {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s;
}
.sf-input:focus {
    border-color: var(--sf-primary, #E57E00);
    outline: none;
    box-shadow: 0 0 0 3px rgba(229, 126, 0, 0.08);
}
.sf-select {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    background: #fff;
}
.sf-form-row { display: flex; gap: 16px; }
.sf-form-half { flex: 1; }
.sf-form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #444;
}
.sf-form-control {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    background: #fff;
    transition: all 0.2s;
    box-sizing: border-box;
}
.sf-form-control:focus {
    border-color: var(--sf-primary, #E57E00);
    outline: none;
    box-shadow: 0 0 0 3px rgba(229, 126, 0, 0.08);
}
select.sf-form-control {
    appearance: auto;
    cursor: pointer;
}
.sf-required { color: #e53e3e; }
.sf-checkout-section-title {
    font-size: 20px;
    font-weight: 800;
    margin: 0 0 20px;
    color: #1a1a1a;
}

/* ---- Auth Pages ---- */
.sf-auth-container {
    max-width: 440px;
    margin: 40px auto;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.sf-auth-tabs {
    display: flex;
    border-bottom: 1px solid #eee;
}
.sf-auth-tab {
    flex: 1;
    padding: 16px;
    text-align: center;
    border: none;
    background: #fafafa;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    color: #888;
    transition: all 0.2s;
}
.sf-auth-tab.active {
    background: #fff;
    color: var(--sf-primary, #E57E00);
    border-bottom: 2px solid var(--sf-primary, #E57E00);
}
.sf-auth-panel { padding: 28px; }
.sf-auth-message { margin: 12px 0; }

/* ---- Alerts ---- */
.sf-alert {
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
}
.sf-alert-success { background: #e6f7e6; color: #2d7a2d; }
.sf-alert-danger { background: #fde8e8; color: #c62828; }
.sf-alert-warning { background: #fff3e0; color: #e65100; }
.sf-alert-info { background: #e3f2fd; color: #1565c0; }

/* ---- Confirmation Page ---- */
.sf-confirmation {
    text-align: center;
    padding: 60px 20px;
    max-width: 700px;
    margin: 0 auto;
}
.sf-confirmation-icon {
    font-size: 64px;
    color: #2d7a2d;
    margin-bottom: 16px;
}
.sf-confirmation-icon.sf-icon-warning { color: #e65100; }
.sf-confirmation-title {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}
.sf-confirmation-subtitle {
    color: #666;
    font-size: 16px;
    margin-bottom: 30px;
}
.sf-order-summary-box {
    text-align: left;
    background: #fff;
    border-radius: 12px;
    padding: 28px;
    margin-bottom: 24px;
    border: 1px solid #eee;
}
.sf-order-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}
.sf-order-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 16px;
}
.sf-order-table th {
    text-align: left;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    font-size: 12px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
}
.sf-order-table td {
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}
.sf-order-totals { margin-top: 16px; }
.sf-shipping-summary {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #eee;
    font-size: 14px;
}
.sf-create-account-cta {
    background: #e3f2fd;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}
.sf-create-account-cta p { margin-bottom: 12px; }

/* ---- Account Page ---- */
.sf-account-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 40px;
}
.sf-account-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}
.sf-account-nav li { margin-bottom: 2px; }
.sf-account-nav a {
    display: block;
    padding: 10px 14px;
    color: #555;
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.15s;
}
.sf-account-nav a:hover { background: #f0f0f0; text-decoration: none; }
.sf-account-nav a.active {
    background: var(--sf-primary, #E57E00);
    color: #fff;
}
.sf-account-nav a i { width: 20px; margin-right: 8px; }
.sf-section-title {
    font-size: 24px;
    font-weight: 800;
    margin: 0 0 20px;
    color: #1a1a1a;
    letter-spacing: -0.3px;
}
.sf-divider {
    margin: 30px 0;
    border-color: #eee;
}

/* ---- Order Cards ---- */
.sf-orders-list { display: flex; flex-direction: column; gap: 12px; }
.sf-order-card {
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 20px;
    background: #fff;
    transition: box-shadow 0.2s;
}
.sf-order-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.04); }
.sf-order-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.sf-order-date {
    font-size: 13px;
    color: #888;
    margin-left: 12px;
}
.sf-order-card-body {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: #666;
}
.sf-order-total { font-weight: 700; color: #1a1a1a; }
.sf-order-tracking {
    font-size: 13px;
    color: #888;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #f0f0f0;
}

/* ---- Status Badges ---- */
.sf-status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
}
.sf-status-pending { background: #fff3e0; color: #e65100; }
.sf-status-processing { background: #e3f2fd; color: #1565c0; }
.sf-status-shipped { background: #e8eaf6; color: #283593; }
.sf-status-delivered { background: #e6f7e6; color: #2d7a2d; }
.sf-status-cancelled { background: #fde8e8; color: #c62828; }

/* ---- Addresses ---- */
.sf-addresses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}
.sf-address-card {
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 20px;
    background: #fff;
}

/* ---- Toast Notifications ---- */
.sf-toast {
    position: fixed;
    top: 80px;
    right: 20px;
    padding: 14px 24px;
    border-radius: 12px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    z-index: 10000;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    max-width: 400px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}
.sf-toast.show { opacity: 1; transform: translateY(0); }
.sf-toast.success { background: #2d7a2d; }
.sf-toast.danger { background: #c62828; }
.sf-toast.warning { background: #e65100; }
.sf-toast.info { background: #1565c0; }

/* ---- Footer ---- */
.sf-footer {
    background: #1a1a1a;
    color: #999;
    padding: 40px 20px;
    margin-top: 60px;
}
.sf-footer .sf-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.sf-footer a { color: var(--sf-primary, #E57E00); text-decoration: none; }
.sf-footer a:hover { text-decoration: underline; }
.sf-footer p { margin: 0; font-size: 14px; }
.sf-footer-powered {
    font-size: 12px;
    opacity: 0.6;
}

/* ============================================================
   Responsive Design - Mobile First
   ============================================================ */

@media (max-width: 1024px) {
    .sf-product-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }
    .sf-product-grid-4 { grid-template-columns: repeat(4, 1fr); }
    .sf-product-detail .row { gap: 32px; }
}

@media (max-width: 768px) {
    .sf-navbar .sf-container { height: 60px; gap: 12px; }
    .sf-logo { max-height: 40px; }
    .sf-brand-text { font-size: 18px; }
    .sf-nav-link span { display: none; }
    .sf-hero { min-height: 300px; }
    .sf-hero-title { font-size: 28px; }
    .sf-hero-subtitle { font-size: 15px; }
    .sf-hero-cta { padding: 12px 28px; font-size: 14px; }

    .sf-product-grid-4 { grid-template-columns: repeat(2, 1fr); }
    .sf-category-row { margin-bottom: 32px; }
    .sf-category-row-title { font-size: 18px; }

    /* Category nav — collapse to hamburger */
    .sf-catnav-list { display: none; flex-direction: column; width: 100%; }
    .sf-catnav-list.sf-catnav-open { display: flex; }
    .sf-catnav-mobile-toggle { display: flex; }
    .sf-catnav .sf-container { flex-direction: column; }
    .sf-catnav-link { padding: 12px 20px; justify-content: center; }
    .sf-catnav-dropdown {
        position: static;
        box-shadow: none;
        border-radius: 0;
        background: rgba(0,0,0,0.15);
    }
    .sf-has-dropdown .sf-catnav-dropdown { display: none; }
    .sf-has-dropdown.sf-dropdown-open .sf-catnav-dropdown { display: block; }
    .sf-catnav-dropdown li a { color: rgba(255,255,255,0.9); text-align: center; }
    .sf-catnav-dropdown li a:hover { background: rgba(255,255,255,0.1); color: #fff; }
    .sf-catnav-dropdown li a.active { color: #fff; }

    .sf-page-title { font-size: 22px; }
    .sf-toolbar { margin-bottom: 20px; }
    .sf-product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .sf-product-image { aspect-ratio: 1 / 1; }
    .sf-product-info { padding: 10px 12px 6px; }
    .sf-product-name { font-size: 13px; }
    .sf-product-price { font-size: 15px; }
    .sf-product-actions { padding: 4px 12px 12px; }
    .sf-btn-add-cart { padding: 8px 12px; font-size: 13px; border-radius: 8px; }
    .sf-product-category { display: none; }

    .sf-product-detail .row {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .sf-detail-name { font-size: 24px; }
    .sf-detail-price { font-size: 24px; }
    .sf-detail-info { padding: 0; }

    .sf-cart-layout { grid-template-columns: 1fr; }
    .sf-cart-summary { max-width: 100%; }
    .sf-cart-th-image, .sf-cart-cell-image { display: none; }

    .sf-checkout-layout { grid-template-columns: 1fr; }
    .sf-account-layout { grid-template-columns: 1fr; }
    .sf-form-row { flex-direction: column; gap: 0; }
    .sf-order-header { flex-direction: column; gap: 4px; }

    .sf-footer .sf-container { flex-direction: column; gap: 8px; text-align: center; }
}

@media (max-width: 480px) {
    .sf-product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .sf-product-info { padding: 8px 10px 4px; }
    .sf-product-name { font-size: 12px; }
    .sf-product-price { font-size: 14px; }
    .sf-product-actions { padding: 2px 10px 10px; }
    .sf-btn-add-cart { padding: 7px 10px; font-size: 12px; }
    .sf-page-title { font-size: 20px; }
    .sf-add-to-cart-row { flex-direction: column; align-items: stretch; }
    .sf-qty-wrapper { flex-direction: row; align-items: center; gap: 12px; }
}

/* ---- Utility ---- */
.sf-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}

/* ===== Pickup picker (Add-Pickup feature) ===== */
.sf-fulfillment-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.sf-fulfillment-choice {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    background: #fff;
    transition: border-color 120ms ease, background-color 120ms ease, box-shadow 120ms ease;
    position: relative;
    margin: 0;
}
.sf-fulfillment-choice:hover {
    border-color: #E57E00;
    background: #fff8f0;
}
.sf-fulfillment-choice.sf-shipping-selected {
    border-color: #E57E00;
    background: #fff8f0;
    box-shadow: 0 0 0 1px #E57E00 inset;
}
.sf-fulfillment-choice .sf-shipping-option-info { display: flex; flex-direction: column; gap: 2px; }
.sf-fulfillment-choice .sf-shipping-option-name { font-weight: 600; font-size: 1em; color: #1a1a1a; }
.sf-fulfillment-choice .sf-shipping-option-name i { margin-right: 6px; color: #E57E00; }
.sf-fulfillment-choice .sf-shipping-option-price { font-weight: 600; font-size: 0.95em; color: #1a1a1a; }
.sf-pickup-slots { background: #f8f9fa; border: 1px solid #dee2e6; border-radius: 6px; padding: 16px; }
.sf-pickup-help { font-size: 0.92em; color: #555; margin: 0 0 12px; }
.sf-pickup-group { background: #fff; border: 1px solid #e0e0e0; border-radius: 6px; padding: 14px; margin-bottom: 12px; }
.sf-pickup-group:last-child { margin-bottom: 0; }
.sf-pickup-group.sf-pickup-error { border-color: #dc3545; }
.sf-pickup-group-title { font-size: 1em; margin: 0 0 8px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.sf-pickup-lead-badge { background: #fff3e0; color: #c46500; padding: 2px 10px; border-radius: 12px; font-size: 0.75em; font-weight: 600; }
.sf-pickup-group-items { font-size: 0.85em; color: #666; padding-left: 18px; margin: 0 0 10px; }
.sf-pickup-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 600px) {
    .sf-fulfillment-toggle, .sf-pickup-controls { grid-template-columns: 1fr; }
}
