/* Prima Arte - Estilos da Página Individual do Produto */

/* ================================
   LAYOUT PRINCIPAL
   ================================ */
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
    max-width: 1200px;
    margin: 0 auto;
}

/* ================================
   GALERIA DE IMAGENS
   ================================ */
.product-gallery {
    position: sticky;
    top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.main-image-container {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.main-image {
    width: 100%;
    height: 500px;
    object-fit: cover;
    cursor: zoom-in;
    transition: transform 0.3s ease;
    display: block;
}

.main-image-container a {
    display: block; /* Garante que o link ocupe todo o espaço */
}

.main-image-container:hover .main-image {
    transform: scale(1.02);
}

.zoom-indicator {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 5px;
    backdrop-filter: blur(10px);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none; /* Impede que o indicador intercepte o clique */
}

.main-image-container:hover .zoom-indicator {
    opacity: 1;
}

.image-thumbnails {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 0.5rem;
}

.thumbnail {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 10px;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.3s ease;
}

.thumbnail:hover,
.thumbnail.active {
    border-color: var(--primary-gold);
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(218, 165, 32, 0.3);
}

/* ================================
   INFORMAÇÕES DO PRODUTO
   ================================ */
.product-info {
    padding: 1rem 0;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.product-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: var(--dark-brown);
    margin: 0;
    line-height: 1.2;
}

.product-price-container {
    margin: 0;
}

.promotion-badge {
    background: #FF5252;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.price-display {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.regular-price {
    font-size: 1.1rem;
    color: #999;
    text-decoration: line-through;
}

.promotional-price {
    font-size: 2.2rem;
    font-weight: 700;
    color: #d44b4b;
}

.savings-amount {
    font-size: 0.9rem;
    color: #4CAF50;
    font-weight: 600;
}

.regular-price-only {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--primary-pink);
}

.product-category {
    background: linear-gradient(135deg, var(--primary-gold), var(--primary-pink));
    color: white;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    width: fit-content;
}

.product-description {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 15px;
    border-left: 4px solid var(--primary-gold);
    margin: 0;
}

.product-description h3 {
    color: var(--dark-brown);
    font-size: 1.1rem;
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.product-description p {
    line-height: 1.6;
    color: #555;
    margin: 0;
}

/* ================================
   FORMULÁRIO DE COMPRA
   ================================ */
.purchase-form {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.1);
    margin: 0;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--dark-brown);
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 0;
    width: fit-content;
    border: 2px solid var(--primary-gold);
    border-radius: 10px;
    overflow: hidden;
}

.qty-btn {
    background: var(--primary-gold);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.qty-btn:hover {
    background: var(--primary-pink);
}

#quantity {
    width: 60px;
    height: 40px;
    text-align: center;
    border: none;
    background: white;
    font-weight: 600;
    font-size: 1.1rem;
    -moz-appearance: textfield;
}

#quantity::-webkit-outer-spin-button,
#quantity::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

#description {
    width: 100%;
    min-height: 100px;
    padding: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.3s ease;
}

#description:focus {
    border-color: var(--primary-gold);
    outline: none;
}

.purchase-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 0;
}

.btn-add-cart, .btn-whatsapp {
    padding: 1rem 2rem;
    border-radius: 15px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    text-decoration: none;
    border: none;
    min-height: 60px;
    margin: 0;
}

.btn-add-cart {
    background: linear-gradient(135deg, var(--primary-gold), var(--primary-pink));
    color: white;
}

.btn-add-cart:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.btn-whatsapp {
    background: #25D366;
    color: white;
}

.btn-whatsapp:hover {
    background: #1fd655;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(37, 211, 102, 0.3);
}

.product-guarantees {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin: 0;
}

.guarantee-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem;
    background: #f8f9fa;
    border-radius: 10px;
    font-size: 0.9rem;
    color: var(--dark-brown);
}

.guarantee-item i {
    color: var(--primary-gold);
    font-size: 1.2rem;
}

.no-image-product {
    background: linear-gradient(135deg, var(--primary-gold), var(--primary-pink));
    color: white;
    height: 500px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    font-size: 3rem;
}

.no-image-product p {
    font-size: 1.2rem;
    margin-top: 1rem;
}

/* ================================
   RESPONSIVO PRODUTO INDIVIDUAL
   ================================ */
@media (max-width: 768px) {
    .product-detail {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .product-gallery {
        position: static;
    }
    
    .main-image {
        height: 300px;
    }
    
    .product-title {
        font-size: 2rem;
    }
    
    .promotional-price, .regular-price-only {
        font-size: 1.8rem;
    }
    
    .purchase-actions {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .product-guarantees {
        grid-template-columns: 1fr;
    }
    
    .purchase-form {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .product-title {
        font-size: 1.8rem;
    }
    
    .promotional-price, .regular-price-only {
        font-size: 1.6rem;
    }
    
    .purchase-form {
        padding: 1rem;
    }
    
    .btn-add-cart, .btn-whatsapp {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }
}