/* Restaurant Menu Manager - Frontend Styles (Optimized) */

.rmm-frontend-container {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: #f5e6e8;
    margin: 0 auto;
}
[data-category="cold-appetizers"] { order: 1; }
[data-category="hot-appetizers"] { order: 2; }
[data-category="main-grills"] { order: 3; }
[data-category="chefs-specials"] { order: 4; }
[data-category="signature-dishes"] { order: 5; }
[data-category="combination-plates"] { order: 6; }
[data-category="fish-specialities"] { order: 7; }
[data-category="steaks"] { order: 8; }
[data-category="pastas"] { order: 9; }
[data-category="vegetarian"] { order: 10; }
[data-category="salads"] { order: 11; }
[data-category="kids-menu"] { order: 12; }
[data-category="sides"] { order: 13; }
[data-category="sauces"] { order: 14; }
#category-cold-appetizers { order: 1; }
#category-hot-appetizers { order: 2; }
#category-main-grills { order: 3; }
#category-chefs-specials { order: 4; }
#category-signature-dishes { order: 5; }
#category-combination-plates { order: 6; }
#category-fish-specialities { order: 7; }
#category-steaks { order: 8; }
#category-pastas { order: 9; }
#category-vegetarian { order: 10; }
#category-salads { order: 11; }
#category-kids-menu { order: 12; }
#category-sides { order: 13; }
#category-sauces { order: 14; }

/* Header Styles */
.rmm-header {
    display: flex;
justify-content: space-between;
    align-items: center;
    margin-bottom: 0;
    flex-wrap: wrap;
    gap: 15px;
    padding: 20px 30px;
}

.rmm-menu-selector {
    position: relative;
}

.rmm-menu-btn {
    background: white;
    border: 2px solid #e91e63;
    padding: 12px 24px;
    border-radius: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 500;
    color: #333;
    transition: all 0.3s ease;
}

.rmm-menu-btn:hover {
    background: #e91e63;
    color: white;
}

.rmm-dropdown-arrow {
    font-size: 12px;
    transition: transform 0.3s;
}

.rmm-menu-btn:hover .rmm-dropdown-arrow {
    transform: rotate(180deg);
}

/* Search Container */
.rmm-search-container {
    display: flex;
align-items: center;
    background: #f5e6e8;
    border: 1px solid #a94c6e;
    border-radius: 30px;
    padding: 5px;
    min-width: 250px;
    flex: 0 1 350px;
    overflow: hidden;
}
.rmm-item-image {
    width: 30%;
}
.rmm-search-input {
    border: none!important;
    outline: none!important;
    width: 100%!important;
	height:30px!important;
    padding: 5px!important;
	background:transparent!important;
    font-size: 14px!important;
}

.rmm-search-btn {
    background:none!important;
    border:none!important;
    cursor:pointer!important;
    padding:5px!important;
    font-size:18px!important;
}

/* Category Navigation with Slider */
.rmm-category-nav-wrapper {
    position: relative;
    background: white;
    border-radius: 12px;
    margin-bottom: 25px;
    padding: 0;
    transition: all 0.3s ease;
    z-index: 100;
	background:#f5e6e8;
}

.rmm-category-nav-wrapper.sticky {
  position: fixed;
    top: 20px;
    left: 0;
    right: 0;
    border-radius: 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    max-width: 100%;
    margin: 0;
    padding: 0px 30px;
    background: rgb(253 253 242);
    backdrop-filter: blur(10px);
}

.rmm-nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    border: 1px solid #ddd;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.rmm-nav-arrow:hover:not(.disabled) {
    background: #673ab7;
    color: white;
    transform: translateY(-50%) scale(1.1);
}

.rmm-nav-arrow.disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.rmm-nav-prev {
    left: 10px;
}

.rmm-nav-next {
    right: 10px;
}

.rmm-category-nav {
    overflow-x: auto;
    padding: 15px 30px;
    scrollbar-width: none;
	background:#f5e6e8;
    -ms-overflow-style: none;
    scroll-behavior: smooth;
}

.rmm-category-nav::-webkit-scrollbar {
    display: none;
}

.rmm-category-nav-inner {
    display: flex;
    gap: 12px;
    white-space: nowrap;
}

.rmm-category-btn {
    background: #f0f0f0;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    white-space: nowrap;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.rmm-category-btn:hover {
    background: #e0e0e0;
    transform: translateY(-2px);
}

.rmm-category-btn.active {
    background: #a94c6e;
    color: white;
    box-shadow: 0 4px 12px rgba(103, 58, 183, 0.3);
}

.rmm-category-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
    border-radius: 50%;
}

/* Menu Content */
.rmm-menu-content {
	    display: flex;
    flex-direction: column;
    padding: 10px 0;
	background:#efd6d9;
    padding-top: 20px;
    transition: opacity 0.3s ease;
}

.rmm-menu-content.loading {
    opacity: 0.5;
    pointer-events: none;
}

.sticky ~ .rmm-menu-content {
    padding-top: 80px;
}

.rmm-category-section {
       background: #efd6d9;
    border-radius: 0;
    padding: 25px;
    margin-bottom: 0;
}

.rmm-category-title {
   font-size: 28px !important;
    margin-bottom: 25px;
    font-weight: 600;
    position: relative;
    padding-bottom: 10px;
    letter-spacing: 1px !important;
}

.rmm-category-title:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #e91e63, #673ab7);
    border-radius: 2px;
}

/* Items Grid */
.rmm-items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
    gap: 20px;
}

.rmm-item-card {
    background: #fce4ec;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    display: flex;
	flex-direction: row-reverse;
    padding: 0;
	display: flex;
    justify-content: space-between;
	padding:10px;
}
.rmm-item-image img {
	border-radius:10px!important;
}

.rmm-item-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.rmm-item-image img {
    width: 100%;
    height: 75%!important;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.rmm-item-card:hover .rmm-item-image img {
    transform: scale(1.05);
}

/* Item Content */
.rmm-item-content {
    flex: 1;
    padding: 15px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.rmm-item-header {
    margin-bottom: 8px;
}

.rmm-item-title {
      font-size:16px!important;
    font-weight:400!important;
    margin: 0;
    line-height:1.3!important;
    letter-spacing:1px!important;
}

.rmm-item-description {
    color: #666;
    font-size: 13px;
    margin-bottom: 10px;
    line-height: 1.4;
    flex: 1;
}

.rmm-item-footer {
     display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-direction: column;
    gap: 15px;
}

.rmm-item-price {
    font-size: 18px;
    font-weight: bold;
    color: #e91e63;
}

/* Tags with Image Support */
.rmm-item-tags {
    display: flex;
    gap: 5px;
}

.rmm-tag {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
}

.rmm-tag img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rmm-tag-icon {
    font-size: 14px;
}

/* Modal Styles */
.rmm-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    animation: fadeIn 0.15s;
}

.rmm-modal.loading .rmm-modal-content {
    opacity: 0.5;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.rmm-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    animation: slideUp 0.15s;
}

@keyframes slideUp {
    from {
        transform: translate(-50%, -45%);
        opacity: 0;
    }
    to {
        transform: translate(-50%, -50%);
        opacity: 1;
    }
}

.rmm-modal-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.rmm-modal-header h3 {
    margin: 0;
    color: #333;
    font-size: 20px;
}

.rmm-modal-close {
 border-radius: 100px !important;
    font-size: 28px !important;
    cursor: pointer !important;
    transition: color 0.3s;
    height: 30px;
    width: 30px;
    display: flex;
    justify-content: center;
    position: fixed;
    left: 15px;
    gap: 0;
    top: 10px;
    z-index: 99999;
    padding: 0 !important;
    background: #efd6d9 !important;
    align-items: center;
	    font-family: math !important;
}
.rmm-product-details {
    padding: 20px;
}

.rmm-modal-close:hover {
    color: #333;
}

.rmm-modal-body {
    padding: 20px;
}

/* Menu Selector Modal */
.rmm-menu-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s;
    margin-bottom: 10px;
}

.rmm-menu-option:hover {
    background: #f5f5f5;
}

.rmm-menu-option-name {
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

.rmm-menu-option-time {
    font-size: 14px;
    color: #666;
}

.rmm-menu-option-arrow {
    color: #999;
    font-size: 18px;
}

/* Product Modal */
.rmm-product-modal {
    max-width: 1000px;
}

.rmm-product-modal-body {
    display: flex;
    gap: 30px;
    padding: 0px;
}

.rmm-product-image {
    flex: 0 0 450px;
}

.rmm-product-image img {
    width: 100%;
    border-radius: 12px;
    object-fit: cover;
}

.rmm-product-details {
    flex: 1;
}

.rmm-product-details h2 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 24px!important;
}

.rmm-product-details p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
}

.rmm-product-price {
    font-size: 28px;
    font-weight: bold;
    color: #e91e63;
    margin-bottom: 20px;
}

.rmm-product-tags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.rmm-product-tags .rmm-tag {
    width: 30px;
    height: 30px;
	padding:0!important;
}

.rmm-product-tags .rmm-tag img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Loading and Error States */
.rmm-loading {
    text-align: center;
    padding: 60px 20px;
    font-size: 18px;
    color: #666;
}

.rmm-no-results {
    text-align: center;
    padding: 40px 20px;
    background: white;
    border-radius: 12px;
    margin: 20px 0;
    color: #666;
    font-size: 16px;
}

/* Admin Styles */
.rmm-tag {
    padding: 2px 8px;
    background: #f0f0f0;
    border-radius: 3px;
    font-size: 12px;
    margin-right: 5px;
    border-radius: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .rmm-header {
        flex-direction: column;
        align-items: stretch;
    }
	.rmm-menu-btn{
		width:100%;
		justify-content: space-between;
	}
    .rmm-search-container {
        width: 100%;
		flex: 0 1 50px;
    }
    
    .rmm-items-grid {
        grid-template-columns: 1fr;
    }
    
    .rmm-item-card {
      justify-content: space-between;
    }
    
    .rmm-item-image {
        border-radius: 10px;
    }
    
    .rmm-product-modal-body {
        flex-direction: column;
    }
    
    .rmm-product-image {
        flex: 1;
    }
    
    .rmm-category-nav {
        padding: 10px 50px;
    }
    
    .rmm-category-section {
        padding: 15px;
    }
    
    .rmm-category-nav-wrapper.sticky {
       padding: 10px 0 0px 0;
    }
	button.rmm-category-btn {
    font-size: 10px;
    padding: 5px;
}
}

/* Performance Optimizations */
.rmm-item-card,
.rmm-category-btn,
.rmm-modal-content {
    will-change: transform;
}

.rmm-item-image img {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}
@media(max-width:768px){
	.rmm-item-image{
	width: 35%;
	}
	.rmm-item-image img {
    width: 100%;
    height: 100px !important;
	}
}

.rmm-menu-content.loading {
  position: relative;
  min-height: 400px;
  transition: opacity 0.3s ease;
}

.rmm-menu-content.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #2196f3;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
.rmm-item-description strong ,#modalProductDescription strong{
    display: block;
    margin-bottom: 2px;
    color: #1a1a1a;
}
@keyframes spin {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}