/* Restaurant Menu - طراحی کارت عمودی */
/* نسخه 2.0.0 - عکس بزرگ بالا، متن پایین */

/* ===== تنظیمات پایه ===== */
.restaurant-menu-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 15px;
    font-family: "Croissant-Medium", 'Vazir', Arial, sans-serif;
    direction: rtl;
    background-color: #f6f6f6;
}

.restaurant-menu-container * {
    box-sizing: border-box;
}

/* ===== منوی دسته‌بندی ===== */
.restaurant-menu-categories {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 15px 5px;
    margin-bottom: 15px;
    flex-wrap: nowrap;
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid #d0d0d0;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
}

.restaurant-menu-categories::-webkit-scrollbar {
    display: none;
}

.menu-category-btn {
    background: none;
    border: none;
    outline: none;
    cursor: pointer;
    color: #666666;
    font-size: 15px;
    font-weight: normal;
    padding: 8px 12px;
    margin: 0 12px 0 0;
    white-space: nowrap;
    flex: 0 0 auto;
    transition: color 0.2s ease;
    font-family: "Croissant-Medium", 'Vazir', Arial, sans-serif;
}

.menu-category-btn:hover {
    color: #333333;
}

.menu-category-btn.active {
    color: #007cba;
    font-weight: bold;
}

/* ===== کانتینر محصولات ===== */
.restaurant-menu-products {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 10px;
    background-color: #f6f6f6;
}

/* ===== گروه دسته‌بندی ===== */
.category-group {
    margin-bottom: 25px;
}

.category-title {
    font-size: 20px;
    font-weight: bold;
    color: #333333;
    margin: 0 0 20px 0;
    padding: 15px 0;
    border-bottom: 1px solid #d0d0d0;
    text-align: center;
    font-family: "Croissant-Medium", 'Vazir', Arial, sans-serif;
}

/* ===== کارت محصول - طراحی عمودی ===== */
.restaurant-menu-item {
    display: flex;
    flex-direction: column;
    background-color: #ffffff;
    border: 1px solid #d0d0d0;
    border-radius: 0;
    margin: 0 0 15px 0;
    padding: 0;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.restaurant-menu-item:hover {
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

/* ===== عکس محصول - بزرگ و بالا ===== */
.menu-item-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    padding: 25px;
    background-color: #f5f2ed;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.menu-item-image img {
    max-width: 85%;
    max-height: 85%;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* ===== محتوای محصول - پایین ===== */
.menu-item-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: right;
    padding: 20px 25px 25px 25px;
    background: #ffffff;
    direction: rtl;
}

/* ===== نام محصول ===== */
.menu-item-title {
    font-size: 20px;
    font-weight: bold;
    color: #333333;
    margin: 0 0 5px 0;
    line-height: 1.4;
    font-family: "Croissant-Medium", 'Vazir', Arial, sans-serif;
}

/* ===== توضیحات محصول ===== */
.menu-item-description {
    font-size: 13px;
    color: #888888;
    line-height: 1.6;
    margin: 0 0 10px 0;
    font-family: "ModamFaNumWeb-Regular", 'Vazir', Arial, sans-serif;
}

/* ===== قیمت محصول ===== */
.menu-item-price {
    font-size: 18px;
    color: #333333;
    font-weight: normal;
    margin: 5px 0 0 0;
    font-family: "ModamFaNumWeb-Regular", Arial, sans-serif;
    direction: ltr;
    text-align: right;
}

.menu-item-price .woocommerce-Price-amount,
.menu-item-price .amount {
    font-family: "ModamFaNumWeb-Regular", Arial, sans-serif;
}

/* ===== لودینگ ===== */
.restaurant-menu-loading {
    text-align: center;
    padding: 40px 20px;
}

.loading-spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007cba;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== پیام‌ها ===== */
.no-products-found {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 16px;
    background: #f8f9fa;
    border: 1px dashed #ccc;
    margin: 20px 0;
}

.restaurant-menu-error {
    background: #ffebee;
    color: #c62828;
    padding: 20px;
    text-align: center;
    border: 1px solid #ffcdd2;
}

/* ===== ریسپانسیو - تبلت ===== */
@media (max-width: 768px) {
    .restaurant-menu-container {
        padding: 10px;
    }
    
    .restaurant-menu-categories {
        padding: 12px 5px;
        margin-bottom: 12px;
    }
    
    .menu-category-btn {
        font-size: 14px;
        padding: 6px 10px;
        margin-right: 10px;
    }
    
    .restaurant-menu-products {
        gap: 12px;
        padding: 5px;
    }
    
    .category-title {
        font-size: 18px;
        padding: 12px 0;
    }
    
    .menu-item-image {
        padding: 20px;
    }
    
    .menu-item-content {
        padding: 15px 20px 20px 20px;
    }
    
    .menu-item-title {
        font-size: 18px;
    }
    
    .menu-item-description {
        font-size: 12px;
    }
    
    .menu-item-price {
        font-size: 16px;
    }
}

/* ===== ریسپانسیو - موبایل کوچک ===== */
@media (max-width: 480px) {
    .restaurant-menu-container {
        padding: 8px;
    }
    
    .menu-category-btn {
        font-size: 13px;
        padding: 5px 8px;
        margin-right: 8px;
    }
    
    .restaurant-menu-products {
        gap: 10px;
    }
    
    .category-title {
        font-size: 16px;
    }
    
    .menu-item-image {
        padding: 15px;
    }
    
    .menu-item-content {
        padding: 12px 15px 18px 15px;
    }
    
    .menu-item-title {
        font-size: 16px;
    }
    
    .menu-item-description {
        font-size: 11px;
    }
    
    .menu-item-price {
        font-size: 15px;
    }
}

/* ===== انیمیشن ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.restaurant-menu-item {
    animation: fadeInUp 0.3s ease-out;
    animation-fill-mode: both;
}

.restaurant-menu-item:nth-child(1) { animation-delay: 0.05s; }
.restaurant-menu-item:nth-child(2) { animation-delay: 0.1s; }
.restaurant-menu-item:nth-child(3) { animation-delay: 0.15s; }
.restaurant-menu-item:nth-child(4) { animation-delay: 0.2s; }
.restaurant-menu-item:nth-child(5) { animation-delay: 0.25s; }
.restaurant-menu-item:nth-child(6) { animation-delay: 0.3s; }

/* ===== ستاره اسپشیال - پیشنهاد سربینو ===== */
.rm-special-star {
    display: inline-block;
    color: #e6a817;
    font-size: 18px;
    margin-left: 6px;
    vertical-align: middle;
    line-height: 1;
    text-shadow: 0 1px 3px rgba(230, 168, 23, 0.4);
}

.rm-is-special .menu-item-title {
    /* عنوان محصولات اسپشیال - اختیاری: می‌توانید رنگ یا استایل متفاوت بدهید */
}

/* ===== سفارش آنلاین سریع ===== */
.restaurant-online-order {
    background: #f6f6f6;
    padding-bottom: 76px;
}

.restaurant-online-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 18px;
    align-items: start;
}

.restaurant-online-products {
    min-width: 0;
}

.restaurant-online-cart {
    position: sticky;
    top: 84px;
    background: #ffffff;
    border: 1px solid #d0d0d0;
    padding: 18px;
    font-family: "ModamFaNumWeb-Regular", 'Vazir', Arial, sans-serif;
    max-height: calc(100vh - 104px);
    overflow: auto;
}

.restaurant-online-cart-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.restaurant-online-cart h2 {
    margin: 0 0 14px 0;
    font-size: 18px;
    color: #333333;
}

.restaurant-online-cart-head h2 {
    margin: 0;
}

.restaurant-online-cart-close {
    display: none;
    width: 34px;
    height: 34px;
    border: 1px solid #dddddd;
    background: #ffffff;
    color: #333333;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
}

.restaurant-online-empty {
    color: #777777;
    font-size: 14px;
    padding: 12px 0;
}

.restaurant-online-cart-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #eeeeee;
}

.restaurant-online-cart-row strong,
.restaurant-online-cart-row span {
    display: block;
    line-height: 1.7;
}

.restaurant-online-cart-row strong {
    font-size: 14px;
    color: #333333;
}

.restaurant-online-cart-row span {
    font-size: 12px;
    color: #777777;
}

.restaurant-online-remove {
    width: 30px;
    height: 30px;
    border: 1px solid #d0d0d0;
    background: #ffffff;
    color: #b3261e;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.restaurant-online-trash-icon {
    position: relative;
    display: inline-block;
    width: 18px;
    height: 18px;
}

.restaurant-online-trash-icon span,
.restaurant-online-trash-icon i,
.restaurant-online-trash-icon b {
    position: absolute;
    background: currentColor;
    display: block;
}

.restaurant-online-trash-icon span {
    left: 2px;
    top: 6px;
    width: 14px;
    height: 11px;
    border-radius: 1px 1px 3px 3px;
}

.restaurant-online-trash-icon span::before,
.restaurant-online-trash-icon span::after {
    content: "";
    position: absolute;
    top: 2px;
    width: 2px;
    height: 7px;
    background: #ffffff;
    opacity: 0.85;
}

.restaurant-online-trash-icon span::before {
    left: 4px;
}

.restaurant-online-trash-icon span::after {
    right: 4px;
}

.restaurant-online-trash-icon i {
    left: 1px;
    top: 3px;
    width: 16px;
    height: 2px;
    border-radius: 2px;
}

.restaurant-online-trash-icon b {
    left: 6px;
    top: 1px;
    width: 6px;
    height: 2px;
    border-radius: 2px;
}

.restaurant-online-total {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin: 14px 0;
    padding-top: 14px;
    border-top: 1px solid #d0d0d0;
    color: #333333;
}

.restaurant-online-total strong {
    direction: rtl;
}

.restaurant-online-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.restaurant-online-form label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: #333333;
    font-size: 13px;
}

.restaurant-online-form input,
.restaurant-online-form textarea {
    width: 100%;
    border: 1px solid #cfcfcf;
    background: #ffffff !important;
    color: #111111 !important;
    -webkit-text-fill-color: #111111;
    padding: 10px;
    font: inherit;
    border-radius: 0;
    opacity: 1;
    caret-color: #111111;
}

.restaurant-online-form input::placeholder,
.restaurant-online-form textarea::placeholder {
    color: #8a8a8a;
    opacity: 1;
}

.restaurant-online-form input:focus,
.restaurant-online-form textarea:focus {
    border-color: #222222;
    outline: none;
    box-shadow: 0 0 0 1px #222222;
}

.restaurant-online-form .restaurant-online-prefilled {
    color: #111111 !important;
    -webkit-text-fill-color: #111111;
    background: #ffffff !important;
    font-weight: 500;
}

.restaurant-online-form input:-webkit-autofill,
.restaurant-online-form input:-webkit-autofill:hover,
.restaurant-online-form input:-webkit-autofill:focus,
.restaurant-online-form textarea:-webkit-autofill,
.restaurant-online-form textarea:-webkit-autofill:hover,
.restaurant-online-form textarea:-webkit-autofill:focus {
    -webkit-text-fill-color: #111111;
    -webkit-box-shadow: 0 0 0 1000px #ffffff inset;
    box-shadow: 0 0 0 1000px #ffffff inset;
    caret-color: #111111;
}

.restaurant-online-form textarea {
    resize: vertical;
}

.restaurant-online-payment-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.restaurant-online-payment-option {
    display: flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    padding: 8px 10px;
    border: 1px solid #cfcfcf;
    background: #ffffff;
    color: #222222;
    cursor: pointer;
    text-align: center;
    font-family: "ModamFaNumWeb-Regular", 'Vazir', Arial, sans-serif;
    font-size: 13px;
    line-height: 1.5;
}

.restaurant-online-payment-option.is-selected {
    border-color: #222222;
    background: #222222;
    color: #ffffff;
}

.restaurant-online-lookup-message {
    min-height: 22px;
    margin-top: -4px;
    font-size: 12px;
    line-height: 1.7;
    color: #777777;
}

.restaurant-online-lookup-message.loading {
    color: #555555;
}

.restaurant-online-lookup-message.success {
    color: #008a20;
}

.restaurant-online-lookup-message.error {
    color: #777777;
}

.restaurant-online-submit,
.restaurant-online-add,
.restaurant-online-continue {
    border: 1px solid #222222;
    background: #222222;
    color: #ffffff;
    cursor: pointer;
    font-family: "ModamFaNumWeb-Regular", 'Vazir', Arial, sans-serif;
}

.restaurant-online-submit {
    padding: 12px 14px;
    font-size: 15px;
}

.restaurant-online-submit:disabled {
    opacity: 0.65;
    cursor: wait;
}

.restaurant-online-continue {
    width: 100%;
    min-height: 40px;
    margin: 4px 0 14px;
    background: #ffffff;
    color: #222222;
    font-size: 13px;
}

.restaurant-online-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
    margin-top: 12px;
}

.restaurant-online-stepper {
    display: inline-grid;
    grid-template-columns: 28px 34px 28px;
    align-items: center;
    min-height: 32px;
    border: 1px solid #dddddd;
    background: #f8f8f8;
    border-radius: 999px;
    overflow: hidden;
}

.restaurant-online-qty {
    width: 28px;
    height: 32px;
    border: none;
    background: transparent;
    color: #222222;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    padding: 0;
}

.restaurant-online-qty:hover {
    background: #eeeeee;
}

.restaurant-online-qty-value {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    border: none;
    color: #333333;
    font-size: 13px;
    background: #ffffff;
}

.restaurant-online-add {
    min-height: 34px;
    padding: 0 10px;
    font-size: 13px;
    border-radius: 999px;
    background: #ffffff;
    color: #222222;
    border-color: #222222;
    min-width: 104px;
    margin-right: auto;
}

.restaurant-online-add:hover {
    background: #222222;
    color: #ffffff;
}

.restaurant-online-message {
    min-height: 24px;
    font-size: 13px;
    line-height: 1.7;
}

.restaurant-online-message.success {
    color: #008a20;
}

.restaurant-online-message.error {
    color: #b3261e;
}

.restaurant-online-notice {
    position: fixed;
    right: 18px;
    bottom: 86px;
    z-index: 10000;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 6px 14px;
    width: min(420px, calc(100vw - 36px));
    padding: 16px 18px;
    background: #0f5132;
    color: #ffffff;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2);
    transform: translateY(18px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    font-family: "ModamFaNumWeb-Regular", 'Vazir', Arial, sans-serif;
}

.restaurant-online-notice.is-visible {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.restaurant-online-notice strong {
    font-size: 16px;
}

.restaurant-online-notice-text {
    grid-column: 1 / -1;
    font-size: 13px;
    line-height: 1.8;
}

.restaurant-online-notice-close {
    width: 30px;
    height: 30px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: transparent;
    color: #ffffff;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
}

.restaurant-online-floating-cart {
    display: none;
    position: fixed;
    right: 14px;
    left: 14px;
    bottom: 14px;
    z-index: 9998;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 10px;
    min-height: 54px;
    padding: 10px 14px;
    border: 1px solid #222222;
    background: #222222;
    color: #ffffff;
    cursor: pointer;
    font-family: "ModamFaNumWeb-Regular", 'Vazir', Arial, sans-serif;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
}

.restaurant-online-floating-count {
    color: #d9d9d9;
    font-size: 12px;
    white-space: nowrap;
}

.restaurant-online-floating-total {
    text-align: center;
    font-size: 13px;
    white-space: nowrap;
}

.restaurant-online-floating-cart span:last-child {
    font-size: 13px;
    white-space: nowrap;
}

@media (max-width: 900px) {
    .restaurant-online-layout {
        grid-template-columns: 1fr;
    }

    .restaurant-online-cart {
        position: fixed;
        right: 0;
        left: 0;
        bottom: 0;
        top: auto;
        z-index: 9999;
        max-height: 82vh;
        padding: 18px 16px 22px;
        border-width: 1px 0 0 0;
        transform: translateY(105%);
        transition: transform 0.24s ease;
        box-shadow: 0 -12px 30px rgba(0, 0, 0, 0.18);
    }

    .restaurant-online-order.is-cart-open .restaurant-online-cart {
        transform: translateY(0);
    }

    .restaurant-online-cart-close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .restaurant-online-floating-cart {
        display: grid;
    }
}

@media (max-width: 480px) {
    .restaurant-online-controls {
        gap: 8px;
    }

    .restaurant-online-add {
        min-width: 96px;
    }
}
