/*
Theme Name:   IoT Bees
Theme URI:    https://www.iot-bees.com
Description:  IoT Bees — Sensor selection store. Deep Navy + Gold.
Author:       SpringBees
Template:     
Version:      1.1.0
License:      GPLv2 or later
Text Domain:  iot-bees
*/

/* ========================================
   CSS Variables (matching SensorBees Hub)
   ======================================== */
:root {
    --navy: #032144;
    --navy-dark: #021A36;
    --gold: #EAA924;
    --gold-hover: #d4971e;
    --gold-light: #FFF8E1;
    --white: #ffffff;
    --text-primary: #1A202C;
    --text-secondary: #4A5568;
    --text-muted: #718096;
    --text-light: #a0aec0;
    --border: #e2e8f0;
    --bg-light: #F5F7FA;
    --bg-card: #ffffff;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
    --radius: 12px;
    --radius-sm: 8px;
    --nav-height: 64px;
}

/* ========================================
   Reset & Base
   ======================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-light);
    -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; display: block; }

/* ========================================
   Top Navigation
   ======================================== */
.top-nav {
    position: sticky;
    top: 0;
    z-index: 200;
    background: var(--navy);
    color: var(--white);
    height: var(--nav-height);
    display: flex;
    align-items: center;
    padding: 0 28px;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.top-nav .nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--white);
    white-space: nowrap;
}
.top-nav .nav-brand .gold { color: var(--gold); }
.top-nav .nav-brand img { height: 56px; }
.top-nav .nav-links {
    display: flex;
    gap: 4px;
    margin-left: 32px;
}
.top-nav .nav-links a {
    padding: 8px 16px;
    font-size: 1.1rem;
    font-weight: 700;
    color: rgba(255,255,255,0.85);
    border-radius: 50px;
    transition: all 0.15s;
    margin: 0 16px;
}
.top-nav .nav-links a:hover {
    color: var(--white);
    background: rgba(255,255,255,0.08);
}
.top-nav .nav-links a .badge {
    display: inline-block;
    padding: 2px 8px;
    font-size: 0.7rem;
    font-weight: 600;
    background: var(--gold);
    color: var(--navy);
    border-radius: 50px;
    margin-left: 6px;
}

/* Nav: Active filter */
.top-nav .nav-links a.active,
.top-nav .nav-filter-btn.active {
    color: var(--gold) !important;
    background: rgba(255,255,255,0.1);
}

/* ========================================
   Main Layout
   ======================================== */
.main-layout {
    display: flex;
    min-height: calc(100vh - var(--nav-height));
}

/* ========================================
   Sidebar
   ======================================== */
.sidebar {
    width: 230px;
    min-width: 230px;
    background: var(--white);
    border-right: 1px solid var(--border);
    padding: 24px 16px;
    height: calc(100vh - var(--nav-height));
    position: sticky;
    top: var(--nav-height);
    overflow-y: auto;
}
.sidebar h4 {
    font-size: 0.88rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--navy);
    margin: 24px 0 8px;
    font-weight: 800;
}
.sidebar h4:first-child { margin-top: 0; }
.sidebar a {
    display: block;
    padding: 8px 12px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    border-radius: 6px;
    transition: all 0.15s;
    margin: 2px 0;
    font-weight: 500;
}
.sidebar a:hover {
    background: var(--bg-light);
    color: var(--navy);
}
.sidebar a.active {
    background: #FFF3D0;
    color: var(--navy);
    font-weight: 700;
}
.sidebar .sidebar-search {
    margin-bottom: 16px;
}
.sidebar .sidebar-search input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.85rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}
.sidebar .sidebar-search input:focus {
    border-color: var(--gold);
}

/* ========================================
   Content Area
   ======================================== */
.content {
    flex: 1;
    padding: 32px;
    max-width: calc(100% - 250px);
}

/* ========================================
   Hero
   ======================================== */
.hero {
    background: var(--navy);
    color: #ffffff;
    padding: 14px 40px;
    border-radius: 999px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 56px;
}
.hero h1 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
    color: #FFF3D0 !important;
    text-align: center;
    opacity: 1 !important;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.hero h1 .flight-icon {
    display: inline-block;
}

.hero h1 .flight-icon .plane {
    display: inline-block;
    animation: beeWings 1s ease-in-out infinite;
}

@keyframes beeWings {
    0% {
        transform: rotateY(180deg) scaleY(1);
    }
    25% {
        transform: rotateY(180deg) scaleY(0.8);
    }
    50% {
        transform: rotateY(180deg) scaleY(1);
    }
    75% {
        transform: rotateY(180deg) scaleY(0.8);
    }
    100% {
        transform: rotateY(180deg) scaleY(1);
    }
}
.hero p {
    font-size: 1rem;
    color: rgba(255,255,255,0.7);
    max-width: 600px;
}

/* ========================================
   Filter Bar
   ======================================== */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}
.filter-tag {
    padding: 6px 16px;
    font-size: 0.82rem;
    font-weight: 500;
    background: var(--bg-card);
    color: var(--text-secondary);
    border-radius: 20px;
    cursor: pointer;
    border: 1px solid var(--border);
    transition: all 0.15s;
}
.filter-tag:hover {
    border-color: var(--gold);
    color: var(--navy);
}
.filter-tag.active {
    background: var(--navy);
    color: var(--white);
    border-color: var(--navy);
}

/* ========================================
   Product Grid
   ======================================== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}

.product-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
}
.product-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.card-image {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-light);
    overflow: hidden;
    padding: 16px;
}
.card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.card-image .placeholder {
    font-size: 3rem;
    opacity: 0.3;
}

.card-body {
    padding: 16px;
}

.card-model {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 8px;
    line-height: 1.3;
}
.card-model a {
    color: inherit;
}
.card-model a:hover { color: var(--gold); }

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 12px;
}
.card-tag {
    font-size: 0.68rem;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 500;
}
.card-tag.brand-tag {
    background: var(--gold-light);
    color: #92600a;
}
.card-tag.app-tag {
    background: #E3F2FD;
    color: #0D47A1;
}
.card-tag.new-tag {
    background: #FFEBEE;
    color: #C62828;
    font-weight: 600;
}

.card-btn {
    display: block;
    width: 66%;
    margin: 0 auto;
    padding: 4.5px;
    background: #FFF8E1;
    color: #032144;
    border: 1px solid #EAA924;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.75rem;
    cursor: pointer;
    text-align: center;
    font-family: inherit;
    transition: background 0.2s;
}
.card-btn:hover { background: #FFEAB5; }

/* ========================================
   Footer
   ======================================== */
.site-footer {
    background: var(--navy);
    color: var(--white);
    padding: 14px 32px 10px;
    margin-top: 48px;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 32px;
}
.footer-col h4 {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.footer-col p, .footer-col a {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.65);
    line-height: 1.8;
}
.footer-col a:hover { color: var(--white); }
.footer-bottom {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
    font-size: 0.95rem;
    font-weight: 700;
    color: #FFF3D0;
}

/* ========================================

/* ========================================
   Single Product Detail
   ======================================== */
.detail-breadcrumb {
    font-size: 0.85rem; color: var(--text-muted); margin-bottom: 24px;
    display: flex; align-items: center; flex-wrap: wrap;
}
.detail-breadcrumb a { color: var(--navy); font-weight: 500; }
.detail-breadcrumb a:hover { color: var(--gold); }
.detail-breadcrumb .back-arrow { margin-right: 4px; }
.detail-breadcrumb .sep { margin: 0 8px; color: var(--border); }
.detail-breadcrumb .current { color: var(--navy); font-weight: 600; }

.detail-top {
    display: flex;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}
.detail-gallery {
    width: 33.33%; min-width: 0; padding: 20px;
    border-right: 1px solid var(--border);
    background: var(--bg-light);
    display: flex; flex-direction: column; align-items: center; gap: 10px;
    max-height: 50vh;
}
.gallery-main { width: 100%; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; min-height: 0; }
.gallery-main img { max-width: 100%; max-height: 40vh; width: auto; height: auto; object-fit: contain; }
.gallery-main .placeholder { font-size: 3rem; opacity: 0.3; }
.gallery-arrow { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,0.4); color: #fff; border: none; width: 36px; height: 48px; font-size: 1.6rem; cursor: pointer; display: flex; align-items: center; justify-content: center; border-radius: 4px; opacity: 0; transition: opacity 0.2s; z-index: 2; line-height: 1; padding: 0; }
.gallery-main:hover .gallery-arrow { opacity: 1; }
.gallery-arrow-left { left: 6px; }
.gallery-arrow-right { right: 6px; }
.gallery-arrow:hover { background: rgba(0,0,0,0.6); }
.gallery-thumbs { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.gallery-thumb { width: 48px; height: 48px; border-radius: 4px; overflow: hidden; border: 2px solid transparent; cursor: pointer; opacity: 0.6; }
.gallery-thumb:hover { opacity: 0.9; }
.gallery-thumb.active { border-color: var(--gold); opacity: 1; }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }

.detail-info { width: 66.67%; min-width: 0; padding: 28px 32px; overflow-y: auto; max-height: 50vh; display: flex; flex-direction: column; }
.detail-title { font-size: 1.5rem; font-weight: 700; color: var(--navy); margin-bottom: 16px; }
.detail-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.detail-short-desc { font-size: 0.92rem; line-height: 1.7; color: var(--text-secondary); }
.detail-short-desc p { margin-bottom: 8px; }

.detail-quote-btn {
    display: inline-block; margin-top: auto; padding: 10px 20px;
    background: #FFF8E1; color: #032144; border: 1px solid #EAA924; border-radius: 50px;
    font-weight: 700; font-size: 0.85rem; cursor: pointer; font-family: inherit;
    transition: background 0.2s, transform 0.15s;
    align-self: flex-end;
    white-space: nowrap;
}

.detail-description {
    margin-top: 20px; background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 28px 32px 28px 64px;
    box-shadow: var(--shadow-sm); font-size: 0.9rem; line-height: 1.7; color: var(--text-secondary);
    height: auto; min-height: 0; max-height: none; overflow: visible;
}
.detail-description p { margin-bottom: 10px; }

@media (max-width: 768px) {
    .detail-top { flex-direction: column; }
    .detail-gallery, .detail-info { width: 100%; max-height: none; }
    .detail-gallery { border-right: none; border-bottom: 1px solid var(--border); }
}
    padding: 0 !important;
}

@media (max-width: 768px) {
    .content .product { grid-template-columns: 1fr; }
    .content .product .woocommerce-product-gallery,
    .content .product .summary { max-height: none; grid-column: 1; grid-row: auto; }
    .content .product .woocommerce-product-gallery { border-right: none; }
}
@media (max-width: 768px) {
    .main-layout { flex-direction: column; }
    .sidebar {
        width: 100%;
        min-width: 100%;
        height: auto;
        position: static;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }
    .content { max-width: 100%; padding: 20px; }
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 12px;
    }
    .top-nav .nav-links { gap: 2px; margin-left: 12px; }
    .top-nav .nav-links a { padding: 6px 10px; font-size: 0.8rem; }
    .hero { padding: 28px 24px; }
    .hero h1 { font-size: 1.3rem; }
}
/* v20260608b */
