/*
Theme Name: Evermark Electronics
Theme URI: https://evermarkelectronics.com
Author: Evermark Team
Author URI: https://evermarkelectronics.com
Description: Custom WooCommerce theme for Evermark Electronics - Professional electronics e-commerce solution
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.4
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: evermark
Tags: e-commerce, electronics, woocommerce, custom-menu, custom-logo, responsive
*/

/* ============================================
   CSS VARIABLES & ROOT SETTINGS
   ============================================ */

:root {
    /* Container & Layout */
    --wd-container-w: 1301px;
    
    /* Colors - Primary Palette */
    --wd-primary-color: rgb(15, 85, 196);
    --wd-alternative-color: rgb(15, 85, 196);
    --wd-text-color: rgb(56, 56, 56);
    --wd-title-color: #242424;
    --wd-link-color: #333333;
    --wd-link-color-hover: #242424;
    
    /* Colors - Grayscale */
    --color-white: #fff;
    --color-gray-100: #f7f7f7;
    --color-gray-200: #f1f1f1;
    --color-gray-300: #bbb;
    --color-gray-400: #a5a5a5;
    --color-gray-500: #777;
    --color-gray-600: #666;
    --color-gray-700: #555;
    --color-gray-800: #333;
    --color-gray-900: #242424;
    
    /* Background Colors */
    --bgcolor-white: #fff;
    --bgcolor-gray-100: #f7f7f7;
    --bgcolor-gray-200: #f7f7f7;
    --bgcolor-gray-300: #f1f1f1;
    --bgcolor-gray-400: rgba(187, 187, 187, 0.4);
    --wd-main-bgcolor: #fff;
    
    /* Border Colors */
    --brdcolor-gray-200: rgba(0, 0, 0, 0.075);
    --brdcolor-gray-300: rgba(0, 0, 0, 0.105);
    --brdcolor-gray-400: rgba(0, 0, 0, 0.12);
    --brdcolor-gray-500: rgba(0, 0, 0, 0.2);
    
    /* Typography */
    --wd-text-font: "Work Sans", Arial, Helvetica, sans-serif;
    --wd-text-font-weight: 400;
    --wd-text-font-size: 15px;
    --wd-text-line-height: 1.6;
    
    --wd-title-font: "Urbanist", Arial, Helvetica, sans-serif;
    --wd-title-font-weight: 700;
    
    --wd-entities-title-font: "Urbanist", Arial, Helvetica, sans-serif;
    --wd-entities-title-font-weight: 700;
    --wd-entities-title-color: #333333;
    --wd-entities-title-color-hover: rgb(51 51 51 / 65%);
    
    --wd-widget-title-font: "Urbanist", Arial, Helvetica, sans-serif;
    --wd-widget-title-font-weight: 700;
    --wd-widget-title-transform: capitalize;
    --wd-widget-title-color: #333;
    --wd-widget-title-font-size: 16px;
    
    --wd-header-el-font: "Urbanist", Arial, Helvetica, sans-serif;
    --wd-header-el-font-weight: 600;
    --wd-header-el-transform: capitalize;
    --wd-header-el-font-size: 14px;
    
    --wd-alternative-font: "Lato", Arial, Helvetica, sans-serif;
    
    /* Border Radius */
    --wd-brd-radius: 10px;
    --wd-cat-brd-radius: 50%;
    
    /* Forms */
    --wd-form-height: 42px;
    --wd-form-color: rgb(119, 119, 119);
    --wd-form-placeholder-color: rgb(119, 119, 119);
    --wd-form-bg: rgb(255, 255, 255);
    --wd-form-brd-radius: 35px;
    --wd-form-brd-width: 1px;
    --wd-form-brd-color: rgba(0, 0, 0, 0.1);
    --wd-form-brd-color-focus: rgba(0, 0, 0, 0.15);
    
    /* Buttons */
    --btn-height: 42px;
    --btn-transform: none;
    --btn-font-weight: 600;
    
    --btn-default-color: #333;
    --btn-default-color-hover: #333;
    --btn-default-bgcolor: #f7f7f7;
    --btn-default-bgcolor-hover: #efefef;
    --btn-default-brd-radius: 35px;
    --btn-default-box-shadow: none;
    --btn-default-box-shadow-hover: none;
    --btn-default-transform: none;
    
    --btn-accented-color: #fff;
    --btn-accented-color-hover: #fff;
    --btn-accented-bgcolor: rgb(15, 85, 196);
    --btn-accented-bgcolor-hover: rgb(15, 85, 196);
    --btn-accented-brd-radius: 35px;
    --btn-accented-box-shadow: none;
    --btn-accented-box-shadow-hover: none;
    --btn-accented-transform: none;
    
    /* Notices */
    --notices-success-color: #fff;
    --notices-success-bg: #459647;
    --notices-warning-color: #fff;
    --notices-warning-bg: #E0B252;
    
    /* Header Heights */
    --wd-top-bar-h: 40px;
    --wd-top-bar-sm-h: 40px;
    --wd-top-bar-sticky-h: 0.001px;
    --wd-header-general-h: 100px;
    --wd-header-general-sm-h: 75px;
    --wd-header-general-sticky-h: 0.001px;
    --wd-header-bottom-h: 45px;
    --wd-header-bottom-sm-h: 0.001px;
    --wd-header-bottom-sticky-h: 0.001px;
    --wd-header-clone-h: 75px;
    
    /* Calculated Header Height */
    --wd-header-h: calc(var(--wd-top-bar-h) + var(--wd-header-general-h) + var(--wd-header-bottom-h));
    --wd-header-sticky-h: calc(var(--wd-top-bar-sticky-h) + var(--wd-header-general-sticky-h) + var(--wd-header-bottom-sticky-h) + var(--wd-header-clone-h));
    
    /* Spacing */
    --wd-block-spacing: 20px;
    --wd-tags-mb: 20px;
}

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

*, 
*::before, 
*::after {
    box-sizing: border-box;
}

html, body, div, span, applet, object, iframe, 
h1, h2, h3, h4, h5, h6, p, blockquote, pre, 
a, abbr, acronym, address, big, cite, code, 
del, dfn, em, img, ins, kbd, q, s, samp, 
small, strike, strong, sub, sup, tt, var, 
b, u, i, center, dl, dt, dd, ol, ul, li, 
fieldset, form, label, legend, table, caption, 
tbody, tfoot, thead, tr, th, td, article, aside, 
canvas, details, embed, figure, figcaption, footer, 
header, hgroup, menu, nav, output, ruby, section, 
summary, time, mark, audio, video {
    vertical-align: baseline;
    margin: 0;
    padding: 0;
    border: 0;
    font: inherit;
}

html {
    line-height: 1;
    text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
    font-family: sans-serif;
    overflow-x: hidden;
}

body {
    background-color: rgb(255, 255, 255);
    color: var(--wd-text-color);
    text-rendering: optimizelegibility;
    font-weight: var(--wd-text-font-weight);
    font-size: var(--wd-text-font-size);
    font-family: var(--wd-text-font);
    -webkit-font-smoothing: antialiased;
    line-height: var(--wd-text-line-height);
    margin: 0;
}

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

.site-header {
    background-color: #fff;
}

/* Top Bar */
.top-bar {
    background-color: rgba(251, 250, 247, 1);
    border-bottom: 1px solid rgba(208, 208, 208, 0.42);
    height: var(--wd-top-bar-h);
    display: flex;
    align-items: center;
}

.top-bar-inner {
    max-width: var(--wd-container-w);
    width: 100%;
    margin: 0 auto;
    padding: 0 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar-left {
    display: flex;
    gap: 20px;
    align-items: center;
}

.top-bar-left a {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--wd-text-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.top-bar-left a:hover {
    color: var(--wd-primary-color);
}

.top-bar-right {
    display: flex;
    gap: 20px;
    align-items: center;
    font-size: 13px;
}

.top-bar-right a {
    color: var(--wd-text-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.top-bar-right a:hover {
    color: var(--wd-primary-color);
}

/* General Header */
.whb-general-header {
    background-color: rgba(251, 250, 247, 1);
    border-bottom: 1px solid rgba(208, 208, 208, 0.42);
    height: var(--wd-header-general-h);
    transition: background-color 0.2s ease;
}

.header-inner {
    max-width: var(--wd-container-w);
    width: 100%;
    margin: 0 auto;
    padding: 0 15px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Brand Logos Section */
.brand-logos {
    display: flex;
    align-items: center;
    gap: 15px;
}

.brand-logo-item {
    display: flex;
    align-items: center;
}

.brand-logo-item img {
    height: 45px;
    width: auto;
    object-fit: contain;
}

.brand-logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.brand-logo-link:hover {
    opacity: 0.8;
}

/* Main Logo */
.site-logo {
    display: flex;
    align-items: center;
}

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

/* Header Right Section */
.header-right {
    display: flex;
    align-items: center;
    gap: 25px;
}

/* Search Form */
.search-form {
    position: relative;
}

.search-form input[type="search"] {
    width: 300px;
    height: var(--wd-form-height);
    padding: 0 45px 0 20px;
    border: 1px solid var(--wd-form-brd-color);
    border-radius: var(--wd-form-brd-radius);
    background-color: var(--wd-form-bg);
    color: var(--wd-form-color);
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s ease;
}

.search-form input[type="search"]:focus {
    border-color: var(--wd-form-brd-color-focus);
}

.search-form input[type="search"]::placeholder {
    color: var(--wd-form-placeholder-color);
}

.search-submit {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

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

.header-icon {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--wd-text-color);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
}

.header-icon:hover {
    color: var(--wd-primary-color);
}

.header-icon svg {
    width: 24px;
    height: 24px;
}

/* Cart Icon */
.cart-icon {
    position: relative;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: var(--wd-primary-color);
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
}

.cart-total {
    background-color: #000;
    color: white;
    padding: 8px 20px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 14px;
    margin-left: 5px;
}

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

.main-navigation {
    background-color: #fff;
    border-bottom: 1px solid var(--brdcolor-gray-200);
    height: var(--wd-header-bottom-h);
}

.nav-inner {
    max-width: var(--wd-container-w);
    width: 100%;
    margin: 0 auto;
    padding: 0 15px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.primary-menu {
    list-style: none;
    display: flex;
    gap: 30px;
    margin: 0;
    padding: 0;
}

.menu-item {
    position: relative;
}

.menu-item a {
    color: var(--wd-text-color);
    text-decoration: none;
    font-family: var(--wd-header-el-font);
    font-weight: var(--wd-header-el-font-weight);
    font-size: var(--wd-header-el-font-size);
    text-transform: var(--wd-header-el-transform);
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 12px 0;
    transition: color 0.2s ease;
}

.menu-item a:hover {
    color: var(--wd-primary-color);
}

.menu-item.current-menu-item a {
    color: var(--wd-primary-color);
}

.shipping-notice {
    font-size: 13px;
    color: var(--wd-text-color);
}

/* ============================================
   CONTAINER & LAYOUT
   ============================================ */

.container {
    max-width: var(--wd-container-w);
    width: 100%;
    margin: 0 auto;
    padding: 0 15px;
}

.site-content {
    padding: 40px 0;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: var(--btn-height);
    padding: 0 30px;
    border-radius: var(--btn-default-brd-radius);
    font-weight: var(--btn-font-weight);
    font-size: 14px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    outline: none;
}

.btn-default {
    background-color: var(--btn-default-bgcolor);
    color: var(--btn-default-color);
}

.btn-default:hover {
    background-color: var(--btn-default-bgcolor-hover);
    color: var(--btn-default-color-hover);
}

.btn-primary {
    background-color: var(--btn-accented-bgcolor);
    color: var(--btn-accented-color);
}

.btn-primary:hover {
    background-color: var(--btn-accented-bgcolor-hover);
    color: var(--btn-accented-color-hover);
}

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

@media (max-width: 1024px) {
    :root {
        --wd-header-general-h: var(--wd-header-general-sm-h);
    }
    
    .brand-logos {
        gap: 10px;
    }
    
    .brand-logo-item img {
        height: 35px;
    }
    
    .search-form input[type="search"] {
        width: 250px;
    }
}

@media (max-width: 768px) {
    .top-bar {
        height: var(--wd-top-bar-sm-h);
    }
    
    .brand-logos {
        display: none;
    }
    
    .search-form {
        display: none;
    }
    
    .primary-menu {
        display: none;
    }
    
    .header-right {
        gap: 15px;
    }
}

/* ============================================
   UTILITIES
   ============================================ */

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

.mb-0 { margin-bottom: 0; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }
.mb-40 { margin-bottom: 40px; }

.mt-0 { margin-top: 0; }
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }
.mt-40 { margin-top: 40px; }

/* ============================================
   HOMEPAGE STYLES
   ============================================ */

/* Hero Section */
.hero-section {
    background-color: #f5f5f5;
    min-height: 500px;
    display: flex;
    align-items: center;
    margin-bottom: 60px;
}

/* Brand Banners */
.brand-banners-section {
    margin-bottom: 60px;
}

.brand-banner {
    background-color: #000;
    border-radius: var(--wd-brd-radius);
    overflow: hidden;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
}

.brand-banner-logo {
    max-width: 400px;
    height: auto;
}

/* Full Width Brand Banners */
.brand-banner-section {
    margin: 60px 0;
}

.brand-banner-full {
    width: 100%;
    overflow: hidden;
    border-radius: var(--wd-brd-radius);
}

.brand-banner-full img {
    width: 100%;
    height: auto;
    display: block;
}

/* Products Section */
.products-section,
.featured-products-section {
    margin: 60px 0;
}

/* Promo Banner */
.promo-banner-section {
    margin: 80px 0;
}

.promo-banner {
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
    border-radius: var(--wd-brd-radius);
    padding: 50px;
}

.promo-banner-content {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 50px;
    align-items: center;
}

.promo-left {
    display: flex;
    justify-content: center;
    align-items: center;
}

.mastercard-image {
    max-width: 250px;
    height: auto;
}

.promo-title {
    font-family: var(--wd-title-font);
    font-weight: var(--wd-title-font-weight);
    font-size: 28px;
    color: var(--wd-primary-color);
    margin-bottom: 20px;
}

.promo-description {
    margin-bottom: 25px;
    font-size: 15px;
    line-height: 1.8;
}

.promo-description strong {
    font-weight: 700;
}

.promo-btn {
    display: inline-flex;
}

@media (max-width: 768px) {
    .promo-banner-content {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }
    
    .promo-banner {
        padding: 30px 20px;
    }
}

/* Latest Articles Section */
.latest-articles-section {
    margin: 80px 0 60px;
}

.section-title {
    font-family: var(--wd-title-font);
    font-weight: var(--wd-title-font-weight);
    font-size: 32px;
    color: var(--wd-title-color);
    text-align: center;
    margin-bottom: 50px;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.article-card {
    background: #fff;
    border-radius: var(--wd-brd-radius);
    overflow: hidden;
    transition: all 0.3s ease;
}

.article-card:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transform: translateY(-5px);
}

.article-thumbnail {
    overflow: hidden;
    height: 250px;
}

.article-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.article-card:hover .article-thumbnail img {
    transform: scale(1.05);
}

.article-content {
    padding: 25px;
}

.article-title {
    font-family: var(--wd-entities-title-font);
    font-weight: var(--wd-entities-title-font-weight);
    font-size: 20px;
    line-height: 1.4;
    margin: 0;
}

.article-title a {
    color: var(--wd-entities-title-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.article-title a:hover {
    color: var(--wd-primary-color);
}

@media (max-width: 1024px) {
    .articles-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .articles-grid {
        grid-template-columns: 1fr;
    }
}

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

.site-footer {
    background-color: #1a1a1a;
    color: #fff;
    margin-top: 80px;
}

/* Main Footer */
.footer-main {
    padding: 60px 0 40px;
}

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

.footer-widget-title {
    font-family: var(--wd-widget-title-font);
    font-weight: var(--wd-widget-title-font-weight);
    font-size: var(--wd-widget-title-font-size);
    text-transform: var(--wd-widget-title-transform);
    color: #fff;
    margin-bottom: 20px;
}

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

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

.footer-menu a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
}

.footer-menu a:hover {
    color: #fff;
}

/* Footer Features */
.footer-features {
    background-color: rgba(255, 255, 255, 0.05);
    padding: 40px 0;
}

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

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

.feature-icon {
    flex-shrink: 0;
    color: var(--wd-primary-color);
}

.feature-title {
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 5px;
    color: #fff;
}

.feature-text {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

/* Copyright */
.footer-copyright {
    background-color: rgba(0, 0, 0, 0.3);
    padding: 20px 0;
    text-align: center;
}

.copyright-inner p {
    margin: 0;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--wd-primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--wd-primary-color);
    transform: translateY(-5px);
}

/* Footer Responsive */
@media (max-width: 1024px) {
    .footer-row,
    .features-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .footer-row,
    .features-row {
        grid-template-columns: 1fr;
    }
    
    .footer-main {
        padding: 40px 0 30px;
    }
}

/* ============================================
   MOBILE MENU STYLES
   ============================================ */

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.mobile-menu-toggle span {
    width: 100%;
    height: 3px;
    background-color: var(--wd-text-color);
    transition: all 0.3s ease;
    border-radius: 3px;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }
    
    .primary-menu {
        display: none;
        position: fixed;
        top: var(--wd-header-h);
        left: 0;
        width: 100%;
        background-color: #fff;
        padding: 20px;
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
        z-index: 1000;
        flex-direction: column;
    }
    
    .primary-menu.mobile-active {
        display: flex;
    }
    
    .primary-menu .menu-item {
        width: 100%;
        border-bottom: 1px solid var(--brdcolor-gray-200);
    }
    
    .primary-menu .menu-item a {
        padding: 15px 10px;
        display: block;
    }
    
    .primary-menu .sub-menu {
        display: none;
        padding-left: 20px;
        background-color: var(--bgcolor-gray-100);
    }
    
    .primary-menu .menu-item.submenu-open > .sub-menu {
        display: block;
    }
    
    body.mobile-menu-open {
        overflow: hidden;
    }
}

/* ============================================
   ADDITIONAL RESPONSIVE FIXES
   ============================================ */

@media (max-width: 480px) {
    :root {
        --wd-text-font-size: 14px;
    }
    
    .site-logo img {
        height: 45px;
    }
    
    .cart-total {
        display: none;
    }
    
    .header-icon span {
        display: none;
    }
    
    .hero-section {
        min-height: 300px;
    }
    
    .section-title {
        font-size: 24px;
    }
    
    .promo-title {
        font-size: 20px;
    }
}

/* ============================================
   LOGO FIXES - Logo + Text
   ============================================ */
.site-logo-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

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

.site-logo-text {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-color);
    font-family: var(--font-heading);
}

@media (max-width: 768px) {
    .site-logo-text {
        font-size: 14px;
    }
    
    .site-logo-img {
        height: 40px;
    }
}
