/*
Theme Name: MB
Theme URI: https://jouetsbloom.com
Author: MB
Author URI: https://jouetsbloom.com
Description: Theme personnalisé pour la boutique de jouets éducatifs MB. Entièrement éditable via le personnaliseur WordPress et compatible WooCommerce.
Version: 1.3.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: jouets-bloom
Tags: e-commerce, custom-logo, custom-menu, featured-images, theme-options, translation-ready
WC requires at least: 7.0
WC tested up to: 8.5
*/

/* ============================================
   CSS VARIABLES
   ============================================ */
:root {
    --jb-primary: #e8a020;
    --jb-primary-hover: #d4911a;
    --jb-dark: #1a1a1a;
    --jb-darker: #111111;
    --jb-text: #333333;
    --jb-text-light: #666666;
    --jb-white: #ffffff;
    --jb-light-bg: #f9f9f9;
    --jb-border: #eeeeee;
    --jb-font-main: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --jb-font-heading: 'Georgia', 'Times New Roman', serif;
    --jb-max-width: 1200px;
    --jb-header-height: 60px;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--jb-font-main);
    color: var(--jb-text);
    line-height: 1.6;
    background-color: var(--jb-white);
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

ul, ol {
    list-style: none;
}

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

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

/* ============================================
   HEADER
   ============================================ */
.site-header {
    background-color: var(--jb-dark);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: var(--jb-max-width);
    margin: 0 auto;
    padding: 0 20px;
    height: var(--jb-header-height);
}

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

.site-logo .custom-logo-text {
    color: var(--jb-white);
    font-size: 1.4rem;
    font-weight: bold;
}

/* Main Navigation */
.main-navigation {
    display: flex;
    align-items: center;
}

.main-navigation .nav-menu {
    display: flex;
    gap: 30px;
    align-items: center;
}

.main-navigation .nav-menu li a {
    color: var(--jb-white);
    font-size: 0.95rem;
    padding: 8px 0;
    position: relative;
    transition: color 0.3s ease;
}

.main-navigation .nav-menu li a:hover,
.main-navigation .nav-menu li.current-menu-item a,
.main-navigation .nav-menu li.current_page_item a {
    color: var(--jb-primary);
}

.main-navigation .nav-menu li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--jb-primary);
    transition: width 0.3s ease;
}

.main-navigation .nav-menu li a:hover::after,
.main-navigation .nav-menu li.current-menu-item a::after {
    width: 100%;
}

/* Dropdown arrow */
.dropdown-arrow {
    font-size: 0.6rem;
    margin-left: 4px;
    transition: transform 0.3s ease;
}

.has-dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

/* Dropdown Submenu */
.main-navigation .nav-menu li {
    position: relative;
}

.main-navigation .nav-menu li .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--jb-dark);
    min-width: 220px;
    padding: 10px 0;
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
    border-top: 2px solid var(--jb-primary);
    z-index: 1000;
    border-radius: 0 0 6px 6px;
}

.main-navigation .nav-menu li:hover > .sub-menu {
    display: block;
    animation: jb-dropdown 0.25s ease;
}

@keyframes jb-dropdown {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.main-navigation .nav-menu .sub-menu li {
    width: 100%;
}

.main-navigation .nav-menu .sub-menu li a {
    display: block;
    padding: 8px 20px;
    font-size: 0.9rem;
    color: #cccccc;
    white-space: nowrap;
}

.main-navigation .nav-menu .sub-menu li a::after {
    display: none;
}

.main-navigation .nav-menu .sub-menu li a:hover {
    background: rgba(255,255,255,0.05);
    color: var(--jb-primary);
    padding-left: 24px;
}

/* Nested sub-menu (level 3) */
.main-navigation .nav-menu .sub-menu .sub-menu {
    top: 0;
    left: 100%;
    border-top: none;
    border-left: 2px solid var(--jb-primary);
    border-radius: 0 6px 6px 0;
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-actions a {
    color: var(--jb-white);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.3s ease;
}

.header-actions a:hover {
    color: var(--jb-primary);
}

.cart-count {
    background: var(--jb-primary);
    color: var(--jb-white);
    font-size: 0.7rem;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    top: -8px;
    left: -5px;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--jb-white);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--jb-white);
    margin: 5px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}

/* ============================================
   HERO BANNER
   ============================================ */
.hero-banner {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
}

.hero-banner img.hero-cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
}

.hero-banner .hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* overlay color is set inline via customizer */
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-content {
    text-align: center;
    color: var(--jb-white);
    padding: 20px;
}

.hero-content h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero-content p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 25px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.hero-btn {
    display: inline-block;
    background: var(--jb-primary);
    color: var(--jb-white);
    padding: 14px 35px;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid var(--jb-primary);
}

.hero-btn:hover {
    background: transparent;
    color: var(--jb-white);
    border-color: var(--jb-white);
}

/* ============================================
   CUSTOM SECTIONS
   ============================================ */
.jb-custom-section {
    padding: 60px 20px;
}

.jb-custom-section .section-inner {
    max-width: var(--jb-max-width);
    margin: 0 auto;
}

/* Type: Text */
.jb-section-text {
    text-align: center;
}

.jb-section-text h2 {
    font-family: var(--jb-font-heading);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.jb-section-text .section-subtitle {
    color: var(--jb-primary);
    font-size: 1.1rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.jb-section-text .section-desc {
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.8;
    color: var(--jb-text-light);
}

/* Type: Image + Text */
.jb-section-image-text .section-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.jb-section-image-text.image-right .section-inner {
    direction: ltr;
}

.jb-section-image-text .section-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    object-fit: cover;
}

.jb-section-image-text .section-text h2 {
    font-family: var(--jb-font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.jb-section-image-text .section-text .section-subtitle {
    color: var(--jb-primary);
    font-size: 1rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.jb-section-image-text .section-text .section-desc {
    line-height: 1.8;
    color: var(--jb-text-light);
}

.jb-section-image-text .section-text .section-btn {
    display: inline-block;
    margin-top: 20px;
    background: var(--jb-primary);
    color: var(--jb-white);
    padding: 12px 30px;
    border-radius: 4px;
    font-weight: 600;
    transition: background 0.3s ease;
}

.jb-section-image-text .section-text .section-btn:hover {
    background: var(--jb-primary-hover);
}

/* Type: Banner */
.jb-section-banner {
    position: relative;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    text-align: center;
    color: var(--jb-white);
}

.jb-section-banner .banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.jb-section-banner .section-inner {
    position: relative;
    z-index: 1;
}

.jb-section-banner h2 {
    font-family: var(--jb-font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.jb-section-banner .section-subtitle {
    font-size: 1.2rem;
    margin-bottom: 15px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.jb-section-banner .section-desc {
    max-width: 600px;
    margin: 0 auto 20px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.jb-section-banner .section-btn {
    display: inline-block;
    background: var(--jb-primary);
    color: var(--jb-white);
    padding: 14px 35px;
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid var(--jb-primary);
}

.jb-section-banner .section-btn:hover {
    background: transparent;
    border-color: var(--jb-white);
}

/* Type: CTA */
.jb-section-cta {
    text-align: center;
}

.jb-section-cta h2 {
    font-family: var(--jb-font-heading);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.jb-section-cta .section-desc {
    max-width: 600px;
    margin: 0 auto 25px;
    color: var(--jb-text-light);
    line-height: 1.8;
}

.jb-section-cta .section-btn {
    display: inline-block;
    background: var(--jb-primary);
    color: var(--jb-white);
    padding: 14px 40px;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.jb-section-cta .section-btn:hover {
    background: var(--jb-primary-hover);
}

/* Type: Gallery */
.jb-section-gallery .gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.jb-section-gallery .gallery-grid img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.jb-section-gallery .gallery-grid img:hover {
    transform: scale(1.03);
}

.jb-section-gallery h2 {
    font-family: var(--jb-font-heading);
    font-size: 2rem;
    text-align: center;
    margin-bottom: 30px;
}

@media (max-width: 768px) {
    .jb-section-image-text .section-inner {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .jb-section-banner h2 {
        font-size: 1.8rem;
    }

    .jb-section-gallery .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .jb-section-gallery .gallery-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   ABOUT / INTRO SECTION
   ============================================ */
.about-section {
    text-align: center;
    padding: 60px 20px;
    max-width: 700px;
    margin: 0 auto;
}

.about-section h2 {
    font-family: var(--jb-font-heading);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--jb-dark);
}

.about-section p {
    color: var(--jb-text-light);
    font-size: 0.95rem;
    line-height: 1.8;
}

/* ============================================
   SECTION TITLE (Nouvelle Collection etc.)
   ============================================ */
.section-title {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

.section-title::before,
.section-title::after {
    content: '';
    position: absolute;
    top: 50%;
    width: calc(50% - 120px);
    height: 1px;
    border-top: 2px dashed var(--jb-primary);
    opacity: 0.4;
}

.section-title::before {
    left: 0;
}

.section-title::after {
    right: 0;
}

.section-title h2 {
    font-family: 'Courier New', monospace;
    font-size: 1.3rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--jb-dark);
    margin-bottom: 5px;
}

.section-title span {
    display: block;
    color: var(--jb-primary);
    font-size: 1.5rem;
    font-weight: 700;
    font-family: var(--jb-font-heading);
}

/* ============================================
   PRODUCTS GRID
   ============================================ */
.products-section {
    padding: 20px 0 60px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    max-width: var(--jb-max-width);
    margin: 0 auto;
    padding: 0 20px;
}

.product-card {
    text-align: center;
    transition: transform 0.3s ease;
    position: relative;
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-card .product-image {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 12px;
    background: var(--jb-light-bg);
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-card .product-image img {
    max-width: 85%;
    max-height: 85%;
    object-fit: contain;
    transition: transform 0.4s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-card .quick-view {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--jb-dark);
    color: var(--jb-white);
    padding: 8px 20px;
    font-size: 0.8rem;
    border-radius: 3px;
    transition: bottom 0.3s ease;
    white-space: nowrap;
    cursor: pointer;
    border: none;
}

.product-card:hover .quick-view {
    bottom: 10px;
}

.product-card .product-title {
    font-size: 0.85rem;
    color: var(--jb-text);
    margin-bottom: 6px;
    line-height: 1.4;
    min-height: 2.5em;
}

.product-card .product-title a {
    color: var(--jb-text);
}

.product-card .product-title a:hover {
    color: var(--jb-primary);
}

.product-card .product-price {
    font-size: 1rem;
    font-weight: 700;
    color: var(--jb-primary);
}

.product-card .product-price del {
    color: var(--jb-text-light);
    font-weight: 400;
    margin-right: 8px;
    font-size: 0.9rem;
}

/* WooCommerce product overrides */
.woocommerce ul.products {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.woocommerce ul.products li.product {
    text-align: center;
    margin: 0;
    padding: 0;
    width: 100% !important;
    float: none;
}

.woocommerce ul.products li.product a img {
    margin: 0 auto 12px;
    border-radius: 8px;
    background: var(--jb-light-bg);
}

.woocommerce ul.products li.product .price {
    color: var(--jb-primary);
    font-weight: 700;
}

.woocommerce ul.products li.product .button {
    background: var(--jb-primary);
    color: var(--jb-white);
    border-radius: 3px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 40px;
    padding: 20px 0;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.pagination .current,
.pagination a:hover {
    background: var(--jb-primary);
    color: var(--jb-white);
}

.pagination .prev-arrow,
.pagination .next-arrow {
    font-size: 1.2rem;
    color: var(--jb-text-light);
}

/* ============================================
   NEWSLETTER SECTION
   ============================================ */
.newsletter-section {
    background: var(--jb-light-bg);
    padding: 60px 20px;
    text-align: center;
}

.newsletter-section h2 {
    font-family: var(--jb-font-heading);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--jb-dark);
}

.newsletter-section p {
    color: var(--jb-text-light);
    font-size: 0.95rem;
    margin-bottom: 25px;
}

.newsletter-section label {
    display: block;
    text-align: left;
    max-width: 500px;
    margin: 0 auto 8px;
    font-size: 0.85rem;
    color: var(--jb-text-light);
}

.newsletter-form {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
    gap: 0;
}

.newsletter-form input[type="email"] {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--jb-border);
    border-right: none;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.3s ease;
}

.newsletter-form input[type="email"]:focus {
    border-color: var(--jb-primary);
}

.newsletter-form .email-icon-btn {
    background: var(--jb-primary);
    border: none;
    color: var(--jb-white);
    padding: 12px 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.newsletter-form button[type="submit"] {
    background: var(--jb-dark);
    color: var(--jb-white);
    border: none;
    padding: 12px 30px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.3s ease;
}

.newsletter-form button[type="submit"]:hover {
    background: var(--jb-primary);
}

/* ============================================
   FEATURES BAR
   ============================================ */
.features-bar {
    padding: 50px 20px;
    background: var(--jb-white);
}

.features-grid {
    display: flex;
    justify-content: center;
    gap: 80px;
    max-width: var(--jb-max-width);
    margin: 0 auto;
}

.feature-item {
    text-align: center;
}

.feature-item .feature-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
    color: var(--jb-primary);
}

.feature-item .feature-icon svg {
    width: 50px;
    height: 50px;
    fill: var(--jb-primary);
}

.feature-item h4 {
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
    color: var(--jb-dark);
}

.feature-item p {
    font-size: 0.85rem;
    color: var(--jb-text-light);
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
    background: var(--jb-darker);
    color: #cccccc;
    padding: 50px 20px 0;
}

.footer-inner {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    max-width: var(--jb-max-width);
    margin: 0 auto;
    padding-bottom: 40px;
}

.footer-column h3 {
    color: var(--jb-white);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 20px;
    font-weight: 700;
}

.footer-column ul li {
    margin-bottom: 8px;
}

.footer-column ul li a {
    color: #999999;
    font-size: 0.85rem;
    transition: color 0.3s ease;
}

.footer-column ul li a:hover {
    color: var(--jb-primary);
}

.footer-contact p {
    font-size: 0.85rem;
    color: #999999;
    margin-bottom: 5px;
    line-height: 1.6;
}

.footer-contact a {
    color: #999999;
}

.footer-contact a:hover {
    color: var(--jb-primary);
}

.footer-bottom {
    border-top: 1px solid #333333;
    padding: 20px 0;
    max-width: var(--jb-max-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer-bottom .payment-icons {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.footer-bottom .payment-icons i {
    transition: opacity 0.3s ease, transform 0.3s ease;
    opacity: 0.8;
}

.footer-bottom .payment-icons i:hover {
    opacity: 1;
    transform: scale(1.1);
}

.footer-bottom .payment-icons .payment-icon-img {
    opacity: 0.8;
    transition: opacity 0.3s ease, transform 0.3s ease;
    object-fit: contain;
}

.footer-bottom .payment-icons .payment-icon-img:hover {
    opacity: 1;
    transform: scale(1.1);
}

.footer-bottom .payment-icons .payment-icon-link {
    display: inline-flex;
    align-items: center;
    line-height: 1;
}

.footer-bottom .payment-icons .payment-icon-link:hover i,
.footer-bottom .payment-icons .payment-icon-link:hover .payment-icon-img {
    opacity: 1;
    transform: scale(1.1);
}

.footer-bottom .copyright {
    font-size: 0.8rem;
    color: #666666;
}

.footer-bottom .footer-logo img,
.footer-bottom .footer-logo .custom-logo {
    width: auto;
    object-fit: contain;
}

.footer-bottom .footer-logo span img,
.footer-bottom .footer-logo span .custom-logo {
    max-height: 100%;
}

/* ============================================
   PAGE TEMPLATES
   ============================================ */
.page-content {
    max-width: var(--jb-max-width);
    margin: 0 auto;
    padding: 60px 20px;
}

.page-content h1 {
    font-family: var(--jb-font-heading);
    font-size: 2.2rem;
    margin-bottom: 20px;
    color: var(--jb-dark);
}

.page-content h2 {
    font-size: 1.6rem;
    margin-bottom: 15px;
    color: var(--jb-dark);
}

.page-content p {
    margin-bottom: 15px;
    line-height: 1.8;
}

/* Contact Form */
.contact-form {
    max-width: 600px;
}

.contact-form .form-group {
    margin-bottom: 20px;
}

.contact-form label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 0.9rem;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--jb-border);
    border-radius: 4px;
    font-size: 0.95rem;
    font-family: var(--jb-font-main);
    transition: border-color 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--jb-primary);
}

.contact-form textarea {
    min-height: 150px;
    resize: vertical;
}

.contact-form button {
    background: var(--jb-primary);
    color: var(--jb-white);
    border: none;
    padding: 12px 35px;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.contact-form button:hover {
    background: var(--jb-primary-hover);
}

/* ============================================
   WOOCOMMERCE OVERRIDES
   ============================================ */
.woocommerce .woocommerce-breadcrumb {
    max-width: var(--jb-max-width);
    margin: 20px auto;
    padding: 0 20px;
    font-size: 0.85rem;
    color: var(--jb-text-light);
}

.woocommerce .woocommerce-result-count,
.woocommerce .woocommerce-ordering {
    margin-bottom: 20px;
}

.woocommerce div.product {
    max-width: var(--jb-max-width);
    margin: 0 auto;
    padding: 20px;
}

.woocommerce div.product .product_title {
    font-family: var(--jb-font-heading);
    color: var(--jb-dark);
}

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

.woocommerce div.product .single_add_to_cart_button {
    background: var(--jb-primary) !important;
    border-radius: 4px;
}

.woocommerce div.product .single_add_to_cart_button:hover {
    background: var(--jb-primary-hover) !important;
}

.woocommerce-cart .wc-proceed-to-checkout a.checkout-button,
.woocommerce #respond input#submit,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button {
    background-color: var(--jb-primary);
    color: var(--jb-white);
}

.woocommerce #respond input#submit:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover {
    background-color: var(--jb-primary-hover);
    color: var(--jb-white);
}

/* WooCommerce notices */
.woocommerce-message {
    border-top-color: var(--jb-primary);
}

.woocommerce-message::before {
    color: var(--jb-primary);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 992px) {
    .products-grid,
    .woocommerce ul.products {
        grid-template-columns: repeat(3, 1fr);
    }

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

    .features-grid {
        gap: 40px;
    }

    .hero-content h1 {
        font-size: 2.2rem;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .main-navigation {
        position: fixed;
        top: var(--jb-header-height);
        left: -100%;
        width: 280px;
        height: calc(100vh - var(--jb-header-height));
        background: var(--jb-dark);
        flex-direction: column;
        padding: 20px;
        transition: left 0.3s ease;
        z-index: 999;
        overflow-y: auto;
    }

    .main-navigation.active {
        left: 0;
    }

    .main-navigation .nav-menu {
        flex-direction: column;
        gap: 0;
        width: 100%;
    }

    .main-navigation .nav-menu li {
        width: 100%;
        border-bottom: 1px solid #333;
    }

    .main-navigation .nav-menu li a {
        display: block;
        padding: 12px 0;
    }

    /* Mobile dropdowns */
    .main-navigation .nav-menu li .sub-menu {
        position: static;
        display: none;
        min-width: 100%;
        box-shadow: none;
        border-top: none;
        border-radius: 0;
        padding: 0;
        background: rgba(255,255,255,0.05);
    }

    .main-navigation .nav-menu li.sub-menu-open > .sub-menu {
        display: block;
    }

    .main-navigation .nav-menu .sub-menu li a {
        padding-left: 25px;
        font-size: 0.85rem;
    }

    .main-navigation .nav-menu .sub-menu .sub-menu li a {
        padding-left: 40px;
    }

    .main-navigation .nav-menu li:hover > .sub-menu {
        display: none;
    }

    .main-navigation .nav-menu li.sub-menu-open:hover > .sub-menu {
        display: block;
    }

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

    .features-grid {
        flex-direction: column;
        gap: 30px;
    }

    .hero-content h1 {
        font-size: 1.8rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .about-section h2 {
        font-size: 1.6rem;
    }

    .newsletter-form {
        flex-direction: column;
    }

    .newsletter-form input[type="email"] {
        border-right: 1px solid var(--jb-border);
    }

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

    .footer-bottom {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .section-title::before,
    .section-title::after {
        width: calc(50% - 80px);
    }
}

@media (max-width: 480px) {
    .products-grid,
    .woocommerce ul.products {
        grid-template-columns: 1fr;
        max-width: 300px;
        margin: 0 auto;
    }

    .header-actions .account-text {
        display: none;
    }
}

/* ============================================
   MOBILE NAV OVERLAY
   ============================================ */
.nav-overlay {
    display: none;
    position: fixed;
    top: var(--jb-header-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 998;
}

.nav-overlay.active {
    display: block;
}

/* ============================================
   UTILITY
   ============================================ */
.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
    word-wrap: normal !important;
}

.alignwide {
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

.alignfull {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}
