/* Menu Common Styles - Tüm Menü Şablonları İçin Ortak CSS */

/* ============ BODY OVERRIDE ============ */
body {
    padding-top: 0 !important;
}

/* ============ HEADER ============ */
.menu-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 16px 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1)
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px
}

.menu-logo {
    max-height: 48px;
    width: auto;
    border-radius: 8px
}

.menu-logo-text {
    font-size: 20px;
    font-weight: 800;
    color: #fff
}

.hamburger-menu {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px
}

.hamburger-menu span {
    width: 24px;
    height: 3px;
    background: #fff;
    border-radius: 2px;
    transition: .3s
}

.lang-selector {
    display: flex;
    gap: 8px
}

.lang-btn {
    width: 28px;
    height: 20px;
    border-radius: 4px;
    overflow: hidden;
    opacity: .7;
    transition: .2s;
    display: block
}

.lang-btn.active,
.lang-btn:hover {
    opacity: 1;
    transform: scale(1.1)
}

.lang-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover
}

/* ============ DELIVERY ALERT ============ */
.delivery-alert {
    max-width: 600px;
    margin: 12px auto;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    text-align: center;
}

.delivery-alert-closed {
    background: #fee2e2;
    color: #991b1b;
    border-left: 4px solid #dc2626;
}

.delivery-alert-hours {
    background: #dbeafe;
    color: #1e40af;
    border-left: 4px solid #3b82f6;
}

.delivery-alert strong {
    display: block;
    margin-bottom: 4px;
}

.delivery-alert-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    justify-content: center;
    font-size: 12px;
    margin-top: 8px;
}

/* ============ MODAL ============ */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1002;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s ease
}

.modal.active {
    opacity: 1;
    pointer-events: auto
}

.modal-content {
    background: #fff;
    border-radius: 24px 24px 0 0;
    width: 100%;
    max-width: 540px;
    height: 80vh;
    max-height: 80vh;
    overflow-y: auto;
    transform: translateY(100%);
    transition: transform .35s cubic-bezier(.22, .61, .36, 1);
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.2);
    position: relative
}

@media (max-width: 480px) {
    .modal-content {
        height: 75vh;
        max-height: 75vh;
        border-radius: 20px 20px 0 0;
    }
}

.modal.active .modal-content {
    transform: translateY(0)
}

@media (min-width: 992px) {
    .modal {
        align-items: center;
        padding: 24px 16px;
    }

    .modal-content {
        width: min(540px, calc(100% - 32px));
        height: auto;
        max-height: min(88vh, 760px);
        border-radius: 20px;
        transform: translateY(24px);
        box-shadow: 0 20px 48px rgba(0, 0, 0, 0.28);
    }

    .modal-content[style*="max-width:100%"] {
        width: min(540px, calc(100% - 32px)) !important;
        max-width: 540px !important;
    }

    .modal.active .modal-content {
        transform: translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(15, 23, 42, 0.7);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: .2s
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.3)
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    z-index: 10;
}

.modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
}

.modal-header .modal-close {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    position: static;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid #e9ecef;
    display: flex;
    gap: 12px;
    position: sticky;
    bottom: 0;
    background: white;
}

/* Modal Buttons */
.modal-footer button {
    padding: 12px 20px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all .2s
}

.modal-footer .btn-secondary,
.btn-secondary {
    background: #fff;
    color: #374151;
    border: 1px solid #e5e7eb
}

.modal-footer .btn-secondary:hover,
.btn-secondary:hover {
    background: #f3f4f6
}

/* General Button Styles */
.btn {
    flex: 1;
    padding: 14px 20px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.btn:active {
    transform: scale(0.98);
}

.btn-outline {
    background: white;
    border: 2px solid #e5e7eb;
    color: #374151;
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.modal-footer .btn-primary,
.btn.btn-primary,
.btn-primary {
    background: var(--primary);
    color: #fff;
    border: none;
    flex: 1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.modal-footer .btn-primary:hover,
.btn.btn-primary:hover,
.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* Product Modal */
.product-modal-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 0
}

.product-modal-body {
    padding: 20px
}

.product-modal-title {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 8px;
    color: #1f2937
}

.product-modal-desc {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 16px
}

.product-modal-price {
    font-size: 24px;
    font-weight: 800;
    color: var(--primary)
}

/* ============ CART BAR - Modern Oval Style ============ */
.cart-bar {
    position: fixed !important;
    bottom: 20px !important;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) translateY(100px) !important;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%) !important;
    color: white !important;
    padding: 16px 24px !important;
    border-radius: 50px !important;
    box-shadow: 0 8px 32px rgba(74, 74, 74, 0.5) !important;
    display: flex !important;
    align-items: center !important;
    gap: 20px !important;
    z-index: 1001 !important;
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55) !important;
    max-width: 90% !important;
    border-top: none !important;
}

.cart-bar.show {
    transform: translateX(-50%) translateY(0) !important;
}

.cart-info {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 12px !important;
    white-space: nowrap !important;
}

.cart-count {
    background: rgba(255, 255, 255, 0.2) !important;
    padding: 8px 16px !important;
    border-radius: 20px !important;
    font-weight: 700 !important;
    font-size: 14px !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    color: white !important;
}

#cartCount {
    background: white !important;
    color: var(--primary) !important;
    width: 24px !important;
    height: 24px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: 800 !important;
    font-size: 13px !important;
}

.cart-amount {
    font-size: 18px !important;
    font-weight: 800 !important;
    color: white !important;
}

.cart-actions {
    display: flex !important;
    gap: 12px !important;
}

.btn-clear-cart {
    background: rgba(255, 255, 255, 0.15) !important;
    color: #fff !important;
    border: none !important;
    width: 44px !important;
    height: 44px !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    font-size: 16px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: .2s !important;
    padding: 0 !important;
}

.btn-clear-cart:hover {
    background: rgba(255, 255, 255, 0.25) !important;
}

.btn-view-cart {
    background: #fff !important;
    color: var(--primary) !important;
    border: none !important;
    padding: 12px 20px !important;
    border-radius: 25px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: .2s !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.btn-view-cart:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

@media (max-width: 480px) {
    .cart-bar {
        padding: 12px 16px;
        gap: 12px;
        left: 50%;
        bottom: 12px;
    }

    .cart-amount {
        font-size: 16px;
    }

    .btn-view-cart {
        padding: 10px 16px;
        font-size: 14px;
    }
}

/* ============ CART MODAL ============ */
.cart-modal-body {
    padding: 0
}

.cart-item {
    display: flex;
    gap: 12px;
    padding: 16px;
    border-bottom: 1px solid #e5e7eb
}

.cart-item-image {
    width: 64px;
    height: 64px;
    border-radius: 10px;
    background-size: cover;
    background-position: center;
    flex-shrink: 0
}

.cart-item-info {
    flex: 1
}

.cart-item-name {
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 4px
}

.cart-item-options {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 4px
}

.cart-item-price {
    font-weight: 700;
    color: var(--primary)
}

.cart-item-qty {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px
}

.cart-item-qty button {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    background: #fff;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: .2s
}

.cart-item-qty button:hover {
    background: #f3f4f6
}

.cart-item-qty span {
    font-weight: 700;
    min-width: 24px;
    text-align: center
}

.cart-item-remove {
    color: #ef4444;
    background: #fef2f2;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    margin-left: auto
}

.cart-item-remove:hover {
    background: #fee2e2
}

.cart-footer {
    padding: 16px 20px;
    background: #f8f9fa;
    border-top: 1px solid #e5e7eb
}

.cart-total-row {
    display: flex;
    justify-content: space-between;
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 12px
}

.btn-checkout {
    width: 100%;
    padding: 14px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 14px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: .2s
}

.btn-checkout:hover {
    opacity: 0.9
}

.cart-empty {
    padding: 40px 20px;
    text-align: center;
    color: #6b7280
}

.cart-empty i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5
}

/* ============ ORDER TYPE MODAL ============ */
.order-type-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px
}

.order-type-btn {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    cursor: pointer;
    transition: all .2s
}

.order-type-btn:hover {
    border-color: var(--primary);
    background: #fef3c7
}

.order-type-btn.active {
    border-color: var(--primary);
    background: #fef3c7
}

.order-type-btn i {
    font-size: 24px;
    color: var(--primary);
    width: 32px;
    text-align: center
}

.order-type-btn span {
    font-weight: 600;
    font-size: 16px
}

/* ============ FORM ELEMENTS ============ */
.form-group {
    margin-bottom: 16px
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #374151
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 15px;
    transition: .2s;
    box-sizing: border-box
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary)
}

.form-group textarea {
    min-height: 80px;
    resize: vertical
}

/* ============ OPTION GROUPS ============ */
.option-group {
    margin-bottom: 20px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 12px
}

.option-group-title {
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px
}

.option-group-title .required {
    color: #ef4444;
    font-size: 12px
}

.option-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #e5e7eb
}

.option-item:last-child {
    border-bottom: none
}

.option-item input[type="radio"],
.option-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--primary)
}

.option-item label {
    flex: 1;
    cursor: pointer;
    font-size: 14px
}

.option-item .option-price {
    font-weight: 600;
    color: var(--primary)
}

/* ============ SEARCH BOX ============ */
.search-container {
    margin: 16px auto;
    max-width: 960px;
    padding: 0 16px
}

.search-box {
    position: relative
}

.search-box input {
    width: 100%;
    padding: 14px 20px 14px 48px;
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    font-size: 15px;
    background: #fff;
    transition: all .2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .04);
    box-sizing: border-box
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 4px 16px rgba(0, 0, 0, .08)
}

.search-box input::placeholder {
    color: #9ca3af
}

.search-box .search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 16px;
    pointer-events: none
}

.search-box .clear-search {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 16px;
    cursor: pointer;
    display: none
}

.search-box .clear-search.show {
    display: block
}

/* ============ BOTTOMBAR / FOOTER ============ */
.bottombar {
    background: #2d3748;
    padding: 30px 20px;
    text-align: center;
    color: #fff;
}

/* Cart bottombar - accordion tema için */
.bottombar.cart-bottombar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    padding: 12px 20px 16px;
    display: none;
    z-index: 998;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15)
}

.bottombar.cart-bottombar.show,
.bottombar.cart-bottombar.active {
    display: block
}

.bottombar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 600px;
    margin: 0 auto
}

.bottombar-info {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff
}

.bottombar-count {
    background: rgba(255, 255, 255, 0.2);
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 16px
}

.bottombar-total {
    font-size: 18px;
    font-weight: 800
}

.bottombar-btn {
    background: #fff;
    color: var(--primary);
    border: none;
    padding: 12px 24px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: .2s
}

.bottombar-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15)
}

/* ============ FOOTER ============ */
.footer-bar {
    background: #2d3748;
    padding: 30px 20px;
    text-align: center;
    border-top: 1px solid #4a5568
}

.footer-bar a,
.footer-bar a:link,
.footer-bar a:visited,
.footer-bar a:hover,
.footer-bar a:active {
    color: #fff !important;
    text-decoration: none !important
}

.footer-bar a:hover {
    opacity: 0.8
}

/* ============ QUANTITY CONTROLS ============ */
.qty-control {
    display: flex;
    align-items: center;
    gap: 12px
}

.qty-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 2px solid #e5e7eb;
    background: #fff;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: .2s
}

.qty-btn:hover {
    border-color: var(--primary);
    color: var(--primary)
}

.qty-btn:active {
    transform: scale(0.95)
}

.qty-value {
    font-size: 18px;
    font-weight: 700;
    min-width: 40px;
    text-align: center
}

/* ============ PAYMENT METHOD ============ */
.payment-options {
    display: flex;
    flex-direction: column;
    gap: 10px
}

.payment-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    cursor: pointer;
    transition: .2s
}

.payment-option:hover {
    border-color: var(--primary)
}

.payment-option.active {
    border-color: var(--primary);
    background: #fef3c7
}

.payment-option input {
    display: none
}

.payment-option i {
    font-size: 20px;
    color: var(--primary);
    width: 24px;
    text-align: center
}

.payment-option span {
    font-weight: 600
}

/* ============ TOAST ============ */
.toast {
    position: fixed;
    top: 120px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: #fff;
    padding: 16px 28px;
    border-radius: 16px;
    z-index: 9999;
    font-weight: 700;
    font-size: 15px;
    min-width: 280px;
    text-align: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    animation: toastIn .3s ease
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px)
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0)
    }
}

/* ============ UTILITIES ============ */
.text-primary {
    color: var(--primary)
}

.text-muted {
    color: #6b7280
}

.font-bold {
    font-weight: 700
}

.text-center {
    text-align: center
}

.mt-2 {
    margin-top: 8px
}

.mt-4 {
    margin-top: 16px
}

.mb-2 {
    margin-bottom: 8px
}

.mb-4 {
    margin-bottom: 16px
}

/* ============ MODAL BADGES ============ */
.modal-badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.modal-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 2px solid;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    background: #fff;
    white-space: nowrap;
}

.modal-badge i {
    font-size: 14px;
}

.modal-badge span {
    line-height: 1;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 640px) {
    .modal-content {
        max-height: 95vh;
        border-radius: 20px 20px 0 0
    }

    .cart-bar {
        padding: 10px 16px !important;
        gap: 12px !important;
        max-width: 90% !important
    }

    .cart-count {
        padding: 6px 10px !important;
        font-size: 12px !important
    }

    #cartCount {
        width: 20px !important;
        height: 20px !important;
        font-size: 11px !important
    }

    .cart-amount {
        font-size: 14px !important
    }

    .btn-view-cart {
        padding: 8px 14px !important;
        font-size: 13px !important
    }

    .btn-clear-cart {
        width: 36px !important;
        height: 36px !important;
        font-size: 14px !important
    }

    .header-container {
        padding: 0 8px
    }
}
