/**
 * Estilos específicos para WooCommerce
 * Compatibilidade com o layout Ella
 */

/* Reset de estilos padrão do WooCommerce - Usando Bootstrap Grid */
.woocommerce ul.products,
.woocommerce-page ul.products {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: contents !important;
}

.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
    clear: none !important;
}

/* Reset de estilos padrão do WooCommerce */
.woocommerce div.product {
    margin-bottom: 0;
}

.woocommerce div.product .product_title {
    display: none;
}

.woocommerce div.product .woocommerce-product-rating {
    display: none;
}

.woocommerce div.product .price {
    display: none;
}

.woocommerce div.product .woocommerce-product-details__short-description {
    display: none;
}

.woocommerce div.product .product_meta {
    display: none;
}

.woocommerce div.product .woocommerce-product-gallery {
    display: none;
}

/* Estilos para formulário de variações */
.woocommerce div.product form.cart .variations {
    margin-bottom: 1rem;
}

.woocommerce div.product form.cart .variations td {
    padding: 0.5rem 0;
    border: none;
}

.woocommerce div.product form.cart .variations label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: block;
}

.woocommerce div.product form.cart .variations select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
}

.woocommerce div.product form.cart .variations .reset_variations {
    display: none;
}

/* Estilos para botão de adicionar ao carrinho */
.woocommerce div.product form.cart .single_add_to_cart_button {
    background-color: #022A60;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
    transition: background-color 0.3s ease;
}

.woocommerce div.product form.cart .single_add_to_cart_button:hover {
    background-color: #1a4a8a;
}

.woocommerce div.product form.cart .single_add_to_cart_button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* Estilos para quantidade */
.woocommerce div.product form.cart .quantity {
    display: none !important;
}

/* Estilos para variações */
.woocommerce div.product .single_variation_wrap {
    margin-top: 1rem;
}

.woocommerce div.product .woocommerce-variation {
    margin-bottom: 1rem;
}

.woocommerce div.product .woocommerce-variation-price {
    display: none;
}

.woocommerce div.product .woocommerce-variation-availability {
    margin-bottom: 1rem;
}

.woocommerce div.product .woocommerce-variation-availability .stock {
    font-weight: 600;
    padding: 0.5rem;
    border-radius: 4px;
}

.woocommerce div.product .woocommerce-variation-availability .stock.in-stock {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.woocommerce div.product .woocommerce-variation-availability .stock.out-of-stock {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Estilos para mensagens de estoque */
.woocommerce div.product .stock {
    font-weight: 600;
    padding: 0.5rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.woocommerce div.product .stock.in-stock {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.woocommerce div.product .stock.out-of-stock {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Estilos para carrossel de imagens */
.woocommerce div.product .woocommerce-product-gallery__wrapper {
    display: none;
}

/* Estilos para carrossel personalizado */
.carrossel-separador {
    margin-bottom: 1rem;
}

.carrossel-separador .carousel-inner {
    border-radius: 8px;
    overflow: hidden;
}

.carrossel-separador .carousel-item img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* Estilos para thumbnails */
.thumbnails-container {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.thumbnails-container .img-thumbnail {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border: 2px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.7;
}

.thumbnails-container .img-thumbnail:hover {
    opacity: 1;
    border-color: #022A60;
    transform: scale(1.05);
}

.thumbnails-container .img-thumbnail.active {
    opacity: 1;
    border-color: #022A60;
    border-width: 3px;
}

/* Estilos para carrosséis de cores */
.ella-grey,
.ella-white {
    transition: opacity 0.3s ease;
}

.ella-grey.hidden,
.ella-white.hidden {
    display: none !important;
}

/* Estilos para compartilhamento social */
.woocommerce div.product .woocommerce-product-details__short-description {
    display: none;
}

/* Estilos para tabs de produto */
.woocommerce div.product .woocommerce-tabs {
    margin-top: 2rem;
}

.woocommerce div.product .woocommerce-tabs ul.tabs {
    border-bottom: 1px solid #ddd;
    margin-bottom: 1rem;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li {
    display: inline-block;
    margin-right: 1rem;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li a {
    padding: 0.5rem 1rem;
    text-decoration: none;
    color: #333;
    border-bottom: 2px solid transparent;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li.active a {
    border-bottom-color: #022A60;
    color: #022A60;
}

/* Estilos para produtos relacionados */
.woocommerce div.product .woocommerce-product-related {
    margin-top: 3rem;
}

.woocommerce div.product .woocommerce-product-related h2 {
    margin-bottom: 1.5rem;
    text-align: center;
}

/* Estilos para breadcrumb */
.woocommerce .woocommerce-breadcrumb {
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.woocommerce .woocommerce-breadcrumb a {
    color: #022A60;
    text-decoration: none;
}

.woocommerce .woocommerce-breadcrumb a:hover {
    text-decoration: underline;
}

/* Estilos para mensagens de sucesso/erro */
.woocommerce .woocommerce-message,
.woocommerce .woocommerce-error,
.woocommerce .woocommerce-info {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 4px;
}

.woocommerce .woocommerce-message {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.woocommerce .woocommerce-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.woocommerce .woocommerce-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Ocultar notices nas páginas de loja e produto único */
body.woocommerce-shop .woocommerce-message,
body.woocommerce-shop .woocommerce-error,
body.woocommerce-shop .woocommerce-info,
body.woocommerce-shop .woocommerce-notices-wrapper,
body.woocommerce-shop .wc-block-components-notice-banner,
body.single-product .woocommerce-message,
body.single-product .woocommerce-error,
body.single-product .woocommerce-info,
body.single-product .woocommerce-notices-wrapper,
body.single-product .wc-block-components-notice-banner,
body.tax-product_cat .woocommerce-message,
body.tax-product_cat .woocommerce-error,
body.tax-product_cat .woocommerce-info,
body.tax-product_cat .woocommerce-notices-wrapper,
body.tax-product_cat .wc-block-components-notice-banner,
body.tax-product_tag .woocommerce-message,
body.tax-product_tag .woocommerce-error,
body.tax-product_tag .woocommerce-info,
body.tax-product_tag .woocommerce-notices-wrapper,
body.tax-product_tag .wc-block-components-notice-banner {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
}

/* Estilos para formulário de avaliações */
.woocommerce div.product .woocommerce-Reviews {
    margin-top: 2rem;
}

.woocommerce div.product .woocommerce-Reviews h2 {
    margin-bottom: 1rem;
}

/* Responsividade */
@media (max-width: 768px) {
    .woocommerce div.product form.cart .variations td {
        display: block;
        width: 100%;
    }
    
    .woocommerce div.product form.cart .variations td.label {
        margin-bottom: 0.5rem;
    }
    
    .woocommerce div.product form.cart .variations td.value {
        margin-bottom: 1rem;
    }
}

/* Estilos para botões de compartilhamento */
.share-icon {
    display: inline-block;
    margin-right: 0.5rem;
    transition: transform 0.3s ease;
}

.share-icon:hover {
    transform: scale(1.1);
}

.share-icon img {
    width: 32px;
    height: 32px;
}

/* Estilos para características do produto */
.ul-shop-caracteristicas {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.ul-shop-caracteristicas li {
    display: flex;
    align-items: center;
    margin-bottom: 0.2rem;
}

.ul-shop-caracteristicas li svg {
    margin-right: 0.5rem;
    flex-shrink: 0;
}

/* Estilos para seleção de cores */
.shop-escolha-cor {
    margin: 1rem 0;
}

.color-img-shop {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    margin: 0 0.25rem;
    border: 2px solid transparent;
    transition: border-color 0.3s ease;
}

.color-img-shop:hover,
.color-img-shop.highlight {
    border-color: #022A60;
}

/* Estilos para seleção de cores personalizada */
.color-selection {
    margin: 1rem 0;
}

.color-options {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.color-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.color-option:hover {
    background-color: #f8f9fa;
}

.color-option input[type="radio"] {
    margin-right: 0.5rem;
}

.color-option input[type="radio"]:checked + .color-label {
    font-weight: 600;
    color: #022A60;
}

.color-label {
    font-size: 0.9rem;
    color: #333;
}

/* Estilos para informações de frete */
.shop-frete-gratis {
    background-color: #f8f9fa;
    padding: 0.75rem;
    border-radius: 4px;
    margin: 1rem 0;
    font-size: 0.9rem;
}

.shop-frete-gratis strong {
    color: #022A60;
}

.shop-frete-gratis small {
    display: block;
    margin-top: 0.25rem;
    color: #666;
}

/* Estilos para botões de ação */
.mais-informacoes,
.ficha-tecnica {
    color: #022A60;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.mais-informacoes:hover,
.ficha-tecnica:hover {
    color: #1a4a8a;
    text-decoration: underline;
}

/* Estilos para descrição expandível */

.shop-descricao.d-none {
    display: none !important;
}

.shop-descricao:not(.d-none) {
    display: block !important;
}

.ella-text-info-color-primary {
    color: #6B6969;
}

/* Grid de produtos agora usa Bootstrap diretamente no template - sem CSS adicional necessário */

/* Estilos para cards de produtos - Estilo suave e limpo */
.ella-product-card {
    border: 1px solid #EBF0FB;
    border-radius: 10px;
    transition: all 0.3s ease;
    overflow: hidden;
    background: #fff;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.ella-product-card:hover {
    border-color: #FDB813;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.ella-product-image {
    position: relative;
    overflow: hidden;
    background-color: #fff;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-grow: 1;
}

.ella-product-image img,
.ella-product-image .img-fluid {
    width: 100%;
    height: auto;
    border: none;
    border-radius: 0;
    padding: 0;
    display: block;
}

.ella-product-image a {
    display: block;
    width: 100%;
}

.ella-product-card .card-body,
.ella-product-card-body {
    padding: 0;
    display: block;
    flex-grow: 0;
}

.ella-product-card h2.woocommerce-loop-product__title,
.ella-product-card .woocommerce-loop-product__title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #022A60;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.ella-product-card h2.woocommerce-loop-product__title a,
.ella-product-card .woocommerce-loop-product__title a {
    color: #022A60;
    text-decoration: none;
    transition: color 0.3s ease;
}

.ella-product-card h2.woocommerce-loop-product__title a:hover,
.ella-product-card .woocommerce-loop-product__title a:hover {
    color: #FDB813;
}

.ella-product-card .price {
    font-size: 1.5rem;
    font-weight: 600;
    color: #022A60;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.ella-product-card .price del {
    color: #6B6969;
    font-size: 1rem;
    font-weight: 400;
    margin-right: 0.5rem;
    text-decoration: line-through;
}

.ella-product-card .price ins {
    text-decoration: none;
    color: #022A60;
}

.ella-product-card .woocommerce-loop-product__link {
    display: block;
    text-decoration: none;
}

.ella-product-card .button,
.ella-product-card .add_to_cart_button,
.ella-product-card .product_type_simple,
.ella-product-card-body .button,
.ella-product-card-body .add_to_cart_button,
.ella-product-card-body .product_type_simple {
    border-radius: 0;
    font-weight: bold;
    padding: 1rem 1.5rem;
    color: #022A60 !important;
    border: none;
    background-color: #FDB813;
    background-image: none;
    transition: background-color 0.3s ease;
    overflow: hidden;
    width: 100%;
    text-align: center;
    display: block;
    text-decoration: none;
    font-size: 1rem;
    text-transform: none;
    margin: 0;
}

.ella-product-card .button:hover,
.ella-product-card .add_to_cart_button:hover,
.ella-product-card .product_type_simple:hover,
.ella-product-card-body .button:hover,
.ella-product-card-body .add_to_cart_button:hover,
.ella-product-card-body .product_type_simple:hover {
    background-color: #f5c000;
    color: #022A60 !important;
    transform: none;
    box-shadow: none;
}

.ella-product-card .woocommerce-loop-product__link {
    display: block;
}

.ella-product-card .onsale {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: #FDB813;
    color: #022A60;
    padding: 0.4rem 0.8rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 700;
    z-index: 10;
}

/* Remover sidebar da página de loja */
.woocommerce-page .woocommerce-sidebar {
    display: none;
}

.woocommerce-page .woocommerce-main-content {
    width: 100%;
}

/* Ajustes para o wrapper de conteúdo */
.woocommerce .woocommerce-products-header {
    margin-bottom: 2rem;
}

.woocommerce .woocommerce-result-count,
.woocommerce .woocommerce-ordering {
    margin-bottom: 1.5rem;
}

/* Container da loja */
.shop-ella-wrapper {
    max-width: 1200px;
    margin: 0 auto;
}

/* Reset de pseudo-elementos do WooCommerce */
.woocommerce ul.products::before,
.woocommerce ul.products::after {
    display: none !important;
}

/* Título da página de loja com espaçamento discreto */
.shop-ella-wrapper .ella-title {
    margin-top: 1rem;
    margin-bottom: 1rem;
}

@media (max-width: 767.98px) {
    .shop-ella-wrapper .ella-title {
        margin-top: 0.75rem;
        margin-bottom: 0.75rem;
    }
}

/* Responsividade para cards */
@media (max-width: 767.98px) {
    .woocommerce ul.products {
        gap: 1.5rem;
    }
    
    .ella-product-image {
        min-height: 300px;
    }
    
    .ella-product-card .button,
    .ella-product-card-body .button {
        padding: 0.875rem 1.25rem;
        font-size: 0.95rem;
    }
}

/* Estilos para carrinho vazio */
.woocommerce-cart-empty {
    padding: 4rem 1rem;
    text-align: center;
}

/* Ocultar conteúdo de carrinho vazio quando há produtos no carrinho */
.woocommerce-cart-form ~ .woocommerce-cart-empty,
.cart_item ~ .woocommerce-cart-empty,
.shop_table.cart ~ .woocommerce-cart-empty,
.cart_totals ~ .woocommerce-cart-empty,
.woocommerce-cart-form__contents ~ .woocommerce-cart-empty,
.woocommerce-cart-item ~ .woocommerce-cart-empty {
    display: none !important;
}

/* Se há itens no carrinho, ocultar conteúdo de carrinho vazio */
body:has(.cart_item) .woocommerce-cart-empty,
body:has(.woocommerce-cart-form) .woocommerce-cart-empty,
body:has(.cart_totals) .woocommerce-cart-empty {
    display: none !important;
}

.cart-empty-content {
    max-width: 600px;
    margin: 0 auto;
}

.cart-empty-icon {
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.cart-empty-icon svg {
    width: 120px;
    height: 120px;
    opacity: 0.4;
}

.cart-empty-message {
    font-size: 1.5rem;
    font-weight: 600;
    color: #022A60;
    margin-bottom: 2rem;
    line-height: 1.4;
}

.cart-empty-button-wrapper {
    margin-top: 2rem;
}

/* Garantir que os botões do carrinho vazio usem os estilos corretos */
.cart-empty-button-wrapper .btn {
    min-width: 250px;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    text-decoration: none;
    display: inline-block;
}

/* Garantir que os botões do carrinho vazio mantenham os estilos corretos */
.cart-empty-button-wrapper .btn.btn-ella-primary,
.cart-empty-button-wrapper .btn.btn-ella-secondary,
.cart-empty-button-wrapper .button.btn-ella-primary,
.cart-empty-button-wrapper .button.btn-ella-secondary {
    border-radius: 1.5rem !important;
    font-weight: 500 !important;
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
    text-transform: none !important;
    border-width: 1px !important;
    border-style: solid !important;
    background: none !important;
    background-image: linear-gradient(-45deg, #022A60 50%, #FDB813 50%) !important;
    background-size: 250% 100% !important;
    background-position: left top !important;
    transform: none !important;
    box-shadow: none !important;
}

.cart-empty-button-wrapper .btn.btn-ella-primary,
.cart-empty-button-wrapper .button.btn-ella-primary {
    color: #022A60 !important;
    border-color: #FDB813 !important;
}

.cart-empty-button-wrapper .btn.btn-ella-primary:hover,
.cart-empty-button-wrapper .button.btn-ella-primary:hover {
    border-color: #022A60 !important;
    color: #FDB813 !important;
    background-position: right bottom !important;
    transform: none !important;
    box-shadow: none !important;
}

.cart-empty-button-wrapper .btn.btn-ella-secondary,
.cart-empty-button-wrapper .button.btn-ella-secondary {
    color: #FDB813 !important;
    border-color: #022A60 !important;
    background-image: linear-gradient(-45deg, #FDB813 50%, #022A60 50%) !important;
}

.cart-empty-button-wrapper .btn.btn-ella-secondary:hover,
.cart-empty-button-wrapper .button.btn-ella-secondary:hover {
    border-color: #FDB813 !important;
    color: #022A60 !important;
    background-position: right bottom !important;
    transform: none !important;
    box-shadow: none !important;
}

/* Esconder mensagem padrão do WooCommerce */
.woocommerce-cart-empty .wc-empty-cart-message,
.wc-empty-cart-message,
.woocommerce-info.cart-empty,
.wc-block-cart__empty-cart__title,
.wp-block-woocommerce-empty-cart-block,
.wc-block-cart__empty-cart__title.with-empty-cart-icon {
    display: none !important;
}

/* Responsividade */
@media (max-width: 767.98px) {
    .woocommerce-cart-empty {
        padding: 3rem 1rem;
    }
    
    .cart-empty-icon svg {
        width: 100px;
        height: 100px;
    }
    
    .cart-empty-message {
        font-size: 1.25rem;
    }
    
    .cart-empty-button-wrapper .btn {
        width: 100%;
        max-width: 300px;
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
}

/* Estilos para botão de checkout nos blocos do WooCommerce */
.wc-block-cart_submit-button.btn.btn-ella-primary,
.wc-block-components-checkout-button.btn.btn-ella-primary,
.wc-block-components-button.btn.btn-ella-primary,
.wp-block-woocommerce-proceed-to-checkout-block .btn.btn-ella-primary,
.wp-block-woocommerce-proceed-to-checkout-block a.btn.btn-ella-primary,
.wc-block-cart_submit-container .btn.btn-ella-primary,
.wc-block-cart_submit-container a.btn.btn-ella-primary {
    border-radius: 1.5rem !important;
    font-weight: 500 !important;
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
    color: #022A60 !important;
    border: 1px solid #FDB813 !important;
    background-image: linear-gradient(-45deg, #022A60 50%, #FDB813 50%) !important;
    background-size: 250% 100% !important;
    background-position: left top !important;
    transition: background-position .5s ease !important;
    overflow: hidden !important;
}

.wc-block-cart_submit-button.btn.btn-ella-primary:hover,
.wc-block-components-checkout-button.btn.btn-ella-primary:hover,
.wc-block-components-button.btn.btn-ella-primary:hover,
.wp-block-woocommerce-proceed-to-checkout-block .btn.btn-ella-primary:hover,
.wp-block-woocommerce-proceed-to-checkout-block a.btn.btn-ella-primary:hover,
.wc-block-cart_submit-container .btn.btn-ella-primary:hover,
.wc-block-cart_submit-container a.btn.btn-ella-primary:hover,
a.btn.btn-ella-primary.wc-block-cart_submit-button:hover,
a.btn.btn-ella-primary.wc-block-components-checkout-button:hover {
    border: 1px solid #022A60 !important;
    color: #FDB813 !important;
    background-position: right bottom !important;
    background-image: linear-gradient(-45deg, #022A60 50%, #FDB813 50%) !important;
}