/* RMM One-Page Menu Layout */

:root {
    --rmm-primary: #ff9900;
    /* Match KKS Accent */
    --rmm-text-dark: #2d3436;
    --rmm-text-light: #636e72;
    --rmm-card-bg: #ffffff;
    --rmm-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    --rmm-radius: 12px;
}

/* Force container transparent to pick up theme bg */
.rmm-menu-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background: transparent !important;
    overflow: visible !important;
    /* Critical for sticky to work */
}

/* ... Sticky Nav ... */
.rmm-sticky-nav-container {
    position: -webkit-sticky;
    /* Safari */
    position: sticky;
    top: 0;
    z-index: 7;
    /* Ensure it stays on top */
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 10px 0;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: top 0.3s;
}

.rmm-sticky-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin: 0;
    padding: 0 20px;
    list-style: none;
}

.rmm-sticky-nav li a {
    text-decoration: none;
    color: var(--rmm-text-dark);
    font-weight: 700;
    padding: 10px 20px;
    border-radius: 50px;
    /* Pill shape */
    transition: all 0.3s ease;
    display: inline-block;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 0.5px;
}

.rmm-sticky-nav li a:hover,
.rmm-sticky-nav li a.active {
    background-color: var(--rmm-primary);
    color: #fff;
    box-shadow: 0 4px 10px rgba(255, 153, 0, 0.3);
    /* Glow for active */
}

/* Category Sections */
.rmm-category-section {
    margin-bottom: 60px;
    scroll-margin-top: 100px;
    /* Offset for sticky header */
}

.rmm-category-title {
    font-size: 2em;
    margin-bottom: 30px;
    color: var(--rmm-primary);
    position: relative;
    padding-bottom: 10px;
    text-transform: uppercase;
    font-weight: 700;
}

.rmm-category-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--rmm-primary);
    border-radius: 2px;
}

/* Grid Layout */
.rmm-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    align-items: start;
}

/* --- New Tools: Search & Filter --- */
.rmm-tools-container {
    max-width: 800px;
    margin: 20px auto 30px;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}

/* Search Modernization */
.rmm-search-box {
    width: 100%;
    position: relative;
    max-width: 600px;
}

.rmm-search-box input {
    width: 100%;
    padding: 18px 50px 18px 30px;
    border: none;
    background: #fff;
    border-radius: 50px;
    font-size: 16px;
    outline: none;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    /* Floating shadow */
}

.rmm-search-box input:focus {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    /* Lift on focus */
    transform: translateY(-2px);
}

.rmm-search-box::after {
    content: '\1F50D';
    /* Search Icon */
    position: absolute;
    right: 25px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.4;
    pointer-events: none;
    font-size: 18px;
}

/* Scroll To Top */
#rmm-scroll-top {
    display: none;
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1001;
    /* Above everything */
    border: none;
    outline: none;
    background-color: var(--rmm-primary);
    color: white;
    cursor: pointer;
    padding: 0;
    border-radius: 50%;
    font-size: 24px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    width: 50px;
    height: 50px;
    line-height: 50px;
    text-align: center;
    transition: transform 0.3s, background-color 0.3s;
}

#rmm-scroll-top.visible {
    display: block;
    animation: fadeIn 0.3s;
}

#rmm-scroll-top:hover {
    transform: translateY(-5px);
    background-color: #333;
}

/* Full Width Subtitle (Spans all columns) */
.rmm-grid-full-width {
    grid-column: 1 / -1;
    margin-top: 20px;
    margin-bottom: 10px;
    font-size: 1.2em;
    font-weight: 700;
    letter-spacing: 1px;
    padding-bottom: 5px;
    border-bottom: 2px solid #eee;
}

.rmm-sub-title.veg {
    color: #27ae60;
    border-color: #27ae60;
}

.rmm-sub-title.nonveg {
    color: #c0392b;
    border-color: #c0392b;
}

/* Product Card */
.rmm-product-card {
    background: #ffffff !important;
    border-radius: var(--rmm-radius);
    box-shadow: var(--rmm-shadow);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.rmm-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Image */
.rmm-product-image-wrapper {
    position: relative;
    overflow: hidden;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
}

.rmm-product-image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform 0.5s ease;
}

.rmm-product-card:hover .rmm-product-image {
    transform: scale(1.05);
}

.rmm-product-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #f0f0f0;
}

/* Overlay & badges */
.rmm-product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}

.rmm-product-card:hover .rmm-product-overlay,
.rmm-product-card:active .rmm-product-overlay {
    opacity: 1;
}

.rmm-product-overlay .button {
    background-color: #fff !important;
    color: var(--rmm-text-dark) !important;
    border: none !important;
    padding: 12px 24px !important;
    border-radius: 30px !important;
    font-weight: 600 !important;
    text-transform: uppercase;
    font-size: 0.9em;
    cursor: pointer;
    transition: transform 0.2s;
    text-decoration: none;
}

.rmm-out-of-stock-badge {
    background-color: #e74c3c !important;
    color: #fff !important;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.9em;
}

.rmm-filters {
    display: flex;
    gap: 10px;
}

.rmm-filter-btn {
    padding: 8px 20px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s;
}

.rmm-filter-btn.active,
.rmm-filter-btn:hover {
    background: var(--rmm-primary);
    color: #fff;
    border-color: var(--rmm-primary);
}

.rmm-product-overlay .button:hover {
    transform: scale(1.05);
    background-color: var(--rmm-primary) !important;
    color: #fff !important;
}

/* Info */
.rmm-product-info {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.rmm-info-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.rmm-product-title {
    font-size: 1.1em;
    margin: 0;
    color: var(--rmm-text-dark);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Indicators */
.rmm-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.rmm-indicator.veg {
    background-color: #27ae60;
    border: 1px solid #2ecc71;
    box-shadow: 0 0 4px rgba(46, 204, 113, 0.4);
}

.rmm-indicator.nonveg {
    background-color: #c0392b;
    border: 1px solid #e74c3c;
    box-shadow: 0 0 4px rgba(231, 76, 60, 0.4);
}

.rmm-product-price {
    font-weight: 600;
    color: var(--rmm-primary);
    white-space: nowrap;
    margin-left: 10px;
}

/* Enhanced Subtitle */
.rmm-product-subtitle {
    font-size: 0.95em;
    color: var(--rmm-text-light);
    line-height: 1.4;
    display: block !important;
    margin-top: 5px;
}

/* Mobile Tweaks */
@media (max-width: 768px) {

    /* Sticky Nav Fix */
    .rmm-sticky-nav-container {
        position: -webkit-sticky !important;
        /* Safari */
        position: sticky !important;
        top: 0 !important;
        margin-bottom: 20px;
        z-index: 7 !important;
        /* Low Z-Index as requested (was 1000) */
        width: 100% !important;
        /* Ensure full width */
    }

    .rmm-sticky-nav {
        flex-wrap: nowrap;
        /* Mobile: Scroll */
        justify-content: flex-start !important;
        /* Force start alignment */
        overflow-x: auto;
        padding: 10px 15px !important;
        scroll-padding-left: 15px;
        -ms-overflow-style: none;
        scrollbar-width: none;
    }

    .rmm-sticky-nav::-webkit-scrollbar {
        display: none;
    }

    .rmm-sticky-nav li:first-child {
        margin-left: 0;
    }

    .rmm-sticky-nav li a {
        white-space: nowrap;
        font-size: 13px;
        padding: 8px 16px;
    }

    /* Target title specifically */
    .rmm-category-title,
    h2.rmm-category-title {
        cursor: default;
        font-size: 23px !important;
        /* EXACTLY 23px as requested */
        margin-bottom: 20px;
    }

    .rmm-accordion-icon {
        display: none;
    }

    /* 2 Columns on Mobile - FORCE overrides */
    .rmm-products-grid {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 15px !important;
        padding: 0 5px;
    }

    /* Adjust Card internals for small size */
    .rmm-product-info {
        padding: 10px;
    }

    .rmm-product-title {
        font-size: 14px;
    }

    .rmm-product-price {
        font-size: 13px;
    }

    .rmm-product-image-wrapper {
        height: 300px;
        /* Reduced specific for mobile */
    }

    /* Tap to Show Overlay Logic */
    .rmm-product-card.tap-active .rmm-product-overlay {
        opacity: 1 !important;
    }

    .rmm-product-overlay .button {
        padding: 8px 12px !important;
        font-size: 11px !important;
    }
}