/* Storefront theme: category_hub — modern family with category-driven home hub */
@import url('modern.css');
@import url('classic.css');

.storefront-theme-category_hub {
    font-family: var(--storefront-font, var(--font-family, system-ui, sans-serif));
    background-color: #f8fafc;
}

.sf-dark .storefront-theme-category_hub,
.storefront-theme-category_hub.sf-dark,
html.sf-dark body.storefront-theme-category_hub {
    background-color: #09090b !important;
    color: #fafafa;
}

html.sf-dark body.storefront-theme-category_hub .sf-storefront-frame {
    background-color: #09090b;
}

.sf-dark .storefront-theme-category_hub .sf-category-hub-products,
.storefront-theme-category_hub.sf-dark .sf-category-hub-products {
    background-color: #09090b !important;
}

.sf-dark .storefront-theme-category_hub .sf-category-hub-card__media,
.storefront-theme-category_hub.sf-dark .sf-category-hub-card__media {
    background-color: #27272a !important;
}

/* ── Brand row (logo + branch name) ── */
.storefront-theme-category_hub .sf-category-hub-brand-wrap {
    background: linear-gradient(
        180deg,
        transparent 0%,
        color-mix(in srgb, #fff 88%, transparent) 38%,
        #fff 100%
    );
}

.sf-dark .storefront-theme-category_hub .sf-category-hub-brand-wrap,
.storefront-theme-category_hub.sf-dark .sf-category-hub-brand-wrap {
    background: linear-gradient(
        180deg,
        transparent 0%,
        color-mix(in srgb, #18181b 88%, transparent) 38%,
        #18181b 100%
    );
}

.storefront-theme-category_hub .sf-category-hub-brand-row {
    align-items: center;
}

.storefront-theme-category_hub .sf-category-hub-brand-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.125rem;
    min-width: 0;
}

.storefront-theme-category_hub .sf-category-hub-brand-copy h1,
.storefront-theme-category_hub .sf-category-hub-brand-copy p {
    overflow-wrap: anywhere;
}

.sf-dark .storefront-theme-category_hub .sf-category-hub-brand-copy h1 {
    color: #fafafa !important;
}

.sf-dark .storefront-theme-category_hub .sf-category-hub-brand-copy p {
    color: #a1a1aa !important;
}

.storefront-theme-category_hub .sf-category-hub-brand-logo {
    flex-shrink: 0;
}

.storefront-theme-category_hub .sf-modern-header {
    overflow: visible;
}

/* ── Recent orders on home ── */
.storefront-theme-category_hub .sf-recent-orders,
.storefront-theme-category_hub .sf-category-hub-recent-orders {
    background: transparent;
}

.storefront-theme-category_hub .sf-recent-orders-track,
.storefront-theme-category_hub .sf-category-hub-recent-orders-track {
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
}

.storefront-theme-category_hub .sf-category-hub-recent-order-card {
    scroll-snap-align: start;
}

.storefront-theme-category_hub .sf-category-hub-recent-order-hit {
    transition: background-color 0.15s ease;
}

.storefront-theme-category_hub .sf-category-hub-recent-order-card:active .sf-category-hub-recent-order-hit,
.storefront-theme-category_hub .sf-category-hub-recent-order-card:focus-within .sf-category-hub-recent-order-hit {
    background-color: color-mix(in srgb, var(--primary-color, #0d9488) 6%, transparent);
}

.storefront-theme-category_hub .sf-category-hub-recent-order-footer {
    min-height: 2.25rem;
}

.storefront-theme-category_hub .sf-category-hub-recent-order-actions {
    min-height: 2.25rem;
}

.storefront-theme-category_hub .sf-category-hub-recent-order-thumb {
    width: 2.75rem;
    height: 2.75rem;
    flex: none;
}

.storefront-theme-category_hub .sf-category-hub-recent-order-ref {
    letter-spacing: 0.02em;
}

.storefront-theme-category_hub .sf-category-hub-recent-order-meta {
    line-height: 1.35;
}

.sf-dark .storefront-theme-category_hub .sf-category-hub-recent-orders h2,
.storefront-theme-category_hub.sf-dark .sf-category-hub-recent-orders h2 {
    color: #fafafa !important;
}

.sf-dark .storefront-theme-category_hub .sf-category-hub-recent-order-card,
.storefront-theme-category_hub.sf-dark .sf-category-hub-recent-order-card {
    background-color: #18181b !important;
    border-color: #3f3f46 !important;
}

.storefront-theme-category_hub .sf-category-hub-recent-order-actions {
    position: relative;
}

.storefront-theme-category_hub .sf-category-hub-recent-order-action {
    position: relative;
}

.storefront-theme-category_hub .sf-category-hub-recent-order-action:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--primary-color, #0d9488) 55%, transparent);
    outline-offset: 2px;
}

/* ── Status + contact card ── */
.storefront-theme-category_hub .sf-category-hub-status-card {
    position: relative;
    z-index: 1;
}

.sf-dark .storefront-theme-category_hub .sf-category-hub-status-card > .rounded-2xl {
    background-color: #18181b !important;
    border-color: #3f3f46 !important;
}

.sf-dark .storefront-theme-category_hub .sf-category-hub-branch-row {
    border-color: #3f3f46 !important;
}

.sf-dark .storefront-theme-category_hub .sf-category-hub-branch-row button {
    color: #e4e4e7;
}

.sf-dark .storefront-theme-category_hub .sf-category-hub-branch-row button:hover {
    background-color: #27272a !important;
}

.storefront-theme-category_hub .sf-category-hub-status-card .sf-classic-branch-status {
    min-height: 2.25rem;
}

.storefront-theme-category_hub .sf-category-hub-branch-row button {
    min-height: 2.75rem;
}

.storefront-theme-category_hub .sf-category-hub-status-card .sf-classic-branch-status--compact {
    max-width: none;
    flex: 1 1 auto;
    min-width: 0;
}

.sf-dark .storefront-theme-category_hub .sf-category-hub-quick-action {
    background-color: #09090b !important;
    border-color: #3f3f46 !important;
    color: #e4e4e7 !important;
}

/* ── Bestsellers: grid strip (override modern flex) ── */
.storefront-theme-category_hub .sf-category-hub-bestsellers {
    background: transparent;
}

.sf-dark .storefront-theme-category_hub .sf-category-hub-bestsellers h2 {
    color: #fafafa !important;
}

.storefront-theme-category_hub .sf-category-hub-bestsellers-strip {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(10.5rem, 11.75rem);
    grid-template-rows: 1fr;
    align-items: stretch;
    gap: 0.75rem;
    overflow-x: auto;
    overscroll-x: contain;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
}

.storefront-theme-category_hub .sf-category-hub-bestsellers-strip::-webkit-scrollbar {
    display: none;
}

.storefront-theme-category_hub .sf-category-hub-bestsellers .sf-bestseller-card {
    scroll-snap-align: start;
    min-height: 15.5rem;
}

.sf-dark .storefront-theme-category_hub .sf-category-hub-bestsellers .sf-bestseller-card {
    background-color: #18181b !important;
    border-color: #3f3f46 !important;
}

.storefront-theme-category_hub .sf-category-hub-bestsellers .sf-bestseller-card__media {
    aspect-ratio: 1 / 1;
}

.sf-dark .storefront-theme-category_hub .sf-category-hub-bestsellers .sf-bestseller-card__media {
    background-color: #27272a !important;
}

.storefront-theme-category_hub .sf-category-hub-bestsellers .sf-card-body {
    padding: 0.75rem;
}

.storefront-theme-category_hub .sf-category-hub-bestsellers .sf-card-footer {
    padding-top: 0.5rem;
    min-height: 2.25rem;
    align-items: center;
}

.storefront-theme-category_hub .sf-category-hub-bestsellers .sf-product-action--unavailable {
    color: #64748b;
}

.sf-dark .storefront-theme-category_hub .sf-category-hub-bestsellers .sf-product-action--unavailable {
    color: #71717a;
}

/* ── Category hub grid cards ── */
.storefront-theme-category_hub .sf-category-hub-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

@media (min-width: 480px) {
    .storefront-theme-category_hub .sf-category-hub-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.storefront-theme-category_hub .sf-category-hub-card {
    overflow: hidden;
    border-radius: 1.15rem;
    border: 1px solid #e2e8f0;
    background: #fff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
    transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.sf-dark .storefront-theme-category_hub .sf-category-hub-card,
.storefront-theme-category_hub.sf-dark .sf-category-hub-card {
    border-color: #3f3f46;
    background: #18181b;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
}

.storefront-theme-category_hub .sf-category-hub-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
}

.sf-dark .storefront-theme-category_hub .sf-category-hub-card:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

.storefront-theme-category_hub .sf-category-hub-card__media {
    aspect-ratio: 1 / 1;
    width: auto;
}

.storefront-theme-category_hub .sf-category-hub-card__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.storefront-theme-category_hub .sf-category-hub-card__badge {
    background: #f1f5f9;
    color: #334155 !important;
    box-shadow: inset 0 0 0 1px color-mix(in srgb, #64748b 18%, transparent);
}


.sf-dark .storefront-theme-category_hub .sf-category-hub-card h2 {
    color: #fafafa !important;
}

.sf-dark .storefront-theme-category_hub .sf-empty-state {
    border-color: #3f3f46 !important;
    background-color: #18181b !important;
    color: #a1a1aa !important;
}

/* ── Category products (classic cards) ── */
.storefront-theme-category_hub .sf-category-hub-products .sf-classic-square-card,
.storefront-theme-category_hub .sf-category-hub-products .sf-classic-card {
    border-color: color-mix(in srgb, var(--primary-color, #0d9488) 10%, #e2e8f0);
}

.sf-dark .storefront-theme-category_hub .sf-category-hub-products .sf-classic-square-card,
.sf-dark .storefront-theme-category_hub .sf-category-hub-products .sf-classic-card {
    border-color: #3f3f46 !important;
    background-color: #18181b !important;
}

.storefront-theme-category_hub .sf-category-hub-products .sf-classic-square-card .sf-card-body > div > p,
.storefront-theme-category_hub .sf-category-hub-products .sf-classic-row p.line-clamp-3,
.storefront-theme-category_hub .sf-category-hub-products .sf-classic-row p.line-clamp-2 {
    font-size: 0.8125rem;
    line-height: 1.5;
    color: #475569;
    -webkit-line-clamp: 3;
}

.sf-dark .storefront-theme-category_hub .sf-category-hub-products .sf-classic-square-card .sf-card-body > div > p,
.sf-dark .storefront-theme-category_hub .sf-category-hub-products .sf-classic-row p {
    color: #a1a1aa !important;
}

.storefront-theme-category_hub .sf-product-action--add {
    background-color: var(--primary-color, #0d9488);
    box-shadow: 0 4px 14px color-mix(in srgb, var(--primary-color, #0d9488) 34%, transparent);
}

.storefront-theme-category_hub .sf-product-action--add:hover:not(:disabled) {
    background-color: color-mix(in srgb, var(--primary-color, #0d9488) 88%, #000);
}

.storefront-theme-category_hub .sf-product-action--view {
    background-color: #fff;
    color: var(--primary-color, #0d9488);
    border: 1px solid color-mix(in srgb, var(--primary-color, #0d9488) 28%, #e2e8f0);
    box-shadow: none;
}

.storefront-theme-category_hub .sf-product-action--view:hover:not(:disabled) {
    background-color: color-mix(in srgb, var(--primary-color, #0d9488) 8%, #fff);
}

.sf-dark .storefront-theme-category_hub .sf-product-action--add,
.storefront-theme-category_hub.sf-dark .sf-product-action--add {
    background-color: color-mix(in srgb, var(--primary-color, #0d9488) 72%, #fff);
    color: #fff;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.sf-dark .storefront-theme-category_hub .sf-product-action--add:hover:not(:disabled),
.storefront-theme-category_hub.sf-dark .sf-product-action--add:hover:not(:disabled) {
    background-color: color-mix(in srgb, var(--primary-color, #0d9488) 82%, #fff);
}

.sf-dark .storefront-theme-category_hub .sf-product-action--view,
.storefront-theme-category_hub.sf-dark .sf-product-action--view {
    background-color: #27272a;
    border-color: #52525b;
    color: #fafafa;
}

.sf-dark .storefront-theme-category_hub .sf-product-action--view:hover:not(:disabled),
.storefront-theme-category_hub.sf-dark .sf-product-action--view:hover:not(:disabled) {
    background-color: #3f3f46;
    color: #fff;
}

.storefront-theme-category_hub .sf-category-hub-show-header {
    border-bottom: 1px solid #e2e8f0;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(12px);
}

.sf-dark .storefront-theme-category_hub .sf-category-hub-show-header,
.storefront-theme-category_hub.sf-dark .sf-category-hub-show-header {
    border-bottom-color: #3f3f46;
    background: rgba(24, 24, 27, 0.94);
}

/* ── Dark mode: product cards & readable prices ── */
.sf-dark .storefront-theme-category_hub .sf-classic-square-card h2,
.sf-dark .storefront-theme-category_hub .sf-classic-card h2,
.storefront-theme-category_hub.sf-dark .sf-classic-square-card h2,
.storefront-theme-category_hub.sf-dark .sf-classic-card h2 {
    color: #fafafa !important;
}

.sf-dark .storefront-theme-category_hub .sf-classic-price-amount,
.sf-dark .storefront-theme-category_hub .sf-classic-price-amount .font-black,
.sf-dark .storefront-theme-category_hub .storefront-text-primary.sf-classic-price-amount,
.storefront-theme-category_hub.sf-dark .sf-classic-price-amount,
.storefront-theme-category_hub.sf-dark .sf-classic-price-amount .font-black,
.storefront-theme-category_hub.sf-dark .storefront-text-primary.sf-classic-price-amount {
    color: #fafafa !important;
}

.sf-dark .storefront-theme-category_hub .sf-classic-price-amount span.text-\[0\.72em\],
.storefront-theme-category_hub.sf-dark .sf-classic-price-amount span {
    color: #d4d4d8 !important;
    opacity: 1 !important;
}

.sf-dark .storefront-theme-category_hub .sf-classic-square-card .sf-product-snippet,
.sf-dark .storefront-theme-category_hub .sf-classic-row p,
.storefront-theme-category_hub.sf-dark .sf-classic-square-card .sf-product-snippet,
.storefront-theme-category_hub.sf-dark .sf-classic-row p {
    color: #a1a1aa !important;
}

.sf-dark .storefront-theme-category_hub .sf-category-hub-products .sf-classic-square-card,
.sf-dark .storefront-theme-category_hub .sf-category-hub-products .sf-classic-card,
.storefront-theme-category_hub.sf-dark .sf-category-hub-products .sf-classic-square-card,
.storefront-theme-category_hub.sf-dark .sf-category-hub-products .sf-classic-card {
    background-color: #18181b !important;
    border-color: #3f3f46 !important;
}

.sf-dark .storefront-theme-category_hub .sf-category-hub-products .sf-classic-square-card .relative.aspect-square,
.storefront-theme-category_hub.sf-dark .sf-category-hub-products .sf-classic-square-card .relative.aspect-square {
    background-color: #27272a !important;
}

.sf-dark .storefront-theme-category_hub .sf-category-hub-grid h2,
.storefront-theme-category_hub.sf-dark .sf-category-hub-grid h2 {
    color: #fafafa !important;
}

.sf-dark .storefront-theme-category_hub .sf-category-hub-show-header h1,
.sf-dark .storefront-theme-category_hub .sf-category-hub-show-header p,
.storefront-theme-category_hub.sf-dark .sf-category-hub-show-header h1,
.storefront-theme-category_hub.sf-dark .sf-category-hub-show-header p {
    color: #fafafa !important;
}

.sf-dark .storefront-theme-category_hub .sf-text-primary,
.storefront-theme-category_hub.sf-dark .sf-text-primary {
    color: #e4e4e7 !important;
}

.sf-dark .storefront-theme-category_hub .sf-category-hub-card__badge,
.storefront-theme-category_hub.sf-dark .sf-category-hub-card__badge {
    background: rgba(255, 255, 255, 0.16) !important;
    color: #fafafa !important;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.sf-dark .storefront-theme-category_hub .sf-category-hub-status-card .sf-text-primary,
.storefront-theme-category_hub.sf-dark .sf-category-hub-status-card .sf-text-primary {
    color: color-mix(in srgb, var(--primary-color, #6366f1) 45%, #e4e4e7) !important;
}

.sf-dark .storefront-theme-category_hub .sf-category-hub-status-card .sf-category-hub-quick-action,
.storefront-theme-category_hub.sf-dark .sf-category-hub-status-card .sf-category-hub-quick-action {
    color: #e4e4e7;
}

/* ── Header profile contact on light band ── */
.storefront-theme-category_hub .sf-category-hub-header .sf-classic-quick-action {
    border-color: #e2e8f0;
    background: #f8fafc;
    color: #334155;
}

.sf-dark .storefront-theme-category_hub .sf-category-hub-header .sf-classic-quick-action,
.storefront-theme-category_hub.sf-dark .sf-category-hub-header .sf-classic-quick-action {
    border-color: #3f3f46;
    background: #18181b;
    color: #e4e4e7;
}
