/*!
 * New Stylo Furniture Theme - Custom Styles
 * Modern, elegant design for furniture stores
 */

/* ===== CSS Variables ===== */
:root {
    --primary-color: #8B4513;
    --secondary-color: #D2B48C;
    --accent-color: #CD853F;
    --text-dark: #2C2C2C;
    --text-light: #666666;
    --background-light: #FAFAFA;
    --white: #FFFFFF;
    --border-color: #E5E5E5;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;
}

/* ===== Base Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Override any conflicting styles */
body {
    font-family: var(--font-primary) !important;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--white);
}

/* Force navigation menu spacing - single line */
#site-navigation .nav-menu {
    gap: 25px !important;
    flex-wrap: nowrap !important;
    white-space: nowrap !important;
}

#primary-menu {
    gap: 25px !important;
    flex-wrap: nowrap !important;
    white-space: nowrap !important;
}

.nav-menu {
    gap: 25px !important;
    flex-wrap: nowrap !important;
    white-space: nowrap !important;
}

/* Override any WordPress/Bootstrap defaults */
.main-navigation ul.nav-menu {
    gap: 25px !important;
    flex-wrap: nowrap !important;
    white-space: nowrap !important;
}

.main-navigation #primary-menu {
    gap: 25px !important;
    flex-wrap: nowrap !important;
    white-space: nowrap !important;
}

/* Add body padding to account for fixed header */
body {
    padding-top: 120px !important;
}

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

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--accent-color);
}

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

.container {
    max-width: 1200px;
}

/* ===== Button Styles ===== */
.btn {
    display: inline-block;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    border: 2px solid transparent;
    border-radius: 5px;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

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

.btn-outline:hover {
    background-color: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

/* ===== Header Styles ===== */
.site-header {
    background-color: var(--white);
    box-shadow: var(--shadow);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    width: 100%;
}

.site-header .top-bar {
    background-color: var(--text-dark) !important;
    color: var(--white) !important;
    padding: 10px 0;
    font-size: 14px;
}

.site-header .main-header {
    background-color: var(--white) !important;
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
}

.top-bar {
    background-color: var(--text-dark) !important;
    color: var(--white) !important;
    padding: 10px 0;
    font-size: 14px;
    width: 100%;
}

.top-bar .contact-info span {
    margin-right: 20px;
    color: var(--white) !important;
}

.top-bar .contact-info i {
    margin-right: 5px;
    color: var(--secondary-color) !important;
}

.contact-info span {
    margin-right: 20px;
}

.contact-info i {
    margin-right: 5px;
    color: var(--secondary-color);
}

.social-links a {
    display: inline-block;
    width: 35px;
    height: 35px;
    line-height: 35px;
    text-align: center;
    background-color: var(--secondary-color);
    color: var(--text-dark);
    border-radius: 50%;
    margin-left: 10px;
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--accent-color);
    color: var(--white);
    transform: translateY(-2px);
}

.main-header {
    padding: 20px 0;
}

.main-header .container {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.main-header .row {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.main-header .col-lg-4 {
    padding-left: 0 !important;
}

.logo-container {
    margin-left: -60px !important;
    padding-left: 0 !important;
    position: relative !important;
    left: -20px !important;
}

.site-branding .site-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 5px;
    line-height: 1.1;
}

.site-branding .site-title a {
    color: var(--text-dark);
    text-decoration: none;
}

.site-branding .brand-line-1,
.site-branding .brand-line-2,
.site-branding .brand-line-3 {
    display: block;
    position: relative;
}

.site-branding .brand-line-1::after,
.site-branding .brand-line-2::after,
.site-branding .brand-line-3::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
}

.site-branding .site-description {
    color: var(--text-light);
    font-size: 14px;
    margin: 0;
}

.main-navigation .nav-menu {
    display: flex !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    gap: 25px !important;
    justify-content: center !important;
    flex-wrap: nowrap !important;
    white-space: nowrap !important;
}

.main-navigation .nav-menu li {
    margin: 0 !important;
    margin-right: 0 !important;
    flex-shrink: 0 !important;
}

.main-navigation .nav-menu li:not(:last-child) {
    margin-right: 0 !important;
}

.main-navigation .nav-menu a {
    color: var(--text-dark);
    font-weight: 500;
    font-size: 16px;
    padding: 12px 0;
    position: relative;
    text-decoration: none;
    transition: var(--transition);
}

.main-navigation .nav-menu a:hover {
    color: var(--primary-color);
}

.main-navigation .nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    transition: var(--transition);
}

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

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    justify-content: flex-end;
    padding-right: 0 !important;
    margin-right: -80px !important;
    position: relative;
    right: -35px !important;
}

/* Override inline styles for header actions */
.main-header .header-actions {
    margin-right: -80px !important;
    position: relative !important;
    right: -35px !important;
    padding-right: 0 !important;
}

/* Target the contact button specifically */
.contact-btn {
    margin-right: -20px !important;
    position: relative !important;
    right: -15px !important;
}

.search-toggle,
.cart-toggle {
    font-size: 20px;
    color: var(--text-dark);
    cursor: pointer;
    transition: var(--transition);
}

.search-toggle:hover,
.cart-toggle:hover {
    color: var(--primary-color);
}

.cart-toggle {
    position: relative;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: var(--primary-color);
    color: var(--white);
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

/* ===== Search Overlay ===== */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}

.search-overlay.active {
    display: flex;
}

.search-container {
    width: 100%;
    max-width: 600px;
    position: relative;
}

.search-form {
    display: flex;
    background-color: var(--white);
    border-radius: 50px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.search-field {
    flex: 1;
    padding: 20px 30px;
    border: none;
    font-size: 18px;
    outline: none;
}

.search-submit {
    padding: 20px 30px;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    cursor: pointer;
    font-size: 18px;
}

.search-close {
    position: absolute;
    top: -60px;
    right: 0;
    background: none;
    border: none;
    color: var(--white);
    font-size: 30px;
    cursor: pointer;
}

/* ===== Hero Section ===== */
.hero-section {
    height: 100vh;
    position: relative;
    overflow: hidden;
    margin-top: 120px;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.hero-slide.active {
    opacity: 1;
}

.hero-image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, rgba(0,0,0,0.6), rgba(0,0,0,0.3));
}

.hero-title {
    font-size: 60px;
    color: var(--white);
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero-subtitle {
    font-size: 20px;
    color: var(--white);
    margin-bottom: 30px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.hero-buttons {
    display: flex;
    gap: 20px;
}

.hero-buttons .btn {
    padding: 15px 35px;
    font-size: 18px;
}

/* ===== Section Styles ===== */
section {
    padding: 80px 0;
}

.section-header {
    margin-bottom: 60px;
}

.section-title {
    font-size: 42px;
    color: var(--text-dark);
    margin-bottom: 15px;
}

.section-subtitle {
    font-size: 18px;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

/* ===== Featured Categories ===== */
.featured-categories {
    background-color: var(--background-light);
}

.category-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

.category-card-link:hover {
    text-decoration: none;
    color: inherit;
}

.category-card {
    background-color: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
    height: 100%;
    cursor: pointer;
}

.category-card-link:hover .category-card {
    box-shadow: var(--shadow-hover);
}

.category-image {
    height: 250px;
    overflow: hidden;
}

.category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.category-card-link:hover .category-image img {
    transform: scale(1.1);
}

.category-content {
    padding: 30px;
}

.category-content h3 {
    font-size: 24px;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.category-content p {
    color: var(--text-light);
    margin-bottom: 20px;
}

.category-link {
    color: var(--primary-color);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.category-card-link:hover .category-link {
    color: var(--accent-color);
}

/* ===== Product Cards ===== */
.product-card {
    background-color: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.product-card:hover {
    box-shadow: var(--shadow-hover);
}

.product-image {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.product-card:hover .product-overlay {
    opacity: 1;
}

.quick-view {
    background-color: var(--white);
    color: var(--text-dark);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: var(--transition);
}

.quick-view:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

.product-content {
    padding: 25px;
}

.product-title {
    font-size: 18px;
    margin-bottom: 10px;
}

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

.product-price {
    font-size: 20px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.product-actions {
    text-align: center;
}

/* ===== About Section ===== */
.about-section {
    background-color: var(--background-light);
}

.about-content h2 {
    font-size: 36px;
    margin-bottom: 25px;
}

.about-content p {
    font-size: 18px;
    color: var(--text-light);
    margin-bottom: 40px;
}

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

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.feature-item i {
    font-size: 24px;
    color: var(--primary-color);
    margin-top: 5px;
}

.feature-item h4 {
    font-size: 20px;
    margin-bottom: 10px;
}

.feature-item p {
    color: var(--text-light);
    margin: 0;
}

.about-image img {
    border-radius: 10px;
    box-shadow: var(--shadow);
}

/* ===== Newsletter Section ===== */
.newsletter-section {
    background-color: var(--primary-color);
    color: var(--white);
}

.newsletter-section h2 {
    font-size: 36px;
    margin-bottom: 15px;
}

.newsletter-section p {
    font-size: 18px;
    margin-bottom: 40px;
    opacity: 0.9;
}

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

.input-group {
    display: flex;
    background-color: var(--white);
    border-radius: 50px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.input-group .form-control {
    flex: 1;
    padding: 15px 25px;
    border: none;
    font-size: 16px;
    outline: none;
}

.input-group .btn {
    border-radius: 0;
    margin: 0;
}

/* ===== Footer Styles ===== */
.site-footer {
    background-color: var(--text-dark);
    color: var(--white);
}

.footer-main {
    padding: 60px 0 40px;
}

.footer-widget-title {
    font-size: 20px;
    margin-bottom: 25px;
    color: var(--white);
}

.footer-widget p {
    color: #ccc;
    margin-bottom: 20px;
}

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

.footer-menu li {
    margin-bottom: 10px;
}

.footer-menu a {
    color: #ccc;
    transition: var(--transition);
}

.footer-menu a:hover {
    color: var(--secondary-color);
}

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

.footer-categories li {
    margin-bottom: 10px;
}

.footer-categories a {
    color: #ccc;
    transition: var(--transition);
}

.footer-categories a:hover {
    color: var(--secondary-color);
}

.contact-info p {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.contact-info i {
    color: var(--secondary-color);
    width: 20px;
}

.footer-bottom {
    border-top: 1px solid #444;
    padding: 20px 0;
}

.footer-links a {
    color: #ccc;
    margin-left: 20px;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--secondary-color);
}

/* ===== Responsive Design ===== */

/* Mobile Header Fixes */
@media (max-width: 991px) {
    /* Hide top bar on tablets and mobile */
    .top-bar {
        display: none !important;
    }
    
    /* Adjust main header padding */
    .main-header {
        padding: 10px 0 !important;
    }
    
    /* Make logo and brand text smaller */
    .site-title {
        font-size: 18px !important;
        line-height: 1.2 !important;
    }
    
    .brand-text p {
        font-size: 10px !important;
        margin: 2px 0 0 0 !important;
    }
    
    /* Hide navigation on tablets */
    .main-navigation {
        display: none !important;
    }
    
    /* Show menu toggle */
    .menu-toggle {
        display: block !important;
    }
    
    /* Adjust header actions */
    .header-actions {
        gap: 10px !important;
    }
    
    .contact-btn {
        padding: 8px 16px !important;
    }
    
    .contact-btn a {
        font-size: 12px !important;
    }
}

@media (max-width: 768px) {
    /* Mobile specific fixes */
    body {
        padding-top: 80px !important;
    }
    
    /* Hide top bar completely on mobile */
    .top-bar {
        display: none !important;
    }
    
    /* Compact main header */
    .main-header {
        padding: 8px 0 !important;
    }
    
    /* Mobile logo adjustments */
    .logo-container {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 5px !important;
    }
    
    .logo-container img {
        height: 35px !important;
        max-width: 120px !important;
    }
    
    .site-title {
        font-size: 16px !important;
        line-height: 1.1 !important;
    }
    
    .brand-text p {
        font-size: 9px !important;
        margin: 2px 0 0 0 !important;
    }
    
    /* Mobile navigation */
    .main-navigation {
        position: relative !important;
    }
    
    .main-navigation .nav-menu {
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--white);
        box-shadow: var(--shadow);
        display: none;
        z-index: 1001;
        margin-top: 10px;
    }
    
    .main-navigation .nav-menu.active {
        display: flex;
    }
    
    .main-navigation .nav-menu li {
        margin: 0;
        border-bottom: 1px solid var(--border-color);
    }
    
    .main-navigation .nav-menu a {
        padding: 15px 20px;
        display: block;
        font-size: 16px;
    }
    
    .menu-toggle {
        display: block !important;
        background: none;
        border: none;
        font-size: 20px;
        cursor: pointer;
        padding: 5px;
    }
    
    .menu-toggle span {
        display: block;
        width: 25px;
        height: 3px;
        background-color: var(--text-dark);
        margin: 5px 0;
        transition: var(--transition);
    }
    
    /* Mobile header actions */
    .header-actions {
        gap: 8px !important;
        flex-direction: column !important;
        align-items: flex-end !important;
    }
    
    .search-toggle {
        padding: 8px !important;
    }
    
    .search-toggle i {
        font-size: 16px !important;
    }
    
    .contact-btn {
        padding: 6px 12px !important;
    }
    
    .contact-btn a {
        font-size: 11px !important;
    }
    
    /* Adjust container padding */
    .container {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
}

@media (max-width: 480px) {
    /* Extra small mobile devices */
    body {
        padding-top: 70px !important;
    }
    
    .main-header {
        padding: 5px 0 !important;
    }
    
    .logo-container img {
        height: 30px !important;
        max-width: 100px !important;
    }
    
    .site-title {
        font-size: 14px !important;
    }
    
    .brand-text p {
        font-size: 8px !important;
    }
    
    .header-actions {
        gap: 5px !important;
    }
    
    .contact-btn {
        padding: 5px 10px !important;
    }
    
    .contact-btn a {
        font-size: 10px !important;
    }
}

/* General responsive fixes */
@media (max-width: 768px) {
    .hero-title {
        font-size: 40px;
    }
    
    .hero-subtitle {
        font-size: 18px;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .section-title {
        font-size: 32px;
    }
}

/* ===== Animations ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* ===== Shop Page Layout Fixes ===== */
.shop-page {
    padding-top: 40px;
}

.shop-hero {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: var(--white);
    padding: 100px 0 80px 0 !important;
    margin-bottom: 40px;
}

/* Force shop hero padding for all shop pages */
.shop-page .shop-hero,
.woocommerce-page .shop-hero,
body.shop-page .shop-hero,
body.woocommerce-page .shop-hero {
    padding-top: 100px !important;
    padding-bottom: 80px !important;
}

.shop-title {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--white);
}

.shop-subtitle {
    font-size: 18px;
    opacity: 0.9;
    margin: 0;
}

.shop-content {
    padding: 0 0 60px;
}

.products-grid .row {
    display: flex !important;
    flex-wrap: wrap !important;
    margin: 0 -15px !important;
}

.products-grid .product-item {
    padding: 0 15px !important;
    margin-bottom: 30px !important;
    flex: 0 0 auto !important;
}

/* Force Bootstrap grid to work properly */
.col-xl-3, .col-lg-4, .col-md-6, .col-sm-6 {
    position: relative !important;
    width: 100% !important;
    padding-right: 15px !important;
    padding-left: 15px !important;
    box-sizing: border-box !important;
    flex: 0 0 100% !important;
    max-width: 100% !important;
}

@media (min-width: 576px) {
    .col-sm-6 {
        flex: 0 0 50% !important;
        max-width: 50% !important;
    }
}

@media (min-width: 768px) {
    .col-md-6 {
        flex: 0 0 50% !important;
        max-width: 50% !important;
    }
}

@media (min-width: 992px) {
    .col-lg-4 {
        flex: 0 0 33.333333% !important;
        max-width: 33.333333% !important;
    }
}

@media (min-width: 1200px) {
    .col-xl-3 {
        flex: 0 0 25% !important;
        max-width: 25% !important;
    }
}

/* Reset WooCommerce default styles that interfere with Bootstrap */
.woocommerce ul.products {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    width: 100% !important;
}

.woocommerce ul.products li.product {
    width: auto !important;
    float: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
}

/* CRITICAL: Force shop page grid layout - Highest priority */
.shop-page .products-grid .row {
    display: flex !important;
    flex-wrap: wrap !important;
    margin: 0 -15px !important;
    width: 100% !important;
}

.shop-page .products-grid .product-item {
    padding: 0 15px !important;
    margin-bottom: 30px !important;
    flex: 0 0 auto !important;
    width: auto !important;
    float: none !important;
    display: block !important;
}

.shop-page .col-xl-3, 
.shop-page .col-lg-4, 
.shop-page .col-md-6, 
.shop-page .col-sm-6 {
    position: relative !important;
    width: 100% !important;
    padding-right: 15px !important;
    padding-left: 15px !important;
    box-sizing: border-box !important;
    flex: 0 0 100% !important;
    max-width: 100% !important;
}

@media (min-width: 576px) {
    .shop-page .col-sm-6 {
        flex: 0 0 50% !important;
        max-width: 50% !important;
    }
}

@media (min-width: 768px) {
    .shop-page .col-md-6 {
        flex: 0 0 50% !important;
        max-width: 50% !important;
    }
}

@media (min-width: 992px) {
    .shop-page .col-lg-4 {
        flex: 0 0 33.333333% !important;
        max-width: 33.333333% !important;
    }
}

@media (min-width: 1200px) {
    .shop-page .col-xl-3 {
        flex: 0 0 25% !important;
        max-width: 25% !important;
    }
}

/* ULTRA HIGH SPECIFICITY - Override any Bootstrap conflicts */
body.shop-page .products-grid .row {
    display: flex !important;
    flex-wrap: wrap !important;
    margin: 0 -15px !important;
    width: 100% !important;
}

body.shop-page .products-grid .product-item {
    padding: 0 15px !important;
    margin-bottom: 30px !important;
    flex: 0 0 auto !important;
    width: auto !important;
    float: none !important;
    display: block !important;
}

body.shop-page .col-xl-3, 
body.shop-page .col-lg-4, 
body.shop-page .col-md-6, 
body.shop-page .col-sm-6 {
    position: relative !important;
    width: 100% !important;
    padding-right: 15px !important;
    padding-left: 15px !important;
    box-sizing: border-box !important;
    flex: 0 0 100% !important;
    max-width: 100% !important;
}

@media (min-width: 576px) {
    body.shop-page .col-sm-6 {
        flex: 0 0 50% !important;
        max-width: 50% !important;
    }
}

@media (min-width: 768px) {
    body.shop-page .col-md-6 {
        flex: 0 0 50% !important;
        max-width: 50% !important;
    }
}

@media (min-width: 992px) {
    body.shop-page .col-lg-4 {
        flex: 0 0 33.333333% !important;
        max-width: 33.333333% !important;
    }
}

@media (min-width: 1200px) {
    body.shop-page .col-xl-3 {
        flex: 0 0 25% !important;
        max-width: 25% !important;
    }
}

/* Additional Mobile Header Fixes */
@media (max-width: 768px) {
    /* Ensure header doesn't break on mobile */
    .site-header {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 1000 !important;
        width: 100% !important;
        background: #ffffff !important;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1) !important;
    }
    
    /* Mobile menu toggle animation */
    .menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
    
    /* Mobile navigation improvements */
    .main-navigation .nav-menu {
        border-radius: 0 0 10px 10px;
        overflow: hidden;
    }
    
    .main-navigation .nav-menu li:last-child {
        border-bottom: none;
    }
    
    /* Mobile header layout fixes */
    .main-header .row {
        align-items: center !important;
    }
    
    .main-header .col-lg-4,
    .main-header .col-lg-6,
    .main-header .col-lg-2 {
        flex: none !important;
        width: auto !important;
        max-width: none !important;
    }
    
    /* Mobile logo and text adjustments */
    .logo-container {
        max-width: 200px !important;
    }
    
    .brand-text {
        max-width: 150px !important;
    }
    
    /* Mobile header actions positioning */
    .header-actions {
        position: relative !important;
        right: 0 !important;
        margin-right: 0 !important;
    }
}

/* ===== Utility Classes ===== */
.text-center {
    text-align: center;
}

.text-end {
    text-align: right;
}

.mb-0 {
    margin-bottom: 0;
}

.mt-0 {
    margin-top: 0;
}

.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 999999;
    padding: 8px 16px;
    background-color: var(--primary-color);
    color: var(--white);
    text-decoration: none;
}

.skip-link:focus {
    left: 6px;
    top: 7px;
}

/* ULTIMATE OVERRIDE - HIGHEST PRIORITY */
body.shop-page .products-grid .row .product-item,
body.woocommerce-page .products-grid .row .product-item,
html body .shop-content .products-grid .row .product-item {
    flex: 0 0 50% !important;
    max-width: 50% !important;
    width: 50% !important;
    position: relative !important;
    padding-right: 15px !important;
    padding-left: 15px !important;
    box-sizing: border-box !important;
    float: none !important;
    display: block !important;
}

@media (max-width: 767px) {
    body.shop-page .products-grid .row .product-item,
    body.woocommerce-page .products-grid .row .product-item,
    html body .shop-content .products-grid .row .product-item {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        width: 100% !important;
    }
}
