/* 
 * Budget Tier: Mid - Styling for mid-range gaming PCs
 * Version: 1.0.3
 * Last updated: 2025-03-23
 */

/* ================= HERO SECTION ================= */
#pc-hero {
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* Parallax effect */
    position: relative;
    padding: 120px 0;
    text-align: center;
    color: #fff;
    min-height: 60vh;
    display: flex;
    align-items: center;
    overflow: hidden; /* Prevent potential overflow issues */
}

/* Hero backgrounds for specific mid-range PCs */
#pc-hero.ptit-joueur {
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.4)), 
                url("../../assets/images/products/gamer.webp?v=1.0.2");
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

#pc-hero .container {
    position: relative;
    z-index: 2;
    width: 100%; /* Ensure container takes full width */
}

#pc-hero h2 {
    font-size: 3em;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
    animation: fadeInDown 0.8s ease;
}

#pc-hero p {
    font-size: 1.3em;
    max-width: 800px;
    margin: 0 auto;
    animation: fadeInUp 0.8s ease 0.2s forwards;
    opacity: 0;
}

.scroll-down {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 2em;
    animation: bounce 2s infinite;
    cursor: pointer; /* Improve UX by indicating it's clickable */
    z-index: 10; /* Ensure it's above other elements */
}

/* ================= PC DETAILS SECTION ================= */
#pc-details {
    padding: 50px 0;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin: 30px auto;
    position: relative; /* Establish positioning context */
}

/* Image container and effects */
.pc-image {
    width: 100%;
    max-width: 600px;
    margin: 0 auto 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-radius: 10px;
}

.pc-image img {
    width: 100%;
    height: auto;
    transition: transform 0.5s ease;
    border-radius: 10px;
    display: block; /* Fix potential inline gap */
}

.pc-image:hover img {
    transform: scale(1.05);
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 123, 255, 0.2);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
}

.pc-image:hover .image-overlay {
    opacity: 1;
}

.zoom-icon {
    color: white;
    background: rgba(0, 0, 0, 0.5);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2em;
    transform: scale(0);
    transition: transform 0.3s ease;
}

.pc-image:hover .zoom-icon {
    transform: scale(1);
}

/* Description section */
.pc-description {
    padding: 0 20px;
}

.pc-description h3 {
    color: #0069d9;
    font-size: 1.6em;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e9ecef;
}

/* Component list styling */
.pc-description ul {
    list-style: none;
    padding: 0;
    margin-bottom: 30px;
}

.pc-description ul li {
    margin-bottom: 12px;
    padding: 10px 15px;
    border-left: 3px solid #007bff;
    background-color: #f8f9fa;
    border-radius: 0 5px 5px 0;
    transition: all 0.3s ease;
    display: flex; /* Align icon and text properly */
    align-items: center;
}

.pc-description ul li:hover {
    background-color: #e9ecef;
    transform: translateX(5px);
}

.pc-description ul li i {
    color: #007bff;
    width: 25px;
    text-align: center;
    margin-right: 10px;
    flex-shrink: 0; /* Prevent icon from shrinking */
}

/* ================= PRICE & CTA SECTION ================= */
/* Price tag styling */
.price-tag {
    text-align: center;
    margin: 30px 0;
}

.amount {
    font-size: 2.5em;
    font-weight: bold;
    color: #007bff;
    display: block;
}

.installment {
    color: #6c757d;
    font-size: 0.9em;
    display: block;
    margin-top: 5px;
}

/* Button styling */
.action-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

.buy-now-btn, .wishlist-btn, .more-payment-options {
    padding: 12px 25px;
    border-radius: 5px;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none; /* Remove default underline */
}

.buy-now-btn {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(0,123,255,0.3);
}

.buy-now-btn:hover {
    background: linear-gradient(135deg, #0069d9 0%, #004494 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,123,255,0.4);
}

.wishlist-btn {
    background-color: white;
    color: #007bff;
    border: 1px solid #007bff;
}

.wishlist-btn:hover {
    background-color: #f8f9fa;
    color: #0056b3;
    transform: translateY(-3px);
}

.more-payment-options {
    background-color: #f8f9fa;
    color: #495057;
    border: 1px solid #ced4da;
}

.more-payment-options:hover {
    background-color: #e9ecef;
    transform: translateY(-3px);
}

/* ==================== PERFORMANCE SECTION - NOUVEAU DESIGN ================= */
.performance-section {
    background-color: #f8f9fa;
    padding: 50px 20px;
    margin: 40px 0;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.performance-section h3 {
    text-align: center;
    margin-bottom: 30px;
    color: #343a40;
    font-size: 1.8rem;
}

.performance-section h3 i {
    color: #007bff;
    margin-right: 10px;
}

.performance-cards {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 800px;
    margin: 0 auto 30px;
}

.perf-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.perf-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.game-icon {
    width: 60px;
    height: 60px;
    min-width: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #007bff, #0056b3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
}

.game-info {
    flex: 1;
}

.game-info h4 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: #343a40;
}

.fps-meter {
    height: 26px;
    background-color: #e9ecef;
    border-radius: 13px;
    overflow: hidden;
    margin-bottom: 8px;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
    position: relative;
}

.fps-bar {
    height: 100%;
    border-radius: 13px;
    background: linear-gradient(90deg, #00c6ff, #0072ff);
    position: relative;
    transition: width 1.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    animation: pulse 2s infinite;
}

.fps-value {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-weight: bold;
    font-size: 0.9rem;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
    z-index: 1;
}

.settings {
    font-size: 0.85rem;
    color: #6c757d;
    margin: 0;
    font-style: italic;
}

.performance-disclaimer {
    text-align: center;
    font-size: 0.9rem;
    color: #6c757d;
    max-width: 800px;
    margin: 0 auto;
    padding-top: 20px;
    border-top: 1px solid #dee2e6;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 123, 255, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(0, 123, 255, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 123, 255, 0);
    }
}

/* Responsive design pour les performances */
@media (max-width: 576px) {
    .perf-card {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .game-icon {
        margin-bottom: 5px;
    }
    
    .fps-value {
        right: 50%;
        transform: translate(50%, -50%);
    }
}

/* ================= ACCESSORIES SECTION ================= */
.accessories-section {
    padding: 40px 20px;
}

.accessories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.accessory-card {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    text-align: center;
    transition: all 0.3s ease;
}

.accessory-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.accessory-card i {
    font-size: 2em;
    color: #007bff;
    margin-bottom: 15px;
}

.accessory-card h4 {
    margin-bottom: 10px;
    color: #343a40;
}

.view-more {
    display: inline-block;
    margin-top: 15px;
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.view-more:hover {
    color: #0056b3;
}

/* ================= ANIMATIONS ================= */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-20px);
    }
    60% {
        transform: translateX(-50%) translateY(-10px);
    }
}

/* ================= MEDIA QUERIES ================= */
@media (min-width: 768px) {
    #pc-details .container {
        display: flex;
        align-items: flex-start;
        gap: 40px;
    }
    
    .pc-image {
        width: 45%;
        margin: 0;
    }
    
    .pc-description {
        width: 55%;
    }
}

@media (max-width: 767px) {
    #pc-hero {
        padding: 80px 0;
        min-height: 50vh; /* Reduced height for mobile */
    }
    
    #pc-hero h2 {
        font-size: 2.2em;
    }
    
    .action-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .buy-now-btn, .wishlist-btn, .more-payment-options {
        width: 100%;
        justify-content: center;
    }
    
    .accessories-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .pc-description ul li {
        padding: 8px 12px;
    }
    
    .amount {
        font-size: 2em;
    }
}

/* Fix for Safari and some mobile browsers */
@supports (-webkit-overflow-scrolling: touch) {
    #pc-hero {
        background-attachment: scroll;
    }
    
    #pc-hero.ptit-joueur {
        background-attachment: scroll;
    }
}
