/* ============================================
   PÁGINA DE PRODUTO - LAYOUT PRINCIPAL
   ============================================ */

.catalog-product-view .breadcrumbs {
    margin-top: 2rem;
}

.product-info-main-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

/* ============================================
   COLUNA ESQUERDA - GALERIA COM SWIPER
   ============================================ */

.product-media-column {
    position: sticky;
    top: 100px;
}

.product-gallery-custom {
    display: flex;
    gap: 20px;
}

/* ==========================================
   THUMBNAILS VERTICAIS COM SWIPER
   ========================================== */

.gallery-thumbs-wrapper {
    width: 100px;
    flex-shrink: 0;
    position: relative;
    max-height:600px;
}

.gallery-thumbs-swiper {
    width: 100%;
    height: 607px; /* Altura fixa para mostrar 4-5 thumbs */
    overflow: hidden;
}

.gallery-thumbs-swiper .swiper-wrapper {
    /* Swiper controla automaticamente */
}

.gallery-thumbs-swiper .swiper-slide {
    width: 100%;
    height: auto;
}

.gallery-thumb {
    width: 94%;
    aspect-ratio: 1; /* Mantém quadrado */
    border: 2px solid #E0E0E0;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #F9F9F9;
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
}

.gallery-thumb:hover {
    border-color: #FF8C00;
}

.gallery-thumb.active {
    border-color: #FF8C00;
    border-width: 3px;
    background: #FFF5EB;
    box-shadow: 0 0 0 2px rgba(255, 140, 0, 0.2);
}

/* Setas das thumbnails (aparecem se tiver mais de 4 imagens) */
.thumb-arrow {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #E0E0E0;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    padding: 0;
}

.thumb-arrow:hover {
    background: #FF8C00;
    border-color: #FF8C00;
    color: #FFFFFF;
    transform: translateX(-50%) scale(1.1);
}

.thumb-arrow svg {
    width: 16px;
    height: 16px;
}

.thumb-arrow.thumb-arrow-up svg {
    transform: rotate(90deg);
}
.thumb-arrow.thumb-arrow-down svg {
    transform: rotate(90deg);
}
.thumb-arrow-up {
    top: -16px;
}

.thumb-arrow-down {
    bottom: -16px;
}

/* ==========================================
   GALERIA PRINCIPAL
   ========================================== */

.gallery-main-wrapper {
    flex: 1;
    max-width: 600px;
    position: relative;
    display: flex;
    flex-direction: column;
}

.gallery-main-swiper {
    width: 100%;
    border: 1px solid #E0E0E0;
    border-radius: 12px;
    overflow: hidden;
    background: #FFFFFF;
}

.gallery-main-image {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.gallery-main-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* ==========================================
   ARROWS DA GALERIA PRINCIPAL
   ========================================== */

.gallery-arrows {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 16px;
    pointer-events: none;
    z-index: 10;
}

.gallery-arrow {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #E0E0E0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    pointer-events: auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    color: #666666;
    padding:0
}

.gallery-arrow:hover {
    background: #FF8C00;
    border-color: #FF8C00;
    color: #FFFFFF;
    transform: scale(1.1);
}

.gallery-arrow svg {
    width: 24px;
    height: 24px;
}

/* ==========================================
   NAVEGAÇÃO (PAGINAÇÃO)
   ========================================== */

.gallery-navigation {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 16px;
}

.gallery-pagination {
    display: flex;
    gap: 8px;
}

.gallery-pagination .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: #D0D0D0;
    opacity: 1;
    transition: all 0.3s ease;
}

.gallery-pagination .swiper-pagination-bullet-active {
    background: #FF8C00;
    width: 24px;
    border-radius: 5px;
}

/* ============================================
   COLUNA DIREITA - INFORMAÇÕES
   ============================================ */

.product-info-column {
    display: flex;
    flex-direction: column;
    gap: 11px;
}

/* ============================================
   1. CABEÇALHO (Título + SKU + Avaliação)
   ============================================ */

.product-info-header {
    padding-bottom: 20px;
    border-bottom: 1px solid #E0E0E0;
}

.product-name {
    font-size: 24px;
    font-weight: 600;
    color: #333333;
    line-height: 1.3;
    margin: 0 0 12px 0;
}

.product-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: #666666;
}

.product-sku {
    display: flex;
    gap: 6px;
}

.sku-label {
    font-weight: 500;
}

.sku-value {
    color: #333333;
}

.meta-separator {
    color: #D0D0D0;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 6px;
}

.product-rating .rating-result {
    display: flex;
    gap: 4px;
}

.product-rating .rating-result .rating-star {
    color: #FFB800;
    font-size: 16px;
}

/* ============================================
   2. PREÇOS
   ========================================= */

.product-info-price {
    border-bottom: 1px solid #E0E0E0;
    padding-bottom: 20px;
}

.price-old {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #999999;
    margin-bottom: 8px;
}

.price-old .price-value {
    text-decoration: line-through;
    font-size: 16px;
}

.price-discount-badge {
    display: inline-block;
    padding: 4px 12px;
    background: #FF8C00;
    color: #FFFFFF;
    font-size: 12px;
    font-weight: 700;
    border-radius: 20px;
    margin-left: 8px;
}

.product-info-price .price-pix-main {
    display: flex;
    align-items: baseline;
    grid-gap: .8rem;
}

.price-final {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.product-info-price .payment-method-label {
    font-weight: 600;
    color: black;
    font-size: 17px;
}

.price-final .price-label {
    font-size: 14px;
    color: #666666;
}

.price-final .price-value {
    font-size: 26px;
    font-weight: 700;
    color: #333333;
}

.price-installments {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 14px;
    color: #666666;
}

.price-installments strong {
    color: #333333;
    font-weight: 600;
}

/* ============================================
   3. VARIAÇÕES (Voltagem)
   ============================================ */

.product-options-wrapper {
    padding: 9px 0px 10px 0px;
    border-bottom: 1px solid #E0E0E0;
}

.swatch-attribute {
    margin-bottom: 0;
}

.swatch-attribute-label {
    font-size: 14px;
    font-weight: 600;
    color: #333333;
    margin-bottom: 12px;
    display: block;
}

.swatch-attribute-options {
    display: flex;
    gap: 12px;
}

.swatch-option {
    min-width: 60px;
    height: 40px;
    padding: 0 16px;
    border: 2px solid #E0E0E0;
    border-radius: 6px;
    background: #FFFFFF;
    color: #333333;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.swatch-option:hover {
    border-color: #FF8C00;
}

.swatch-option.selected {
    border-color: #FF8C00;
    background: #FF8C00;
    color: #FFFFFF;
}

/* ============================================
   4. QUANTIDADE + COMPRAR
   ============================================ */

.product-add-form {
    border-bottom: 1px solid #E0E0E0;
    padding-bottom: 13px 0px 20px 0px;
}

.qty-label {
    font-size: 14px;
    font-weight: 600;
    color: #333333;
    display: block;
    margin-bottom: 12px;
}

.product-add-actions {
    display: flex;
    gap: 12px;
    align-items: stretch;
}

/* Quantity Box */
.product-add-actions .field.qty {
    display: flex;
    align-items: center;
    border: 1px solid #E0E0E0;
    border-radius: 6px;
    background: #FFFFFF;
    height: 50px;
}

.product-add-actions .qty-btn {
    width: 40px;
    height: 100%;
    border: none;
    background: none;
    color: #666666;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
}

.qty-btn:hover {
    color: #FF8C00;
}

.product-add-actions .input-text.qty{
    width: 60px;
    height: 100%;
    border: none;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: #333333;
    -moz-appearance: textfield;
    border-left: 1px solid #ccc;
    border-right: 1px solid #ccc;
}

.product-add-actions .input-text.qty::-webkit-outer-spin-button,
.product-add-actions .input-text.qty::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.product-add-actions .input-text.qty:focus {
    outline: none;
}

#product-addtocart-button {
    background: #FF7E00;
    border: none;
    border-radius: 6px;
}

/* Botão Comprar */
.btn-buy {
    flex: 1;
    height: 50px;
    padding: 0 40px;
    background: #FF8C00;
    color: #FFFFFF;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-buy:hover {
    background: #E67E00;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 140, 0, 0.3);
}

/* ============================================
   5. CÁLCULO DE FRETE
   ============================================ */

.product-shipping-calculator label.shipping-label {
    font-weight: 600;
}

.shipping-input-wrapper {
    margin-top: .5rem;
    display: flex;
    align-items: center;
    grid-gap: .8rem;
}

.shipping-input-wrapper input {
    width: 44%;
    border-radius: 8px;
    border: 2px solid #E3E4E6;
    height: 41px;
}

button#calculate-shipping-btn {
    background: transparent;
    border: 2px solid #4A5C7A;
    padding: 1rem 1.8rem;
    font-weight: 500;
    border-radius: 8px;
    color: #4A5C7A;
    transition: .4s ease;
}

#calculate-shipping-btn:hover {
    background: #4A5C7A;
    color: white;
}

.shipping-help {
    color: #FF7E00;
    font-weight: 500;
    margin: .9rem 0;
    display: inline-block;
}

div#shipping-result {
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 2rem 1rem;
}

#shipping-result .shipping-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#shipping-result .shipping-info .shipping-time {
    font-weight: 600;
}

.intelipost-original-response {
    padding: 16px;
    background: #F9F9F9;
    border-radius: 8px;
}

/* Tabela do Intelipost */
.intelipost-original-response table {
    width: 100%;
    border-collapse: collapse;
}

.intelipost-original-response table td,
.intelipost-original-response table th {
    padding: 12px 8px;
    text-align: left;
    border-bottom: 1px solid #E0E0E0;
}

.intelipost-original-response table th {
    font-weight: 600;
    color: #333333;
}

.intelipost-original-response table td {
    color: #666666;
}

.intelipost-original-response .price,
.intelipost-original-response td:last-child {
    font-weight: 700;
    color: #00A859;
    font-size: 16px;
}

.intelipost-original-response .method-name,
.intelipost-original-response td:first-child {
    font-weight: 600;
    color: #333333;
}

.intelipost-original-response .delivery-time,
.intelipost-original-response td:nth-child(2) {
    font-size: 13px;
    color: #666666;
}

.intelipost-original-response * {
    box-sizing: border-box;
}

.intelipost-original-response p {
    margin: 0 0 8px 0;
}

.intelipost-original-response ul,
.intelipost-original-response ol {
    margin: 0;
    padding-left: 20px;
}

/* ============================================
   OUTROS
   ============================================ */

.page-layout-2columns-left.catalog-product-view .column.main {
    width: 100%;
    padding:0;
}

.product.data.items > .item.title > .switch {
    color: black;
}

.product.info.detailed {
    margin-top: 4rem;
}

.catalog-product-view .product-info-main {
    display: none;
}

/* ============================================
   RESPONSIVIDADE - DESKTOP
   ============================================ */

@media(min-width:1025px) {
    .product.data.items .item.title:first-child>a {
        border-radius: 20px 0px 0px 0;
    }
    .product.data.items .item.title:nth-child(6)>a {
        border-radius: 0 20px 0 0;
    }
    .product.data.items > .item.content {
        border-radius: 0px 20px 20px 20px;
    }
}

/* ============================================
   RESPONSIVIDADE - TABLET
   ============================================ */

@media (max-width: 1024px) {
    .product-info-main-wrapper {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .product-media-column {
        position: initial;
        width: 100%;
    }
    
    /* Thumbs menores */
    .gallery-thumbs-wrapper {
        width: 80px;
    }
    
    .gallery-thumbs-swiper {
        height: 400px;
    }
    
    .gallery-arrow {
        width: 40px;
        height: 40px;
    }
}

/* ============================================
   RESPONSIVIDADE - MOBILE
   ============================================ */

@media (max-width: 768px) {
    /* Gallery vira coluna reversa */
    .product-gallery-custom {
        flex-direction: column-reverse;
        gap: 16px;
    }
    
    /* Thumbs ficam embaixo - horizontal */
    .gallery-thumbs-wrapper {
        width: 100%;
        height: auto;
        max-width: 94vw;
    }
    
    .gallery-thumbs-swiper {
        width: 100%;
        height: 80px; /* Altura fixa para horizontal */
    }
    
    .gallery-thumb {
        width: 80px;
        height: 80px;
    }
    
    /* Esconder setas das thumbs no mobile */
    .thumb-arrow {
        display: none;
    }
    
    /* Gallery principal */
    .gallery-main-wrapper {
        width: 92vw;
        max-width: 100%;
    }
    
    /* Arrows menores */
    .gallery-arrow {
        width: 36px;
        height: 36px;
    }
    
    .gallery-arrow svg {
        width: 20px;
        height: 20px;
    }
    
    .gallery-arrows {
        padding: 0 12px;
    }
    
    /* Produto */
    .product-name {
        font-size: 20px;
    }
    
    .price-final .price-value {
        font-size: 28px;
    }
    
    .field.qty {
        justify-content: center;
        width: 28%;
    }
    
    .qty-btn {
        width: 38px;
    }
    
    .input-text.qty {
        width: 38px;
    }
    
    .catalog-product-view .breadcrumbs{
        display: block;
    }
    
    .product-info-price > *:first-child {
        margin-bottom:0;
    }
    
    .product-info-price > *:last-child {
        padding: 0 12px;
    }
    
    #product-addtocart-button {
        width: 46%;
    }
    
    .shipping-input-wrapper input {
        width: 58%;
    }
    
    #calculate-shipping-btn {
        width: 40%;
    }
    .gallery-navigation {
        display: none;
    }
    .product-add-actions .input-text.qty {
        width:32px;
    }
    button#calculate-shipping-btn {
        padding:1rem 0
    }
}

/* ============================================
   RESPONSIVIDADE - MOBILE PEQUENO
   ============================================ */

@media (max-width: 480px) {
    .page-product .page-main {
        padding: 20px 16px;
    }
    
    .product-info-column {
        gap: 20px;
    }
    
    .product-name {
        font-size: 18px;
    }
    
    .price-final .price-value {
        font-size: 24px;
    }
    
    .shipping-btn {
        width: 100%;
    }
    
    /* Thumbs ainda menores */
    .gallery-thumb {
        width: 70px;
        height: 70px;
    }
    
    .gallery-thumbs-swiper {
        height: 80px;
    }
    
    .gallery-arrow {
        width: 32px;
        height: 32px;
    }
    
    .gallery-main-swiper {
        border-radius: 8px;
    }
}