/* ════════════════════════════════════════════════════════════════
   mc_homepage.css — v1.0.0  (riscritto: Hero + Phone Search + Categorie)
   Prefisso: .mc-hp-, .mc-hero, .mc-btn, .mc-category-
   (zero conflitti con tema Warehouse)
   Caricato solo in homepage (hookDisplayHeader con check php_self)
   ════════════════════════════════════════════════════════════════ */

/* ── RESET LOCALE ───────────────────────────────────────────────── */
.mc-hero *,
.mc-phone-search-section *,
.mc-categories-section * {
    box-sizing: border-box;
}

/* ── BOTTONI ─────────────────────────────────────────────────────── */
.mc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border-radius: 30px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    border: 2px solid transparent;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.1s;
    white-space: nowrap;
}

.mc-btn:active { transform: scale(0.97); }
.mc-btn:hover  { text-decoration: none; }

.mc-btn--primary {
    background: #111;
    color: #fff;
    border-color: #111;
}
.mc-btn--primary:hover { background: #333; border-color: #333; color: #fff; }

.mc-btn--secondary {
    background: transparent;
    color: #111;
    border-color: #111;
}
.mc-btn--secondary:hover { background: #111; color: #fff; }

/* Rainbow gradient CTA — "Personalizza la tua cover" */
.mc-btn--rainbow {
    background: linear-gradient(90deg, #e63946, #f77f00, #fcbf49, #2a9d8f, #2196f3, #7b2ff7);
    color: #fff;
    border: none;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
    background-size: 200% 100%;
    box-shadow: 0 4px 18px rgba(230, 57, 70, 0.3), 0 0 30px rgba(123, 47, 247, 0.15);
    transition: background-position 0.4s, transform 0.1s, box-shadow 0.3s;
}
.mc-btn--rainbow:hover {
    background-position: 100% 0;
    color: #fff;
    box-shadow: 0 6px 28px rgba(230, 57, 70, 0.45), 0 0 40px rgba(123, 47, 247, 0.25);
}
.mc-btn--rainbow:active { transform: scale(0.97); }

/* White outline CTA — "Trova cover per il tuo telefono" */
.mc-btn--outline {
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.75);
}
.mc-btn--outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #fff;
    color: #fff;
}

/* ── 1. HERO ─────────────────────────────────────────────────────── */
.mc-hero {
    background: #030308;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    padding: 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Canvas space background — animated stars + nebulae via JS */
.mc-hero__space-canvas {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 0;
    pointer-events: none;
}

.mc-hero__inner {
    max-width: 820px;
    margin: 0 auto;
    padding: 80px 24px;
    position: relative;
    z-index: 2;
    /* Vertically centered within flex hero */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
}

/* Brand name — top-left, small, Arial Black */
.mc-hero__brand {
    position: absolute;
    top: 20px;
    left: 24px;
    font-family: 'Arial Black', 'Arial Bold', Arial, sans-serif;
    font-size: 16px;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.85);
    text-transform: uppercase;
    letter-spacing: 2px;
    line-height: 1;
    z-index: 3;
}

.mc-hero__title {
    font-size: clamp(40px, 6vw, 68px);
    font-weight: 900;
    line-height: 1.05;
    color: rgba(255, 255, 255, 0.97);
    margin: 0 0 20px;
    letter-spacing: -2px;
    text-transform: uppercase;
    text-shadow: 0 2px 40px rgba(255, 255, 255, 0.08);
}

/* "PERFETTA" — full rainbow gradient, vivid and wide-spectrum */
.mc-hero__highlight {
    font-weight: 900;
    background: linear-gradient(
        90deg,
        #ff2020 0%,
        #ff8c00 20%,
        #ffe600 38%,
        #00d26a 55%,
        #1a8cff 73%,
        #b24bff 100%
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    /* Ensure gradient is visible on the full word, not compressed */
    display: inline-block;
    padding-bottom: 0.05em; /* prevent descender clipping on some browsers */
}

.mc-hero__subtitle {
    font-size: clamp(15px, 2vw, 20px);
    color: rgba(255, 255, 255, 0.45);
    margin: 0 0 48px;
    font-weight: 400;
    letter-spacing: 0.5px;
}

.mc-hero__cta {
    display: flex;
    flex-wrap: nowrap;
    gap: 16px;
    justify-content: center;
}

@media (max-width: 600px) {
    .mc-hero__brand { font-size: 13px; top: 14px; left: 16px; }
    .mc-hero__title { letter-spacing: -1px; }
    .mc-hero__cta { flex-direction: column; align-items: center; gap: 12px; }
    .mc-btn { width: 100%; max-width: 320px; }
}

/* ── 2. SELETTORE TELEFONO INLINE ────────────────────────────────── */
.mc-phone-search-section {
    background: #fff;
    padding: 40px 20px;
    border-bottom: 1px solid #eee;
}

.mc-phone-search-wrap {
    max-width: 600px;
    margin: 0 auto;
}

/* Stato: telefono salvato */
.mc-hp-phone-saved {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f0f5ff;
    border: 1.5px solid #c5d6f8;
    border-radius: 14px;
    padding: 16px 20px;
}

.mc-hp-saved-icon::before { content: "\1F4F1"; font-size: 22px; }

.mc-hp-saved-text {
    flex: 1;
    font-size: 15px;
    font-weight: 600;
    color: #1a1a2e;
}

.mc-hp-saved-change {
    background: #111;
    color: #fff;
    border: none;
    border-radius: 20px;
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
    white-space: nowrap;
    flex-shrink: 0;
}
.mc-hp-saved-change:hover { background: #333; }

/* Stato: ricerca */
.mc-hp-phone-search-box {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mc-hp-search-label {
    font-size: 16px;
    font-weight: 700;
    color: #111;
    text-align: center;
}

.mc-hp-search-input-wrap { position: relative; }

.mc-hp-search-input {
    width: 100%;
    box-sizing: border-box;
    padding: 14px 48px 14px 18px;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 14px;
    outline: none;
    background: #f9f9f9;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
    -webkit-appearance: none;
}
.mc-hp-search-input:focus {
    border-color: #111;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(0,0,0,0.08);
}

.mc-hp-search-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    pointer-events: none;
    opacity: 0.45;
}

.mc-hp-search-hint {
    text-align: center;
    font-size: 13px;
    color: #999;
    margin: 2px 0 0;
}

/* Suggerimenti */
.mc-hp-suggestions {
    list-style: none;
    margin: 0;
    padding: 4px 0;
    background: #fff;
    border: 1.5px solid #e0e0e0;
    border-top: none;
    border-radius: 0 0 14px 14px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    max-height: 300px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.mc-hp-sug-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    cursor: pointer;
    border-bottom: 1px solid #f5f5f5;
    transition: background 0.1s;
}
.mc-hp-sug-item:last-child { border-bottom: none; }
.mc-hp-sug-item:hover,
.mc-hp-sug-item.mc-hp-sug-active { background: #f0f5ff; }

.mc-hp-sug-label { font-size: 15px; color: #222; }
.mc-hp-sug-label mark { background: transparent; color: #111; font-weight: 700; }
.mc-hp-sug-year { font-size: 12px; color: #aaa; flex-shrink: 0; margin-left: 10px; }

@media (max-width: 480px) {
    .mc-phone-search-section { padding: 28px 16px; }
    .mc-hp-phone-saved { flex-wrap: wrap; }
    .mc-hp-saved-text { font-size: 14px; }
}

/* ── 3. CATEGORIE PRINCIPALI ─────────────────────────────────────── */
.mc-categories-section {
    padding: 40px 20px 56px;
    background: #fafafa;
}

.mc-categories-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    max-width: 800px;
    margin: 0 auto;
}

@media (min-width: 600px) {
    .mc-categories-grid { grid-template-columns: repeat(4, 1fr); }
}

.mc-category-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: #fff;
    border: 1.5px solid #e8e8e8;
    border-radius: 14px;
    padding: 24px 12px 20px;
    text-decoration: none;
    color: #111;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s;
    gap: 8px;
}
.mc-category-tile:hover {
    border-color: #aaa;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    transform: translateY(-2px);
    text-decoration: none;
    color: #111;
}
.mc-category-tile:active { transform: scale(0.97); }

.mc-category-tile__icon { font-size: 36px; line-height: 1; display: block; }

.mc-category-tile--cover     .mc-category-tile__icon::before { content: "\1F4F1"; }
.mc-category-tile--pellicola  .mc-category-tile__icon::before { content: "\1F6E1\FE0F"; }
.mc-category-tile--caricatore .mc-category-tile__icon::before { content: "\26A1"; }
.mc-category-tile--auto       .mc-category-tile__icon::before { content: "\1F697"; }

.mc-category-tile__label { font-size: 15px; font-weight: 700; color: #111; }
.mc-category-tile__desc  { font-size: 12px; color: #888; line-height: 1.3; }

@media (max-width: 480px) {
    .mc-categories-section { padding: 28px 16px 40px; }
    .mc-categories-grid { gap: 10px; }
    .mc-category-tile { padding: 18px 10px 16px; }
    .mc-category-tile__icon { font-size: 28px; }
    .mc-category-tile__desc { display: none; }
}
