/* =============================================================================
   DINAMIK LOUNGE BAR – MENU GOLD EDITION
   Versione: v4 (completa, stabile, ottimizzata desktop + mobile)
   ========================================================================== */

/* RESET */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Poppins", sans-serif;
}

body {
    background: #000;
    color: #fff;
    overflow-x: hidden;
}

/* =============================================================================
   HEADER PREMIUM (MOBILE-FIRST)
   ========================================================================== */

.dm-header {
    width: 100%;
    padding: 14px 12px;
    background: #000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(240,184,64,0.35);
}

/* Freccia Home */
.dm-back-btn {
    font-size: 24px;
    color: #f0b840;
    text-decoration: none;
    padding: 6px 10px;
}

/* Pulsante categorie */
.dm-cat-btn {
    padding: 8px 12px;
    background: #111;
    border: 1px solid rgba(240,184,64,0.45);
    color: #fff;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    white-space: nowrap;
}

/* Titolo centrale */
.dm-titolo {
    color: #f0b840;
    font-size: 22px;
    font-weight: 700;
    text-align: center;
    flex-grow: 1;
}

/* Pulsante carrello con qty + totale */
.dm-cart-toggle {
    padding: 8px 12px;
    background: #111;
    border: 1px solid rgba(240,184,64,0.45);
    color: #fff;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

@media (max-width: 420px) {
    .dm-cart-toggle {
        font-size: 13px;
        padding: 7px 10px;
    }
    .dm-titolo {
        font-size: 20px;
    }
}

/* =============================================================================
   MENU CATEGORIE (DROPDOWN FIX PER DESKTOP)
   ========================================================================== */

.dm-cat-dropdown {
    display: none;
    position: absolute;
    top: 60px;
    right: 20px; /* posiziona correttamente il menu */
    width: 180px;
    background: #111;
    border: 1px solid rgba(240,184,64,0.45);
    border-radius: 8px;
    padding: 8px;
    z-index: 999;
}

.dm-cat-dropdown.active {
    display: block;
}

.dm-cat-voice {
    padding: 10px 6px;
    cursor: pointer;
    color: #fff;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    font-size: 14px;
}

.dm-cat-voice:last-child {
    border-bottom: none;
}

.dm-cat-voice:hover {
    color: #f0b840;
}

/* =============================================================================
   GRIGLIA PRODOTTI – RESPONSIVE
   ========================================================================== */

.prodotti-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
    gap: 18px;
    padding: 20px;
}

/* Smartphone molto piccoli */
@media (max-width: 380px) {
    .prodotti-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Tablet */
@media (min-width: 600px) {
    .prodotti-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Desktop */
@media (min-width: 900px) {
    .prodotti-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.card {
    background: #111;
    border: 1px solid rgba(240,184,64,0.25);
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    transition: 0.25s;
}

.card:hover {
    transform: translateY(-5px);
    border-color: #f0b840;
}

.card-img img {
    width: 100%;
    height: 130px;
    object-fit: contain;
    margin-bottom: 10px;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 6px;
}

.card-price {
    font-size: 16px;
    color: #f0b840;
    margin-bottom: 10px;
}

.add-to-cart {
    padding: 9px;
    width: 100%;
    border: none;
    background: #f0b840;
    color: #000;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.25s;
}

.add-to-cart:hover {
    background: #ffcc57;
}

/* =============================================================================
   CARRELLO OVERLAY DESTRO
   ========================================================================== */

.dm-cart-panel {
    position: fixed;
    top: 0;
    right: -350px;
    width: 310px;
    height: 100%;
    background: #111;
    padding: 20px;
    border-left: 1px solid rgba(240,184,64,0.55);
    transition: 0.35s;
    z-index: 9999;
}

.dm-cart-panel.active {
    right: 0;
}

.dm-cart-header {
    display: flex;
    justify-content: space-between;
    color: #f0b840;
    font-size: 19px;
    margin-bottom: 18px;
}

.dm-close {
    cursor: pointer;
    font-size: 20px;
}

/* Lista prodotti */
.dm-cart-items {
    max-height: 65vh;
    overflow-y: auto;
    padding-right: 5px;
}

.cart-item {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 10px;
    background: #181818;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 12px;
    border: 1px solid rgba(240,184,64,0.25);
}

.cart-item-name {
    font-size: 15px;
    font-weight: 500;
}

.qty-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.qty-controls button {
    width: 28px;
    height: 28px;
    background: #f0b840;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 700;
    color: #000;
}

.cart-item-price {
    color: #f0b840;
    font-weight: 600;
    font-size: 15px;
}

.dm-cart-total {
    font-size: 18px;
    margin-top: 14px;
    font-weight: 600;
    color: #f0b840;
}

.dm-send-wapp {
    margin-top: 18px;
    width: 100%;
    background: #25D366;
    color: #000;
    display: block;
    text-align: center;
    padding: 14px;
    border-radius: 8px;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
}
