/*
Theme Name: Storefront Child - Wholesale CA
Template: storefront
Description: Modern wholesale e-commerce theme
Version: 3.0.0
*/

/* ============================================
   CSS VARIABLES
   ============================================ */
:root {
    --wca-primary: #2563eb;
    --wca-primary-dark: #1d4ed8;
    --wca-primary-light: #eff6ff;
    --wca-primary-rgb: 37, 99, 235;

    --wca-accent: #f97316;
    --wca-accent-dark: #ea580c;
    --wca-accent-light: #fff7ed;

    --wca-price: #dc2626;
    --wca-deal: #16a34a;
    --wca-deal-bg: #f0fdf4;

    --wca-bg: #f8fafc;
    --wca-white: #ffffff;
    --wca-text: #0f172a;
    --wca-text-secondary: #475569;
    --wca-text-light: #94a3b8;
    --wca-border: #e2e8f0;
    --wca-border-light: #f1f5f9;

    --wca-shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --wca-shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --wca-shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1);
    --wca-shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1);

    --wca-radius-sm: 6px;
    --wca-radius: 10px;
    --wca-radius-lg: 14px;
    --wca-radius-xl: 20px;
    --wca-radius-full: 9999px;

    --wca-max-width: 1280px;
    --wca-transition: 0.2s ease;
}

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after { box-sizing: border-box; }

body {
    background: var(--wca-bg) !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans', sans-serif !important;
    color: var(--wca-text) !important;
    margin: 0;
    -webkit-font-smoothing: antialiased;
}

.wca-container {
    max-width: var(--wca-max-width);
    margin: 0 auto;
    padding: 0 20px;
}

a { color: var(--wca-primary); text-decoration: none; }
a:hover { color: var(--wca-primary-dark); }

/* ============================================
   FULL WIDTH LAYOUT (no sidebar)
   ============================================ */
.wca-full-width .site-main,
.wca-full-width .content-area,
.wca-full-width #primary {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    margin: 0 !important;
}

.wca-full-width .widget-area,
.wca-full-width #secondary {
    display: none !important;
}

.wca-full-width .col-full {
    max-width: var(--wca-max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================
   TOP BAR
   ============================================ */
.wca-topbar {
    background: var(--wca-text);
    color: #fff;
    font-size: 12px;
    padding: 8px 0;
    letter-spacing: 0.02em;
}

.wca-topbar .wca-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wca-topbar-right {
    opacity: 0.7;
}

/* ============================================
   MAIN HEADER
   ============================================ */
.site-header {
    background: var(--wca-white) !important;
    border-bottom: none !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: var(--wca-shadow-sm) !important;
    position: sticky;
    top: 0;
    z-index: 999;
}

.wca-main-header {
    padding: 0;
}

.wca-header-inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 20px;
    padding: 10px 0;
}

.wca-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    flex-shrink: 0;
}

.wca-logo-icon {
    width: 40px;
    height: 40px;
    background: var(--wca-primary);
    color: #fff;
    border-radius: var(--wca-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 800;
}

.wca-logo-text {
    font-size: 16px;
    color: var(--wca-text);
    line-height: 1.2;
}

.wca-logo-text strong {
    display: block;
    font-size: 18px;
    font-weight: 800;
    color: var(--wca-primary);
}

.wca-logo-img {
    height: 36px;
    width: auto;
}

/* Search */
.wca-search-form {
    justify-self: center;
    width: 100%;
    max-width: 600px;
    height: 36px;
    display: flex;
    border: 2px solid var(--wca-border);
    border-radius: var(--wca-radius-full);
    overflow: hidden;
    transition: border-color var(--wca-transition), box-shadow var(--wca-transition);
}

.wca-search-form:focus-within {
    border-color: var(--wca-primary);
    box-shadow: 0 0 0 3px rgba(var(--wca-primary-rgb), 0.1);
}

.wca-search-input {
    flex: 1;
    border: none !important;
    padding: 5px 18px !important;
    font-size: 14px !important;
    outline: none !important;
    background: transparent !important;
    margin: 0 !important;
    box-shadow: none !important;
    color: var(--wca-text) !important;
}

.wca-search-input::placeholder {
    color: var(--wca-text-light);
}

.wca-search-btn {
    background: #000000 !important;
    border: none !important;
    color: #fff !important;
    padding: 0 18px !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: background var(--wca-transition);
}

.wca-search-btn:hover {
    background: #333333 !important;
}

/* Header actions */
.wca-header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    justify-self: end;
}

.wca-header-cart,
.wca-header-account {
    position: relative;
    color: var(--wca-text);
    padding: 6px;
    border-radius: var(--wca-radius);
    transition: all var(--wca-transition);
    display: flex;
    align-items: center;
}

.wca-header-cart:hover,
.wca-header-account:hover {
    background: var(--wca-bg);
    color: var(--wca-primary);
}

.wca-cart-count {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--wca-accent);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--wca-radius-full);
    padding: 0 4px;
}

/* ============================================
   CATEGORY NAVIGATION BAR
   ============================================ */
.wca-cat-nav {
    background: var(--wca-white);
    border-bottom: 1px solid var(--wca-border);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.wca-cat-nav::-webkit-scrollbar {
    display: none;
}

.wca-cat-nav .wca-container {
    display: flex;
    gap: 0;
    white-space: nowrap;
}

.wca-cat-nav-item {
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 500;
    color: var(--wca-text-secondary);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: all var(--wca-transition);
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.wca-cat-nav-item:hover {
    color: var(--wca-primary);
    border-bottom-color: var(--wca-primary);
}

.wca-cat-all {
    font-weight: 700;
    color: var(--wca-text);
}

/* ============================================
   CATEGORY CAROUSEL
   ============================================ */
.wca-cat-carousel-wrap {
    position: relative;
    margin: 2px 0 20px;
    padding: 0 36px;
}
.wca-cat-carousel {
    overflow: hidden;
}
.wca-cat-track {
    display: flex;
    gap: 10px;
    transition: transform 0.4s ease;
}
.wca-fcat-card {
    flex: 0 0 calc((100% - 70px) / 8);
    background: var(--wca-white);
    border: 1px solid var(--wca-border);
    border-radius: var(--wca-radius);
    padding: 14px 10px;
    text-align: center;
    text-decoration: none;
    transition: all var(--wca-transition);
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.wca-fcat-card:hover {
    border-color: var(--wca-primary);
    box-shadow: var(--wca-shadow-md);
    transform: translateY(-2px);
}
.wca-fcat-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--wca-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.wca-fcat-count {
    font-size: 11px;
    color: var(--wca-text-light);
}
.wca-fcat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 4px;
}
.wca-fcat-icon svg {
    width: 28px;
    height: 28px;
    color: #3b82f6;
}
.wca-fcat-card:hover .wca-fcat-icon svg {
    color: #2563eb;
}

.wca-cat-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid var(--wca-border);
    background: var(--wca-white);
    color: var(--wca-text);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 2;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 0;
    line-height: 1;
}
.wca-cat-arrow:hover {
    background: var(--wca-primary);
    color: #fff;
    border-color: var(--wca-primary);
}
.wca-cat-arrow:disabled {
    opacity: 0.3;
    cursor: default;
    background: var(--wca-white);
    color: var(--wca-text);
}
.wca-cat-prev { left: 0; }
.wca-cat-next { right: 0; }

/* ============================================
   PRODUCT GRID
   ============================================ */
.woocommerce ul.products {
    display: grid !important;
    grid-template-columns: repeat(5, 1fr) !important;
    gap: 12px !important;
    margin: 0 !important;
}

.woocommerce ul.products li.product {
    width: 100% !important;
    float: none !important;
    margin: 0 !important;
    padding: 0 !important;
    background: var(--wca-white);
    border: 1px solid var(--wca-border);
    border-radius: var(--wca-radius);
    overflow: hidden;
    transition: all var(--wca-transition);
    position: relative;
}

.woocommerce ul.products li.product:hover {
    box-shadow: var(--wca-shadow-lg);
    transform: translateY(-3px);
    border-color: transparent;
}

.woocommerce ul.products li.product a.woocommerce-LoopProduct-link {
    text-decoration: none;
}

/* Product image */
.woocommerce ul.products li.product a img,
.woocommerce ul.products li.product img {
    margin: 0 !important;
    border-radius: 0 !important;
    aspect-ratio: 1;
    object-fit: contain;
    background: #fafafa;
    padding: 8px;
}

/* Product title */
.woocommerce ul.products li.product .woocommerce-loop-product__title,
.woocommerce ul.products li.product h2 {
    font-size: 12px !important;
    font-weight: 500 !important;
    color: var(--wca-text) !important;
    padding: 6px 10px 3px !important;
    margin: 0 !important;
    line-height: 1.4 !important;
    text-align: center !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 38px;
}
/* Product card badge center */
.woocommerce ul.products li.product .wca-badge {
    text-align: center;
    display: block;
}


/* Product price - Line 1 */
.wca-price-line1 {
    font-size: 14px;
    line-height: 1.5;
    color: var(--wca-text);
}
.wca-price-line1 .wca-price-pk {
    font-weight: 700;
    font-size: 16px;
    color: var(--wca-price);
}
.wca-price-line1 .wca-price-sep {
    color: #ccc;
    margin: 0 2px;
}
.wca-price-line1 .wca-price-ea {
    color: #1a1a2e;
    font-size: 13px;
    font-weight: 700;
}
.wca-price-line1 .wca-tier-hint {
    color: var(--wca-deal);
    font-weight: 600;
    font-size: 12px;
}

/* Product price - Line 2 (bold info bar) */
.wca-price-line2 {
    font-size: 13px;
    font-weight: 700;
    color: #1a1a2e;
    background: #f0f4ff;
    padding: 6px 10px;
    margin-top: 6px;
    border-radius: var(--wca-radius-sm);
    border-left: 3px solid var(--wca-primary);
}

/* Grid cards: compact price */
.woocommerce ul.products li.product .price {
    padding: 0 10px !important;
}
.woocommerce ul.products li.product .wca-price-line1 {
    padding: 0 10px;
}
.woocommerce ul.products li.product .wca-price-line1 .wca-price-pk {
    font-size: 14px;
}
.woocommerce ul.products li.product .wca-price-line1 .wca-price-sep,
.woocommerce ul.products li.product .wca-price-line1 .wca-price-ea {
    font-size: 11px;
}
.woocommerce ul.products li.product .wca-price-line1 .wca-tier-hint {
    display: block;
    font-size: 11px;
    margin-top: 2px;
}
.woocommerce ul.products li.product .wca-price-line2 {
    margin: 4px 10px 0;
    font-size: 10px;
    padding: 3px 6px;
}

/* Single product: price display */
.single-product .wca-price-line1 {
    font-size: 15px;
}
.single-product .wca-price-line1 .wca-price-pk {
    font-size: 20px;
}
.single-product .wca-price-line2 {
    font-size: 14px;
    padding: 8px 12px;
    margin-top: 8px;
}

/* SKU on grid */
.wca-grid-sku {
    padding: 2px 10px;
    font-size: 10px;
    color: var(--wca-text-light);
}

/* Add to cart button on grid */
.woocommerce ul.products li.product .button,
.woocommerce ul.products li.product a.add_to_cart_button {
    display: block !important;
    text-align: center !important;
    margin: 6px 10px 10px !important;
    padding: 6px 10px !important;
    background: #000000 !important;
    color: #fff !important;
    border: none !important;
    border-radius: var(--wca-radius-sm) !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    transition: background var(--wca-transition) !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
}

.woocommerce ul.products li.product .button:hover,
.woocommerce ul.products li.product a.add_to_cart_button:hover {
    background: #333333 !important;
}

/* Badge */
.wca-badge {
    position: absolute !important;
    top: 10px !important;
    left: 10px !important;
    right: auto !important;
    border-radius: var(--wca-radius-full) !important;
    font-size: 9px !important;
    padding: 2px 8px !important;
    z-index: 3 !important;
}

/* ============================================
   PRODUCT COUNT & ORDERING
   ============================================ */
.storefront-sorting {
    display: flex !important;
    align-items: center !important;
    gap: 16px !important;
    margin-bottom: 16px !important;
    padding: 6px 14px !important;
    background: var(--wca-white) !important;
    border: 1px solid var(--wca-border) !important;
    border-radius: var(--wca-radius) !important;
}

.storefront-sorting .woocommerce-ordering {
    float: none !important;
    margin: 0 !important;
    order: 1;
}

.storefront-sorting .woocommerce-ordering select {
    border: 1px solid var(--wca-border);
    border-radius: var(--wca-radius-sm);
    padding: 7px 12px;
    font-size: 13px;
    background: var(--wca-white);
}

.storefront-sorting .woocommerce-result-count {
    float: none !important;
    margin: 0 !important;
    font-size: 13px;
    color: var(--wca-text-secondary);
    order: 2;
}

.storefront-sorting .wca-per-page {
    order: 3;
    margin-left: auto;
}

/* Hide duplicate bottom sorting bar */
.storefront-sorting + .products + .storefront-sorting {
    display: none !important;
}

@media (max-width: 768px) {
    .storefront-sorting {
        flex-wrap: wrap !important;
        gap: 10px !important;
        padding: 10px 12px !important;
    }
    .storefront-sorting .wca-per-page {
        margin-left: 0;
        width: 100%;
        justify-content: flex-end;
    }
}

/* ============================================
   PAGINATION
   ============================================ */
.woocommerce nav.woocommerce-pagination ul {
    border: none !important;
}

.woocommerce nav.woocommerce-pagination ul li {
    border: none !important;
}

.woocommerce nav.woocommerce-pagination ul li a,
.woocommerce nav.woocommerce-pagination ul li span {
    border-radius: var(--wca-radius-sm) !important;
    padding: 4px 10px !important;
    font-size: 12px !important;
    min-width: 28px !important;
    line-height: 1.4 !important;
    font-size: 14px !important;
    color: var(--wca-text-secondary) !important;
    background: var(--wca-white) !important;
    border: 1px solid var(--wca-border) !important;
    margin: 0 3px !important;
}

.woocommerce nav.woocommerce-pagination ul li span.current {
    background: #000000 !important;
    color: #fff !important;
    border-color: var(--wca-primary) !important;
}

.woocommerce nav.woocommerce-pagination ul li a:hover {
    background: var(--wca-primary-light) !important;
    color: var(--wca-primary) !important;
    border-color: var(--wca-primary) !important;
}

/* ============================================
   SINGLE PRODUCT PAGE
   ============================================ */
.single-product .site-main {
    width: 100% !important;
    max-width: 100% !important;
}

.single-product .col-full {
    max-width: var(--wca-max-width);
    margin: 0 auto;
}

.single-product div.product {
    background: var(--wca-white);
    border-radius: var(--wca-radius-lg);
    padding: 24px;
    margin-top: 4px;
    box-shadow: var(--wca-shadow-sm);
}

.single-product .product_title {
    font-size: 24px !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    margin-bottom: 12px !important;
}

.single-product .single_add_to_cart_button {
    background: #000000 !important;
    color: #fff !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    padding: 14px 40px !important;
    border-radius: var(--wca-radius) !important;
    border: none !important;
    width: 100%;
    transition: all var(--wca-transition);
    text-transform: none !important;
    letter-spacing: 0;
}

.single-product .single_add_to_cart_button:hover {
    background: #333333 !important;
    box-shadow: var(--wca-shadow-md);
}

/* Hide default qty (tier radio controls it) */
.single-product .quantity {
    position: absolute !important;
    opacity: 0 !important;
    pointer-events: none !important;
    height: 0 !important;
    overflow: hidden !important;
}

/* ============================================
   TIER QUANTITY SELECTOR (Coupang Style)
   ============================================ */
.wca-tier-wrap {
    margin: 20px 0 16px;
}

.wca-tier-header {
    font-size: 14px;
    font-weight: 700;
    color: var(--wca-text);
    margin-bottom: 10px;
}

.wca-qty-tiers {
    border: 1px solid var(--wca-border);
    border-radius: var(--wca-radius);
    overflow: hidden;
    background: var(--wca-white);
}

.wca-tier-row {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid var(--wca-border-light);
    cursor: pointer;
    transition: background var(--wca-transition);
    gap: 12px;
    margin: 0;
    font-weight: 400;
}

.wca-tier-row:last-child { border-bottom: none; }
.wca-tier-row:hover { background: #f8fafc; }

.wca-tier-row.selected {
    background: var(--wca-primary-light);
}

.wca-tier-row input[type="radio"] { display: none; }

.wca-tier-radio-dot {
    width: 20px;
    height: 20px;
    min-width: 20px;
    border-radius: 50%;
    border: 2px solid #cbd5e1;
    position: relative;
    transition: all var(--wca-transition);
    flex-shrink: 0;
}

.wca-tier-row.selected .wca-tier-radio-dot {
    border-color: var(--wca-primary);
}

.wca-tier-row.selected .wca-tier-radio-dot::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--wca-primary);
}

.wca-tier-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.wca-tier-qty-label {
    font-size: 15px;
    font-weight: 600;
    color: var(--wca-text);
}

.wca-tier-save-text {
    font-size: 12px;
    color: var(--wca-deal);
    font-weight: 500;
}

.wca-tier-price-col {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    flex-shrink: 0;
}

.wca-tier-total {
    font-size: 16px;
    font-weight: 700;
    color: var(--wca-text);
}

.wca-tier-row.selected .wca-tier-total {
    color: var(--wca-primary-dark);
}

.wca-tier-badge {
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    background: var(--wca-price);
    padding: 2px 7px;
    border-radius: var(--wca-radius-full);
}

.wca-tier-ref {
    margin-top: 8px;
    font-size: 12px;
    color: var(--wca-text-light);
    text-align: right;
}

/* ============================================
   SPECS TABLE
   ============================================ */
.wca-specs {
    margin-top: 24px;
    background: var(--wca-bg);
    border-radius: var(--wca-radius);
    padding: 20px;
}

.wca-specs h4 {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 12px;
}

.wca-specs ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.wca-specs li {
    padding: 8px 0;
    border-bottom: 1px solid var(--wca-border-light);
    font-size: 14px;
    color: var(--wca-text-secondary);
}

.wca-specs li:last-child { border-bottom: none; }
.wca-specs li strong { color: var(--wca-text); }

/* ============================================
   BREADCRUMB
   ============================================ */
.wca-breadcrumb,
.woocommerce .woocommerce-breadcrumb {
    font-size: 13px;
    color: var(--wca-text-light);
    padding: 0;
    margin-bottom: 0;
}

.wca-breadcrumb a,
.woocommerce .woocommerce-breadcrumb a {
    color: var(--wca-text-secondary);
}

.wca-breadcrumb a:hover,
.woocommerce .woocommerce-breadcrumb a:hover {
    color: var(--wca-primary);
}

.wca-breadcrumb-sep { margin: 0 6px; color: #cbd5e1; }

/* ============================================
   CART & CHECKOUT
   ============================================ */
.wca-cart-sku {
    color: var(--wca-text-light);
    font-size: 12px;
}

.woocommerce-cart .woocommerce table.shop_table {
    border-radius: var(--wca-radius);
    border: 1px solid var(--wca-border);
    overflow: hidden;
}

.woocommerce-cart .woocommerce table.shop_table th {
    background: var(--wca-bg);
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.woocommerce .wc-proceed-to-checkout a.checkout-button {
    background: var(--wca-accent) !important;
    color: #fff !important;
    border-radius: var(--wca-radius) !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    padding: 16px !important;
    transition: all var(--wca-transition);
}

.woocommerce .wc-proceed-to-checkout a.checkout-button:hover {
    background: var(--wca-accent-dark) !important;
}

.woocommerce-checkout #place_order {
    background: var(--wca-accent) !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    padding: 16px 32px !important;
    border-radius: var(--wca-radius) !important;
    width: 100%;
}

.woocommerce-checkout input,
.woocommerce-checkout select {
    border-radius: var(--wca-radius-sm) !important;
    border: 1px solid var(--wca-border) !important;
    padding: 10px 14px !important;
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
    background: var(--wca-text) !important;
    margin: 0 !important;
    padding: 0 !important;
}

.wca-footer {
    background: var(--wca-text);
    color: #94a3b8;
    padding: 48px 0 0;
}

.wca-footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    max-width: var(--wca-max-width);
    margin: 0 auto;
    padding: 0 20px;
}

.wca-footer h4 {
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 16px;
}

.wca-footer p {
    font-size: 14px;
    line-height: 1.6;
}

.wca-footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.wca-footer li {
    padding: 4px 0;
    font-size: 14px;
}

.wca-footer a {
    color: #94a3b8;
    transition: color var(--wca-transition);
}

.wca-footer a:hover {
    color: #fff;
}

.wca-footer-bottom {
    text-align: center;
    padding: 24px 20px;
    margin-top: 40px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 13px;
}

/* ============================================
   MOBILE RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .woocommerce ul.products {
        grid-template-columns: repeat(3, 1fr) !important;
    }
    .wca-fcat-card {
        flex: 0 0 calc((100% - 40px) / 5);
    }
}

@media (max-width: 768px) {
    .wca-header-inner {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 6px;
        padding: 8px 0;
    }

    .wca-mobile-menu-btn { order: 1; }
    .wca-logo-text { display: none; }
    .wca-logo-img { max-height: 32px; }

    .wca-logo { order: 2; flex: 1; text-align: center; }

    .wca-header-actions {
        order: 3;
        gap: 4px;
        flex-shrink: 0;
    }
    .wca-header-cart, .wca-header-account { padding: 4px; }

    .wca-search-form {
        order: 4;
        flex: 1 1 100%;
        max-width: none;
        min-width: 0;
    }

    .wca-topbar-right { display: none; }

    .wca-cat-carousel-wrap {
        padding: 0;
        margin: 4px 0 12px;
    }
    .wca-cat-carousel {
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .wca-cat-carousel::-webkit-scrollbar { display: none; }
    .wca-cat-track {
        transition: none !important;
        transform: none !important;
    }
    .wca-cat-arrow { display: none !important; }
    .wca-fcat-card {
        flex: 0 0 auto;
        min-width: 80px;
        padding: 8px 6px;
    }
    .wca-fcat-icon img { width: 22px; height: 22px; }
    .wca-fcat-name { font-size: 11px; }
    .wca-fcat-count { font-size: 10px; }

    .woocommerce ul.products {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }

    .woocommerce ul.products li.product .woocommerce-loop-product__title,
    .woocommerce ul.products li.product h2 {
        font-size: 12px !important;
        padding: 6px 8px 2px !important;
        min-height: 38px;
    }

    .woocommerce ul.products li.product .price {
        padding: 0 8px !important;
    }
    .woocommerce ul.products li.product .wca-price-line1 {
        padding: 0 8px;
        font-size: 12px;
    }
    .woocommerce ul.products li.product .wca-price-line1 .wca-price-pk {
        font-size: 14px;
    }
    .woocommerce ul.products li.product .wca-price-line2 {
        margin: 4px 8px 0;
        font-size: 10px;
        padding: 3px 6px;
    }

    .woocommerce ul.products li.product .button {
        margin: 6px 8px 8px !important;
        padding: 7px 8px !important;
        font-size: 12px !important;
    }

    .single-product div.product {
        padding: 16px;
    }

    .single-product .product_title {
        font-size: 20px !important;
    }

    .wca-footer-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .wca-tier-row { padding: 12px 14px; gap: 10px; }
    .wca-tier-qty-label { font-size: 14px; }
    .wca-tier-total { font-size: 15px; }
}

@media (max-width: 480px) {
    .wca-hero-text h1 { font-size: 20px; }
    .wca-hero-stats { flex-direction: column; gap: 8px; }
}


/* Tablet: 3 columns */
@media (min-width: 769px) and (max-width: 1024px) {
    .woocommerce ul.products {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 10px !important;
    }
}

/* ============================================
   STOREFRONT OVERRIDES (hide old elements)
   ============================================ */
.storefront-handheld-footer-bar,
.site-header .site-branding,
.site-header .site-search,
.site-header .site-header-cart,
.site-header .secondary-navigation,
.storefront-primary-navigation,
.main-navigation,
p.storefront-handheld-footer-bar { display: none !important; }

.storefront-sorting { margin-bottom: 16px !important; }

/* WooCommerce message styling */
.woocommerce-message,
.woocommerce-info {
    border-top-color: var(--wca-primary) !important;
    border-radius: var(--wca-radius-sm);
}

.woocommerce-message::before {
    color: var(--wca-primary) !important;
}

/* Star ratings */
.star-rating span::before {
    color: #f59e0b !important;
}

/* Force reduce gap between breadcrumb and hero */
.woocommerce-products-header,
.woocommerce-breadcrumb {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

.storefront-breadcrumb {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}
.storefront-breadcrumb .woocommerce-breadcrumb {
    margin: 0 !important;
    padding: 0 !important;
}

/* ============================================
   HOMEPAGE - WCA Landing Page
   ============================================ */
.wca-home {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

/* Hero */
.wca-home-hero {
    background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 50%, #3b82f6 100%);
    border-radius: 20px;
    margin: 12px 0 20px;
    padding: 56px 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.wca-home-hero::before {
    content: '';
    position: absolute;
    top: -80px; right: -60px;
    width: 300px; height: 300px;
    background: rgba(255,255,255,0.04);
    border-radius: 50%;
}
.wca-home-hero::after {
    content: '';
    position: absolute;
    bottom: -60px; left: -40px;
    width: 220px; height: 220px;
    background: rgba(255,255,255,0.03);
    border-radius: 50%;
}
.wca-home-hero-inner {
    position: relative;
    z-index: 1;
}
.wca-home-hero h1 {
    font-size: 48px;
    font-weight: 900;
    color: #fff;
    margin: 0 0 8px;
    line-height: 1.1;
    letter-spacing: -0.03em;
}
.wca-home-hero h1 span {
    color: #93c5fd;
}
.wca-home-hero-sub {
    font-size: 18px;
    color: rgba(255,255,255,0.8);
    margin: 0 0 32px;
    font-weight: 400;
}
.wca-home-hero-stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 32px;
    margin-bottom: 32px;
}
.wca-home-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.wca-home-stat-num {
    font-size: 24px;
    font-weight: 800;
    color: #fff;
}
.wca-home-stat-label {
    font-size: 13px;
    color: rgba(255,255,255,0.7);
    margin-top: 2px;
}
.wca-home-stat-divider {
    width: 1px;
    height: 36px;
    background: rgba(255,255,255,0.2);
}
.wca-home-hero-btn {
    display: inline-block;
    background: #fff;
    color: #1e3a5f;
    padding: 14px 40px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 16px;
    text-decoration: none;
    transition: all 0.2s;
    box-shadow: 0 4px 14px rgba(0,0,0,0.15);
}
.wca-home-hero-btn:hover {
    background: #f0f9ff;
    color: #1e3a5f;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

/* Badge Quick Links */
.wca-home-badges {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 32px;
}
.wca-home-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 12px;
    border-radius: 14px;
    text-decoration: none;
    transition: all 0.2s;
    border: 2px solid transparent;
}
.wca-home-badge:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}
.wca-hbadge-new { background: #ecfdf5; border-color: #a7f3d0; }
.wca-hbadge-new:hover { border-color: #34d399; background: #d1fae5; }
.wca-hbadge-popular { background: #fef2f2; border-color: #fecaca; }
.wca-hbadge-popular:hover { border-color: #f87171; background: #fee2e2; }
.wca-hbadge-lowstock { background: #fffbeb; border-color: #fde68a; }
.wca-hbadge-lowstock:hover { border-color: #f59e0b; background: #fef3c7; }
.wca-hbadge-lastfew { background: #faf5ff; border-color: #ddd6fe; }
.wca-hbadge-lastfew:hover { border-color: #a78bfa; background: #ede9fe; }

.wca-home-badge-icon { font-size: 32px; margin-bottom: 8px; }
.wca-home-badge-name { font-size: 15px; font-weight: 700; color: #1e293b; }
.wca-home-badge-count { font-size: 12px; color: #64748b; margin-top: 2px; }

/* Section */
.wca-home-section {
    margin-bottom: 40px;
}
.wca-home-section-title {
    font-size: 24px;
    font-weight: 800;
    color: #1e293b;
    margin: 0 0 20px;
    letter-spacing: -0.02em;
}
.wca-home-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.wca-home-section-header .wca-home-section-title {
    margin-bottom: 0;
}
.wca-home-view-all {
    font-size: 14px;
    font-weight: 600;
    color: #2563eb;
    text-decoration: none;
}
.wca-home-view-all:hover { color: #1d4ed8; text-decoration: underline; }

/* Category Cards */
.wca-home-cats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}
.wca-home-cat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 12px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    text-decoration: none;
    transition: all 0.2s;
}
.wca-home-cat-card:hover {
    border-color: #2563eb;
    background: #f8fafc;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37,99,235,0.1);
}
.wca-home-cat-emoji { font-size: 36px; margin-bottom: 10px; }
.wca-home-cat-name { font-size: 14px; font-weight: 700; color: #1e293b; text-align: center; }
.wca-home-cat-count { font-size: 12px; color: #94a3b8; margin-top: 4px; }

/* Product Grid */
.wca-home-products {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}
.wca-home-product-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    transition: all 0.2s;
}
.wca-home-product-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}
.wca-home-product-img {
    aspect-ratio: 1;
    overflow: hidden;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
}
.wca-home-product-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 8px;
}
.wca-home-product-info {
    padding: 12px;
    text-align: center;
}
.wca-home-product-info h3 {
    font-size: 12px;
    font-weight: 500;
    color: var(--wca-text);
    margin: 0 0 6px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-align: center;
    min-height: 38px;
}
.wca-home-product-price {
    font-size: 16px;
    font-weight: 800;
    color: #dc2626;
    text-align: center;
    display: block;
}
.wca-home-product-price .wca-price-line1 {
    text-align: center;
}
.wca-home-product-price .wca-price-ea-line {
    text-align: center;
}
.wca-home-product-price .wca-max-discount {
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    color: #16a34a;
    padding: 2px 0 0;
    line-height: 1.4;
}
.wca-home-product-price del {
    font-size: 12px;
    color: #94a3b8;
    font-weight: 400;
}

/* Features */
.wca-home-features {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}
.wca-home-feature {
    text-align: center;
    padding: 28px 16px;
    background: #f8fafc;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
}
.wca-home-feature-icon { font-size: 40px; margin-bottom: 12px; }
.wca-home-feature h3 {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 6px;
}
.wca-home-feature p {
    font-size: 13px;
    color: #64748b;
    margin: 0;
    line-height: 1.5;
}

/* CTA */
.wca-home-cta {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    border-radius: 20px;
    padding: 48px 40px;
    text-align: center;
    margin-bottom: 40px;
}
.wca-home-cta h2 {
    font-size: 28px;
    font-weight: 800;
    color: #fff;
    margin: 0 0 8px;
}
.wca-home-cta p {
    font-size: 16px;
    color: rgba(255,255,255,0.7);
    margin: 0 0 24px;
}
.wca-home-cta-btn {
    display: inline-block;
    background: #2563eb;
    color: #fff;
    padding: 14px 40px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 16px;
    text-decoration: none;
    transition: all 0.2s;
}
.wca-home-cta-btn:hover {
    background: #1d4ed8;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37,99,235,0.4);
}

/* Hide default page title on homepage */
.page-template-template-homepage .entry-header,

.page-template-template-homepage .wca-featured-cats,
.page-template-template-homepage .storefront-breadcrumb,
.page-template-template-homepage .woocommerce-breadcrumb {
    display: none !important;
}

/* Mobile */
@media (max-width: 768px) {
    .wca-home-hero { padding: 36px 20px; margin: 8px 0 16px; }
    .wca-home-hero h1 { font-size: 32px; }
    .wca-home-hero-sub { font-size: 15px; margin-bottom: 24px; }
    .wca-home-hero-stats { gap: 16px; }
    .wca-home-stat-num { font-size: 18px; }
    .wca-home-hero-btn { padding: 12px 32px; font-size: 14px; }

    .wca-home-badges { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .wca-home-badge { padding: 14px 8px; }
    .wca-home-badge-icon { font-size: 24px; }

    .wca-home-cats { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .wca-home-cat-card { padding: 16px 8px; }
    .wca-home-cat-emoji { font-size: 28px; }

    .wca-home-products { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .wca-home-features { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .wca-home-feature { padding: 20px 12px; }

    .wca-home-cta { padding: 32px 20px; }
    .wca-home-cta h2 { font-size: 22px; }

    .wca-home-section-title { font-size: 20px; }
}

@media (max-width: 480px) {
    .wca-home-hero h1 { font-size: 28px; }
    .wca-home-hero-stats { flex-direction: column; gap: 8px; }
    .wca-home-stat-divider { width: 40px; height: 1px; }
    .wca-home-badges { grid-template-columns: repeat(2, 1fr); }
    .wca-home-products { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .wca-home-features { grid-template-columns: 1fr 1fr; gap: 8px; }
}

/* SVG Icon Styles */
.wca-home-cat-icon {
    display: block;
    margin: 0 auto 8px;
    width: 48px;
    height: 48px;
    opacity: 0.85;
    transition: opacity 0.2s, transform 0.2s;
}
.wca-home-cat-card:hover .wca-home-cat-icon {
    opacity: 1;
    transform: scale(1.1);
}
.wca-badge-icon {
    display: inline-block;
    vertical-align: middle;
    margin-right: 4px;
    width: 20px;
    height: 20px;
}
.wca-footer-icon {
    display: inline-block;
    vertical-align: middle;
    margin-right: 4px;
    filter: brightness(0) invert(0.7);
}

/* ============================================
   FIX: Product grid - override Storefront floats
   ============================================ */
.site-main ul.products.columns-4 li.product,
.site-main ul.products.columns-5 li.product,
.woocommerce ul.products li.product,
ul.products li.product.first,
ul.products li.product.last,
.woocommerce ul.products li.product.first,
.woocommerce ul.products li.product.last {
    width: 100% !important;
    float: none !important;
    clear: none !important;
    margin: 0 !important;
    margin-right: 0 !important;
}
ul.products li.product-category {
    width: 100% !important;
    float: none !important;
    clear: none !important;
    margin: 0 !important;
}
.woocommerce ul.products::after,
.woocommerce ul.products::before {
    display: none !important;
}

/* Badge SVG icons */
.wca-home-badge-svg {
    display: block;
    margin: 0 auto 6px;
    width: 32px;
    height: 32px;
}
.wca-hbadge-new .wca-home-badge-svg { filter: hue-rotate(200deg) saturate(1.5); }
.wca-hbadge-popular .wca-home-badge-svg { filter: hue-rotate(-10deg) saturate(2) brightness(0.9); }
.wca-hbadge-lowstock .wca-home-badge-svg { filter: hue-rotate(30deg) saturate(2); }
.wca-hbadge-lastfew .wca-home-badge-svg { filter: hue-rotate(240deg) saturate(1.2); }

/* Center-align price on product cards */
.woocommerce ul.products li.product .wca-price-line1 {
    text-align: center;
}
.woocommerce ul.products li.product .wca-price-ea-line {
    text-align: center;
}
.woocommerce ul.products li.product .wca-max-discount {
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    color: #16a34a;
    padding: 2px 10px 6px;
    line-height: 1.4;
}
.wca-buy-more {
    text-decoration: underline;
    font-weight: 700;
}

/* Mobile: (XX EA) on new line */
@media (max-width: 768px) {
    .woocommerce ul.products li.product .wca-price-pcs {
        display: block;
        font-size: 11px;
        font-weight: 500;
    }
}


/* Per-page selector */
.wca-per-page {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--wca-text-secondary);
    margin-left: auto;
}
.wca-per-page label {
    font-weight: 500;
    white-space: nowrap;
}
.wca-per-page select {
    border: 1px solid var(--wca-border);
    border-radius: var(--wca-radius-sm);
    padding: 7px 12px;
    font-size: 13px;
    background: var(--wca-white);
    color: var(--wca-text);
    cursor: pointer;
}
.wca-per-page select:hover {
    border-color: var(--wca-primary);
}
@media (max-width: 768px) {
    .wca-per-page {
        margin-left: 0;
    }
}
