/*
Theme Name: DiagProTools Theme
Theme URI: http://diagpro.tools
Author: Antigravity
Description: E-commerce Theme for DiagProTools with WooCommerce support.
Version: 1.0.1
Requires at least: 5.0
Tested up to: 6.4
Requires PHP: 7.2
Text Domain: diagprotools
*/

/* --- THEME VARIABLES --- */
:root[data-theme="light"] {
    --bg-body: #f1f3f6;
    --bg-surface: #ffffff;
    --primary-color: #24b9d7;
    --primary-hover: #1ca3be;
    --secondary-color: #1a1e23;
    --text-main: #2b3035;
    --text-muted: #6c757d;
    --text-light: #999999;
    --border-color: #e5e5e5;
    --danger-color: #ff4c4c;
    --success-color: #10b981;
    --image-bg: #ffffff;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
}

:root[data-theme="dark"] {
    --bg-body: #0d1117;
    --bg-surface: #161b22;
    --primary-color: #0070f3; /* Mais vibrante para dark */
    --primary-hover: #3291ff;
    --secondary-color: #0d1117;
    --text-main: #f0f6fc;
    --text-muted: #8b949e;
    --text-light: #6e7681;
    --border-color: #30363d;
    --danger-color: #ff4c4c;
    --success-color: #00f3a0;
    --image-bg: #0d1117;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.4);
    --shadow-md: 0 8px 24px rgba(0,0,0,0.6);
}

/* Base Settings */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 15px;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--primary-hover);
}

ul {
    list-style: none;
}

/* --- THEME SWITCH BTN --- */
.theme-switch {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 20px;
    cursor: pointer;
    padding: 4px 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.theme-switch:hover {
    background: rgba(255,255,255,0.2);
}

[data-theme="light"] .icon-sun { display: none; }
[data-theme="light"] .icon-moon { display: block; }
[data-theme="dark"] .icon-sun { display: block;  }
[data-theme="dark"] .icon-moon { display: none; }


/* --- TOP BAR --- */
.top-bar {
    background-color: var(--secondary-color);
    color: #fff;
    font-size: 0.85rem;
    padding: 8px 0;
    transition: background-color 0.3s ease;
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.top-bar a {
    color: #ddd;
}
.top-bar a:hover {
    color: #fff;
}

/* --- MAIN HEADER --- */
header {
    background-color: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

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

.logo {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -1px;
    text-decoration: none !important;
}

.logo span {
    color: var(--primary-color);
}

.search-bar {
    flex-grow: 1;
    max-width: 600px;
    display: flex;
}

.search-bar input {
    width: 100%;
    padding: 12px 16px;
    background-color: var(--bg-body);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    border-right: none;
    border-radius: 8px 0 0 8px;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.2s;
}

.search-bar input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(36, 185, 215, 0.1);
}

.search-bar button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0 24px;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.2s;
}

.search-bar button:hover {
    background-color: var(--primary-hover);
}

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

.action-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-main);
    font-weight: 600;
    cursor: pointer;
}

.cart-icon {
    position: relative;
    display: flex;
    align-items: center;
    padding: 8px 12px;
    background-color: var(--bg-body);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: all 0.2s;
}
.cart-icon:hover {
    border-color: var(--primary-color);
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: var(--danger-color);
    color: white;
    font-size: 0.75rem;
    font-weight: bold;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.cart-text {
    display: flex;
    flex-direction: column;
    margin-left: 10px;
}

.cart-title {
    font-size: 0.75rem;
    color: var(--text-muted);
}
.cart-total {
    font-weight: 700;
    font-size: 1rem;
}

/* --- NAVIGATION --- */
.nav-menu {
    background-color: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.3s ease;
    position: relative; /* Para os dropdowns e mega-menu */
}

.nav-menu ul {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    align-items: center;
}

.nav-menu > .container > ul > li {
    position: relative; /* Para dropdowns normais */
}

/* Base style do Mega Menu para ocupar toda a largura do container */
.nav-menu > .container > ul > li:nth-child(2) {
    position: static; 
}

.nav-menu a {
    display: block;
    padding: 16px 0;
    color: var(--text-main);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    position: relative;
    display: flex;
    align-items: center;
    gap: 5px;
}

.caret {
    font-size: 0.6rem;
    color: var(--text-light);
    transition: transform 0.2s;
}

.nav-menu li:hover .caret {
    transform: rotate(180deg);
}

.nav-menu > .container > ul > li > a.active {
    color: var(--primary-color);
}

.nav-menu > .container > ul > li > a::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 0;
    height: 3px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-menu > .container > ul > li > a:hover::after, 
.nav-menu > .container > ul > li > a.active::after {
    width: 100%;
}

.nav-menu > .container > ul > li > a:hover {
    color: var(--primary-color);
}

/* --- DROPDOWNS & MEGA MENU --- */
.dropdown-menu, .mega-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    border-radius: 0 0 8px 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    z-index: 200;
}

.nav-menu li.has-dropdown:hover > .dropdown-menu,
.nav-menu li.has-dropdown:hover > .mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Dropdown Simples */
.dropdown-menu {
    min-width: 220px;
    padding: 10px 0;
    border-top: 3px solid var(--primary-color);
}

.dropdown-menu a {
    padding: 10px 20px;
    font-size: 0.9rem;
    text-transform: none;
    font-weight: 500;
    color: var(--text-main);
}

.dropdown-menu a:hover {
    background-color: var(--bg-body);
    color: var(--primary-color);
    padding-left: 25px; /* Efeito de slide */
}

.dropdown-menu a::after {
    display: none; /* remove barra inferior do link */
}

/* Mega Menu */
.mega-menu {
    left: 15px; /* Alinhado ao container padding */
    right: 15px;
    width: calc(100% - 30px);
    display: flex;
    padding: 30px;
    gap: 40px;
    border-top: 3px solid var(--primary-color);
}

.mega-col {
    flex: 1;
}

.mega-col h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
    text-transform: uppercase;
}

.mega-col a {
    padding: 8px 0;
    font-size: 0.95rem;
    text-transform: none;
    color: var(--text-muted);
    font-weight: 500;
}

.mega-col a:hover {
    color: var(--primary-color);
    transform: translateX(5px);
}

.mega-col a::after {
    display: none;
}

.mega-image {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background-color: var(--bg-body);
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1.5; /* Ocupa um pouco mais de espaço */
}

.mega-image img {
    max-width: 80%;
    max-height: 180px;
    object-fit: contain;
    transition: transform 0.5s;
}

.mega-image:hover img {
    transform: scale(1.1);
}

.promo-text {
    position: absolute;
    bottom: 15px;
    left: 15px;
    background-color: var(--bg-surface);
    padding: 8px 15px;
    border-radius: 6px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
}

.promo-text strong {
    color: var(--text-main);
    font-size: 0.9rem;
}

.promo-text span {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 0.85rem;
}

/* --- BREADCRUMBS --- */
.breadcrumbs {
    padding: 20px 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}
.breadcrumbs a {
    color: var(--text-muted);
}
.breadcrumbs span {
    margin: 0 5px;
}
.breadcrumbs span.current {
    color: var(--text-main);
    font-weight: 600;
}

/* --- MAIN SHOP LAYOUT --- */
.shop-layout {
    display: flex;
    gap: 30px;
    padding-bottom: 60px;
}

/* --- SIDEBAR --- */
.sidebar {
    width: 260px;
    flex-shrink: 0;
}

.sidebar-block {
    background-color: var(--bg-surface);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.sidebar-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-main);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.category-list li {
    margin-bottom: 12px;
}
.category-list a {
    color: var(--text-main);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95rem;
}
.category-list a:hover {
    color: var(--primary-color);
}
.cat-count {
    color: var(--text-light);
    font-size: 0.8rem;
    background: var(--bg-body);
    padding: 2px 8px;
    border-radius: 12px;
}

.filter-list li {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.filter-list label {
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}
.filter-list input[type="checkbox"] {
    cursor: pointer;
    width: 16px;
    height: 16px;
    accent-color: var(--primary-color);
}

/* --- PRODUCT GRID AREA --- */
.main-content {
    flex-grow: 1;
}

.category-banner {
    background: linear-gradient(135deg, rgba(36, 185, 215, 0.1), var(--bg-surface));
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 40px;
    border-radius: 12px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

[data-theme="dark"] .category-banner {
    background: linear-gradient(135deg, rgba(0, 112, 243, 0.15), var(--bg-surface));
}

.category-banner h1 {
    font-size: 2.2rem;
    margin-bottom: 10px;
    font-weight: 800;
}
.category-banner p {
    color: var(--text-muted);
    max-width: 600px;
}

.toolbar {
    background-color: var(--bg-surface);
    padding: 15px 20px;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.sort-by {
    display: flex;
    align-items: center;
    gap: 10px;
}
.sort-by label {
    font-size: 0.9rem;
    color: var(--text-muted);
}
.sort-by select {
    padding: 8px 12px;
    background-color: var(--bg-body);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    outline: none;
    cursor: pointer;
}

.product-count {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* --- PRODUCTS GRID --- */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
}

.product-card {
    background-color: var(--bg-surface);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: box-shadow 0.3s, transform 0.3s, border-color 0.3s;
    position: relative;
    display: flex;
    flex-direction: column;
}

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

.product-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: var(--danger-color);
    color: white;
    padding: 4px 12px;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 20px;
    z-index: 2;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-badge.new {
    background-color: var(--success-color);
}

.product-badge.top {
    background-color: #ffa500;
}

.product-image {
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    padding: 20px;
    background-color: var(--image-bg);
    border-bottom: 1px solid var(--bg-body);
    transition: background-color 0.3s;
}

.product-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

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

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

.product-brand {
    font-size: 0.8rem;
    color: var(--primary-color);
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.product-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--text-main);
    line-height: 1.4;
    height: 44px; /* Fix height for 2 lines */
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-title a {
    color: inherit;
}
.product-title a:hover {
    color: var(--primary-color);
}

.product-price {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 20px;
    margin-top: auto;
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.price-old {
    font-size: 1rem;
    text-decoration: line-through;
    color: var(--text-light);
    font-weight: 500;
}

.btn-add-cart {
    width: 100%;
    padding: 12px;
    background-color: var(--bg-body);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.product-card:hover .btn-add-cart, .btn-add-cart:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* --- PAGINATION --- */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
}

.pagination a, .pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-main);
    font-weight: 600;
    transition: all 0.2s;
}

.pagination a:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background-color: var(--bg-body);
}

.pagination .current {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* --- FOOTER --- */
footer {
    background-color: var(--secondary-color);
    color: #ddd;
    padding: 60px 0 20px;
    margin-top: 40px;
}

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

.footer-col h3 {
    color: white;
    font-size: 1.1rem;
    margin-bottom: 20px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-col p {
    color: #999;
    margin-bottom: 15px;
}

.footer-links li {
    margin-bottom: 12px;
}
.footer-links a {
    color: #999;
}
.footer-links a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: #777;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 992px) {
    .shop-layout {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 20px;
    }
    .sidebar-block {
        margin-bottom: 0;
    }
    .header-main {
        flex-wrap: wrap;
    }
    .search-bar {
        order: 3;
        flex-basis: 100%;
        max-width: 100%;
        margin-top: 15px;
    }
    .footer-top {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 576px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
    .footer-top {
        grid-template-columns: 1fr;
    }
    .top-bar-left {
        display: none;
    }
    .toolbar {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
}
/*
Theme Name: TechDiag Theme
Theme URI: http://techdiag.pt
Author: Antigravity
Description: E-commerce Theme for TechDiag with WooCommerce.
Version: 1.0.0
*/
/* --- CART MINI DROPDOWN --- */
.header-actions { display: flex; gap: 20px; }
.header-cart-wrapper { position: relative; }
.header-cart-wrapper:hover .mini-cart-dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.mini-cart-dropdown .widget_shopping_cart_content ul.cart_list { list-style: none; padding: 0; margin: 0; }
.mini-cart-dropdown .widget_shopping_cart_content ul.cart_list li { display: flex; gap: 10px; align-items: center; border-bottom: 1px solid var(--border-color); padding: 10px 0; }
.mini-cart-dropdown .widget_shopping_cart_content ul.cart_list li img { width: 50px; height: 50px; object-fit: cover; border-radius: 4px; }
.mini-cart-dropdown { z-index: 999; }

