/*
 * PÁGINA DE PRODUTO - Estilo Reserva
 * Baseado na página de produto da Reserva
 */

/* ==================== BREADCRUMBS ==================== */

.breadcrumbs {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    padding: 1rem 0;
}

.breadcrumb-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
    gap: 0.5rem;
}

.breadcrumb-item {
    font-size: 0.875rem;
    color: #6c757d;
}

.breadcrumb-item:not(:last-child)::after {
    content: '>';
    margin-left: 0.5rem;
    color: #adb5bd;
}

.breadcrumb-item a {
    color: #6c757d;
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb-item a:hover {
    color: #e4002b;
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: #212529;
    font-weight: 500;
}

/* ==================== PRODUCT MAIN SECTION ==================== */

.product-main {
    padding: 2rem 0;
}

.product-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

/* ==================== PRODUCT IMAGES ==================== */

.product-images {
    position: sticky;
    top: 2rem;
}

.main-image-container {
    position: relative;
    margin-bottom: 1rem;
    border-radius: 8px;
    overflow: hidden;
    background-color: #f8f9fa;
}

.main-product-image {
    width: 100%;
    height: auto;
    max-height: 600px;
    object-fit: cover;
    display: block;
}

.wishlist-btn-product {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 44px;
    height: 44px;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.wishlist-btn-product:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
}

.wishlist-btn-product svg {
    color: #6c757d;
    transition: color 0.2s ease;
}

.wishlist-btn-product.active svg,
.wishlist-btn-product:hover svg {
    color: #e4002b;
    fill: #e4002b;
}

/* Thumbnail Images */
.thumbnail-images {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.thumbnail-btn {
    width: 80px;
    height: 80px;
    border: 2px solid transparent;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.2s ease;
    background: none;
    padding: 0;
}

.thumbnail-btn:hover,
.thumbnail-btn.active {
    border-color: #e4002b;
}

.thumbnail-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ==================== PRODUCT INFO ==================== */

.product-info {
    padding-left: 1rem;
}

.product-header {
    margin-bottom: 1rem;
}

.product-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: #212529;
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
}

.product-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: #6c757d;
}

.product-sku,
.product-brand {
    font-weight: 500;
}

/* Product Rating */
.product-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.stars {
    display: flex;
    gap: 0.125rem;
}

.star {
    font-size: 1rem;
    color: #e9ecef;
}

.star.filled {
    color: #ffc107;
}

.rating-text {
    font-size: 0.875rem;
    color: #6c757d;
}

/* Product Price */
.product-price {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.price-current {
    font-size: 1.5rem;
    font-weight: 700;
    color: #212529;
}

.price-original {
    font-size: 1.125rem;
    color: #6c757d;
    text-decoration: line-through;
}

.price-sale {
    font-size: 1.5rem;
    font-weight: 700;
    color: #e4002b;
}

.discount-percent {
    background-color: #e4002b;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Stock Status */
.stock-status {
    margin-bottom: 1.5rem;
}

.in-stock {
    color: #28a745;
    font-weight: 500;
    font-size: 0.875rem;
}

.out-of-stock {
    color: #dc3545;
    font-weight: 600;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.out-of-stock::before {
    content: '⚠️';
    font-size: 1.25rem;
}

/* ==================== PRODUCT VARIATIONS ==================== */

.product-variations {
    margin-bottom: 2rem;
}

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

.variation-label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #212529;
}

/* Size Options */
.size-options {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.size-btn {
    min-width: 44px;
    height: 44px;
    border: 2px solid #dee2e6;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.75rem;
}

.size-btn:hover:not(.disabled) {
    border-color: #e4002b;
    color: #e4002b;
}

.size-btn.selected {
    border-color: #e4002b;
    background-color: #e4002b;
    color: white;
}

.size-btn.disabled {
    border-color: #e9ecef;
    color: #adb5bd;
    cursor: not-allowed;
    position: relative;
}

.size-btn.disabled::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 10%;
    right: 10%;
    height: 1px;
    background-color: #adb5bd;
    transform: translateY(-50%) rotate(-45deg);
}

/* Color Options */
.color-options {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.color-btn {
    width: 44px;
    height: 44px;
    border: 2px solid #dee2e6;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.color-btn:hover:not(.disabled) {
    border-color: #e4002b;
    transform: scale(1.1);
}

.color-btn.selected {
    border-color: #e4002b;
    box-shadow: 0 0 0 2px white, 0 0 0 4px #e4002b;
}

.color-btn.disabled {
    border-color: #e9ecef;
    cursor: not-allowed;
    opacity: 0.5;
}

.color-btn.disabled::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 10%;
    right: 10%;
    height: 2px;
    background-color: #dc3545;
    transform: translateY(-50%) rotate(-45deg);
}

/* ==================== PRODUCT ACTIONS ==================== */

.product-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

/* Quantity Selector */
.quantity-selector {
    display: flex;
    border: 2px solid #dee2e6;
    border-radius: 4px;
    overflow: hidden;
}

.qty-btn {
    width: 44px;
    height: 44px;
    border: none;
    background: white;
    cursor: pointer;
    font-size: 1.25rem;
    font-weight: 600;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-btn:hover {
    background-color: #f8f9fa;
}

.qty-input {
    width: 60px;
    height: 44px;
    border: none;
    border-left: 1px solid #dee2e6;
    border-right: 1px solid #dee2e6;
    text-align: center;
    font-weight: 500;
    background: white;
}

.qty-input:focus {
    outline: none;
    background-color: #f8f9fa;
}

/* Add to Cart Button */
.add-to-cart-btn {
    flex: 1;
    min-width: 200px;
    height: 50px;
    background-color: #e4002b;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.add-to-cart-btn:hover:not(.disabled) {
    background-color: #c8001f;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(228, 0, 43, 0.3);
}

.add-to-cart-btn.success {
    background-color: #28a745;
}

.add-to-cart-btn.disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}

/* Notify Button */
.notify-btn {
    flex: 1;
    min-width: 200px;
    height: 50px;
    background-color: transparent;
    color: #e4002b;
    border: 2px solid #e4002b;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.notify-btn:hover {
    background-color: #e4002b;
    color: white;
}

/* ==================== SHIPPING CALCULATOR ==================== */

.shipping-calculator {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1.5rem;
    background-color: #f8f9fa;
}

.shipping-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #212529;
}

.shipping-form {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.cep-input {
    flex: 1;
    height: 44px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 0 1rem;
    font-size: 0.875rem;
}

.cep-input:focus {
    outline: none;
    border-color: #e4002b;
}

.cep-btn {
    height: 44px;
    padding: 0 1.5rem;
    background-color: #e4002b;
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.cep-btn:hover {
    background-color: #c8001f;
}

.shipping-results {
    border-top: 1px solid #dee2e6;
    padding-top: 1rem;
}

.shipping-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e9ecef;
}

.shipping-option:last-child {
    border-bottom: none;
}

.shipping-name {
    font-weight: 600;
    color: #212529;
}

.shipping-time {
    color: #6c757d;
    font-size: 0.875rem;
}

.shipping-price {
    font-weight: 600;
    color: #28a745;
}

/* ==================== PRODUCT DETAILS TABS ==================== */

.product-details {
    padding: 3rem 0;
    border-top: 1px solid #e9ecef;
    background-color: #fff;
}

.tabs-container {
    max-width: 800px;
    margin: 0 auto;
}

/* Tab Navigation */
.tabs-nav {
    display: flex;
    border-bottom: 2px solid #e9ecef;
    margin-bottom: 2rem;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.tabs-nav::-webkit-scrollbar {
    display: none;
}

.tab-btn {
    padding: 1rem 1.5rem;
    background: none;
    border: none;
    font-size: 1rem;
    font-weight: 500;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
}

.tab-btn:hover {
    color: #212529;
}

.tab-btn.active {
    color: #e4002b;
    border-bottom-color: #e4002b;
}

/* Tab Content */
.tabs-content {
    min-height: 300px;
}

.tab-pane {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-pane.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Description Tab */
.description-content h4 {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 1.5rem 0 0.75rem 0;
    color: #212529;
}

.description-content p {
    line-height: 1.6;
    color: #495057;
    margin-bottom: 1rem;
}

/* Delivery Tab */
.delivery-info h4 {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 1.5rem 0 0.75rem 0;
    color: #212529;
}

.delivery-info ul {
    list-style: none;
    padding: 0;
    margin-bottom: 1.5rem;
}

.delivery-info li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #f1f3f4;
    color: #495057;
}

.delivery-info li:last-child {
    border-bottom: none;
}

/* Composition Tab */
.composition-info h4 {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 1.5rem 0 0.75rem 0;
    color: #212529;
}

.composition-info p {
    color: #495057;
    margin-bottom: 1rem;
}

/* ==================== REVIEWS SECTION ==================== */

.reviews-section {
    max-width: none;
}

.reviews-summary {
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.rating-overview {
    text-align: center;
}

.score-number {
    font-size: 3rem;
    font-weight: 700;
    color: #212529;
    display: block;
}

.score-stars {
    margin: 0.5rem 0;
}

.score-stars .star {
    font-size: 1.5rem;
    margin: 0 0.125rem;
}

.total-reviews {
    color: #6c757d;
    font-size: 0.875rem;
}

/* Reviews List */
.reviews-list {
    margin-bottom: 2rem;
}

.review-item {
    padding: 1.5rem 0;
    border-bottom: 1px solid #e9ecef;
}

.review-item:last-child {
    border-bottom: none;
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.reviewer-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.reviewer-name {
    font-weight: 600;
    color: #212529;
}

.review-stars .star {
    font-size: 0.875rem;
    margin-right: 0.125rem;
}

.review-date {
    color: #6c757d;
    font-size: 0.875rem;
}

.review-content p {
    color: #495057;
    line-height: 1.5;
    margin: 0;
}

/* No Reviews */
.no-reviews {
    text-align: center;
    padding: 2rem;
    color: #6c757d;
}

.no-reviews p {
    margin: 0.5rem 0;
}

/* Write Review */
.write-review {
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
}

.write-review h4 {
    margin-bottom: 0.5rem;
    color: #212529;
}

.write-review p {
    color: #6c757d;
    margin-bottom: 1rem;
}

.login-btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: #e4002b;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.login-btn:hover {
    background-color: #c8001f;
}

/* ==================== RELATED PRODUCTS ==================== */

.related-products {
    padding: 3rem 0;
    background-color: #f8f9fa;
}

.related-products .section-header {
    text-align: center;
    margin-bottom: 2rem;
}

.related-products .section-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: #212529;
    margin: 0;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.product-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.product-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.product-card .product-image {
    position: relative;
    padding-bottom: 125%; /* 4:5 aspect ratio */
    overflow: hidden;
}

.product-card .product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-card .product-details {
    padding: 1rem;
}

.product-card .product-name {
    font-size: 1rem;
    font-weight: 500;
    color: #212529;
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card .product-price {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.product-card .price-current {
    font-size: 1.125rem;
    font-weight: 600;
    color: #212529;
}

.product-card .price-original {
    font-size: 0.875rem;
    color: #6c757d;
    text-decoration: line-through;
}

.product-card .price-sale {
    font-size: 1.125rem;
    font-weight: 600;
    color: #e4002b;
}

.product-card .wishlist-btn {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
    opacity: 0;
    transform: scale(0.8);
}

.product-card:hover .wishlist-btn {
    opacity: 1;
    transform: scale(1);
}

.product-card .wishlist-btn:hover {
    background: white;
    transform: scale(1.1);
}

.product-card .wishlist-btn svg {
    color: #6c757d;
    transition: color 0.2s ease;
}

.product-card .wishlist-btn.active svg,
.product-card .wishlist-btn:hover svg {
    color: #e4002b;
    fill: #e4002b;
}

/* ==================== RESPONSIVE DESIGN ==================== */

/* Tablet */
@media (max-width: 1024px) {
    .product-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .product-images {
        position: static;
    }
    
    .product-info {
        padding-left: 0;
    }
    
    .main-image-container {
        max-height: 500px;
    }
    
    .product-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .quantity-selector {
        align-self: flex-start;
    }
    
    .tabs-nav {
        justify-content: flex-start;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .product-main {
        padding: 1rem 0;
    }
    
    .product-grid {
        gap: 1.5rem;
    }
    
    .product-title {
        font-size: 1.5rem;
    }
    
    .main-image-container {
        max-height: 400px;
    }
    
    .thumbnail-images {
        justify-content: center;
    }
    
    .thumbnail-btn {
        width: 60px;
        height: 60px;
    }
    
    .product-actions {
        gap: 0.75rem;
    }
    
    .add-to-cart-btn,
    .notify-btn {
        min-width: auto;
        height: 44px;
        font-size: 0.875rem;
    }
    
    .shipping-calculator {
        padding: 1rem;
    }
    
    .shipping-form {
        flex-direction: column;
    }
    
    .cep-btn {
        height: 40px;
    }
    
    .cep-input {
        height: 40px;
    }
    
    .product-details {
        padding: 2rem 0;
    }
    
    .tabs-nav {
        gap: 0;
    }
    
    .tab-btn {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

/* Mobile Small */
@media (max-width: 480px) {
    .breadcrumbs {
        padding: 0.75rem 0;
    }
    
    .breadcrumb-list {
        font-size: 0.75rem;
    }
    
    .product-title {
        font-size: 1.25rem;
    }
    
    .product-meta {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .product-price {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .variation-group {
        margin-bottom: 1rem;
    }
    
    .size-btn,
    .color-btn {
        width: 40px;
        height: 40px;
    }
    
    .shipping-calculator {
        padding: 0.75rem;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
}

/* ==================== UTILITIES ==================== */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ==================== LOADING STATES ==================== */

.loading {
    opacity: 0.7;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #e4002b;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
