/* style.css - Restoran meni */

/* Osnovni reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    background-color: #f9f9f9;
}

/* Link za skok do pića */
.jump-link {
    display: inline-block;
    padding: 12px 25px;
    background: #4CAF50;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    font-size: 18px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    margin: 0 auto 30px auto;
    display: block;
    text-align: center;
    max-width: fit-content;
    transition: background 0.2s;
}
.jump-link:hover {
    background: #45a049;
}

/* Logo */
.logo {
    max-width: 200px;
    height: auto;
    display: block;
    margin: 0 auto 30px auto;
}

/* Naslovi */
h2 {
    color: #2c3e50;
    text-align: center;
    margin: 40px 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 3px solid #4CAF50;
    font-size: 24px;
}

h3 {
    color: #2c3e50;
    margin: 10px 0;
    font-size: 20px;
}

/* Sekcija za broj stola */
#table-input {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    text-align: center;
}

#table-input label {
    display: block;
    font-size: 18px;
    margin-bottom: 10px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#table-input input {
    width: 120px;
    padding: 12px;
    font-size: 24px;
    text-align: center;
    border: 3px solid #fff;
    border-radius: 10px;
    background: rgba(255,255,255,0.9);
    color: #333;
    font-weight: bold;
    margin: 10px auto;
    display: block;
}

#table-input input:focus {
    outline: none;
    border-color: #ffd700;
    box-shadow: 0 0 10px rgba(255,215,0,0.5);
}

#table-error {
    color: #ffcccc;
    font-size: 14px;
    margin-top: 5px;
    min-height: 20px;
}

/* Stavke menija */
.item, .drink {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    border: 2px solid #4CAF50;
}

.item:hover, .drink:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 15px;
}

/* Opšti stilovi za dugmad - osim za male dugmiće za brisanje */
button:not(.remove-btn) {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    width: 100%;
    text-transform: uppercase;
    letter-spacing: 1px;
}

button:not(.remove-btn):hover {
    background: #45a049;
}

button:not(.remove-btn):active {
    transform: scale(0.98);
}

button:disabled {
    background: #cccccc;
    cursor: not-allowed;
}

/* Mali dugmić za brisanje stavki iz korpe */
.remove-btn {
    background: #f44336 !important;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 2px 8px;
    margin-left: 10px;
    cursor: pointer;
    width: auto !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    font-size: 14px !important;
}
.remove-btn:hover {
    background: #d32f2f !important;
}

/* Cena */
.price {
    font-size: 24px;
    font-weight: bold;
    color: #4CAF50;
    margin: 15px 0;
    text-align: right;
    border-top: 2px dashed #4CAF50;
    padding-top: 15px;
}

/* Korpa */
#cart {
    position: sticky;      /* umjesto fixed */
    bottom: 0;             /* ostaje na dnu svoje sekcije */
    left: 0;
    width: 100%;
    background: #fff;
    padding: 15px;
    border-top: 2px solid #ddd;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 9999;
}

#cart strong {
    color: #2c3e50;
    font-size: 18px;
    display: block;
    margin-bottom: 15px;
}

#cart div {
    margin-bottom: 10px;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#cart-error {
    color: #dc3545;
    font-size: 14px;
    margin-top: 5px;
    min-height: 20px;
    text-align: center;
}

/* Poruke o uspehu/grešci */
.success-message {
    background: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 8px;
    margin: 10px 0;
    text-align: center;
    font-weight: bold;
    border: 2px solid #c3e6cb;
    animation: fadeIn 0.5s ease-out;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 8px;
    margin: 10px 0;
    text-align: center;
    font-weight: bold;
    border: 2px solid #f5c6cb;
    animation: fadeIn 0.5s ease-out;
}

/* Dugme za slanje narudžbe */
#sendOrderBtn {
    background: #4CAF50;
    color: white;
    padding: 15px 30px;
    font-size: 20px;
    font-weight: bold;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    width: 100%;
    margin-top: 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
    box-shadow: 0 4px 10px rgba(76, 175, 80, 0.3);
    transition: all 0.2s;
}

#sendOrderBtn:hover {
    background: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(76, 175, 80, 0.4);
}

/* Pića */
.drink {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    background: #f8f9fa;
}

.drink span {
    font-size: 18px;
    flex: 1;
}

.drink button {
    width: auto !important;
    margin-left: 15px;
    text-transform: none !important;
    letter-spacing: normal !important;
}

/* Horizontalna linija */
hr {
    border: none;
    height: 2px;
    background: linear-gradient(to right, transparent, #4CAF50, transparent);
    margin: 30px 0;
}

/* Opis stavki */
.item p, .drink p {
    color: #666;
    font-size: 14px;
    margin: 10px 0;
    line-height: 1.4;
}

/* Responsive dizajn za mobilne */
@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    h2 {
        font-size: 20px;
    }
    
    .item img {
        height: 150px;
    }
    
    .price {
        font-size: 20px;
    }
    
    button:not(.remove-btn) {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .drink {
        flex-direction: column;
        text-align: center;
    }
    
    .drink button {
        width: 100% !important;
        margin-left: 0;
        margin-top: 10px;
    }
    
    #table-input input {
        width: 100px;
        font-size: 20px;
    }

    #cart div {
        flex-direction: column;
        gap: 8px;
    }
}

/* Animacije */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.item, .drink, #table-input, #cart {
    animation: fadeIn 0.5s ease-out;
}
#korpa,
.cart-bar,
.vasa-korpa {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 9999;
}
#cart {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #fff;
    padding: 10px;
    border-top: 2px solid #ddd;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 9999;
}