/*
Theme Name: Electronics Dokan
Theme URI: https://nabatechshop.com/
Author: Electronics Dokan Team
Author URI: https://nabatechshop.com/
Description: A WooCommerce-compatible electronics shop theme inspired by Naba Tech Shop. Features a dark blue color scheme with hero banner, product grid, category sidebar, and full WooCommerce integration.
Version: 1.0.0
Requires at least: 5.0
Tested up to: 6.5
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: electronics-dokan
Tags: e-commerce, woocommerce, electronics, dark, blue, shop
*/

/* ========================================
   CSS VARIABLES & ROOT
   ======================================== */
:root {
    --primary-dark: #0a1628;
    --primary-blue: #0d2137;
    --secondary-blue: #132d4a;
    --accent-blue: #1e4d7b;
    --highlight-orange: #f97316;
    --highlight-red: #ef4444;
    --green-btn: #22c55e;
    --green-btn-hover: #16a34a;
    --text-white: #ffffff;
    --text-light: #cbd5e1;
    --text-dark: #1e293b;
    --bg-white: #ffffff;
    --bg-light: #f8fafc;
    --border-color: #e2e8f0;
    --card-shadow: 0 2px 8px rgba(0,0,0,0.08);
    --font-primary: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --topbar-bg: #dc2626;
    --topbar-text: #ffffff;
}

/* ========================================
   RESET & BASE
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-primary);
    color: var(--text-dark);
    background-color: var(--bg-light);
    line-height: 1.6;
}

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

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

ul, ol {
    list-style: none;
}

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

/* ========================================
   TOP ANNOUNCEMENT BAR
   ======================================== */
.top-bar {
    background-color: var(--topbar-bg);
    color: var(--topbar-text);
    text-align: center;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
}

.top-bar a {
    color: var(--text-white);
    text-decoration: underline;
}

/* ========================================
   HEADER
   ======================================== */
.site-header {
    background-color: var(--bg-white);
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
}

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

.site-logo img {
    max-height: 55px;
}

.header-search {
    flex: 1;
    max-width: 500px;
}

.header-search form {
    display: flex;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    overflow: hidden;
}

.header-search input[type="search"] {
    flex: 1;
    padding: 12px 16px;
    border: none;
    font-size: 14px;
    outline: none;
}

.header-search button {
    background: var(--accent-blue);
    color: white;
    border: none;
    padding: 12px 20px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s;
}

.header-search button:hover {
    background: var(--primary-blue);
}

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

.header-actions a {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 5px;
}

.header-actions a:hover {
    color: var(--accent-blue);
}

.cart-count {
    background: var(--topbar-bg);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
}

/* ========================================
   MAIN NAVIGATION
   ======================================== */
.main-navigation {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
}

.main-nav {
    display: flex;
    justify-content: center;
    gap: 30px;
    padding: 12px 0;
}

.main-nav a {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-dark);
    padding: 5px 0;
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--topbar-bg);
    border-bottom-color: var(--topbar-bg);
}

/* ========================================
   CATEGORY NAVIGATION BAR
   ======================================== */
.category-nav {
    background: var(--bg-white);
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.category-nav ul {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
}

.category-nav a {
    font-size: 13px;
    color: var(--text-dark);
    font-weight: 500;
    transition: color 0.3s;
}

.category-nav a:hover {
    color: var(--accent-blue);
}

/* ========================================
   HERO BANNER
   ======================================== */
.hero-banner {
    width: 100%;
    overflow: hidden;
    background: var(--primary-dark);
}

.hero-banner img {
    width: 100%;
    display: block;
    object-fit: cover;
}

/* ========================================
   FEATURES BAR
   ======================================== */
.features-bar {
    background: var(--bg-white);
    padding: 25px 0;
    border-bottom: 1px solid var(--border-color);
}

.features-grid {
    display: flex;
    justify-content: center;
    gap: 50px;
    flex-wrap: wrap;
}

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

.feature-icon {
    width: 40px;
    height: 40px;
    background: var(--primary-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
}

.feature-text {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-dark);
}

/* ========================================
   MAIN CONTENT LAYOUT
   ======================================== */
.site-main {
    display: flex;
    gap: 25px;
    padding: 30px 0;
    max-width: 1280px;
    margin: 0 auto;
}

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

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

/* ========================================
   SIDEBAR CATEGORIES
   ======================================== */
.sidebar-widget {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.sidebar-widget h3 {
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent-blue);
    color: var(--text-dark);
}

.category-list li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.category-list li:last-child {
    border-bottom: none;
}

.category-list a {
    font-size: 14px;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.3s;
}

.category-list a:hover {
    color: var(--accent-blue);
}

.category-list .cat-icon {
    font-size: 12px;
    color: var(--accent-blue);
}

/* ========================================
   PRODUCT SECTIONS
   ======================================== */
.section-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
    text-align: center;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

/* ========================================
   PRODUCT CARD
   ======================================== */
.product-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.3s, transform 0.3s;
    position: relative;
}

.product-card:hover {
    box-shadow: var(--card-shadow);
    transform: translateY(-2px);
}

.product-card .badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    color: white;
    z-index: 2;
}

.badge-hot {
    background: var(--highlight-red);
}

.badge-sale {
    background: var(--highlight-orange);
}

.badge-soldout {
    background: #64748b;
}

.product-card .product-image {
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-card .product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 10px;
    transition: transform 0.3s;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-card .product-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    opacity: 0;
    transition: opacity 0.3s;
}

.product-card:hover .product-actions {
    opacity: 1;
}

.product-actions button {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.3s;
}

.product-actions button:hover {
    background: var(--accent-blue);
    color: white;
    border-color: var(--accent-blue);
}

.product-card .product-info {
    padding: 12px;
}

.product-card .product-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 38px;
}

.product-card .product-title a:hover {
    color: var(--accent-blue);
}

.product-card .product-price {
    font-size: 16px;
    font-weight: 700;
    color: var(--topbar-bg);
    margin-bottom: 10px;
}

.product-card .product-price .original-price {
    font-size: 12px;
    color: #94a3b8;
    text-decoration: line-through;
    margin-right: 5px;
    font-weight: 400;
}

.product-card .product-quantity {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 10px;
}

.product-card .qty-btn {
    width: 28px;
    height: 28px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: white;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.product-card .qty-btn:hover {
    background: var(--accent-blue);
    color: white;
}

.product-card .qty-input {
    width: 40px;
    text-align: center;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 4px;
    font-size: 13px;
}

.product-card .add-to-cart-btn {
    width: 100%;
    padding: 10px;
    background: var(--green-btn);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.3s;
}

.product-card .add-to-cart-btn:hover {
    background: var(--green-btn-hover);
}

.product-card .read-more-btn {
    width: 100%;
    padding: 10px;
    background: var(--highlight-red);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    transition: opacity 0.3s;
}

/* ========================================
   LOAD MORE BUTTON
   ======================================== */
.load-more-section {
    text-align: center;
    padding: 20px 0 40px;
}

.load-more-btn {
    display: inline-block;
    padding: 14px 40px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-dark);
    background: white;
    cursor: pointer;
    transition: all 0.3s;
}

.load-more-btn:hover {
    border-color: var(--accent-blue);
    color: var(--accent-blue);
    background: var(--bg-light);
}

/* ========================================
   FOOTER
   ======================================== */
.site-footer {
    background: var(--primary-dark);
    color: var(--text-light);
    padding: 50px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-column h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 20px;
    text-transform: uppercase;
}

.footer-column p {
    font-size: 14px;
    line-height: 1.8;
    color: var(--text-light);
}

.footer-column ul li {
    margin-bottom: 10px;
}

.footer-column ul a {
    font-size: 14px;
    color: var(--text-light);
    transition: color 0.3s;
}

.footer-column ul a:hover {
    color: var(--text-white);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 20px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.footer-bottom p {
    font-size: 13px;
    color: var(--text-light);
}

.footer-bottom .payment-icons {
    display: flex;
    gap: 10px;
    align-items: center;
}

.payment-icons span {
    background: rgba(255,255,255,0.1);
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-white);
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 1200px) {
    .product-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 992px) {
    .site-main {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
    }

    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .header-inner {
        flex-wrap: wrap;
    }

    .header-search {
        order: 3;
        max-width: 100%;
        flex-basis: 100%;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }
}

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

    .main-nav {
        flex-wrap: wrap;
        gap: 15px;
        justify-content: center;
    }

    .category-nav ul {
        justify-content: flex-start;
    }

    .features-grid {
        gap: 20px;
    }
}

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

    .header-actions {
        gap: 10px;
    }

    .header-actions a {
        font-size: 11px;
    }
}
