/* ============================================
   PIERO EXTRAS FRONTEND — Lakeside Smash Dark
   ============================================ */

.piero-extras-wrap {
    margin: 20px 0;
    border: 1px solid #2a2a2a;
    border-radius: 10px;
    padding: 18px 16px 14px;
    background: #1a1a1a;
    font-family: inherit;
}

.piero-extras-heading {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #7dc242;
    margin: 0 0 14px;
}

.piero-extras-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* ---- Item base ---- */
.piero-extra-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    background: #111111;
    transition: border-color .15s, background .15s;
}

.piero-extra-item.piero-extra-active {
    border-color: #7dc242;
    background: #0d150a;
}

/* ---- Immagine extra (quantità) ---- */
.piero-extra-img {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    background: #2a2a2a;
    display: flex;
    align-items: center;
    justify-content: center;
}

.piero-extra-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.piero-extra-img-empty {
    background: #2a2a2a;
}

/* ---- Info ---- */
.piero-extra-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.piero-extra-name {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    line-height: 1.3;
}

.piero-extra-price {
    font-size: 12px;
    color: #7dc242;
    font-weight: 500;
}

/* ---- Stepper quantità ---- */
.piero-extra-qty {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.piero-qty-minus,
.piero-qty-plus {
    width: 28px;
    height: 28px;
    border: 1px solid #333;
    border-radius: 50%;
    background: #1a1a1a;
    color: #aaaaaa;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: border-color .15s, background .15s, color .15s;
    flex-shrink: 0;
}

.piero-qty-minus:hover,
.piero-qty-plus:hover {
    border-color: #7dc242;
    color: #7dc242;
    background: #0d150a;
}

.piero-qty-minus:disabled {
    opacity: .3;
    cursor: not-allowed;
}

.piero-qty-value {
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
    min-width: 20px;
    text-align: center;
}

/* ---- Scelta singola ---- */
.piero-extra-choice {
    cursor: pointer;
}

.piero-extra-choice:hover {
    border-color: #7dc242;
}

.piero-extra-choice.piero-choice-selected {
    border-color: #7dc242;
    background: #0d150a;
}

.piero-choice-preview {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.piero-choice-placeholder {
    font-size: 12px;
    color: #555;
    font-style: italic;
}

.piero-choice-selected-img {
    width: 36px;
    height: 36px;
    border-radius: 5px;
    object-fit: cover;
    border: 1px solid #7dc242;
}

.piero-choice-selected-name {
    font-size: 12px;
    color: #7dc242;
    font-weight: 600;
    max-width: 100px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ---- Modal overlay ---- */
.piero-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: lks-fadein .2s ease;
}

@keyframes lks-fadein {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ---- Modal box ---- */
.piero-modal {
    background: #1a1a1a;
    border-radius: 16px;
    width: 100%;
    max-width: 600px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    animation: lks-fadein .2s ease;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0,0,0,0.7);
}

.piero-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #2a2a2a;
    flex-shrink: 0;
}

.piero-modal-title {
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.piero-modal-close {
    background: none;
    border: none;
    color: #666;
    font-size: 18px;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
    transition: color .15s;
}

.piero-modal-close:hover {
    color: #fff;
}

.piero-modal-body {
    padding: 16px;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

@media (max-width: 480px) {
    .piero-modal-body {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ---- Card opzione nel modal ---- */
.piero-option-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px 10px;
    background: #111111;
    border: 2px solid #2a2a2a;
    border-radius: 10px;
    cursor: pointer;
    transition: border-color .15s, background .15s, transform .1s;
    text-align: center;
}

.piero-option-card:hover {
    border-color: #7dc242;
    background: #0d150a;
}

.piero-option-card.piero-option-selected {
    border-color: #7dc242;
    background: #0d150a;
}

.piero-option-card.piero-option-selected::after {
    content: '✓';
    position: absolute;
    top: 6px;
    right: 8px;
    color: #7dc242;
    font-weight: 700;
    font-size: 14px;
}

.piero-option-card {
    position: relative;
}

.piero-option-img {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    overflow: hidden;
    background: #2a2a2a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    flex-shrink: 0;
}

.piero-option-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.piero-option-img-empty {
    background: #2a2a2a;
}

.piero-option-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.piero-option-name {
    font-size: 12px;
    font-weight: 600;
    color: #ffffff;
    line-height: 1.3;
}

.piero-option-price-label {
    font-size: 11px;
    color: #7dc242;
    font-weight: 500;
}

/* ---- Totale extra ---- */
.piero-extras-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #2a2a2a;
    font-size: 14px;
}

.piero-extras-total-label {
    color: #aaaaaa;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.piero-extras-total-value {
    font-weight: 700;
    color: #f5c518;
    font-size: 16px;
}

/* Prezzo dinamico highlight */
.piero-price-updated {
    transition: color .3s;
    color: #f5c518 !important;
}

@media (max-width: 480px) {
    .piero-extra-item {
        flex-wrap: wrap;
    }
    .piero-extra-qty {
        margin-left: auto;
    }
}