/*
 * Theme Name:  EBHTOOLS
 * Description: A custom WooCommerce theme for EBHTOOLS — tool & hardware e-commerce store.
 * Version:     1.1.0
 * Author:      EBH Tools
 * Text Domain: ebhtools
 * Requires at least: 6.0
 * Requires PHP: 7.4
 * Tags: e-commerce, woocommerce, custom-menu, custom-logo, theme-options
 */

/* =====================================================
   CSS VARIABLES — change colours here, updates everywhere
   ===================================================== */
:root {
    --color-primary: #026164; /* teal — brand accent */
    --color-dark: #1a1c1c;
    --color-mid: #16213e;
    --color-light: #f9f9f9;
    --color-border: #d5dce5;
    --color-text: #3f4949;
    --color-muted: #718096;
    --font-main: 'Inter', system-ui, sans-serif;
    --font-display: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
    --radius: 8px;
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    --transition: 0.25s ease;
}

/* =====================================================
   RESET
   ===================================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    /* Keep scrollbar lane always — prevents width jump + sticky header drop */
    overflow-y: scroll;
    scrollbar-gutter: stable;
}

html.has-lenis {
    scroll-behavior: auto;
}

.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

/* =====================================================
   INTRO / PAGE-TRANSITION LOADER
   ===================================================== */
.ebh-loader {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent; /* page stays visible underneath */
    overflow: hidden;
    pointer-events: none;
    opacity: 1;
    visibility: visible;
    transform: none;
}

/* Cold load / refresh only — solid start so unfinished paint isn't shown */
.ebh-loader.is-animating {
    background: #f3f3f3;
}

.ebh-loader.is-done {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

.ebh-loader.is-leaving,
.ebh-loader.is-enter,
.ebh-loader.is-covered,
.ebh-loader.is-exiting {
    background: transparent;
    pointer-events: all;
}

/* Do NOT set overflow:hidden here — it hides the scrollbar, breaks sticky
   positioning on .site-header (header “drops”), then snaps back on finish.
   Scroll is blocked in JS while .ebh-loading is present. */
html.ebh-loading {
    background: #061c1c;
}

.ebh-loader__panels {
    position: absolute;
    inset: 0;
    display: flex;
    width: 100%;
    height: 100%;
    transform: translateX(100%);
    will-change: transform;
}

.ebh-loader__panel {
    flex: 1 1 50%;
    height: 100%;
}

.ebh-loader__panel--dark {
    background: #061c1c;
}

.ebh-loader__panel--teal {
    background: #026164;
}

.ebh-loader__logo {
    position: relative;
    z-index: 2;
    opacity: 0;
    transform: translateY(28px);
    will-change: transform, opacity;
}

.ebh-loader__brand {
    font-family: var(--font-display);
    font-size: clamp(2rem, 6vw, 3.5rem);
    font-weight: 800;
    letter-spacing: 0.04em;
    line-height: 1;
    color: #fff;
    user-select: none;
}

.ebh-loader__brand span {
    font-weight: 800;
}

/* Keep panels/logo locked in place when holding / exiting (prevents snap-back). */
.ebh-loader.is-covered .ebh-loader__panels,
.ebh-loader.is-enter .ebh-loader__panels {
    transform: translateX(0);
}

.ebh-loader.is-covered .ebh-loader__logo,
.ebh-loader.is-enter .ebh-loader__logo {
    opacity: 1;
    transform: translateY(0);
}

/* ── Cold visit / refresh — full intro (text first, then panels) ── */
.ebh-loader.is-animating .ebh-loader__brand {
    -webkit-text-stroke: 1px #026164;
    paint-order: stroke fill;
    color: #026164;
    /* Flip to white as panels arrive — same delay/duration as panels wipe */
    animation: ebhLoaderBrandToWhite 0.85s cubic-bezier(0.65, 0, 0.35, 1) 0.55s forwards;
}

.ebh-loader.is-animating .ebh-loader__logo {
    animation: ebhLoaderLogoIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.ebh-loader.is-animating .ebh-loader__panels {
    animation: ebhLoaderPanelsIn 0.85s cubic-bezier(0.65, 0, 0.35, 1) 0.55s forwards;
}

/* After panels finish covering, brand becomes white on dark panels */
.ebh-loader.is-animating.is-covered .ebh-loader__brand,
.ebh-loader.is-covered .ebh-loader__brand,
.ebh-loader.is-exiting .ebh-loader__brand {
    color: #fff;
    -webkit-text-stroke: 0;
    animation: none;
}

/* Cold reveal — text fades up while panels wipe away */
.ebh-loader.is-exiting:not(.is-page-transition) .ebh-loader__panels {
    animation: ebhLoaderPanelsOut 0.6s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

.ebh-loader.is-exiting:not(.is-page-transition) .ebh-loader__logo {
    animation: ebhLoaderLogoOut 0.35s ease forwards;
}

/* ── In-site page switch — slower ease, minimal center dwell ── */
.ebh-loader.is-page-transition .ebh-loader__brand {
    -webkit-text-stroke: 0;
    color: #fff;
}

/* Slightly slower wipe; ease-in-out for smooth feel.
   Navigation fires mid-wipe so the next page is ready before settle. */
.ebh-loader.is-page-transition.is-leaving .ebh-loader__panels {
    animation: ebhLoaderPanelsIn 0.5s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

/* Logo uses vw (not %) so it travels with the panels, and stays hidden
   until the wipe has covered the center — avoids early floating text. */
.ebh-loader.is-page-transition.is-leaving .ebh-loader__logo {
    opacity: 0;
    transform: translateX(100vw);
    animation: ebhLoaderPageLogoIn 0.5s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

.ebh-loader.is-page-transition.is-enter .ebh-loader__panels,
.ebh-loader.is-page-transition.is-covered .ebh-loader__panels,
.ebh-loader.is-page-transition.is-enter .ebh-loader__logo,
.ebh-loader.is-page-transition.is-covered .ebh-loader__logo {
    opacity: 1;
    transform: translateX(0);
}

/* Exit eases out of center quickly (less “stuck”), still soft at the end. */
.ebh-loader.is-page-transition.is-exiting .ebh-loader__panels {
    animation: ebhLoaderPanelsOut 0.5s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}

.ebh-loader.is-page-transition.is-exiting .ebh-loader__logo {
    animation: ebhLoaderPageLogoOut 0.5s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}

.ebh-loader.is-exiting {
    animation: ebhLoaderHide 0.01s linear 0.6s forwards;
}

.ebh-loader.is-page-transition.is-exiting {
    animation: ebhLoaderHide 0.01s linear 0.5s forwards;
}

@keyframes ebhLoaderLogoIn {
    from {
        opacity: 0;
        transform: translateY(28px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes ebhLoaderLogoOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-16px);
    }
}

@keyframes ebhLoaderPanelsIn {
    from { transform: translateX(100%); }
    to   { transform: translateX(0); }
}

@keyframes ebhLoaderPageLogoIn {
    0% {
        opacity: 0;
        transform: translateX(100vw);
    }
    55% {
        opacity: 0;
        transform: translateX(45vw);
    }
    72% {
        opacity: 1;
        transform: translateX(28vw);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes ebhLoaderPageLogoOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 1;
        transform: translateX(-100vw);
    }
}

/* Slow teal → white ease across the wipe (not a snap) */
@keyframes ebhLoaderBrandToWhite {
    0% {
        color: #026164;
        -webkit-text-stroke: 1px #026164;
    }
    12% {
        color: #026164;
        -webkit-text-stroke: 1px #026164;
    }
    100% {
        color: #fff;
        -webkit-text-stroke: 0;
    }
}

@keyframes ebhLoaderPanelsOut {
    from { transform: translateX(0); }
    to   { transform: translateX(-100%); }
}

@keyframes ebhLoaderHide {
    to {
        visibility: hidden;
        pointer-events: none;
    }
}

/* Brand loader wipe is intentional site chrome — do not kill it via
   prefers-reduced-motion (Windows “animation effects” off was disabling it). */

body {
    font-family: var(--font-main);
    background: var(--color-light);
    color: var(--color-text);
    font-size: 16px;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6,
.hero-title,
.site-logo-text {
    font-family: var(--font-display);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

button {
    cursor: pointer;
    font-family: inherit;
}

/* =====================================================
   UTILITY
   ===================================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    display: inline-block;
    padding: 10px 24px;
    border-radius: var(--radius);
    font-weight: 600;
    transition: background var(--transition), transform var(--transition);
    border: none;
    font-size: 0.95rem;
}

.btn-primary {
    background: var(--color-primary);
    color: #fff;
}

.btn-primary:hover {
    background: #024a4c;
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
}

.btn-outline:hover {
    background: var(--color-primary);
    color: #fff;
}

/* =====================================================
   HEADER
   ===================================================== */

/* Reset Bootstrap interference inside header */
.site-header *,
.site-header *::before,
.site-header *::after {
    box-sizing: border-box;
}

.site-header ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.site-header a {
    text-decoration: none;
}

.site-header {
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 1030; /* above Bootstrap modals baseline */
    border-bottom: 1px solid var(--color-border);
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
}

.header-inner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    gap: 16px;
}

/* Logo */
.site-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}

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

.site-logo-text {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: var(--color-dark);
}

.site-logo-text span {
    color: var(--color-primary);
}

/* Navigation — hidden on mobile, shown on desktop */
.primary-nav {
    display: none;
}

/* Mobile dropdown when hamburger opens it */
.primary-nav.is-open {
    display: block;
    position: absolute;
    top: calc(100% + 1px);
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid var(--color-border);
    padding: 12px 20px;
    z-index: 998;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.primary-nav.is-open ul {
    flex-direction: column;
    gap: 0;
}

.primary-nav.is-open a {
    border-bottom: none;
    padding: 10px 4px;
}

.primary-nav ul {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.primary-nav a {
    display: block;
    color: var(--color-text);
    padding: 8px 14px;
    font-size: 0.9rem;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    transition: color var(--transition), border-color var(--transition);
}

.primary-nav a:hover,
.primary-nav .current-menu-item > a,
.primary-nav .current_page_item > a {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}

/* Right side */
.header-right {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

/* Icon buttons */
.hdr-icon-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: none;
    border: none;
    color: var(--color-text);
    border-radius: var(--radius);
    transition: color var(--transition), background var(--transition);
    text-decoration: none;
}

.hdr-icon-btn:hover {
    color: var(--color-primary);
    background: #f1f5f9;
}

/* Cart count badge */
.cart-count {
    position: absolute;
    top: 2px;
    right: 2px;
    background: var(--color-primary);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* CTA button */
.hdr-cta {
    font-size: 0.88rem;
    padding: 9px 18px;
    white-space: nowrap;
}

/* Hamburger — shown on mobile */
.menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 17px;
    background: none;
    border: none;
    padding: 0;
}

.menu-toggle span {
    display: block;
    height: 2px;
    background: var(--color-text);
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}

.menu-toggle.is-active span:nth-child(1) {
    transform: translateY(7.5px) rotate(45deg);
}

.menu-toggle.is-active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.is-active span:nth-child(3) {
    transform: translateY(-7.5px) rotate(-45deg);
}

@media (max-width: 1023px) {
    /* Hide nav on mobile UNLESS hamburger has opened it */
    .primary-nav:not(.is-open) {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }

    /* Keep header compact on phones/tablets to avoid wrapping */
    .header-right {
        margin-left: auto;
        gap: 8px;
    }

    .hdr-cta,
    .header-right .hdr-icon-btn[aria-label="Wishlist"],
    .header-right .hdr-icon-btn[aria-label="My Account"] {
        display: none;
    }
}

/* =====================================================
   PAGE-SPECIFIC CSS REMOVED — see assets/css/home.css
   ===================================================== */

/* =====================================================
   HERO MOSAIC — shared: used on homepage AND shop hero
   ===================================================== */
.hero-mosaic {
    display: flex;
    gap: 12px;
    height: 380px;
    border-radius: 16px;
    overflow: hidden;
}

.mosaic-col {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

.mosaic-img {
    border-radius: 12px;
    overflow: hidden;
    background: #f1f5f9;
}

.mosaic-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.mosaic-col-left  { flex: 1.1; }
.mosaic-col-right { flex: 1; }
.mosaic-tall      { flex: 1.6; }
.mosaic-short     { flex: 1; }
.mosaic-tiny      { flex: 0.6; }
.mosaic-medium    { flex: 1.4; }

/* =====================================================
   BULK / TEAM BANNER — shared (Figma: Section - Bulk Quote CTA)
   ===================================================== */
.bulk-banner-wrap {
    background: #fff;
    padding: 48px 0;
}

.bulk-banner {
    background: #2d7a7d;
    border-radius: 24px;
    padding: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    flex-wrap: wrap;
    position: relative;
    overflow: hidden;
}

.bulk-banner::before {
    content: "";
    position: absolute;
    inset: 0 0 0 50%;
    background-image:
        linear-gradient(180deg, rgba(2, 97, 100, 0.05) 2.5%, rgba(2, 97, 100, 0) 2.5%),
        linear-gradient(90deg, rgba(2, 97, 100, 0.05) 2.5%, rgba(2, 97, 100, 0) 2.5%);
    background-size: 24px 24px;
    opacity: 0.35;
    pointer-events: none;
}

.bulk-banner-text,
.bulk-banner-btns {
    position: relative;
    z-index: 1;
}

.bulk-banner-text h3 {
    font-family: var(--font-display);
    font-size: clamp(1.4rem, 2.5vw, 2rem);
    font-weight: 600;
    color: #fff;
    margin: 0 0 8px;
    letter-spacing: -0.02em;
    line-height: 1.25;
}

.bulk-banner-text p {
    font-size: 1rem;
    color: #cbfdff;
    margin: 0;
    max-width: 512px;
    line-height: 1.5;
    opacity: 0.95;
}

.bulk-banner-btns {
    display: flex;
    gap: 16px;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.bulk-btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 16px 32px;
    border: none;
    border-radius: 4px;
    color: #026164;
    font-weight: 500;
    font-size: 1rem;
    background: #fff;
    text-decoration: none;
    transition: background var(--transition), transform var(--transition);
    white-space: nowrap;
}

.bulk-btn-outline:hover {
    background: #f0fafa;
    color: #026164;
    transform: translateY(-1px);
}

.bulk-btn-whatsapp {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 16px 32px;
    border-radius: 4px;
    background: #25d366;
    color: #fff;
    font-weight: 500;
    font-size: 1rem;
    text-decoration: none;
    border: none;
    transition: background var(--transition), transform var(--transition);
    white-space: nowrap;
}

.bulk-btn-whatsapp:hover {
    background: #1ebe5b;
    color: #fff;
    transform: translateY(-1px);
}

@media (max-width: 767px) {
    .bulk-banner {
        padding: 28px 24px;
        flex-direction: column;
        align-items: flex-start;
        border-radius: 16px;
    }

    .bulk-banner-btns {
        width: 100%;
    }

    .bulk-btn-outline,
    .bulk-btn-whatsapp {
        flex: 1;
        justify-content: center;
        padding: 14px 18px;
    }
}

/* =====================================================
   WOOCOMMERCE — SALE BADGE (global, used on multiple pages)
   ===================================================== */
.woocommerce span.onsale {
    background: var(--color-primary) !important;
    border-radius: var(--radius) !important;
    min-width: auto !important;
    min-height: auto !important;
    padding: 4px 10px !important;
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    top: 10px !important;
    left: 10px !important;
}

/* =====================================================
   SHARED PRODUCT CARD (matches About → Core Collections)
   ===================================================== */
.ebh-product-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    height: 100%;
    text-decoration: none;
    color: inherit;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
    box-shadow: 0 2px 10px rgba(2, 33, 34, 0.07);
    border: 1px solid var(--color-border);
}

a.ebh-product-card:hover,
.ebh-product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(2, 33, 34, 0.12);
    color: inherit;
    text-decoration: none;
}

.ebh-product-card__link-wrap {
    display: flex;
    flex-direction: column;
    flex: 1;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.ebh-product-card__link-wrap:hover {
    color: inherit;
    text-decoration: none;
}

.ebh-product-card__img {
    background: #fff;
    border-radius: 8px;
    margin-bottom: 16px;
    overflow: hidden;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ebh-product-card__img img {
    max-width: 88%;
    max-height: 88%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.ebh-product-card__placeholder {
    font-size: 2.5rem;
    line-height: 1;
}

.ebh-product-card__body {
    flex: 1;
}

.ebh-product-card__title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 8px;
    color: #1a1c1c;
    line-height: 1.3;
}

.ebh-product-card__desc {
    font-size: 0.8rem;
    color: #3f4949;
    margin: 0;
    line-height: 1.5;
}

.ebh-product-card__price {
    margin: 10px 0 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: #1a1c1c;
    line-height: 1.3;
}

.ebh-product-card__price .woocommerce-Price-amount,
.ebh-product-card__price .amount {
    font-weight: 700;
    color: #1a1c1c;
}

.ebh-product-card__price del {
    opacity: 0.55;
    font-weight: 500;
    margin-right: 6px;
}

.ebh-product-card__price ins {
    text-decoration: none;
}

.ebh-product-card__cta {
    display: inline-block;
    margin-top: 16px;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-primary);
}

/* Placeholder — needed by old homepage featured-products loop */
.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 24px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--color-primary);
    display: inline-block;
}


/* =====================================================
   SINGLE PRODUCT
   ===================================================== */
.woocommerce div.product div.images {
    border-radius: var(--radius);
    overflow: hidden;
}

.woocommerce div.product .product_title {
    font-size: 1.6rem;
    font-weight: 700;
}

.woocommerce div.product p.price {
    color: var(--color-primary) !important;
    font-size: 1.5rem !important;
    font-weight: 700 !important;
}

.woocommerce div.product form.cart .button {
    background: var(--color-primary) !important;
    color: #fff !important;
    border-radius: var(--radius) !important;
    font-weight: 700 !important;
    padding: 12px 28px !important;
    font-size: 1rem !important;
}

.woocommerce div.product form.cart .button:hover {
    background: #024a4c !important;
}

/* =====================================================
   CART & CHECKOUT
   ===================================================== */
.woocommerce .wc-proceed-to-checkout a.checkout-button {
    background: var(--color-primary) !important;
    border-radius: var(--radius) !important;
    font-size: 1rem !important;
}

.woocommerce #payment #place_order, .woocommerce-page #payment #place_order {
    background: var(--color-primary) !important;
    border-radius: var(--radius) !important;
}

/* =====================================================
   NOTICES
   ===================================================== */
.woocommerce-message, .woocommerce-info {
    border-top-color: var(--color-primary) !important;
}

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

.woocommerce-message a.button, .woocommerce-error a.button {
    background: var(--color-primary) !important;
}

/* =====================================================
   FOOTER
   ===================================================== */
.site-footer {
    background: #eef0f2;
    color: var(--color-text);
}

.footer-top {
    padding: 48px 0 36px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
}

/* Brand col */
.footer-logo {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--color-dark);
    text-decoration: none;
    display: inline-block;
    margin-bottom: 12px;
}

.footer-logo span {
    color: var(--color-primary);
}

.footer-brand p {
    font-size: 0.88rem;
    color: var(--color-muted);
    line-height: 1.7;
    margin-bottom: 16px;
    max-width: 200px;
}

/* Social icons */
.footer-social {
    display: flex;
    gap: 10px;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid #ccc;
    border-radius: 6px;
    color: var(--color-text);
    transition: color var(--transition), border-color var(--transition);
    text-decoration: none;
}

.social-icon:hover {
    color: var(--color-primary);
    border-color: var(--color-primary);
}

/* Column headings */
.footer-col h4 {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--color-dark);
    margin-bottom: 14px;
    text-transform: uppercase;
}

/* Links */
.footer-col ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-col li a {
    font-size: 0.88rem;
    color: var(--color-muted);
    transition: color var(--transition);
    text-decoration: none;
}

.footer-col li a:hover {
    color: var(--color-primary);
}

/* Payment badges */
.payment-badges {
    display: flex;
    gap: 8px;
    margin-bottom: 4px;
    align-items: center;
}

.pay-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    height: 30px;
    padding: 4px 8px;
    border: 1px solid #d8dee6;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--color-text);
    background: #fff;
    letter-spacing: 0.04em;
    line-height: 1;
}

.pay-badge--cod {
    color: var(--color-primary);
    border-color: rgba(2, 97, 100, 0.35);
    background: rgba(2, 97, 100, 0.06);
}

.pay-badge svg {
    display: block;
}

/* Header product search */
.hdr-search {
    position: relative;
    display: flex;
    align-items: center;
    background: #f3f5f7;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    padding: 0 4px 0 12px;
    min-width: 220px;
    max-width: 280px;
    height: 38px;
    z-index: 120;
}

.hdr-search.is-open {
    border-radius: 18px 18px 0 0;
    border-bottom-color: transparent;
    background: #fff;
    box-shadow: 0 10px 28px rgba(26, 28, 28, 0.1);
}

.hdr-search input[type="search"] {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 0.85rem;
    color: var(--color-text);
    min-width: 0;
    width: 100%;
}

.hdr-search input[type="search"]::-webkit-search-decoration,
.hdr-search input[type="search"]::-webkit-search-cancel-button {
    -webkit-appearance: none;
}

.hdr-search-btn {
    border: none;
    background: transparent;
    color: var(--color-muted);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}

.hdr-search-btn:hover {
    color: var(--color-primary);
}

.hdr-search-dropdown {
    position: absolute;
    top: calc(100% - 1px);
    left: -1px;
    right: -1px;
    min-width: 360px;
    max-width: min(420px, calc(100vw - 32px));
    background: #fff;
    border: 1px solid var(--color-border);
    border-top: none;
    border-radius: 0 0 16px 16px;
    box-shadow: 0 18px 36px rgba(26, 28, 28, 0.12);
    overflow: hidden;
    z-index: 130;
}

.hdr-search-status {
    padding: 16px 18px;
    font-size: 0.88rem;
    color: var(--color-muted);
}

.hdr-search-list {
    list-style: none;
    margin: 0;
    padding: 6px 0;
    max-height: 360px;
    overflow-y: auto;
}

.hdr-search-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    transition: background 0.15s ease;
}

.hdr-search-item:hover {
    background: #f5f8f8;
}

.hdr-search-main {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
    text-decoration: none;
    color: inherit;
}

.hdr-search-thumb {
    flex: 0 0 52px;
    width: 52px;
    height: 52px;
    border-radius: 10px;
    background: #f3f5f7;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hdr-search-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
}

.hdr-search-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.hdr-search-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1a1c1c;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hdr-search-price {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--color-primary);
}

.hdr-search-price del {
    color: var(--color-muted);
    font-weight: 500;
    margin-right: 4px;
}

.hdr-search-action {
    flex-shrink: 0;
}

.hdr-search-cart {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 999px;
    background: var(--color-primary);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    padding: 8px 12px;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s ease, transform 0.15s ease;
}

.hdr-search-cart:hover {
    background: #01484a;
    color: #fff;
    text-decoration: none;
}

.hdr-search-cart.is-added {
    background: #0f766e;
}

.hdr-search-cart--link {
    background: #e8f2f2;
    color: var(--color-primary);
}

.hdr-search-cart--link:hover {
    background: #d7eaea;
    color: var(--color-primary);
}

.hdr-search-stock {
    font-size: 0.72rem;
    font-weight: 600;
    color: #a16207;
}

.hdr-search-all {
    display: block;
    padding: 12px 16px;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-primary);
    text-decoration: none;
    border-top: 1px solid #eef1f3;
    background: #fafbfb;
}

.hdr-search-all:hover {
    background: #f3f7f7;
    color: #01484a;
}

@media (max-width: 1100px) {
    .hdr-search {
        display: none;
    }
}

/* Admin bar sticky offsets */
body.admin-bar .site-header {
    top: 32px;
}

body.admin-bar .shop-filter-bar {
    top: 96px;
}

@media screen and (max-width: 782px) {
    body.admin-bar .site-header {
        top: 46px;
    }
    body.admin-bar .shop-filter-bar {
        top: 110px;
    }
}

/* Newsletter form */
.newsletter-form {
    display: flex;
    margin-top: 8px;
}

.newsletter-form input {
    flex: 1;
    padding: 9px 12px;
    border: 1px solid #ccc;
    border-radius: var(--radius) 0 0 var(--radius);
    font-size: 0.85rem;
    outline: none;
    background: #fff;
    color: var(--color-text);
}

.newsletter-form input::placeholder {
    color: #aaa;
}

.newsletter-form button {
    background: var(--color-primary);
    color: #fff;
    border: none;
    padding: 9px 14px;
    border-radius: 0 var(--radius) var(--radius) 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition);
}

.newsletter-form button:hover {
    background: #024a4c;
}

/* Footer bottom bar */
.footer-bottom {
    border-top: 1px solid #d8dadc;
    padding: 14px 0;
    text-align: center;
    font-size: 0.82rem;
    color: var(--color-muted);
}

/* =====================================================
   BREADCRUMB
   ===================================================== */
.woocommerce .woocommerce-breadcrumb {
    font-size: 0.85rem;
    color: var(--color-muted);
    padding: 12px 0;
}

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

/* =====================================================
   TABLET — min-width: 768px
   ===================================================== */
@media (min-width: 768px) {
    /* Header spacing only (nav stays mobile-style until desktop) */
    .header-inner {
        gap: 18px;
    }

    /* Hero */
    .hero-inner {
        grid-template-columns: 1fr 1fr;
    }

    .hero-title {
        font-size: 2.6rem;
    }

    /* Categories */
    .category-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    /* Product grid */
    .woocommerce ul.products {
        grid-template-columns: repeat(3, 1fr) !important;
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* =====================================================
   DESKTOP — min-width: 1024px
   ===================================================== */
@media (min-width: 1024px) {
    .menu-toggle {
        display: none;
    }

    .primary-nav {
        display: block !important;
    }

    .hero-title {
        font-size: 3rem;
    }

    .hero-mosaic {
        height: 420px;
    }

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

    .footer-grid {
        grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
    }
}

/* =====================================================
   VISIT OUR STORES — shared section (Home, About, Contact)
   ===================================================== */
.stores-section {
    background: #fff;
    padding: 72px 0 80px;
}

.stores-header {
    text-align: center;
    margin-bottom: 40px;
}

.stores-title {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 3vw, 2rem);
    font-weight: 700;
    color: var(--color-dark);
    margin-bottom: 10px;
    letter-spacing: -0.02em;
}

.stores-sub {
    font-size: 0.95rem;
    color: var(--color-muted);
    max-width: 520px;
    margin: 0 auto;
    line-height: 1.65;
}

.hubs-section {
    background: #fff;
    padding: 72px 0 80px;
}

.hubs-title {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 3vw, 2rem);
    font-weight: 700;
    color: var(--color-dark);
    margin-bottom: 36px;
    letter-spacing: -0.02em;
}

.hub-card {
    border: 1px solid var(--color-border);
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 8px 28px rgba(26, 28, 28, 0.06);
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: transform var(--transition), box-shadow var(--transition);
}

.hub-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 36px rgba(26, 28, 28, 0.1);
}

.hub-map {
    position: relative;
    flex-shrink: 0;
    height: 180px;
    background: #e8f0f0;
    overflow: hidden;
}

.hub-map-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hub-map iframe {
    display: block;
    width: 100%;
    height: 180px;
    border: 0;
}

.hub-map-placeholder {
    height: 180px;
    background:
        radial-gradient(circle at 50% 45%, rgba(2, 97, 100, 0.18), transparent 45%),
        linear-gradient(135deg, #e8f4f4 0%, #d5e8e8 100%);
}

.hub-card-body {
    padding: 18px 20px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.hub-name-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.hub-name {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-dark);
    margin: 0;
}

.hub-badge {
    font-size: 0.68rem;
    font-weight: 700;
    background: var(--color-primary);
    color: #fff;
    padding: 3px 9px;
    border-radius: 5px;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.hub-address {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.86rem;
    color: var(--color-muted);
    margin: 0 0 14px;
    line-height: 1.55;
}

.hub-address .hub-pin {
    flex-shrink: 0;
    margin-top: 2px;
    color: var(--color-primary);
}

.hub-meta-row {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 0.82rem;
    color: var(--color-muted);
    margin-bottom: 5px;
}

.hub-meta-row svg {
    flex-shrink: 0;
    color: var(--color-primary);
}

.hub-actions {
    margin-top: auto;
    display: flex;
    gap: 10px;
    padding-top: 12px;
}

.hub-btn-wa,
.hub-btn-directions {
    flex: 1;
    text-align: center;
    font-size: 0.82rem;
    padding: 11px 12px;
    border-radius: var(--radius);
    font-weight: 600;
}

.hub-btn-wa {
    background: rgba(2, 97, 100, 0.08);
    color: #128c7e;
}

.hub-btn-wa:hover {
    background: #25d366;
    color: #fff;
}

.hub-btn-directions {
    background: var(--color-primary);
    color: #fff;
}

.hub-btn-directions:hover {
    background: #024a4c;
    color: #fff;
}

