/**
 * EczaneSoft Master Design System v2.0
 */

:root {
    --es-primary: #2563eb;
    --es-primary-soft: #eff6ff;
    --es-secondary: #0f172a;
    --es-success: #10b981;
    --es-text-main: #1e293b;
    --es-text-light: #64748b;
    --es-border: #f1f5f9;
    --es-white: #ffffff;
    --es-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --es-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --es-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --es-radius: 12px;
}

/* Base */
* { box-sizing: border-box; margin: 0; padding: 0; outline: none; }
body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: var(--es-text-main);
    background: #fcfdfe;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; transition: all 0.2s ease; }
ul { list-style: none; }
img { max-width: 100%; height: auto; }

.es-container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.es-header {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--es-border);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.es-header-inner {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.es-logo-svg {
    height: 32px;
    color: var(--es-primary);
}

.es-search-wrap {
    flex: 1;
    max-width: 540px;
    position: relative;
}

.es-search-bar {
    display: flex;
    background: #f1f5f9;
    border-radius: 12px;
    padding: 4px;
    border: 1.5px solid transparent;
    transition: all 0.2s;
}

.es-search-bar:focus-within {
    background: #fff;
    border-color: var(--es-primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.es-search-input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 10px 16px;
    font-size: 15px;
    font-family: inherit;
}

.es-search-btn {
    background: var(--es-primary);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0 20px;
    cursor: pointer;
}

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

.es-action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    color: var(--es-text-main);
}

.es-action-icon {
    width: 24px;
    height: 24px;
}

.es-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--es-primary);
    color: white;
    font-size: 10px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 2px solid white;
}

/* Category Slider */
.es-category-scroll {
    display: flex;
    overflow-x: auto;
    padding: 20px 0;
    gap: 24px;
    scrollbar-width: none;
}
.es-category-scroll::-webkit-scrollbar { display: none; }

.es-cat-item {
    flex: 0 0 auto;
    text-align: center;
    width: 100px;
}

.es-cat-icon-box {
    width: 80px;
    height: 80px;
    background: white;
    border: 1px solid var(--es-border);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    transition: all 0.3s;
}

.es-cat-item:hover .es-cat-icon-box {
    border-color: var(--es-primary);
    box-shadow: var(--es-shadow-md);
    transform: translateY(-5px);
}

.es-cat-label { font-size: 13px; font-weight: 600; color: var(--es-text-main); }

/* ============================================
   3. NAVIGATION (HORIZONTAL BAR)
   ============================================ */
.es-nav {
    background: #fff;
    border-bottom: 1px solid var(--es-border);
    padding: 0;
}

.es-nav-menu {
    display: flex;
    list-style: none;
    justify-content: flex-start;
    gap: 40px;
    padding: 0;
    margin: 0;
}

.es-nav-menu li { position: relative; }

.es-nav-menu li a {
    padding: 18px 0;
    display: block;
    font-weight: 700;
    font-size: 13px;
    color: var(--es-text-main);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    position: relative;
    transition: all 0.3s ease;
}

.es-nav-menu li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--es-primary);
    transition: all 0.3s ease;
    border-radius: 3px 3px 0 0;
}

.es-nav-menu li a:hover { color: var(--es-primary); }
.es-nav-menu li a:hover::after { width: 100%; }

/* ============================================
   4. PRODUCT GRID (BULLETPROOF)
   ============================================ */
.woocommerce ul.products, .products {
    display: flex !important;
    flex-wrap: wrap !important;
    margin: 40px -15px !important;
    padding: 0 !important;
    list-style: none !important;
    gap: 0 !important;
}

.woocommerce ul.products li.product, .product {
    width: 25% !important;
    padding: 15px !important;
    margin: 0 !important;
    float: none !important;
    display: flex !important;
    flex-direction: column !important;
    min-width: 250px !important;
}

@media (max-width: 1024px) { 
    .woocommerce ul.products li.product { width: 33.333% !important; min-width: 200px !important; } 
}
@media (max-width: 768px) { 
    .woocommerce ul.products li.product { width: 50% !important; min-width: 150px !important; padding: 10px !important; } 
}

.es-product-card {
    background: #fff;
    border-radius: var(--es-radius);
    border: 1px solid var(--es-border);
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.3s ease;
    width: 100%;
}

.es-product-card:hover {
    box-shadow: var(--es-shadow-lg);
    border-color: var(--es-primary);
    transform: translateY(-5px);
}

.es-product-image-wrapper {
    background: #fff;
    padding: 20px;
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #f8fafc;
}

.es-product-image-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.es-product-info {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.es-brand {
    font-size: 11px;
    font-weight: 800;
    color: var(--es-primary);
    text-transform: uppercase;
    margin-bottom: 6px;
    display: block;
}

.woocommerce-loop-product__title {
    font-size: 15px !important;
    font-weight: 700 !important;
    margin-bottom: 12px !important;
    color: var(--es-text-main);
    line-height: 1.5 !important;
    height: 3em;
    overflow: hidden;
}

.price {
    font-size: 18px !important;
    color: var(--es-text-main) !important;
    font-weight: 800 !important;
    margin: auto 0 16px !important;
    display: block !important;
}

/* Correcting WooCommerce buttons */
.woocommerce ul.products li.product .button {
    margin-top: auto !important;
    padding: 12px !important;
    background: var(--es-primary) !important;
    color: #fff !important;
    border-radius: 8px !important;
    font-weight: 700 !important;
    font-size: 13px !important;
    text-align: center !important;
    display: block !important;
    width: 100% !important;
}

.woocommerce ul.products li.product .button.added_to_cart {
    display: none !important; /* Hide redundant text */
}

/* Responsive Grid */
@media (max-width: 1024px) { .products { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px) { 
    .products { grid-template-columns: repeat(2, 1fr) !important; gap: 12px !important; } 
    .product { padding: 12px; }
    .es-hero-title { font-size: 32px; }
}

/* Footer & Bottom */
.es-footer-bottom {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid rgba(255,255,255,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.es-payment-logos img {
    height: 30px !important;
    width: auto !important;
    filter: none !important;
    opacity: 1 !important;
}

.es-view-all-link {
    color: var(--es-primary);
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.es-footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
}

.es-footer-title {
    color: white;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 24px;
}

.es-footer-links li { margin-bottom: 12px; }
.es-footer-links a:hover { color: white; padding-left: 5px; }

.es-footer-bottom {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid rgba(255,255,255,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.es-payment-logos img { height: 24px; filter: grayscale(1) brightness(2); opacity: 0.6; }

/* Home Slider */
.es-main-slider {
    border-radius: 24px;
    overflow: hidden;
    margin-bottom: 40px;
}
.swiper-slide { position: relative; }
.es-slide-content {
    position: absolute;
    inset: 0;
    padding: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: linear-gradient(90deg, rgba(255,255,255,0.9) 0%, transparent 60%);
}
