/* ===== NAPOLI PIZZA CONFIGURATOR ===== */

body.napoli-modal-open { overflow: hidden; }

.napoli-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.napoli-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(3px);
}

.napoli-modal-container {
    position: relative;
    background: #fff;
    border-radius: 16px;
    width: 100%;
    max-width: 860px;
    max-height: 92vh;
    overflow-y: auto;
    box-shadow: 0 24px 80px rgba(0,0,0,0.4);
    display: flex;
    flex-direction: column;
}

/* Hero */
.napoli-modal-hero {
    position: relative;
    height: 200px;
    overflow: hidden;
    border-radius: 16px 16px 0 0;
    background: #1a1a1a;
    flex-shrink: 0;
}
.napoli-modal-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.7;
}
.napoli-modal-hero-title {
    position: absolute;
    bottom: 20px;
    left: 24px;
}
.napoli-modal-hero-title h2 {
    color: #fff;
    font-size: 2rem;
    font-weight: 800;
    margin: 0;
    text-shadow: 0 2px 8px rgba(0,0,0,0.6);
}
.napoli-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.9);
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    transition: background 0.2s;
}
.napoli-modal-close:hover { background: #fff; }

/* Steps Bar */
.napoli-steps-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 24px 12px;
    gap: 0;
    flex-shrink: 0;
    background: #fff;
    border-bottom: 1px solid #f0ece4;
}
.napoli-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: default;
}
.napoli-step-num {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e8e0d4;
    color: #999;
    font-weight: 700;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}
.napoli-step-label {
    font-size: 0.65rem;
    font-weight: 600;
    color: #aaa;
    letter-spacing: 0.05em;
    transition: color 0.3s;
}
.napoli-step.active .napoli-step-num {
    background: #c0392b;
    color: #fff;
    box-shadow: 0 2px 8px rgba(192,57,43,0.4);
}
.napoli-step.active .napoli-step-label { color: #c0392b; }
.napoli-step.completed .napoli-step-num {
    background: #27ae60;
    color: #fff;
}
.napoli-step.completed .napoli-step-label { color: #27ae60; }
.napoli-step-line {
    flex: 1;
    height: 2px;
    background: #e8e0d4;
    min-width: 20px;
    max-width: 60px;
    margin-bottom: 16px;
}

/* Modal Body */
.napoli-modal-body {
    padding: 24px;
    flex: 1;
    overflow-y: auto;
}
.napoli-step-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: #c0392b;
    letter-spacing: 0.08em;
    margin: 0 0 20px;
    text-transform: uppercase;
}

/* STEP 1: Sizes Grid */
.napoli-sizes-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}
.napoli-size-card {
    border: 2px solid #e8e0d4;
    border-radius: 12px;
    padding: 16px 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: #faf8f4;
}
.napoli-size-card:hover {
    border-color: #c0392b;
    background: #fff5f4;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(192,57,43,0.15);
}
.napoli-size-card.active {
    border-color: #c0392b;
    background: #fff5f4;
    box-shadow: 0 4px 16px rgba(192,57,43,0.25);
}
.napoli-size-inches {
    font-size: 1.6rem;
    font-weight: 800;
    color: #1a1a1a;
    line-height: 1;
}
.napoli-size-label {
    font-size: 0.75rem;
    color: #888;
    margin: 4px 0 6px;
}
.napoli-size-price {
    font-size: 1rem;
    font-weight: 700;
    color: #c0392b;
}

/* STEP 2: Style */
.napoli-style-options { display: flex; flex-direction: column; gap: 12px; }
.napoli-style-option {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    border: 2px solid #e8e0d4;
    border-radius: 12px;
    cursor: pointer;
    background: #faf8f4;
    transition: all 0.2s;
}
.napoli-style-option:hover { border-color: #c0392b; background: #fff5f4; }
.napoli-style-option.active { border-color: #c0392b; background: #fff5f4; }
.napoli-style-icon { font-size: 2rem; }
.napoli-style-info { flex: 1; }
.napoli-style-info strong { display: block; font-size: 1.1rem; color: #1a1a1a; }
.napoli-style-info span { font-size: 0.85rem; color: #888; }
.napoli-check {
    width: 28px; height: 28px;
    border-radius: 50%;
    border: 2px solid #ddd;
    display: flex; align-items: center; justify-content: center;
    color: transparent;
    font-size: 1rem;
    transition: all 0.2s;
}
.napoli-style-option.active .napoli-check {
    background: #c0392b;
    border-color: #c0392b;
    color: #fff;
}

/* STEP 3: Toppings */
.napoli-included-tag {
    background: #f0faf4;
    border: 1px solid #27ae60;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.85rem;
    color: #1a6b3a;
    margin-bottom: 12px;
}
.napoli-extra-price-note {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 16px;
}
.napoli-toppings-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
.napoli-topping-chip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border: 1.5px solid #e8e0d4;
    border-radius: 8px;
    cursor: pointer;
    background: #faf8f4;
    transition: all 0.15s;
    font-size: 0.8rem;
}
.napoli-topping-chip:hover { border-color: #c0392b; background: #fff5f4; }
.napoli-topping-chip.active {
    border-color: #c0392b;
    background: #fff0ee;
}
.napoli-topping-chip[data-included="true"] {
    border-color: #27ae60;
    background: #f0faf4;
    cursor: default;
}
.napoli-topping-name { font-weight: 500; color: #333; }
.napoli-topping-badge {
    font-size: 0.65rem;
    background: #27ae60;
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
}
.napoli-topping-price {
    font-size: 0.7rem;
    color: #c0392b;
    font-weight: 600;
}

/* Half & Half */
.napoli-half-container {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 16px;
    align-items: start;
}
.napoli-half-divider {
    width: 2px;
    background: #e8e0d4;
    min-height: 200px;
    border-radius: 2px;
    margin-top: 32px;
}
.napoli-half-section h4 {
    font-size: 0.9rem;
    color: #1a1a1a;
    margin: 0 0 12px;
}
.napoli-half-flavor {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e8e0d4;
    border-radius: 8px;
    font-size: 0.85rem;
    margin-bottom: 12px;
    background: #faf8f4;
    color: #333;
}
.napoli-half-flavor:focus { outline: none; border-color: #c0392b; }

/* STEP 4: Cut */
.napoli-cut-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
.napoli-cut-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 24px 16px;
    border: 2px solid #e8e0d4;
    border-radius: 12px;
    cursor: pointer;
    background: #faf8f4;
    transition: all 0.2s;
    text-align: center;
}
.napoli-cut-option:hover { border-color: #c0392b; background: #fff5f4; }
.napoli-cut-option.active { border-color: #c0392b; background: #fff5f4; box-shadow: 0 4px 12px rgba(192,57,43,0.2); }
.napoli-cut-icon { font-size: 2rem; }
.napoli-cut-option strong { font-size: 0.95rem; color: #1a1a1a; }
.napoli-cut-option span { font-size: 0.75rem; color: #888; }

/* STEP 5: Confirm */
.napoli-order-summary {
    background: #faf8f4;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}
.napoli-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 8px 0;
    border-bottom: 1px solid #f0ece4;
    font-size: 0.9rem;
    gap: 12px;
}
.napoli-summary-row:last-child { border-bottom: none; }
.napoli-summary-row span { color: #888; flex-shrink: 0; }
.napoli-summary-row strong { color: #1a1a1a; text-align: right; }
.napoli-quantity-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    font-size: 0.9rem;
    color: #555;
}
.napoli-qty-control {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f0ece4;
    border-radius: 8px;
    padding: 4px 8px;
}
.napoli-qty-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #c0392b;
    font-weight: 700;
    padding: 2px 8px;
    transition: color 0.2s;
}
.napoli-qty-btn:hover { color: #922b21; }
#napoli-qty-display { font-weight: 700; font-size: 1rem; min-width: 24px; text-align: center; }
.napoli-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0 0;
    border-top: 2px solid #e8e0d4;
    font-size: 1rem;
    color: #555;
}
#napoli-total-price { font-size: 1.5rem; color: #c0392b; font-weight: 800; }

/* Footer Buttons */
.napoli-modal-footer {
    display: flex;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid #f0ece4;
    background: #fff;
    border-radius: 0 0 16px 16px;
    flex-shrink: 0;
}
.napoli-btn-back {
    padding: 14px 24px;
    border: 2px solid #e8e0d4;
    border-radius: 10px;
    background: #fff;
    color: #555;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0.05em;
}
.napoli-btn-back:hover { border-color: #aaa; color: #333; }
.napoli-btn-next {
    flex: 1;
    padding: 14px 24px;
    border: none;
    border-radius: 10px;
    background: #e8e0d4;
    color: #888;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.napoli-btn-next:hover { background: #c0392b; color: #fff; }
.napoli-btn-cart {
    flex: 1;
    padding: 14px 24px;
    border: none;
    border-radius: 10px;
    background: #c0392b;
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.napoli-btn-cart:hover { background: #922b21; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(192,57,43,0.4); }
.napoli-btn-cart:disabled { background: #aaa; transform: none; box-shadow: none; }

/* Cart Notification */
.napoli-cart-notification {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #1a1a1a;
    color: #fff;
    padding: 14px 20px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    z-index: 999999;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}
.napoli-cart-notification.visible { opacity: 1; transform: translateY(0); }

/* Responsive */
@media (max-width: 640px) {
    .napoli-sizes-grid { grid-template-columns: repeat(2, 1fr); }
    .napoli-toppings-grid { grid-template-columns: repeat(2, 1fr); }
    .napoli-cut-options { grid-template-columns: 1fr; }
    .napoli-half-container { grid-template-columns: 1fr; }
    .napoli-half-divider { display: none; }
    .napoli-modal-hero-title h2 { font-size: 1.4rem; }
    .napoli-steps-bar { padding: 12px 8px; gap: 2px; }
    .napoli-step-label { display: none; }
    .napoli-step-line { min-width: 10px; }
}

/* Trigger button on product cards */
.napoli-configure-pizza {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #c0392b;
    color: #fff !important;
    border: none;
    border-radius: 8px;
    padding: 10px 18px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none !important;
    transition: all 0.2s;
    letter-spacing: 0.03em;
}
.napoli-configure-pizza:hover {
    background: #922b21;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(192,57,43,0.35);
}
