/* CSS para Single Product Customizado */

/* Ocultar mensagens de erro do WooCommerce na página single product */
.woocommerce-error,
.woocommerce-message,
.woocommerce-info,
.woocommerce-notices-wrapper {
    display: none !important;
}

/* Sistema de Tipografia Padronizado */
/* TÃ­tulos grandes: 24px, font-weight 600 */
/* SubtÃ­tulos: 20px, font-weight 600 */
/* Texto normal/labels: 16px, font-weight 500 */
/* Texto menor/metadados: 14px, font-weight 500 */
/* BotÃµes: 16px, font-weight 600 */

/* Breadcrumbs */
.single-product-breadcrumbs {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.single-product-breadcrumbs nav {
    font-size: 16px;
    font-weight: 500;
}

.single-product-breadcrumbs a {
    color: #000 !important;
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;
}

.single-product-breadcrumbs a:hover {
    text-decoration: none;
    color: #a0824f !important;
}

.single-product-breadcrumbs span {
    color: #a0824f !important;
    font-weight: 500;
    font-size: 16px;
}

/* Container principal do produto */
.single-product-custom {
    padding: 20px 0;
    margin: 20px 0;
}

/* Layout do produto */
.single-product-custom .product {
    display: flex;
    gap: 30px;
}

.single-product-custom .product-images {
    flex: 1;
}

.single-product-custom .product-summary {
    flex: 1;
}

/* Imagens do produto */
.single-product-custom .product-images img {
    width: 100%;
    height: auto;
}

/* Garantir que a galeria do produto aparece */
.single-product-custom .woocommerce-product-gallery {
    opacity: 1 !important;
}

.single-product-custom .woocommerce-product-gallery__image img {
    width: 100%;
    height: auto;
}

/* Miniaturas (thumbnails) da galeria */
.single-product-custom .product-images--with-thumbs {
    display: flex;
    align-items: flex-start;
    gap: 25px;
    margin: 0 25px;
}

.single-product-custom .product-images__thumbs {
    width: 84px;
    flex: 0 0 84px;
}

.single-product-custom .product-thumbnails-viewport {
    overflow: auto;
    max-height: 100%;
    scrollbar-width: none; /* Firefox */
}
.single-product-custom .product-thumbnails-viewport::-webkit-scrollbar { display: none; }

.single-product-custom .product-thumbnails {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.single-product-custom .product-thumbnails__item {
    width: 100%;
    height: 84px; /* altura fixa para nÃƒÂ£o saltar o layout */
}

.single-product-custom .product-thumbnails__item img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* nÃƒÂ£o corta a imagem */
    display: block;
    cursor: pointer;
    background: #fff;
}

.single-product-custom .product-images__main {
    flex: 1;
}

/* ForÃƒÂ§ar a imagem principal a 1:1 sem cortar */
.single-product-custom .product-images__main {
    aspect-ratio: 1 / 1;
    width: 100%;
    position: relative;
    overflow: hidden;
}
.single-product-custom .product-images__main img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    object-position: center;
    max-width: none !important;
}

/* Lightbox */
.product-lightbox[aria-hidden="true"] { display: none; }
.product-lightbox[aria-hidden="false"] { display: block; }
.product-lightbox {
    position: fixed;
    inset: 0;
    z-index: 10000;
}
.product-lightbox__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.7);
}
.product-lightbox__inner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(96vw, 900px);
    max-height: 90vh;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}
.product-lightbox__img {
    max-width: 100%;
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}
.product-lightbox__close {
    position: absolute;
    top: -40px;
    right: 0;
    width: 36px;
    height: 36px;
    background: transparent;
    border: 0;
    color: #fff;
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
}
.product-lightbox__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border: 0;
    background: transparent;
    color: #fff;
    cursor: pointer;
    font-size: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.product-lightbox__nav--prev { left: -52px; }
.product-lightbox__nav--next { right: -52px; }

/* Evitar scroll do body quando lightbox aberto */
html.lb-open, html.lb-open body { overflow: hidden; }

/* Toast Add to Cart */
.add-to-cart-toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%) translateY(20px);
    background: rgba(0,0,0,0.9);
    color: #fff;
    border-radius: 24px;
    padding: 14px 24px;
    font-size: 16px;
    line-height: 1.4;
    z-index: 10050;
    opacity: 0;
    transition: opacity .2s ease, transform .2s ease;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.add-to-cart-toast[data-show="1"] {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    text-align: center;
}

.add-to-cart-toast a {
    color: #a0824f !important;
    text-decoration: underline !important;
    margin-left: 5px;
    font-weight: 600;
}

.add-to-cart-toast a:hover {
    color: #8a7344 !important;
}

/* Toast menor no mobile */
@media (max-width: 768px) {
    .add-to-cart-toast {
        padding: 5px 10px;
        font-size: 12px;
    }
}

/* Add to Cart Button with Quantity */
.product-add-to-cart-wrapper {
    margin: 24px 0;
}

.product-add-to-cart-row {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.product-quantity-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.product-quantity-label {
    font-weight: 600;
    color: #333;
    font-size: 16px;
    margin: 0;
}

.product-quantity-input {
    width: 80px;
    padding: 12px;
    border: 2px solid #ddd;
    font-size: 16px;
    text-align: center;
    font-weight: 500;
    background-color: #fff;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.product-quantity-input:focus {
    outline: none;
    border-color: #a0824f;
    background-color: #fafafa;
}

.product-quantity-input:hover {
    border-color: #a0824f;
}

.product-add-to-cart-button {
    background-color: #a0824f;
    color: white;
    padding: 14px 40px;
    border: 2px solid #a0824f;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, border-color 0.3s ease, transform 0.1s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-add-to-cart-button:hover {
    background-color: #8a7344;
    border-color: #8a7344;
    transform: translateY(-1px);
}

.product-add-to-cart-button:active {
    transform: translateY(0);
}

.product-add-to-cart-button:disabled {
    background-color: #ccc;
    border-color: #ccc;
    color: #999;
    cursor: not-allowed;
    opacity: 0.7;
    transform: none;
}

.product-add-to-cart-button:disabled:hover {
    background-color: #ccc;
    border-color: #ccc;
    transform: none;
}

.product-popup[aria-hidden="true"] { 
    display: none; 
}

.product-popup[aria-hidden="false"] { 
    display: block; 
}

.product-popup {
    position: fixed;
    inset: 0;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.product-popup__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.7);
    animation: fadeIn 0.3s ease;
}

.product-popup__content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(90vw, 600px);
    max-height: 90vh;
    background: #fff;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: popupSlideIn 0.3s ease;
    border: 2px solid #eee;
    border-radius: 12px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes popupSlideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.product-popup__close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
    background: transparent;
    border: 0;
    color: #333;
    cursor: pointer;
    font-size: 28px;
    line-height: 1;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.product-popup__close:hover {
    color: #a0824f;
}

.product-popup__body {
    padding: 40px;
    overflow-y: auto;
    max-height: calc(90vh - 80px);
}

.product-popup__body h2 {
    margin: 0 0 20px 0;
    font-size: 24px;
    font-weight: 600;
    color: #333;
    line-height: 1.3;
}

.product-popup__body p {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.6;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


/* Evitar scroll do body quando popup aberto */
html.popup-open, html.popup-open body { overflow: hidden; }

/* setas removidas */

.single-product-custom .product-thumbnails__item.is-active img {
    outline: 2px solid #000;
    outline-offset: -2px;
}

.single-product-custom .product-thumbnails-viewport { cursor: grab; }
.single-product-custom .product-thumbnails-viewport.is-dragging { cursor: grabbing; }

/* TÃ­tulo do produto */
.single-product-custom .product_title {
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 20px 0;
    color: #333;
    line-height: 1.3;
}

/* PreÃ§o */
.single-product-custom .price {
    font-size: 20px;
    font-weight: 600;
    color: #a0824f;
    margin: 20px 0;
    gap: 15px;
}

/* PreÃ§o cortado (riscado) */
.single-product-custom .price del {
    font-size: 16px !important;
    font-weight: 500 !important;
    color: #000 !important;
    text-decoration: line-through;
    opacity: 0.6;
}

/* PreÃ§o atual */
.single-product-custom .price ins {
    font-size: 20px !important;
    font-weight: 600 !important;
    color: #a0824f !important;
    text-decoration: none !important;
    margin-left: auto;
    order: 2;
}

/* Rating */
.single-product-custom .woocommerce-product-rating {
    margin: 18px 0;
}

/* DescriÃ§Ã£o curta */
.single-product-custom .woocommerce-product-details__short-description {
    margin: 20px 0 !important;
    color: #666;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.6;
    display: block;
}

/* Metadados do produto (SKU e Categorias) */
.single-product-custom .product-meta-custom {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.single-product-custom .product-meta-item {
    margin: 10px 0;
    color: #666;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
}

.single-product-custom .product-meta-item strong {
    color: #333;
    font-weight: 600;
    font-size: 14px;
}

.single-product-custom .product-meta-item a {
    color: #a0824f;
    text-decoration: none;
}

.single-product-custom .product-meta-item a:hover {
    text-decoration: none;
}

/* Carrinho */
.single-product-custom .cart {
    margin: 26px 0;
}

/* Container para quantidade e botÃƒÆ’Ã‚Â£o lado a lado */
.single-product-custom .cart-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

/* Quantidade */
.single-product-custom .quantity {
    display: flex;
    align-items: center;
    gap: 10px;
}

.single-product-custom .quantity label {
    font-weight: 500;
    font-size: 16px;
    color: #333;
}

.single-product-custom .quantity input {
    width: 60px;
    padding: 8px;
    border: 2px solid #ddd;
}

/* BotÃ£o adicionar ao carrinho */
.single-product-custom .single_add_to_cart_button {
    background-color: #a0824f;
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 0;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.single-product-custom .single_add_to_cart_button:hover {
    background-color: #8a7344;
}

/* ConteÃºdo da descriÃ§Ã£o */
.single-product-custom .product-description-content {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.single-product-custom .product-description-content h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
    line-height: 1.3;
}

.single-product-custom .product-description-content p {
    font-size: 16px;
    font-weight: 500;
    line-height: 1.6;
    color: #666;
}

/* Produtos relacionados */
.single-product-custom .related {
    margin-top: 40px;
    padding-top: 100px;
    border-top: 2px solid #eee;
}

.single-product-custom .related h2 {
    margin-bottom: 20px;
    font-size: 24px;
    font-weight: 600;
    color: #333;
    line-height: 1.3;
}

.single-product-custom .related ul.products {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    list-style: none;
    padding: 0;
}

/* Em telas menores, mostrar 2 colunas */
@media (max-width: 768px) {
    .single-product-custom .related ul.products {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}

/* Em telas muito pequenas, manter 2 colunas */
@media (max-width: 480px) {
    .single-product-custom .related ul.products {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}

.single-product-custom .related ul.products li.product {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    text-align: center;
    overflow: hidden;
    aspect-ratio: 4 / 5;
}

.single-product-custom .related ul.products li.product a {
    display: block;
    width: 100%;
    height: 100%;
}

.single-product-custom .related ul.products li.product img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.single-product-custom .related ul.products li.product h3 {
    display: none;
}

.single-product-custom .related ul.products li.product .price {
    display: none;
}

/* Garantir fundo branco em todos os elementos */
.single-product-custom .product,
.single-product-custom .product-images,
.single-product-custom .product-summary,
.single-product-custom .woocommerce-tabs,
.single-product-custom .related {
    background-color: #fff !important;
}



/* Garantir que a nova secÃƒÂ§ÃƒÂ£o especÃƒÂ­fica tambÃƒÂ©m tenha fundo branco */
.vc_row.liquid-row-shadowbox-690356e019317,
.vc_row.liquid-row-shadowbox-690356e019317 .ld-container,
.vc_row.liquid-row-shadowbox-690356e019317 .container,
.vc_row.liquid-row-shadowbox-690356e019317 .row {
    background-color: #fff !important;
}

/* Responsive */
@media (max-width: 1300px) {
    /* Lightbox mobile: sem setas nem botÃ£o fechar; sair ao tocar fora */
    .product-lightbox__close,
    .product-lightbox__nav {
        display: none !important;
    }
    .product-lightbox__inner {
        padding: 0;
    }
    .single-product-custom .product {
        flex-direction: column;
    }
    .single-product-custom .product-images--with-thumbs {
        flex-direction: column-reverse;
        margin: 0;
    }
    .single-product-custom .product-images__thumbs {
        width: 100%;
        flex: 0 0 auto;
    }
    .single-product-custom .product-thumbnails {
        flex-direction: row;
        gap: 10px;
        margin-top: 8px;
        flex-wrap: nowrap; /* nÃ£o quebrar linha */
    }
    /* Viewport horizontal com arrasto e inÃ©rcia */
    .single-product-custom .product-thumbnails-viewport {
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x proximity;
        padding-bottom: 6px; /* evitar esconder sombras por baixo */
    }
    .single-product-custom .product-thumbnails__item {
        flex: 0 0 84px; /* min width para thumbs em mobile */
        min-width: 84px;
        scroll-snap-align: start;
    }
    
    .single-product-custom .cart-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .single-product-custom .quantity {
        width: 100%;
    }
    
    .single-product-custom .single_add_to_cart_button {
        width: 100%;
    }
    
    /* Popup mobile */
    .product-popup__content {
        width: 95vw;
        max-height: 85vh;
    }
    
    .product-popup__body {
        padding: 30px 20px;
    }
    
    .product-popup__body h2 {
        font-size: 20px;
        font-weight: 600;
    }
    
    .product-add-to-cart-row {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .product-quantity-wrapper {
        width: 100%;
        justify-content: space-between;
    }
    
    .product-add-to-cart-button {
        width: 100%;
    }
}


/* ForÃ§ar imagens da galeria Woo a ocupar totalmente o principal */
.single-product .woocommerce-product-gallery {
    aspect-ratio: 4 / 5;
}

.single-product .woocommerce-product-gallery,
.single-product .woocommerce-product-gallery__wrapper,
.single-product .woocommerce-product-gallery__image,
.single-product .woocommerce-product-gallery__image a {
    height: 100%;
}

.single-product .woocommerce-product-gallery__image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    object-position: center;
    display: block;
}

