/* Product Title Before Gallery - Arrocísimo Design System */

/* =================================================================
   PRODUCT TITLE SECTION - NEW SECTION ABOVE GALLERY
   ================================================================= */

.product-title-section {
    background: linear-gradient(135deg, rgba(138, 0, 40, 0.02) 0%, rgba(138, 0, 40, 0.05) 100%);
    padding: 30px 0 20px 0;
    border-bottom: 1px solid rgba(138, 0, 40, 0.1);
    margin-bottom: 0;
}

.product-title-section .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.product-title-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.product-title-header h1 {
    font-family: 'Lora', serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--vino-tinto-medio);
    margin: 0 0 15px 0;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(138, 0, 40, 0.1);
}

.product-title-header .product-rating {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
}

.product-title-header .stars {
    display: flex;
    gap: 3px;
}

.product-title-header .stars i {
    color: #FFD700;
    font-size: 1.2rem;
    filter: drop-shadow(0 1px 2px rgba(138, 0, 40, 0.2));
}

.product-title-header .rating-text {
    color: #666;
    font-size: 0.95rem;
    font-weight: 500;
}

/* Breadcrumb adjustments */
.breadcrumb {
    margin-bottom: 0;
    border-bottom: none;
}

/* =================================================================
   PRODUCT HERO SECTION MODIFICATIONS
   ================================================================= */

/* Remove the original product-header from product-info */
.product-info .product-header {
    display: none;
}

/* Adjust product-hero spacing */
.product-hero {
    padding-top: 30px;
    padding-bottom: 40px;
}

/* Ensure proper spacing between sections */
.product-hero-content {
    gap: 40px;
}

/* Price section adjustments - make it more prominent since title moved */
.product-price {
    background: rgba(138, 0, 40, 0.05);
    border: 2px solid rgba(138, 0, 40, 0.1);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    margin-bottom: 25px;
    box-shadow: 0 4px 12px rgba(138, 0, 40, 0.08);
}

.product-price .current-price {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--vino-tinto-medio);
    display: block;
    margin-bottom: 5px;
    text-shadow: 0 2px 4px rgba(138, 0, 40, 0.1);
}

.product-price .price-unit {
    color: #666;
    font-size: 1rem;
    font-weight: 500;
}

/* =================================================================
   MOBILE RESPONSIVENESS
   ================================================================= */

@media (max-width: 768px) {
    .product-title-section {
        padding: 20px 0 15px 0;
    }
    
    .product-title-header h1 {
        font-size: 2rem;
        margin-bottom: 12px;
        line-height: 1.3;
    }
    
    .product-title-header .product-rating {
        gap: 12px;
        flex-direction: column;
        align-items: center;
    }
    
    .product-title-header .stars i {
        font-size: 1.1rem;
    }
    
    .product-title-header .rating-text {
        font-size: 0.9rem;
    }
    
    /* Adjust hero section for mobile */
    .product-hero {
        padding-top: 20px;
        padding-bottom: 30px;
    }
    
    .product-hero-content {
        gap: 25px;
    }
    
    /* Mobile price adjustments */
    .product-price {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .product-price .current-price {
        font-size: 1.8rem;
    }
    
    .product-price .price-unit {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .product-title-section {
        padding: 15px 0 12px 0;
    }
    
    .product-title-header h1 {
        font-size: 1.7rem;
        margin-bottom: 10px;
    }
    
    .product-title-header .stars i {
        font-size: 1rem;
    }
    
    .product-title-header .rating-text {
        font-size: 0.85rem;
    }
    
    .product-price .current-price {
        font-size: 1.6rem;
    }
}

/* =================================================================
   ENHANCED VISUAL HIERARCHY
   ================================================================= */

/* Add subtle animation for title entrance */
@keyframes titleFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-title-header {
    animation: titleFadeIn 0.6s ease-out;
}

/* Improve visual flow from title to gallery */
.product-title-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--vino-tinto-medio), transparent);
    opacity: 0.3;
}

.product-title-section {
    position: relative;
}

/* Gallery enhancement for better visual connection */
.product-gallery {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(138, 0, 40, 0.15);
    transition: all 0.3s ease;
}

.product-gallery:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(138, 0, 40, 0.2);
}

/* =================================================================
   MOBILE ACTIONS COMPATIBILITY
   ================================================================= */

/* Ensure mobile actions optimizer works with new structure */
@media (max-width: 768px) {
    /* The mobile actions container should appear after price section */
    .mobile-actions-container {
        order: 2;
        grid-area: actions-mobile;
    }
    
    /* Adjust grid areas in product-info for new layout */
    .product-info {
        display: grid;
        grid-template-areas: 
            "price"
            "actions-mobile"
            "description"
            "sizes"
            "toppings"
            "flavor-bases"
            "delivery";
        gap: 20px;
    }
    
    .product-price {
        grid-area: price;
    }
    
    .product-description {
        grid-area: description;
    }
}

/* =================================================================
   ACCESSIBILITY IMPROVEMENTS
   ================================================================= */

/* Better focus indicators for keyboard navigation */
.product-title-header h1:focus {
    outline: 3px solid var(--vino-tinto-medio);
    outline-offset: 4px;
    border-radius: 4px;
}

/* Improved color contrast for ratings */
.product-title-header .rating-text {
    color: #444;
    font-weight: 500;
}

/* Screen reader improvements */
.product-title-header h1 {
    scroll-margin-top: 100px; /* Account for sticky headers */
}

/* Skip link target for better navigation */
#product-title-anchor {
    scroll-margin-top: 80px;
}

/* =================================================================
   PRINT STYLES
   ================================================================= */

@media print {
    .product-title-section {
        background: none !important;
        border: none !important;
        padding: 20px 0 !important;
    }
    
    .product-title-header h1 {
        color: #000 !important;
        text-shadow: none !important;
        font-size: 2rem !important;
    }
    
    .product-title-header .stars i {
        color: #000 !important;
        filter: none !important;
    }
}