/* =============================================================
   Efes Grill Online Order - Frontend Styles
   ============================================================= */

:root {
    --efes-primary: #E8712E;
    --efes-primary-dark: #C45A1E;
    --efes-primary-light: #F4934E;
    --efes-dark: #2C1810;
    --efes-text: #333333;
    --efes-text-light: #666666;
    --efes-bg: #FAFAF8;
    --efes-white: #ffffff;
    --efes-border: #e0e0e0;
    --efes-success: #28a745;
    --efes-warning: #ffc107;
    --efes-info: #e67e22;
    --efes-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --efes-shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.12);
    --efes-radius: 12px;
    --efes-radius-sm: 8px;
    --efes-transition: 200ms ease;
}

/* =============================================================
   Page Layout
   ============================================================= */

.efes-order-page {
    background-color: var(--efes-bg);
    min-height: 100vh;
    padding-bottom: 100px;
}

/* =============================================================
   Order Page Header
   ============================================================= */

.efes-order-header {
    background: linear-gradient(135deg, var(--efes-dark) 0%, #4A2E22 100%);
    color: var(--efes-white);
    padding: 2.5rem 0;
}

.efes-order-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.efes-order-header p {
    opacity: 0.8;
    font-size: 1rem;
    margin-bottom: 0;
}

.efes-open-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.8rem;
    background: rgba(76, 175, 80, 0.15);
    color: #4CAF50;
    border-radius: 2rem;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 0.75rem;
}

.efes-open-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #4CAF50;
    border-radius: 50%;
    animation: efes-blink 1.5s infinite;
}

@keyframes efes-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* =============================================================
   Sticky Category Navigation
   ============================================================= */

.efes-cat-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--efes-white);
    border-bottom: 1px solid #eee;
    padding: 0.75rem 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.efes-cat-nav::-webkit-scrollbar {
    display: none;
}

.efes-cat-nav-inner {
    display: flex;
    gap: 0.5rem;
    white-space: nowrap;
}

.efes-cat-pill {
    padding: 0.5rem 1.25rem;
    border-radius: 2rem;
    border: 1px solid #ddd;
    background: transparent;
    font-size: 0.85rem;
    font-weight: 600;
    color: #666;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
    flex-shrink: 0;
}

.efes-cat-pill:hover,
.efes-cat-pill.active {
    background: var(--efes-primary);
    color: var(--efes-white);
    border-color: var(--efes-primary);
}

/* =============================================================
   Order Content Area
   ============================================================= */

.efes-order-content {
    padding-top: 0.5rem;
    padding-bottom: 1rem;
}

/* Category Section */
.efes-order-category {
    margin-bottom: 1.5rem;
}

.efes-order-category-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--efes-dark);
    margin: 1.5rem 0 0.75rem;
    padding-left: 0.25rem;
}

.efes-order-category-products {
    background: var(--efes-white);
    border-radius: var(--efes-radius);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

/* =============================================================
   Product Cards (List Style - Lieferando/Uber Eats)
   ============================================================= */

.efes-order-product {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--efes-white);
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.15s;
}

.efes-order-product:first-child {
    border-radius: 12px 12px 0 0;
}

.efes-order-product:last-child {
    border-radius: 0 0 12px 12px;
    border-bottom: none;
}

.efes-order-product:only-child {
    border-radius: 12px;
}

.efes-order-product:hover {
    background: #FDFAF7;
}

.efes-order-product-info {
    flex: 1;
    min-width: 0;
    padding-right: 1rem;
}

.efes-order-product-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--efes-dark);
    margin: 0 0 0.15rem;
}

.efes-order-product-desc {
    font-size: 0.8rem;
    color: var(--efes-text-light);
    margin: 0 0 0.25rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.efes-order-product-price {
    font-weight: 700;
    color: var(--efes-primary);
    font-size: 0.95rem;
}

.efes-order-product-action {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

/* =============================================================
   Add Button (Circle Plus)
   ============================================================= */

.efes-add-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--efes-primary);
    background: transparent;
    color: var(--efes-primary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.efes-add-btn:hover {
    background: var(--efes-primary);
    color: var(--efes-white);
}

/* =============================================================
   Quantity Control (inline, appears after first add)
   ============================================================= */

.efes-qty-control {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: #FFF3E0;
    border-radius: 2rem;
    padding: 0.25rem;
}

.efes-qty-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: var(--efes-primary);
    color: var(--efes-white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: background 0.15s;
    padding: 0;
}

.efes-qty-btn:hover {
    background: var(--efes-primary-dark);
}

.qty-display {
    font-weight: 700;
    min-width: 1.5rem;
    text-align: center;
    font-size: 1rem;
    color: var(--efes-dark);
}

/* =============================================================
   Sticky Cart Bar (Bottom)
   ============================================================= */

.efes-cart-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--efes-dark);
    color: var(--efes-white);
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.efes-cart-bar.visible {
    transform: translateY(0);
}

.efes-cart-bar-info {
    display: flex;
    flex-direction: column;
}

.efes-cart-count {
    font-size: 0.85rem;
    opacity: 0.8;
}

.efes-cart-total {
    font-size: 1.25rem;
    font-weight: 700;
    display: block;
}

.efes-cart-bar-btn {
    background: var(--efes-primary);
    color: var(--efes-white);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
}

.efes-cart-bar-btn:hover {
    background: var(--efes-primary-dark);
}

/* =============================================================
   Checkout Section
   ============================================================= */

.efes-checkout-section {
    margin-top: 2rem;
    margin-bottom: 2rem;
    scroll-margin-top: 80px;
}

.efes-checkout-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--efes-dark);
    margin-bottom: 1rem;
}

/* Cart Summary in Checkout */
.efes-checkout-cart {
    background: var(--efes-white);
    border-radius: var(--efes-radius);
    padding: 1rem 1.25rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    margin-bottom: 1.5rem;
}

.efes-checkout-cart-items {
    list-style: none;
    padding: 0;
    margin: 0 0 0.75rem 0;
}

.efes-checkout-cart-items li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.95rem;
}

.efes-checkout-cart-items li:last-child {
    border-bottom: none;
}

.efes-checkout-cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.75rem;
    border-top: 2px solid #f0f0f0;
    font-size: 1.1rem;
    font-weight: 700;
}

.efes-checkout-total-amount {
    color: var(--efes-primary);
    font-size: 1.25rem;
}

/* Checkout Form */
.efes-checkout-form {
    background: var(--efes-white);
    border-radius: var(--efes-radius);
    padding: 1.25rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.efes-checkout-form-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--efes-dark);
    margin-bottom: 1rem;
}

/* =============================================================
   Order Button
   ============================================================= */

.efes-btn-order {
    background: var(--efes-primary);
    color: var(--efes-white);
    border: none;
    border-radius: var(--efes-radius-sm);
    padding: 0.75rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    transition: background var(--efes-transition);
}

.efes-btn-order:hover {
    background: var(--efes-primary-dark);
    color: var(--efes-white);
}

.efes-btn-order:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Card Header (shared) */
.efes-card-header {
    background: var(--efes-primary);
    color: var(--efes-white);
}

/* =============================================================
   Confirmation Page
   ============================================================= */

.efes-confirmation-hero {
    padding: 1rem 0;
}

.efes-confirmation-check {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #4CAF50;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    animation: efes-scale-in 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes efes-scale-in {
    0% { transform: scale(0); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.efes-confirmation-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--efes-dark);
}

.efes-confirmation-ordernr {
    font-size: 1.15rem;
    color: var(--efes-text-light);
    margin-top: 0.25rem;
}

.efes-confirmation-wait {
    font-size: 1rem;
    color: var(--efes-primary);
    font-weight: 500;
}

.efes-btn-track {
    font-size: 1.15rem;
    padding: 0.9rem 2rem;
    animation: efes-scale-in 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.3s both;
}

/* =============================================================
   Domino's-Style Order Tracker
   ============================================================= */

.efes-tracker-container {
    max-width: 700px;
    margin: 0 auto;
    padding: 1rem 1rem 2rem;
}

.efes-tracker {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
    margin: 2rem 0 3rem;
    padding: 0 1rem;
}

.efes-tracker-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
    z-index: 2;
}

.efes-tracker-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: #e8e8e8;
    color: #999;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.efes-tracker-step.active .efes-tracker-icon {
    background: var(--efes-primary);
    color: #fff;
    box-shadow: 0 4px 15px rgba(232, 113, 46, 0.3);
}

.efes-tracker-step.completed .efes-tracker-icon {
    background: #4CAF50;
    color: #fff;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.25);
}

.efes-tracker-step.current .efes-tracker-icon {
    animation: efes-pulse 2s infinite;
}

@keyframes efes-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(232, 113, 46, 0.4); }
    50% { box-shadow: 0 0 0 15px rgba(232, 113, 46, 0); }
}

.efes-tracker-label {
    margin-top: 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #999;
    text-align: center;
    max-width: 90px;
    line-height: 1.3;
}

.efes-tracker-step.active .efes-tracker-label,
.efes-tracker-step.completed .efes-tracker-label {
    color: var(--efes-dark);
}

/* Connection Lines */
.efes-tracker-line {
    position: absolute;
    top: 32px;
    left: calc(12.5% + 32px);
    right: calc(12.5% + 32px);
    height: 3px;
    background: #e8e8e8;
    z-index: 1;
    border-radius: 2px;
}

.efes-tracker-line-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, var(--efes-primary));
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 2px;
}

/* Cancelled Banner */
.efes-cancelled-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.5rem;
    margin: 2rem 0;
    background: #FFEBEE;
    border: 1px solid #EF9A9A;
    border-radius: var(--efes-radius);
    color: #C62828;
    font-size: 1.2rem;
    font-weight: 600;
}

.efes-cancelled-banner i {
    font-size: 1.5rem;
}

/* Status Message */
.efes-status-msg {
    text-align: center;
    padding: 1.5rem;
    margin: 1rem 0 2rem;
    border-radius: var(--efes-radius);
    font-size: 1.15rem;
    font-weight: 500;
    line-height: 1.6;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.efes-status-msg.status-confirmed {
    background: #FFF8E1;
    color: #F57F17;
    border: 1px solid #FFE082;
}

.efes-status-msg.status-preparing {
    background: #FFF3E0;
    color: #E65100;
    border: 1px solid #FFB74D;
}

.efes-status-msg.status-ready {
    background: #E8F5E9;
    color: #2E7D32;
    border: 1px solid #A5D6A7;
}

.efes-status-msg.status-picked_up {
    background: #F5F5F5;
    color: #616161;
    border: 1px solid #E0E0E0;
}

.efes-status-msg.status-cancelled {
    background: #FFEBEE;
    color: #C62828;
    border: 1px solid #EF9A9A;
}

.efes-status-msg.efes-fade-out {
    opacity: 0;
    transform: translateY(-8px);
}

.efes-status-msg.efes-fade-in {
    opacity: 1;
    transform: translateY(0);
}

/* Wait Time */
.efes-wait-time {
    text-align: center;
    font-size: 0.95rem;
    color: var(--efes-text-light);
    margin-bottom: 2rem;
}

.efes-wait-time i {
    color: var(--efes-primary);
    margin-right: 0.5rem;
}

/* Details Card */
.efes-details-card {
    border-radius: var(--efes-radius);
    overflow: hidden;
    box-shadow: var(--efes-shadow);
    border: none;
}

/* =============================================================
   Legacy classes (kept for confirmation/status pages)
   ============================================================= */

.efes-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.efes-subtitle {
    font-size: 1.1rem;
    opacity: 0.85;
    margin-bottom: 0;
}

/* =============================================================
   Combo/Menu Highlight
   ============================================================= */

.efes-order-category[data-category-name*="Combo"],
.efes-order-category[data-category-name*="Menu"],
.efes-order-category[data-category-name*="Menü"],
.efes-order-category[data-category-name*="Men"] {
    background: linear-gradient(135deg, #FFF8E1 0%, #FFF3E0 100%);
    border-radius: 16px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    border: 1px solid #FFE082;
}

.efes-combo-badge {
    display: inline-block;
    background: #E8712E;
    color: #fff;
    padding: 0.15rem 0.6rem;
    border-radius: 1rem;
    font-size: 0.7rem;
    font-weight: 700;
    margin-left: 0.5rem;
    vertical-align: middle;
}

.efes-order-product-savings {
    display: inline-block;
    background: #4CAF50;
    color: #fff;
    padding: 0.1rem 0.5rem;
    border-radius: 1rem;
    font-size: 0.65rem;
    font-weight: 700;
    margin-left: 0.4rem;
}

/* =============================================================
   Responsive
   ============================================================= */

@media (max-width: 576px) {
    .efes-title {
        font-size: 1.5rem;
    }

    .efes-subtitle {
        font-size: 0.95rem;
    }

    .efes-order-header {
        padding: 1.75rem 0;
    }

    .efes-order-header h1 {
        font-size: 1.4rem;
    }

    .efes-order-header p {
        font-size: 0.9rem;
    }

    .efes-cat-nav-inner {
        padding: 0 0.75rem;
    }

    .efes-cat-pill {
        padding: 0.4rem 1rem;
        font-size: 0.8rem;
    }

    .efes-order-product {
        padding: 0.75rem;
    }

    .efes-order-product-name {
        font-size: 0.9rem;
    }

    .efes-order-product-price {
        font-size: 0.9rem;
    }

    .efes-add-btn {
        width: 34px;
        height: 34px;
    }

    .efes-qty-btn {
        width: 30px;
        height: 30px;
    }

    .efes-qty-control {
        gap: 0.5rem;
    }

    .efes-cart-bar {
        padding: 0.75rem 1rem;
    }

    .efes-cart-bar-btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }

    .efes-checkout-section {
        scroll-margin-top: 60px;
    }

    /* Tracker mobile: vertikal */
    .efes-tracker {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 0;
    }

    .efes-tracker-step {
        flex-direction: row;
        gap: 1rem;
        padding: 0.75rem 0;
    }

    .efes-tracker-icon {
        width: 48px;
        height: 48px;
        font-size: 1.2rem;
        flex-shrink: 0;
    }

    .efes-tracker-label {
        margin-top: 0;
        text-align: left;
        max-width: none;
        font-size: 0.9rem;
    }

    .efes-tracker-line {
        display: none;
    }

    .efes-status-msg {
        font-size: 1rem;
        padding: 1.25rem;
    }

    .efes-confirmation-title {
        font-size: 1.3rem;
    }

    .efes-confirmation-check {
        width: 64px;
        height: 64px;
        font-size: 1.8rem;
    }
}
