/* ========================================
   PERFILMIL - LAYOUT ORGANIZADO EM 3 LINHAS
   Estrutura flexível com containers separados
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* Container principal do produto */
.perfilmil-single-product {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.5;
    color: #1a1a1a;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 100%;
    margin: 0 auto;
    padding: 1rem;
}

/* ========================================
   LINHA 1: CARD PRINCIPAL DO PRODUTO
   ======================================== */

.perfilmil-main-section {
    width: 100%;
    display: flex;
    justify-content: center;
}

.perfilmil-card-wrapper {
    max-width: 1200px;
    width: 100%;
}

.perfilmil-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    border: 1px solid #f0f0f0;
}

/* Breadcrumb */
.perfilmil-breadcrumb-modern {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #f0f0f0;
    background: #fafafa;
}

.perfilmil-breadcrumb-modern .woocommerce-breadcrumb {
    font-size: 0.875rem;
    color: #666;
    margin: 0;
}

.perfilmil-breadcrumb-modern .woocommerce-breadcrumb a {
    color: #666;
    text-decoration: none;
    transition: color 0.2s ease;
}

.perfilmil-breadcrumb-modern .woocommerce-breadcrumb a:hover {
    color: var(--logo-red, #dc2626);
}

/* Layout principal do produto */
.perfilmil-product-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    min-height: 600px;
}

/* Galeria de imagens (lado esquerdo) */
.perfilmil-product-imgs {
    background: #fafafa;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2rem;
}

.perfilmil-img-display {
    overflow: hidden;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.perfilmil-img-showcase {
    display: flex;
    width: 100%;
    transition: all 0.5s ease;
}

.perfilmil-img-showcase .woocommerce-product-gallery {
    width: 100%;
    margin: 0;
}

.perfilmil-img-showcase .woocommerce-product-gallery__wrapper {
    width: 100%;
}

.perfilmil-img-showcase .woocommerce-product-gallery__image {
    width: 100%;
    min-height: 400px;
    overflow: hidden;
    border-radius: 12px;
}

.perfilmil-img-showcase .woocommerce-product-gallery__image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.perfilmil-img-showcase .woocommerce-product-gallery__image:hover img {
    transform: scale(1.05);
}

/* Trigger do lightbox */
.perfilmil-img-showcase .woocommerce-product-gallery__trigger {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
}

.perfilmil-img-showcase .woocommerce-product-gallery__trigger:hover {
    background: #fff;
    transform: scale(1.1);
}

/* Thumbnails */
.perfilmil-img-showcase .flex-control-nav {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
    padding: 0;
}

.perfilmil-img-showcase .flex-control-nav li {
    margin: 0;
    list-style: none;
}

.perfilmil-img-showcase .flex-control-nav li img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.perfilmil-img-showcase .flex-control-nav li img:hover,
.perfilmil-img-showcase .flex-control-nav li img.flex-active {
    opacity: 1;
    border-color: var(--logo-red, #dc2626);
}

/* Conteúdo do produto (lado direito) */
.perfilmil-product-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Título do produto */
.perfilmil-product-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
    line-height: 1.2;
    position: relative;
}

.perfilmil-product-title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -8px;
    height: 3px;
    width: 60px;
    background: var(--logo-red, #dc2626);
    border-radius: 2px;
}

/* Link da categoria */
.perfilmil-product-link {
    display: inline-block;
    text-decoration: none;
    text-transform: uppercase;
    font-weight: 600;
    font-size: 0.875rem;
    background: var(--logo-red, #dc2626);
    color: #fff !important;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    transition: all 0.3s ease;
    width: fit-content;
}

.perfilmil-product-link:hover {
    background: #b91c1c;
    transform: translateY(-1px);
}

/* Rating */
.perfilmil-product-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #fbbf24;
}

.perfilmil-product-rating .star-rating {
    color: #fbbf24;
}

.perfilmil-rating-count {
    font-weight: 600;
    color: #666 !important;
    font-size: 0.9rem;
}

/* Preços */
.perfilmil-product-price {
    margin: 1rem 0;
}

.perfilmil-product-price .price {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 800;
    margin: 0;
}

.perfilmil-product-price .price .woocommerce-Price-amount {
    color: var(--logo-red, #dc2626);
}

.perfilmil-product-price .price del {
    font-size: 0.7em;
    color: #999;
    font-weight: 500;
}

/* Detalhes do produto */
.perfilmil-product-detail h2 {
    font-size: 1.25rem;
    color: #1a1a1a;
    margin: 0 0 0.75rem 0;
    font-weight: 600;
}

.perfilmil-short-description {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #555;
    margin-bottom: 1rem;
}

.perfilmil-short-description p {
    margin-bottom: 0.5rem;
}

/* Lista de meta informações */
.perfilmil-product-meta-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
    font-size: 0.9rem;
}

.perfilmil-product-meta-list li {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="%23dc2626"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z" clip-rule="evenodd"/></svg>') left center no-repeat;
    background-size: 16px;
    font-weight: 500;
    color: #333;
}

.perfilmil-product-meta-list li span {
    font-weight: 400;
    color: #666;
}

/* Formulário de compra */
.perfilmil-purchase-info {
    margin: 1.5rem 0;
}

.perfilmil-purchase-info .cart {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.perfilmil-purchase-info .quantity {
    display: flex;
    align-items: center;
    border: 2px solid #e5e5e5;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    width: fit-content;
}

.perfilmil-purchase-info .quantity input.qty {
    width: 80px;
    padding: 12px 16px;
    border: none;
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
    color: #1a1a1a;
    background: transparent;
}

.perfilmil-purchase-info .quantity input.qty:focus {
    outline: none;
}

.perfilmil-purchase-info .single_add_to_cart_button {
    background: linear-gradient(135deg, var(--logo-red, #dc2626) 0%, #b91c1c 100%);
    border: none;
    border-radius: 12px;
    color: #fff !important;
    padding: 16px 32px;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
    width: 100%;
}

.perfilmil-purchase-info .single_add_to_cart_button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 38, 38, 0.4);
}

.perfilmil-purchase-info .single_add_to_cart_button:active {
    transform: translateY(0);
}

/* Compartilhamento social */
.perfilmil-social-links {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #f0f0f0;
}

.perfilmil-social-links p {
    margin: 0;
    font-weight: 600;
    color: #666;
    font-size: 0.9rem;
}

.perfilmil-social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    color: #666;
    border: 1px solid #e5e5e5;
    border-radius: 50%;
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.perfilmil-social-links a:hover {
    background: var(--logo-red, #dc2626);
    border-color: var(--logo-red, #dc2626);
    color: #fff;
    transform: translateY(-2px);
}

/* ========================================
   LINHA 2: SEÇÃO DE DIFERENCIAIS
   ======================================== */

.perfilmil-benefits-section {
    width: 100%;
    display: flex;
    justify-content: center;
}

.perfilmil-value-props {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    padding: 2rem;
    max-width: 1200px;
    width: 100%;
}

.perfilmil-value-props-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.perfilmil-value-prop {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    text-align: left;
}

.perfilmil-value-prop-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--logo-red, #dc2626), #b91c1c);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.25rem;
}

.perfilmil-value-prop-content h3 {
    font-size: 1.1rem;
    margin: 0 0 0.5rem 0;
    color: #1a1a1a;
    font-weight: 600;
}

.perfilmil-value-prop-content p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #666;
}

/* ========================================
   LINHA 3: SEÇÃO DE DETALHES
   ======================================== */

.perfilmil-details-section {
    width: 100%;
    display: flex;
    justify-content: center;
}

.perfilmil-product-details {
    max-width: 1200px;
    width: 100%;
}

.perfilmil-product-details .woocommerce-tabs {
    background: #fff;
    border-radius: 16px;
    border: 1px solid #f0f0f0;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.perfilmil-product-details .wc-tabs {
    display: flex;
    background: #fafafa;
    border-bottom: 1px solid #f0f0f0;
    margin: 0;
    padding: 0;
}

.perfilmil-product-details .wc-tabs li {
    margin: 0;
    list-style: none;
}

.perfilmil-product-details .wc-tabs a {
    display: block;
    padding: 1rem 1.5rem;
    font-weight: 600;
    color: #666;
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
}

.perfilmil-product-details .wc-tabs li.active a {
    color: var(--logo-red, #dc2626);
    background: #fff;
}

.perfilmil-product-details .wc-tabs li.active a::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    background: var(--logo-red, #dc2626);
}

.perfilmil-product-details .woocommerce-Tabs-panel {
    padding: 2rem;
    line-height: 1.7;
    color: #555;
}

/* Produtos relacionados */
.perfilmil-product-details .related {
    margin-top: 3rem;
    padding: 2rem;
    background: #fff;
    border-radius: 16px;
    border: 1px solid #f0f0f0;
}

.perfilmil-product-details .related h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: #1a1a1a;
    font-weight: 700;
}

.perfilmil-product-details .related .products {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

/* ========================================
   RESPONSIVIDADE
   ======================================== */

@media screen and (max-width: 992px) {
    .perfilmil-single-product {
        padding: 0.5rem;
        gap: 1.5rem;
    }
    
    .perfilmil-product-main {
        grid-template-columns: 1fr;
    }
    
    .perfilmil-product-imgs {
        order: 1;
        padding: 1.5rem;
    }
    
    .perfilmil-product-content {
        order: 2;
        padding: 1.5rem;
    }
    
    .perfilmil-value-props-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .perfilmil-value-props {
        padding: 1.5rem;
    }
}

@media screen and (max-width: 768px) {
    .perfilmil-single-product {
        padding: 0.25rem;
        gap: 1rem;
    }
    
    .perfilmil-product-imgs,
    .perfilmil-product-content {
        padding: 1rem;
    }
    
    .perfilmil-img-showcase .woocommerce-product-gallery__image {
        min-height: 300px;
    }
    
    .perfilmil-img-showcase .woocommerce-product-gallery__image img {
        height: 300px;
    }
    
    .perfilmil-value-props {
        padding: 1rem;
    }
    
    .perfilmil-value-props-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .perfilmil-product-details .wc-tabs {
        flex-direction: column;
    }
}

@media screen and (max-width: 480px) {
    .perfilmil-breadcrumb-modern {
        padding: 0.75rem 1rem;
    }
    
    .perfilmil-product-title {
        font-size: 1.5rem;
    }
    
    .perfilmil-purchase-info .quantity,
    .perfilmil-purchase-info .single_add_to_cart_button {
        width: 100%;
    }
    
    .perfilmil-social-links {
        flex-wrap: wrap;
    }
}

/* ========================================
   OCULTAR ELEMENTOS DESNECESSÁRIOS
   ======================================== */

/* Ocultar notices wrapper que estava causando problemas de layout */
.single-product .woocommerce-notices-wrapper,
.perfilmil-single-product .woocommerce-notices-wrapper {
    display: none !important;
}

/* Ocultar sidebar e widgets */
.perfilmil-single-product .sidebar,
.perfilmil-single-product .widget,
.perfilmil-single-product .widget-area {
    display: none !important;
}

/* Layout de página limpo */
.single-product .content-area {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

.single-product .site-main {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}