/* 
 * APPLE RELATED PRODUCTS CAROUSEL - PREMIUM EDITION
 */



/* [Theme Architect] Variabili locali: evitiamo :root per ridurre collisioni. */
.apple-related-section {
    --apple-blue: #0071e3;
    --apple-radius: 24px;

    /* Rimosso padding verticale: la spaziatura esterna viene gestita in product.css.
       Manteniamo overflow e clear per contenere la track del carousel. */
    overflow: hidden;
    clear: both;
}

.apple-section-title {
    font-size: clamp(1.8rem, 4vw, 2.4rem);
    font-weight: 600;
    text-align: center;
    margin-bottom: 50px;
    letter-spacing: -0.02em;
    color: #1d1d1f;
}

/* Link card: copre tutta la card e rimuove sottolineatura */
.apple-card-link {
    display: block;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

/*
 * Contenitore della track del carousel.
 * Il max-width locale è stato rimosso per permettere alla
 * sezione di ereditare la larghezza dalla regola globale
 * `.single-product .apple-related-section` in product.css.
 */
.apple-carousel-container {
    position: relative;
    margin: 0 auto;
    padding: 0 20px;
}

.apple-carousel-track {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 20px 10px 50px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
}

.apple-carousel-track::-webkit-scrollbar { display: none; }

/* Card Prodotto */
.apple-product-card {
    flex: 0 0 clamp(260px, 32vw, 320px);
    /* Uniformiamo lo stile delle card con gli altri blocchi */
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-radius: var(--bspc-radius-large, 18px);
    border: 1px solid rgba(0, 0, 0, 0.04);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.05);
    transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    scroll-snap-align: start;
    text-decoration: none;
}

.apple-product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 50px rgba(0,0,0,0.08);
    background: #fff;
}

/* Immagine Magic Background */
.apple-card-image {
    background: radial-gradient(circle at center, #ffffff 0%, #f5f5f7 100%);
    height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--apple-radius) var(--apple-radius) 0 0;
    padding: 30px;
    overflow: hidden;
}

.apple-card-image img {
    max-height: 100%;
    width: auto;
    object-fit: contain;
    mix-blend-mode: multiply;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

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

/* Info Card */
.apple-card-info {
    padding: 30px 24px;
    text-align: center;
}

.apple-card-name {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 20px; /* Aumentato spazio dato che non c'è il prezzo */
    color: #1d1d1f;
    line-height: 1.3;
}

/* Bottone CTA - PIÙ GRANDE */
.apple-card-cta {
    display: inline-block;
    background: var(--apple-blue);
    color: #fff;
    padding: 12px 32px; /* Aumentato padding per renderlo più grande */
    border-radius: 50px;
    font-size: 0.95rem; /* Aumentato font-size */
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 113, 227, 0.2);
}

.apple-product-card:hover .apple-card-cta {
    background: #0077ed;
    transform: scale(1.05);
    box-shadow: 0 6px 15px rgba(0, 113, 227, 0.3);
}

/* Navigazione */
.apple-nav-btn {
    position: absolute;
    top: 45%;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0,0,0,0.08);
    /* Ingrandiamo la freccia per maggiore leggibilità */
    font-size: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.apple-nav-btn.prev { left: -1px; }
.apple-nav-btn.next { right: -1px; }

@media (max-width: 768px) {
    .apple-nav-btn { display: none; }
    /* Riduci l'altezza complessiva della sezione e delle card su mobile */
    .apple-related-section {
        padding: 40px 0;
    }
    .apple-product-card {
        flex: 0 0 220px;
    }
    .apple-card-image {
        height: 180px;
        padding: 20px;
    }
    .apple-card-info {
        padding: 20px 16px;
    }
    .apple-card-name {
        margin-bottom: 16px;
        font-size: 1rem;
    }
    .apple-card-cta {
        padding: 10px 28px;
        font-size: 0.9rem;
    }
}