/*
Theme Name: storefront-child
Template: storefront
Version:    1.0
Text Domain: storefront-child
*/

/* Importação das fontes */
@font-face {
    font-family: 'Playfair Display';
    src: url('assets/fonts/PlayfairDisplay-Regular.woff2') format('woff2'),
         url('assets/fonts/PlayfairDisplay-Regular.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Playfair Display';
    src: url('assets/fonts/PlayfairDisplay-Bold.woff2') format('woff2'),
         url('assets/fonts/PlayfairDisplay-Bold.woff') format('woff');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Raleway';
    src: url('assets/fonts/Raleway-Regular.woff2') format('woff2'),
         url('assets/fonts/Raleway-Regular.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Raleway';
    src: url('assets/fonts/Raleway-Medium.woff2') format('woff2'),
         url('assets/fonts/Raleway-Medium.woff') format('woff');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

/* Variáveis de cores e tipografia */
:root {
    --color-preto-carvao: #1A1A1A;
    --color-branco-puro: #FFFFFF;
    --color-terracota: #BB6845;
    --color-verde-oliva: #A3A380;
    --color-cinza-claro: #E5E5E5;
    --color-cinza-suave: #F8F8F8;
    
    --font-titulos: 'Playfair Display', serif;
    --font-texto: 'Raleway', sans-serif;
}

/* Estilos base de tipografia */
body {
    font-family: var(--font-texto);
    font-weight: normal;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6,
.site-title,
.entry-title,
.woocommerce-loop-product__title,
.woocommerce div.product .product_title {
    font-family: var(--font-titulos);
    font-weight: bold;
}

/* Header Customization */
.site-header {
    background-color: var(--color-branco-puro);
    padding: 1.5rem 0;
    margin-bottom: 0;
    border-bottom: 1px solid var(--color-cinza-claro);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

.site-header .col-full {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1400px;
    padding: 0 2rem;
}

/* Logo */
.custom-logo-link {
    margin-right: 2rem;
    transition: opacity 0.3s ease;
}

.custom-logo-link:hover {
    opacity: 0.9;
}

.custom-logo {
    max-width: 280px;
    height: auto;
}

/* Search */
.site-header .site-search {
    margin: 0;
    width: 400px;
    position: relative;
}

.site-search .widget_product_search form {
    position: relative;
    margin: 0;
}

/* Remove o ícone padrão do tema */
.site-search .widget_product_search form::before {
    content: none !important;
}

.site-search .widget_product_search form input[type=search] {
    background-color: var(--color-cinza-suave);
    padding: 1em 1.2em;
    padding-right: 3em;
    border-radius: 50px;
    font-family: var(--font-texto);
    border: 2px solid transparent;
    width: 100%;
    box-sizing: border-box;
    transition: all 0.3s ease;
    -webkit-appearance: none;
}

.site-search .widget_product_search form input[type=search]:focus {
    background-color: var(--color-branco-puro);
    border-color: var(--color-cinza-claro);
    outline: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Remove o botão padrão do navegador */
.site-search .widget_product_search form input[type="submit"],
.site-search .widget_product_search form button[type="submit"] {
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    height: 1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}

/* Adiciona o ícone personalizado */
.site-search .widget_product_search form::after {
    content: '';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231A1A1A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    opacity: 0.5;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.site-search .widget_product_search form:hover::after {
    opacity: 0.8;
}

.site-search .widget_product_search form input[type=search]:focus + form::after {
    opacity: 1;
}

/* Navigation */
.main-navigation-wrapper {
    background-color: var(--color-branco-puro);
    border-bottom: 1px solid var(--color-cinza-claro);
    margin: 0;
    display: block;
}

.main-navigation-wrapper .col-full {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.main-navigation-wrapper ul.menu {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.main-navigation-wrapper ul.menu > li {
    position: relative;
}

.main-navigation-wrapper ul.menu > li > a {
    font-family: var(--font-titulos);
    color: var(--color-preto-carvao);
    font-weight: normal;
    padding: 1.2em 1em;
    letter-spacing: 0.02em;
    position: relative;
    display: block;
    text-decoration: none;
}

.main-navigation-wrapper ul.menu > li > a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: var(--color-terracota);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.main-navigation-wrapper ul.menu > li:hover > a::after {
    width: 100%;
}

.main-navigation-wrapper ul.menu > li > a:hover {
    color: var(--color-terracota);
}

/* Menu Toggle Button */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    position: relative;
    width: 40px;
    height: 40px;
    z-index: 100;
    box-sizing: content-box;
}

.menu-toggle-icon {
    display: block;
    position: relative;
    width: 28px;
    height: 2px;
    background: var(--color-preto-carvao);
    transition: background 0.3s ease;
    margin: 0 auto;
}

.menu-toggle-icon::before,
.menu-toggle-icon::after {
    content: '';
    position: absolute;
    left: 0;
    width: 28px;
    height: 2px;
    background: var(--color-preto-carvao);
    transition: transform 0.3s ease, top 0.3s ease, bottom 0.3s ease, opacity 0.3s ease;
}

.menu-toggle-icon::before {
    top: -8px;
}

.menu-toggle-icon::after {
    bottom: -8px;
}

.menu-toggle[aria-expanded="true"] .menu-toggle-icon {
    background: transparent;
}

.menu-toggle[aria-expanded="true"] .menu-toggle-icon::before {
    top: 0;
    transform: rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-toggle-icon::after {
    bottom: 0;
    transform: rotate(-45deg);
}

/* Botões e elementos de destaque */
.button,
.woocommerce #respond input#submit,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button {
    background-color: var(--color-terracota);
    color: var(--color-branco-puro);
    font-family: var(--font-texto);
    font-weight: 500;
}

.button:hover,
.woocommerce #respond input#submit:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover {
    background-color: var(--color-verde-oliva);
}

/* Breadcrumb */
.woocommerce-breadcrumb {
    margin-bottom: 2em;
    color: var(--color-verde-oliva);
    font-size: 0.9em;
    font-family: var(--font-texto);
}

.woocommerce-breadcrumb a {
    color: var(--color-preto-carvao);
}

/* Responsivo */
@media (max-width: 768px) {
    .site-header .col-full {
        padding: 0 1rem;
    }

    .custom-logo {
        max-width: 200px;
    }

    .site-header .site-search {
        display: none;
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        padding: 1rem;
        background: var(--color-branco-puro);
        border-top: 1px solid var(--color-cinza-claro);
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }

    .site-search.active {
        display: block;
    }

    .menu-toggle {
        display: block;
    }

    .main-navigation-wrapper {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--color-branco-puro);
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        z-index: 99;
    }

    .main-navigation-wrapper.active {
        display: block;
    }

    .main-navigation-wrapper .col-full {
        padding: 0;
    }

    .main-navigation-wrapper ul.menu {
        flex-direction: column;
        gap: 0;
    }

    .main-navigation-wrapper ul.menu > li {
        border-bottom: 1px solid var(--color-cinza-claro);
        margin: 0;
    }

    .main-navigation-wrapper ul.menu > li:last-child {
        border-bottom: none;
    }

    .main-navigation-wrapper ul.menu > li > a {
        padding: 1em;
        text-align: left;
    }

    .main-navigation-wrapper ul.menu > li > a::after {
        display: none;
    }

    /* Ajustes para busca mobile */
    .site-search {
        display: none;
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        padding: 1rem;
        background: var(--color-branco-puro);
        border-top: 1px solid var(--color-cinza-claro);
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        z-index: 98;
    }

    .site-search.active {
        display: block;
    }

    /* Ajuste do header mobile */
    .site-header .col-full {
        padding: 0 1rem;
    }

    .custom-logo {
        max-width: 200px;
    }
}

/* Footer Customization */
.site-footer {
    background-color: var(--color-cinza-suave);
    color: var(--color-preto-carvao);
    padding: 3em 0;
    font-family: var(--font-texto);
    border-top: 1px solid var(--color-cinza-claro);
}

/* Métodos de Pagamento */
.payment-methods {
    text-align: center;
    margin-bottom: 2em;
    padding: 1.5em 0;
    border-bottom: 1px solid var(--color-cinza-claro);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2.5em;
    flex-wrap: wrap;
}

.payment-methods img {
    height: 35px;
    width: auto;
    object-fit: contain;
    filter: grayscale(1);
    opacity: 0.8;
    transition: all 0.3s ease;
}

.payment-methods img:hover {
    filter: grayscale(0);
    opacity: 1;
}

/* Site Seguro */
.site-security {
    text-align: center;
    margin: 2em 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.site-security img {
    height: 45px;
    width: auto;
    object-fit: contain;
    margin: 0 auto;
}

/* Links do Footer */
.footer-links {
    text-align: center;
    margin: 2em 0;
    padding: 1em 0;
    font-family: var(--font-titulos);
}

.footer-links a {
    color: var(--color-preto-carvao);
    text-decoration: none;
    margin: 0 1.5em;
    font-size: 0.95em;
    font-weight: 700;
    transition: color 0.3s ease;
    position: relative;
}

.footer-links a:hover {
    color: var(--color-terracota);
}

.footer-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--color-terracota);
    transition: width 0.3s ease;
}

.footer-links a:hover::after {
    width: 100%;
}

/* Informações de Contato */
.contact-info {
    text-align: center;
    color: var(--color-preto-carvao);
    font-size: 0.9em;
    line-height: 1.8;
    margin-top: 2em;
}

.contact-info p {
    margin: 0.5em 0;
    opacity: 0.8;
}

/* Responsivo Footer */
@media (max-width: 768px) {
    .payment-methods {
        gap: 1.5em;
        padding: 1em;
    }

    .payment-methods img {
        height: 30px;
    }

    .site-security img {
        height: 40px;
    }

    .footer-links {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1em;
    }

    .footer-links a {
        margin: 0.5em 0;
    }

    .footer-links span {
        display: none;
    }

    .contact-info {
        padding: 0 1em;
    }
}

/* Backgrounds secundários */
.secondary-navigation,
.widget-area,
.woocommerce-tabs {
    background-color: var(--color-cinza-claro);
}

/* Elementos orgânicos */
.woocommerce ul.products li.product .price,
.woocommerce div.product p.price,
.woocommerce div.product span.price {
    color: var(--color-verde-oliva);
    font-family: var(--font-texto);
    font-weight: 500;
}

/* Ajustes específicos para WooCommerce */
.woocommerce ul.products li.product .woocommerce-loop-product__title {
    font-family: var(--font-titulos);
    font-weight: normal;
}

.woocommerce div.product .product_title {
    font-family: var(--font-titulos);
    font-weight: bold;
}

.woocommerce div.product .price {
    font-family: var(--font-texto);
    font-weight: 500;
}

/* WooCommerce Tabs - Página de Produto */
.woocommerce div.product .woocommerce-tabs,
.woocommerce div.product .woocommerce-tabs .panel,
.woocommerce div.product .woocommerce-tabs ul.tabs {
    background: var(--color-branco-puro) !important;
    border-radius: 0;
    box-shadow: none;
    border: none;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li.active a,
.woocommerce div.product .woocommerce-tabs ul.tabs li a:hover {
    color: var(--color-terracota);
    border-bottom: 2px solid var(--color-terracota);
    background: var(--color-branco-puro);
}

.woocommerce div.product .woocommerce-tabs ul.tabs li a {
    color: var(--color-preto-carvao);
    background: var(--color-branco-puro);
    border: none;
    font-family: var(--font-titulos);
    font-weight: 700;
    font-size: 1.1em;
    transition: color 0.2s, border 0.2s;
}
