/*
Theme Name: Storefront Child
Template: storefront
Description: Equipment Catalog - Minimal Tech Design
Version: 2.2
*/

/* ==========================================
   CSS Variables - Minimal Palette
   ========================================== */
:root {
    --primary: #2d3748;
    --primary-hover: #1a202c;
    --accent: #3182ce;
    --accent-hover: #2b6cb0;
    --success: #38a169;
    --bg: #f7fafc;
    --white: #fff;
    --text: #2d3748;
    --text-light: #718096;
    --border: #e2e8f0;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.1);
    --radius: 6px;
}

/* ==========================================
   Global Styles
   ========================================== */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    color: var(--accent-hover);
}

/* ==========================================
   HIDE Storefront defaults
   ========================================== */
#secondary,
.widget-area,
.storefront-primary-navigation,
.main-navigation,
.site-header-cart,
.secondary-navigation,
.storefront-handheld-footer-bar {
    display: none !important;
}

#primary {
    width: 100% !important;
}

.col-full {
    max-width: 1280px !important;
}

/* ==========================================
   Header - Clean Minimal
   ========================================== */
.site-header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    box-shadow: none;
}

.site-branding {
    padding: 20px 0;
}

.site-title a {
    color: var(--text);
    font-weight: 700;
    font-size: 22px;
    letter-spacing: -0.5px;
}

.site-title a:hover {
    color: var(--accent);
}

/* Hide storefront search styling issues */
.storefront-product-search form {
    display: flex;
}

.storefront-product-search input[type="search"] {
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    width: 280px;
}

.storefront-product-search input[type="search"]:focus {
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1);
}

.storefront-product-search button {
    display: none;
    /* Hide search button, search on enter */
}

/* ==========================================
   Custom Navigation Bar
   ========================================== */
.ecs-nav-bar {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
}

.ecs-nav-inner {
    display: flex;
    align-items: center;
    gap: 15px;
}

.ecs-catalog-dropdown {
    position: relative;
}

.ecs-catalog-btn {
    background: var(--primary);
    color: var(--white) !important;
    padding: 10px 20px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 14px;
    transition: background 0.2s;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.ecs-catalog-btn:hover {
    background: var(--primary-hover);
    color: var(--white) !important;
}

.ecs-dropdown-arrow {
    font-size: 10px;
    transition: transform 0.2s;
}

.ecs-catalog-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 250px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    display: none;
    margin-top: 8px;
}

.ecs-catalog-menu.open {
    display: block;
}

.ecs-catalog-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    color: var(--text) !important;
    text-decoration: none;
    font-size: 14px;
    border-bottom: 1px solid var(--border);
    transition: background 0.2s;
}

.ecs-catalog-item:last-child {
    border-bottom: none;
}

.ecs-catalog-item:hover {
    background: var(--bg);
}

.ecs-cat-count {
    font-size: 12px;
    color: var(--text-light);
    background: var(--bg);
    padding: 2px 8px;
    border-radius: 10px;
}

.ecs-view-all {
    color: var(--accent) !important;
    font-weight: 500;
}

.ecs-cart-trigger {
    background: var(--bg);
    color: var(--text) !important;
    padding: 10px 18px;
    border-radius: var(--radius);
    font-weight: 500;
    font-size: 14px;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.2s;
}

.ecs-cart-trigger:hover {
    border-color: var(--accent);
    color: var(--accent) !important;
}

.ecs-cart-count {
    background: var(--accent);
    color: var(--white);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 5px;
}

.ecs-nav-links {
    display: flex;
    gap: 25px;
    margin-left: auto;
}

.ecs-nav-links a {
    color: var(--text);
    font-weight: 500;
    font-size: 14px;
    padding: 8px 0;
    transition: color 0.2s;
    border-bottom: 2px solid transparent;
}

.ecs-nav-links a:hover {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

/* ==========================================
   Cart Sidebar - Clean
   ========================================== */
.ecs-cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
}

.ecs-cart-overlay.open {
    opacity: 1;
    visibility: visible;
}

.ecs-cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 380px;
    height: 100%;
    background: var(--white);
    z-index: 9999;
    box-shadow: var(--shadow-lg);
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}

.ecs-cart-sidebar.open {
    right: 0;
}

.ecs-cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border);
}

.ecs-cart-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
}

.ecs-cart-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-light);
    padding: 0;
    line-height: 1;
}

.ecs-cart-close:hover {
    color: var(--text);
}

.ecs-cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
}

.ecs-cart-item {
    display: flex;
    gap: 12px;
    padding: 15px 0;
    border-bottom: 1px solid var(--border);
}

.ecs-cart-item:last-child {
    border-bottom: none;
}

.ecs-cart-item-img img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.ecs-cart-item-name {
    font-weight: 500;
    font-size: 14px;
    color: var(--text);
    margin-bottom: 4px;
}

.ecs-cart-item-qty {
    color: var(--text-light);
    font-size: 13px;
}

.ecs-cart-empty {
    text-align: center;
    color: var(--text-light);
    padding: 40px 20px;
}

.ecs-cart-footer {
    padding: 20px;
    border-top: 1px solid var(--border);
    background: var(--bg);
}

.ecs-cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 16px;
    margin-bottom: 15px;
}

.ecs-cart-btn {
    display: block;
    text-align: center;
    padding: 12px 20px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    margin-bottom: 10px;
    transition: all 0.2s;
}

.ecs-cart-btn:last-child {
    margin-bottom: 0;
}

.ecs-cart-btn-view {
    background: var(--white);
    color: var(--text) !important;
    border: 1px solid var(--border);
}

.ecs-cart-btn-view:hover {
    border-color: var(--accent);
    color: var(--accent) !important;
}

.ecs-cart-btn-order {
    background: var(--accent);
    color: var(--white) !important;
}

.ecs-cart-btn-order:hover {
    background: var(--accent-hover);
}

/* ==========================================
   Homepage Sections
   ========================================== */
.ecs-hero {
    background: var(--primary);
    color: var(--white);
    padding: 80px 40px;
    text-align: center;
    margin-bottom: 40px;
}

.ecs-hero h1 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.ecs-hero p {
    font-size: 16px;
    opacity: 0.85;
    margin-bottom: 25px;
}

.ecs-hero-btn {
    display: inline-block;
    background: var(--white);
    color: var(--primary) !important;
    padding: 14px 32px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s;
}

.ecs-hero-btn:hover {
    background: var(--bg);
    transform: translateY(-1px);
}

.ecs-section {
    padding: 50px 20px;
    max-width: 1280px;
    margin: 0 auto;
}

.ecs-section-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 30px;
    color: var(--text);
    letter-spacing: -0.3px;
}

.ecs-center {
    text-align: center;
    margin-top: 30px;
}

.ecs-btn-outline {
    display: inline-block;
    padding: 12px 24px;
    border: 1px solid var(--border);
    color: var(--text) !important;
    border-radius: var(--radius);
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s;
}

.ecs-btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent) !important;
}

/* ==========================================
   Product Cards - Clean Minimal
   ========================================== */
.woocommerce ul.products {
    display: grid;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 20px;
    margin: 0;
    padding: 0;
}

.woocommerce ul.products li.product {
    background: var(--white);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 20px;
    margin: 0 !important;
    width: 100% !important;
    float: none !important;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
}

.woocommerce ul.products li.product:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow);
}

.woocommerce ul.products li.product a img {
    border-radius: var(--radius);
    margin-bottom: 15px;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title,
.woocommerce ul.products li.product h2 {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 8px;
    line-height: 1.4;
}

.woocommerce ul.products li.product .price {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 15px;
}

.woocommerce ul.products li.product .price del {
    color: var(--text-light);
    font-size: 13px;
    font-weight: normal;
}

.woocommerce ul.products li.product .price ins {
    text-decoration: none;
    color: var(--success);
}

.woocommerce ul.products li.product .button,
.woocommerce ul.products li.product a.add_to_cart_button {
    background: var(--accent);
    color: var(--white) !important;
    border: none;
    padding: 10px 16px;
    border-radius: var(--radius);
    font-weight: 500;
    font-size: 13px;
    text-align: center;
    display: block;
    width: 100%;
    box-sizing: border-box;
    transition: background 0.2s;
    margin-top: auto;
}

.woocommerce ul.products li.product .button:hover,
.woocommerce ul.products li.product a.add_to_cart_button:hover {
    background: var(--accent-hover);
}

.woocommerce span.onsale {
    background: var(--success);
    color: var(--white);
    padding: 4px 10px;
    border-radius: var(--radius);
    font-size: 11px;
    font-weight: 600;
    position: absolute;
    top: 15px;
    left: 15px;
    min-width: auto;
    min-height: auto;
    line-height: 1.4;
}

/* ==========================================
   Single Product
   ========================================== */
.single-product div.product {
    background: var(--white);
    padding: 40px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.single-product div.product .product_title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 15px;
}

.single-product div.product .price {
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 20px;
}

.single-product .single_add_to_cart_button {
    background: var(--accent);
    color: var(--white);
    padding: 14px 32px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}

.single-product .single_add_to_cart_button:hover {
    background: var(--accent-hover);
}

/* ==========================================
   Cart Page
   ========================================== */
.woocommerce-cart .woocommerce {
    background: var(--white);
    padding: 30px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

/* ==========================================
   Breadcrumbs
   ========================================== */
.woocommerce-breadcrumb {
    background: var(--white);
    padding: 15px 20px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    border: 1px solid var(--border);
    color: var(--text-light);
    font-size: 13px;
}

/* ==========================================
   Footer
   ========================================== */
.site-footer {
    background: var(--primary);
    color: var(--white);
    padding: 40px 0 20px;
}

.site-info {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
}

/* ==========================================
   Responsive
   ========================================== */
@media (max-width: 1200px) {
    .woocommerce ul.products {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media (max-width: 768px) {
    .woocommerce ul.products {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px;
    }

    .ecs-nav-inner {
        flex-wrap: wrap;
    }

    .ecs-nav-links {
        width: 100%;
        justify-content: center;
        margin-top: 10px;
        margin-left: 0;
        gap: 15px;
    }

    .ecs-hero {
        padding: 50px 20px;
    }

    .ecs-hero h1 {
        font-size: 28px;
    }

    .ecs-cart-sidebar {
        width: 100%;
        right: -100%;
    }
}

@media (max-width: 480px) {
    .woocommerce ul.products {
        grid-template-columns: 1fr !important;
    }
}