/* -----------------------------------------------------------
   KISO TRADING - MAIN THEME STYLES
   Handles: Header, Footer, Hero, Typography, Forms, Login
   (WooCommerce styles are in woocommerce.css)
----------------------------------------------------------- */

/* 1. VARIABLES */
:root {
    --color-primary: #0f172a;       /* Deep Navy */
    --color-primary-light: #1e293b;
    --color-primary-dark: #020617;
    --color-accent: #f59e0b;        /* Amber */
    --color-accent-hover: #d97706;
    --color-text-main: #334155;
    --color-text-light: #94a3b8;
    --color-white: #ffffff;
    --bg-body: #f8fafc;
    --border-color: #e2e8f0;
    --container-width: 1400px;
    --header-height: 80px;
}

* { box-sizing: border-box; }

body {
    font-family: 'Manrope', 'Inter', sans-serif;
    background-color: var(--bg-body);
    color: var(--color-text-main);
    margin: 0;
    line-height: 1.6;
}

a { text-decoration: none; color: inherit; transition: all 0.2s; }
a:hover { color: var(--color-accent); }
ul { padding: 0; margin: 0; list-style: none; }
img { max-width: 100%; height: auto; }

.container { max-width: var(--container-width); margin: 0 auto; padding: 0 20px; }

/* -----------------------------------------------------------
   2. HEADER STRUCTURE
----------------------------------------------------------- */
.site-header-wrapper { background: #fff; box-shadow: 0 2px 15px rgba(0,0,0,0.04); position: relative; z-index: 1000; }

/* Top Bar */
.header-top { background: var(--color-primary); color: #cbd5e1; height: 40px; font-size: 0.85rem; border-bottom: 1px solid rgba(255,255,255,0.1); }
.top-inner { display: flex; justify-content: space-between; align-items: center; height: 100%; }
.top-left, .top-right { display: flex; gap: 20px; align-items: center; }
.service-link { display: flex; align-items: center; gap: 6px; }
.service-link:hover { color: white; }
.b2b-link { color: var(--color-accent); font-weight: 700; }

/* Main Header */
.header-main { padding: 20px 0; }
.main-inner { display: flex; align-items: center; justify-content: space-between; gap: 40px; }

/* Logo - Strict Sizing */
.site-branding { flex-shrink: 0; width: 200px; }
.site-logo .custom-logo-link img, .custom-logo { max-height: 50px; width: auto; max-width: 100%; object-fit: contain; }
.logo-mark { background: var(--color-primary); color: var(--color-accent); width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border-radius: 8px; font-weight: 800; font-size: 1.5rem; }
.logo-details { display: flex; flex-direction: column; line-height: 1.1; margin-left: 10px; }
.logo-title { font-weight: 800; font-size: 1.4rem; color: var(--color-primary); }

/* Search */
.header-search-container { flex: 1; max-width: 600px; position: relative; }
.search-field { width: 100%; height: 48px; border: 2px solid #e2e8f0; border-radius: 8px; padding: 0 20px; padding-right: 50px; font-size: 0.95rem; }
.search-btn { position: absolute; right: 5px; top: 5px; height: 38px; width: 40px; background: var(--color-primary); color: white; border: none; border-radius: 6px; cursor: pointer; display: flex; align-items: center; justify-content: center; }

/* Actions */
.header-actions-group { display: flex; gap: 25px; align-items: center; }
.action-item { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.icon-box { position: relative; }
.cart-badge { position: absolute; top: -8px; right: -8px; background: #ef4444; color: white; width: 18px; height: 18px; border-radius: 50%; font-size: 0.7rem; font-weight: 700; display: flex; align-items: center; justify-content: center; border: 2px solid white; }
.text-box { display: flex; flex-direction: column; line-height: 1.2; font-size: 0.8rem; }
.main-text { font-weight: 700; color: var(--color-primary); font-size: 0.9rem; }

/* VAT Switch */
.switch-vat { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 0.8rem; font-weight: 600; color: #64748b; background: #f1f5f9; padding: 6px 12px; border-radius: 20px; }
.switch-vat .slider { width: 32px; height: 18px; background: #cbd5e1; border-radius: 18px; position: relative; }
.switch-vat .slider::before { content: ''; position: absolute; left: 2px; top: 2px; width: 14px; height: 14px; background: white; border-radius: 50%; transition: 0.3s; }
.switch-vat input:checked + .slider { background: var(--color-primary); }
.switch-vat input:checked + .slider::before { transform: translateX(14px); }

/* -----------------------------------------------------------
   3. NAVIGATION (REDESIGNED)
----------------------------------------------------------- */
.header-nav-bar { background: #fff; border-top: 1px solid #e2e8f0; border-bottom: 1px solid #e2e8f0; }
.nav-container { display: flex; align-items: center; height: 55px; }

/* Categories Button */
.nav-departments-wrapper { position: relative; height: 100%; }
.dept-btn { background: var(--color-accent); color: white; border: none; height: 100%; padding: 0 25px; font-weight: 700; display: flex; align-items: center; gap: 10px; cursor: pointer; transition: background 0.2s; }
.dept-btn:hover { background: var(--color-accent-hover); }

/* Dropdown Menu (Vertical) */
.dept-dropdown { position: absolute; top: 100%; left: 0; width: 260px; background: white; box-shadow: 0 10px 30px rgba(0,0,0,0.15); border-top: 2px solid var(--color-primary); opacity: 0; visibility: hidden; transform: translateY(10px); transition: all 0.2s; z-index: 999; }
.dept-dropdown.active { opacity: 1; visibility: visible; transform: translateY(0); }
.dept-menu-list li a { display: block; padding: 12px 20px; border-bottom: 1px solid #f1f5f9; color: var(--color-text-main); font-weight: 500; }
.dept-menu-list li a:hover { background: #f8fafc; color: var(--color-primary); padding-left: 25px; }

/* Primary Menu (Horizontal) */
.primary-navigation { margin-left: 30px; flex: 1; }
.primary-navigation ul.menu { display: flex; gap: 30px; }
.primary-navigation > ul > li > a { font-weight: 600; color: var(--color-text-main); padding: 18px 0; display: block; position: relative; }
.primary-navigation > ul > li > a:hover { color: var(--color-primary); }

/* Standard Dropdown */
.primary-navigation li { position: relative; }
.primary-navigation ul.sub-menu { position: absolute; top: 100%; left: 0; background: white; min-width: 220px; box-shadow: 0 10px 20px rgba(0,0,0,0.1); border-radius: 0 0 6px 6px; opacity: 0; visibility: hidden; transform: translateY(10px); transition: all 0.2s; z-index: 100; padding: 10px 0; }
.primary-navigation li:hover > ul.sub-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.primary-navigation ul.sub-menu li a { display: block; padding: 8px 20px; font-size: 0.95rem; color: #64748b; }
.primary-navigation ul.sub-menu li a:hover { background: #f8fafc; color: var(--color-primary); }

/* Mega Menu Override (Classes added by walker) */
.primary-navigation li.has-mega-menu { position: static; }
.primary-navigation li.has-mega-menu .kiso-mega-menu-dropdown { width: 100%; left: 0; right: 0; padding: 30px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; background: white; border-top: 1px solid #e2e8f0; }
.mega-menu-heading { font-weight: 700; color: var(--color-primary); text-transform: uppercase; margin-bottom: 15px; border-bottom: 2px solid var(--color-accent); padding-bottom: 5px; display: inline-block; }

/* -----------------------------------------------------------
   4. HERO & CONTENT
----------------------------------------------------------- */
.hero-section { background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 100%); color: white; padding: 5rem 0; }
.hero-container { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }
.hero-title { font-size: 3rem; margin-bottom: 20px; line-height: 1.1; }
.hero-subtitle { font-size: 1.2rem; color: #cbd5e1; margin-bottom: 40px; }

/* -----------------------------------------------------------
   5. FOOTER
----------------------------------------------------------- */
.site-footer { background: var(--color-primary-dark); color: #94a3b8; padding: 4rem 0 0 0; border-top: 4px solid var(--color-accent); margin-top: auto; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 3rem; }
.footer-title { color: white; font-size: 1.1rem; text-transform: uppercase; margin-bottom: 1.5rem; font-weight: 700; }
.footer-col a:hover { color: white; }
.site-info-bar { background: rgba(0,0,0,0.2); padding: 20px 0; border-top: 1px solid rgba(255,255,255,0.05); }
.info-inner { display: flex; justify-content: space-between; align-items: center; }
.payment-methods { display: flex; gap: 15px; align-items: center; }
.pay-img { height: 22px !important; filter: grayscale(1); opacity: 0.6; }

/* -----------------------------------------------------------
   6. MISC (Login, Reg, Toast)
----------------------------------------------------------- */
.login-wrapper, .registration-wrapper { background: white; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.05); overflow: hidden; }
.login-page-container { padding: 4rem 0; }
.kiso-toast { background: white; padding: 15px; border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,0.1); position: fixed; bottom: 20px; right: 20px; z-index: 9999; transform: translateX(120%); transition: 0.3s; border-left: 4px solid var(--color-primary); }
.kiso-toast.visible { transform: translateX(0); }

/* Mobile */
@media (max-width: 992px) {
    .header-nav-bar { display: none; }
    .hero-container { grid-template-columns: 1fr; text-align: center; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}
