/*
Theme Name:   MarcWeb Child
Description:  Child theme agência WooCommerce 2026 - 97% PageSpeed - Seguro contra atualizações
Author:       Agência MarcWeb
Author URI:   https://wp.marcweb.com.br
Template:     generatepress
Version:      2.3.4
License:      GPL v2
License URI:  https://www.gnu.org/licenses/gpl-2.0.html
Text Domain:  marcweb-child
Tags:         agency, woocommerce, performance, brazil
*/

/* Os css do pai e variables.css estão instanciados no functions.php via wp_enqueue_style :) */

/* ==========================================================================
   VARIÁVEIS GLOBAIS (Consolidadas)
   ========================================================================== */
:root {
    /* Layout */
    --mw-header-height: 80px;
    --mw-header-justify: space-between;
    --mw-border-radius: 12px;

    /* Colors */
    --mw-accent-color: #3a7bd5;
    --mw-bg-color: #ffffff;
    --mw-text-color: #333333;

    /* Glassmorphism */
    --mw-glass-blur: 10px;
    --mw-glass-bg: rgba(255, 255, 255, 0.1);
    --mw-glass-border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ==========================================================================
   BASE & LAYOUT
   ========================================================================== */
body {
    background-color: var(--mw-bg-color);
    color: var(--mw-text-color);
    font-size: var(--mw-font-size-base);
    line-height: var(--mw-line-height-normal);
    min-height: 100vh;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: inherit;
}

h1 {
    font-size: var(--mw-font-size-h1);
}

/* ==========================================================================
   HEADER & NAVIGATION
   ========================================================================== */
.site-header {
    height: var(--mw-header-height);
}

.inside-header {
    display: flex;
    align-items: center;
    justify-content: var(--mw-header-justify);
    width: 100%;
    height: 100%;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.navigation-branding {
    width: auto;
    margin-right: 0;
}

.main-navigation {
    width: auto !important;
    float: none !important;
    margin-left: 0;
    background-color: transparent !important;
}

.main-navigation .main-nav,
.inside-navigation {
    background-color: transparent !important;
}

/* ==========================================================================
   GLASSMORPHISM & DESIGN EFFECTS
   ========================================================================== */
.site-header,
.inside-article,
.sidebar .widget,
.site-footer {
    background: var(--mw-glass-bg) !important;
    backdrop-filter: blur(var(--mw-glass-blur)) !important;
    -webkit-backdrop-filter: blur(var(--mw-glass-blur)) !important;
    border: var(--mw-glass-border) !important;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    border-radius: var(--mw-border-radius);
    margin-bottom: 20px;
}

.inside-article {
    padding: 30px;
}

.separate-containers .inside-article,
.separate-containers .sidebar .widget,
.separate-containers .site-main {
    background-color: transparent !important;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
    /* margin-top: auto; Removido para não depender de Flexbox no Body */
    margin-bottom: 0 !important; /* Remove o espaçamento final para colar na tela */
}

.footer-widgets {
    background-color: var(--mw-header-bg-color, #2c3e50);
    color: var(--mw-header-text-color, #ffffff);
    padding: 60px 0 30px;
}

.site-info {
    background-color: var(--mw-header-bg-color, #1a1a1a);
    color: var(--mw-header-text-color, #888888);
    padding: 20px 0;
    border-top: 1px solid rgba(128, 128, 128, 0.1);
}

.site-info a {
    color: var(--mw-accent-color);
    text-decoration: underline;
}

/* ==========================================================================
   GLOBAL LINKS & BUTTONS
   ========================================================================== */
a {
    color: var(--mw-accent-color);
    transition: var(--mw-transition);
}

a:hover {
    filter: brightness(1.2);
}

button,
.button,
input[type="submit"],
.woocommerce-button,
.wp-block-button__link {
    background-color: var(--mw-accent-color);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--mw-border-radius);
    transition: var(--mw-transition);
}

button:hover,
.button:hover,
input[type="submit"]:hover {
    filter: brightness(1.2);
}

/* ==========================================================================
   DARK MODE - COMPREHENSIVE
   ========================================================================== */
body.dark-mode {
    background-color: var(--mw-bg-color, #121212);
    color: var(--mw-text-color, #e0e0e0);
}

/* Typography */
body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4,
body.dark-mode h5,
body.dark-mode h6,
body.dark-mode .site-title a,
body.dark-mode .navigation-branding a,
body.dark-mode .main-navigation a,
body.dark-mode .menu-toggle,
body.dark-mode .main-navigation .menu-item a {
    color: #ffffff !important;
}

body.dark-mode .main-navigation a:hover,
body.dark-mode .main-navigation .menu-item a:hover {
    color: #5ba3e0 !important;
}

/* Form Inputs */
body.dark-mode input[type="text"],
body.dark-mode input[type="email"],
body.dark-mode input[type="tel"],
body.dark-mode input[type="password"],
body.dark-mode input[type="number"],
body.dark-mode input[type="search"],
body.dark-mode textarea {
    background-color: rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: calc(var(--mw-border-radius) / 2);
}

body.dark-mode input::placeholder,
body.dark-mode textarea::placeholder {
    color: rgba(255, 255, 255, 0.5) !important;
}

/* WooCommerce Blocks Containers */
body.dark-mode .wc-blocks-components-select__container {
    background-color: transparent !important;
    margin-top: 15px !important;
}

body.dark-mode .wc-blocks-components-select__label,
body.dark-mode .wc-block-components-text-input label,
body.dark-mode .wc-block-components-checkbox__label {
    color: #e0e0e0 !important;
}

/* ALL Dropdowns/Selects - WooCommerce Blocks Compatible */
body.dark-mode select,
body.dark-mode .select2-container--default .select2-selection--single,
body.dark-mode #shipping-country,
body.dark-mode #billing-country,
body.dark-mode #shipping-state,
body.dark-mode #billing-state,
body.dark-mode .wc-blocks-components-select__select,
body.dark-mode .woocommerce-input-wrapper select,
body.dark-mode .select2-selection,
body.dark-mode .select2-selection--single {
    background-color: rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: calc(var(--mw-border-radius) / 2);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* Custom Arrows for Selects */
body.dark-mode select,
body.dark-mode .wc-blocks-components-select__select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ffffff' d='M6 9L1 4h10z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 10px center !important;
    padding-right: 30px !important;
}

/* Select2 Dropdowns */
body.dark-mode .select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #ffffff !important;
}

body.dark-mode .select2-dropdown {
    background-color: #2a2a2a !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

body.dark-mode .select2-results__option {
    color: #ffffff !important;
    background-color: #2a2a2a !important;
}

body.dark-mode .select2-results__option--highlighted {
    background-color: #3a3a3a !important;
}

/* Buttons Dark Mode Overrides (if needed) */
body.dark-mode button,
body.dark-mode .button,
body.dark-mode input[type="submit"],
body.dark-mode .woocommerce-button,
body.dark-mode .wp-block-button__link {
    background-color: var(--mw-accent-color) !important;
    color: #ffffff !important;
}

/* WooCommerce Ordering Dropdown */
body.dark-mode .woocommerce-ordering select,
body.dark-mode .woocommerce .woocommerce-ordering select,
body.dark-mode select.orderby,
body.dark-mode .woocommerce-ordering select.orderby {
    background-color: rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
}

body.dark-mode .woocommerce-ordering select option,
body.dark-mode select option {
    background-color: #2a2a2a !important;
    color: #ffffff !important;
}

/* Error/Notice Boxes */
body.dark-mode .wc-block-components-notice.is-error,
body.dark-mode .woocommerce-error,
body.dark-mode .woocommerce-message {
    background-color: rgba(204, 24, 24, 0.1) !important;
    color: #ff8a8a !important;
    border-color: #cc1818 !important;
}

/* Checkout Columns */
body.dark-mode .woocommerce-checkout .col-1,
body.dark-mode .woocommerce-checkout .col-2,
body.dark-mode #order_review_heading,
body.dark-mode #order_review {
    background: var(--mw-glass-bg);
    backdrop-filter: blur(var(--mw-glass-blur));
    -webkit-backdrop-filter: blur(var(--mw-glass-blur));
    border: var(--mw-glass-border);
    padding: 20px;
    border-radius: var(--mw-border-radius);
}

/* Tables */
body.dark-mode table,
body.dark-mode .woocommerce table {
    color: #e0e0e0 !important;
    background-color: transparent !important;
}

body.dark-mode th,
body.dark-mode td {
    color: #e0e0e0 !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

/* Product Cards */
body.dark-mode .woocommerce ul.products li.product,
body.dark-mode .woocommerce div.product {
    background: var(--mw-glass-bg);
    border: var(--mw-glass-border);
    border-radius: var(--mw-border-radius);
}

body.dark-mode .woocommerce ul.products li.product .price,
body.dark-mode .woocommerce div.product p.price {
    color: #4CAF50 !important;
}

/* Links Dark Mode Specifics (if needed) */
body.dark-mode a {
    color: var(--mw-accent-color);
}

body.dark-mode a:hover {
    filter: brightness(1.2);
}

/* Limpeza: Removidos todos os overrides de largura manual para Carrinho e Checkout.
   O layout agora é gerenciado 100% pelo tema pai (GeneratePress) e pelos blocos do WooCommerce. */