/**
 * First Priority Supply Theme - Complete Main Styles
 * Professional styling for the flooring supply website
 */

/* ==================================== */
/* CSS VARIABLES */
/* ==================================== */

:root {
    /* Primary Colors - Wood/Flooring Inspired */
    --primary: #8B4513;        /* Saddle Brown - Warm wood tone */
    --primary-dark: #654321;   /* Dark wood */
    --primary-light: #D2691E;  /* Chocolate - Lighter wood */
    
    /* Secondary Colors - Trust & Professional */
    --secondary: #1e3a5f;      /* Deep Navy Blue */
    --secondary-light: #4a6fa5; /* Steel Blue */
    
    /* Accent Colors */
    --accent: #ff6b35;         /* Coral Orange - Energy */
    --accent-light: #ffa07a;   /* Light Salmon */
    
    /* Neutral Colors */
    --dark: #2b2d42;
    --gray: #6c757d;
    --light: #f8f9fa;
    --border: #dee2e6;
    --white: #ffffff;
    
    /* Functional Colors */
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --info: #17a2b8;
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 8px rgba(0,0,0,0.15);
    --shadow-lg: 0 8px 16px rgba(0,0,0,0.2);
}

/* ==================================== */
/* BASE STYLES & RESET */
/* ==================================== */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background-color: #f5f5f5;
    overflow-x: hidden;
}

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

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

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

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }

/* ==================================== */
/* UTILITY CLASSES */
/* ==================================== */

.container {
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
}

/* ==================================== */
/* TOP BANNER */
/* ==================================== */

.top-banner {
    background: linear-gradient(135deg, var(--accent) 0%, var(--primary-light) 100%);
    color: white;
    text-align: center;
    padding: 14px 20px;
    font-size: 1rem;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.top-banner a {
    color: white;
    text-decoration: underline;
    font-weight: 700;
    text-underline-offset: 3px;
}

.top-banner a:hover {
    opacity: 0.85;
}

/* ==================================== */
/* UTILITY BAR */
/* ==================================== */

.utility-bar {
    background-color: var(--secondary);
    color: white;
    padding: 12px 0;
    font-size: 0.9rem;
}

.utility-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.utility-left,
.utility-right {
    display: flex;
    align-items: center;
    gap: 25px;
    flex-wrap: wrap;
}

.utility-link {
    color: rgba(255, 255, 255, 0.95);
    transition: color 0.3s;
    font-weight: 500;
}

.utility-link:hover {
    color: var(--accent-light);
}

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

header {
    background-color: white;
    padding: 25px 0;
    border-bottom: 3px solid var(--primary);
    position: sticky;
    top: 0;
    z-index: 999;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    flex-wrap: wrap;
}

.logo {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    white-space: nowrap;
    display: flex;
    align-items: center;
    transition: transform 0.3s;
}

.logo:hover {
    color: var(--primary-dark);
    transform: scale(1.02);
}

.logo-text {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ==================================== */
/* SEARCH BAR */
/* ==================================== */

.search-bar {
    flex: 1;
    max-width: 550px;
    min-width: 280px;
}

.search-bar form {
    display: flex;
    border: 2px solid var(--border);
    border-radius: 50px;
    overflow: hidden;
    background-color: white;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
}

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

.search-bar input[type="search"] {
    flex: 1;
    padding: 14px 20px;
    border: none;
    font-size: 1rem;
    outline: none;
    background: transparent;
}

.search-bar button {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    padding: 14px 30px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.search-bar button:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    transform: scale(1.05);
}

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

.header-actions {
    display: flex;
    gap: 25px;
    align-items: center;
}

.header-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    color: var(--secondary);
    font-size: 0.85rem;
    transition: all 0.3s;
    position: relative;
    font-weight: 600;
}

.header-action:hover {
    color: var(--primary);
    transform: translateY(-2px);
}

.header-action-icon {
    font-size: 1.8rem;
    position: relative;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -12px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--danger) 100%);
    color: white;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    box-shadow: var(--shadow-sm);
}

/* ==================================== */
/* NAVIGATION */
/* ==================================== */

.main-nav {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-light) 100%);
    box-shadow: var(--shadow-md);
}

.main-nav .container {
    position: relative;
}

.mobile-menu-toggle {
    display: none;
    background: transparent;
    border: none;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    padding: 15px;
}

.nav-links {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    justify-content: center;
}

.nav-links li {
    position: relative;
}

.nav-links a {
    display: block;
    color: white;
    padding: 18px 24px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-links a:hover,
.nav-links .current-menu-item a {
    background-color: rgba(255, 107, 53, 0.2);
    color: var(--accent-light);
    transform: translateY(-2px);
}

/* Dropdown menu */
.nav-links .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: white;
    box-shadow: var(--shadow-lg);
    min-width: 220px;
    list-style: none;
    padding: 0;
    margin: 0;
    z-index: 1000;
    border-radius: 0 0 8px 8px;
}

.nav-links li:hover > .sub-menu {
    display: block;
}

.nav-links .sub-menu a {
    color: var(--dark);
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
    text-transform: none;
    letter-spacing: normal;
}

.nav-links .sub-menu a:hover {
    background-color: var(--light);
    color: var(--primary);
    padding-left: 25px;
}

/* ==================================== */
/* BREADCRUMB */
/* ==================================== */

.breadcrumb {
    background-color: var(--light);
    padding: 12px 0;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border);
}

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

.breadcrumb a:hover {
    color: var(--accent);
    text-decoration: underline;
}

.woocommerce-breadcrumb {
    margin: 0;
}

/* ==================================== */
/* SHOP LAYOUT */
/* ==================================== */

.shop-layout {
    display: flex;
    gap: 35px;
    padding: 35px 0;
}

.sidebar {
    width: 280px;
    flex-shrink: 0;
}

.filter-toggle-mobile {
    display: none;
}

.shop-content {
    flex: 1;
    min-width: 0;
}

/* ==================================== */
/* SIDEBAR FILTERS */
/* ==================================== */

.filter-section,
.widget {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 25px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.3s;
}

.filter-section:hover,
.widget:hover {
    box-shadow: var(--shadow-md);
}

.filter-title,
.widget-title {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 16px 18px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0;
    font-size: 1.05rem;
}

.filter-content,
.widget ul {
    padding: 18px;
}

.filter-content ul,
.widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.filter-content li,
.widget li {
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    transition: padding-left 0.3s;
}

.filter-content li:last-child,
.widget li:last-child {
    border-bottom: none;
}

.filter-content li:hover,
.widget li:hover {
    padding-left: 8px;
}

.filter-content a,
.widget a {
    color: var(--dark);
    transition: all 0.3s;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-content a:hover,
.widget a:hover {
    color: var(--primary);
    padding-left: 12px;
}

/* Product Categories Specific Styling */
.product-categories {
    list-style: none;
    padding: 0;
    margin: 0;
}

.product-categories li {
    border-bottom: 1px solid var(--border);
    padding: 0;
}

.product-categories li:last-child {
    border-bottom: none;
}

.product-categories > li > a {
    padding: 12px 0;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-categories .count {
    background: var(--primary);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 700;
}

.product-categories .children {
    padding-left: 20px;
    background: rgba(0,0,0,0.02);
}

.product-categories .children li a {
    padding: 8px 0;
    font-size: 0.9rem;
    font-weight: 500;
}

.toggle-icon {
    transition: transform 0.3s;
}

.filter-title.collapsed .toggle-icon {
    transform: rotate(-90deg);
}

/* ==================================== */
/* PRODUCT GRID */
/* ==================================== */

.products,
ul.products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
    list-style: none;
    padding: 0;
}

.product,
li.product {
    background: white;
    border: 2px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s;
    box-shadow: var(--shadow-sm);
}

.product:hover,
li.product:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.product-image,
.attachment-woocommerce_thumbnail {
    position: relative;
    overflow: hidden;
    height: 280px;
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
}

.product-image img,
.attachment-woocommerce_thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.product:hover .product-image img,
li.product:hover img {
    transform: scale(1.1);
}

.onsale {
    position: absolute;
    top: 15px;
    left: 15px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--danger) 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 25px;
    font-weight: 700;
    font-size: 0.9rem;
    z-index: 10;
    box-shadow: var(--shadow-md);
}

.product-info {
    padding: 25px;
}

.product-title,
.woocommerce-loop-product__title {
    font-size: 1.2rem;
    margin-bottom: 12px;
    line-height: 1.4;
}

.product-title a,
.woocommerce-loop-product__title {
    color: var(--secondary);
    transition: color 0.3s;
}

.product-title a:hover,
.woocommerce-loop-product__title:hover {
    color: var(--primary);
}

.product-category {
    font-size: 0.85rem;
    color: var(--gray);
    text-transform: uppercase;
    margin-bottom: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.price,
.woocommerce-Price-amount {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 18px;
    display: block;
}

.price del {
    color: var(--gray);
    font-size: 1.1rem;
    margin-right: 10px;
    opacity: 0.7;
}

.add_to_cart_button,
.button {
    display: inline-block;
    width: 100%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 14px;
    text-align: center;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.add_to_cart_button:hover,
.button:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ==================================== */
/* PAGINATION */
/* ==================================== */

.woocommerce-pagination {
    margin-top: 50px;
    text-align: center;
}

.woocommerce-pagination ul {
    display: inline-flex;
    list-style: none;
    gap: 8px;
    padding: 0;
}

.woocommerce-pagination li {
    display: inline-block;
}

.woocommerce-pagination a,
.woocommerce-pagination span {
    display: block;
    padding: 12px 18px;
    border: 2px solid var(--border);
    border-radius: 8px;
    color: var(--dark);
    transition: all 0.3s;
    font-weight: 600;
}

.woocommerce-pagination a:hover,
.woocommerce-pagination .current {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border-color: var(--primary);
    transform: translateY(-2px);
}

/* ==================================== */
/* FOOTER */
/* ==================================== */

.site-footer {
    background: linear-gradient(135deg, var(--secondary) 0%, #0f1e30 100%);
    color: white;
    padding: 60px 0 30px;
    margin-top: 80px;
    position: relative;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 50%, var(--primary) 100%);
}

.footer-widgets {
    margin-bottom: 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.footer-column {
    padding: 0;
}

.footer-column h3,
.footer-section h3 {
    color: white;
    margin-bottom: 20px;
    font-size: 1.3rem;
    position: relative;
    padding-bottom: 10px;
}

.footer-column h3::after,
.footer-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
}

.footer-column ul,
.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-column li,
.footer-section li {
    margin-bottom: 12px;
}

.footer-column a,
.footer-section a {
    color: rgba(255, 255, 255, 0.85);
    transition: all 0.3s;
    display: inline-block;
}

.footer-column a:hover,
.footer-section a:hover {
    color: var(--accent-light);
    padding-left: 8px;
}

.footer-column p,
.footer-section p {
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.8;
    margin-bottom: 12px;
}

.footer-column strong {
    color: white;
    display: block;
    margin-bottom: 5px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding-top: 30px;
    text-align: center;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.95rem;
}

/* ==================================== */
/* RESPONSIVE DESIGN */
/* ==================================== */

@media (max-width: 992px) {
    .shop-layout {
        gap: 25px;
    }
    
    .sidebar {
        width: 250px;
    }
    
    .products,
    ul.products {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 25px;
    }
}

@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.7rem; }
    h3 { font-size: 1.3rem; }
    
    .utility-bar .container {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .header-content {
        flex-direction: column;
        gap: 20px;
    }
    
    .logo {
        font-size: 1.7rem;
    }
    
    .search-bar {
        width: 100%;
        max-width: 100%;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .nav-links a {
        padding: 15px 20px;
    }
    
    .shop-layout {
        flex-direction: column;
        padding: 25px 0;
    }
    
    .sidebar {
        width: 100%;
        position: fixed;
        left: -100%;
        top: 0;
        height: 100vh;
        background: white;
        z-index: 9999;
        overflow-y: auto;
        padding: 20px;
        box-shadow: 2px 0 10px rgba(0,0,0,0.1);
        transition: left 0.3s ease;
    }
    
    .sidebar.mobile-visible {
        left: 0;
    }
    
    .filter-toggle-mobile {
        display: block;
        margin-bottom: 20px;
        position: relative;
        z-index: 1;
    }
    
    .filter-toggle-btn {
        width: 100%;
        background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
        color: white;
        padding: 15px;
        border: none;
        border-radius: 8px;
        font-size: 1.05rem;
        font-weight: 700;
        cursor: pointer;
        box-shadow: var(--shadow-sm);
    }
    
    .products,
    ul.products {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 20px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (max-width: 480px) {
    .top-banner {
        font-size: 0.9rem;
        padding: 12px 15px;
    }
    
    .logo {
        font-size: 1.5rem;
    }
    
    .products,
    ul.products {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .header-actions {
        width: 100%;
        justify-content: space-around;
        gap: 15px;
    }
    
    .header-action {
        font-size: 0.8rem;
    }
    
    .header-action-icon {
        font-size: 1.5rem;
    }
}