/* ═══════════════════════════════════════════════
   Restaurant Menu Widget  v1.6
   ═══════════════════════════════════════════════ */

/* ── Reset & base ─────────────────────────── */
.rmw-widget * { box-sizing: border-box; }
.rmw-widget   { font-family: inherit; width: 100%; }
.rmw-error-msg { text-align:center; color:#c00; padding:40px 20px; font-size:14px; }

/* ── Search bar ───────────────────────────── */
.rmw-search-wrap   { width:100%; padding:15px 20px; background:#f5f5f5; }
.rmw-search-form   { width:100%; }
.rmw-search-inner  {
    display:flex; align-items:center; gap:10px;
    background:#fff; border-radius:25px; border:1px solid #ddd;
    padding:8px 18px; transition:box-shadow .2s;
}
.rmw-search-inner:focus-within { box-shadow:0 0 0 3px rgba(107,13,13,.15); border-color:#6b0d0d; }
.rmw-search-icon   { font-size:16px; color:#666; flex-shrink:0; }
.rmw-search-input  { border:none; outline:none; width:100%; background:transparent; font-size:15px; color:#333; padding:2px 0; }
.rmw-search-input::placeholder { color:#aaa; }

/* ── Unified menu container ───────────────── */
.rmw-menu-container { background:#f5f5f5; width:100%; }

/* ── Category carousel ────────────────────── */
.rmw-carousel-wrap {
    width:100%; background:inherit;
    padding:15px 15px 10px;
    display:flex; flex-direction:column;
}
.rmw-carousel-wrap.rmw-sticky {
    position:fixed; top:0; left:0; right:0; z-index:9999;
    background:#f5f5f5;
    box-shadow:0 3px 16px rgba(0,0,0,.18);
    padding:8px 15px 6px;
}
.rmw-sticky-placeholder { display:none; width:100%; }

/* overflow:visible so hover border/shadow on items is never clipped
   The track scroll is controlled by JS transform, not container scroll */
.rmw-carousel-container {
    width:100%;
    overflow:hidden;           /* keep horizontal clip to prevent page scroll */
    touch-action:pan-y;
    /* Extra padding-top/bottom so item hover border isn't clipped */
    padding:4px 0 4px 0;
}
.rmw-carousel-track {
    display:flex; gap:10px;
    transition:transform .35s cubic-bezier(.4,0,.2,1);
    will-change:transform; cursor:grab;
    /* Right padding = last item gets same breathing room as the left */
    padding-right:4px;
}
.rmw-carousel-track.dragging,
.rmw-carousel-track.no-transition { transition:none; cursor:grabbing; }

.rmw-cat-item {
    display:flex; flex-direction:column; align-items:center; justify-content:center;
    flex-shrink:0; min-width:100px; padding:10px 15px;
    background:#fff; border-radius:8px; border:2px solid transparent;
    cursor:pointer; text-align:center;
    transition:border-color .2s, transform .2s, background .2s;
    user-select:none; -webkit-user-select:none;
}
.rmw-cat-item:hover        { border-color:#6b0d0d; transform:translateY(-2px); }
.rmw-cat-item.active       { background:#6b0d0d; border-color:#6b0d0d; }
.rmw-cat-item.active span  { color:#fff !important; }
.rmw-cat-img-wrap          { margin-bottom:6px; }
.rmw-cat-img               { width:50px; height:50px; object-fit:cover; border-radius:50%; display:block; }
.rmw-cat-item span         { font-size:13px; font-weight:600; color:#333; line-height:1.3; white-space:nowrap; }

.rmw-nav-buttons { display:flex; gap:6px; justify-content:flex-end; margin-top:8px; }
.rmw-nav-btn {
    width:34px; height:34px; border-radius:50%;
    border:2px solid #6b0d0d; background:#fff; color:#6b0d0d;
    font-size:20px; font-weight:bold; cursor:pointer;
    display:flex; align-items:center; justify-content:center;
    transition:background .2s, color .2s; line-height:1; padding:0;
}
.rmw-nav-btn:hover        { background:#6b0d0d; color:#fff; }
.rmw-nav-btn:disabled     { opacity:.35; cursor:not-allowed; }

/* ── Products section ─────────────────────── */
.rmw-products-section { padding:20px; }
.rmw-section-title    { text-align:center; font-size:28px; font-weight:800; color:#222; margin:0 0 20px; }

/* Grid — column counts injected per-widget via JS */
.rmw-products-grid    { display:grid; gap:20px; width:100%; }

/* Fallback static classes (JS-injected overrides these) */
.rmw-cols-1 { grid-template-columns:repeat(1,1fr); }
.rmw-cols-2 { grid-template-columns:repeat(2,1fr); }
.rmw-cols-3 { grid-template-columns:repeat(3,1fr); }
.rmw-cols-4 { grid-template-columns:repeat(4,1fr); }
.rmw-cols-5 { grid-template-columns:repeat(5,1fr); }

@media (max-width:900px) {
    .rmw-cols-tab-1 { grid-template-columns:repeat(1,1fr)!important; }
    .rmw-cols-tab-2 { grid-template-columns:repeat(2,1fr)!important; }
    .rmw-cols-tab-3 { grid-template-columns:repeat(3,1fr)!important; }
    .rmw-cols-tab-4 { grid-template-columns:repeat(4,1fr)!important; }
}
@media (max-width:560px) {
    .rmw-cols-mob-1 { grid-template-columns:repeat(1,1fr)!important; }
    .rmw-cols-mob-2 { grid-template-columns:repeat(2,1fr)!important; }
}

/* ── Product card ─────────────────────────── */
.rmw-product-card {
    background:#fff; border-radius:10px; overflow:hidden;
    display:flex; flex-direction:column;
    box-shadow:0 2px 8px rgba(0,0,0,.08);
    transition:box-shadow .25s, transform .25s;
}
.rmw-product-card:hover { box-shadow:0 6px 20px rgba(0,0,0,.14); transform:translateY(-3px); }

/* Image — height & object-fit set by inline style from JS */
.rmw-product-image      { width:100%; height:250px; overflow:hidden; flex-shrink:0; }
.rmw-product-image img  { width:100%; height:100%; display:block; transition:transform .4s; }
.rmw-product-card:hover .rmw-product-image img { transform:scale(1.05); }

.rmw-product-info  { padding:12px 12px 6px; flex:1; }
.rmw-product-name  { font-size:16px; font-weight:700; color:#222; margin:0 0 5px; line-height:1.4; }

/* Price display — min-height prevents layout jump */
.rmw-price-display   { min-height:22px; }
.rmw-product-price   { font-size:15px; font-weight:600; color:#6b0d0d; margin:0; }
.rmw-product-price del  { color:#999; font-weight:400; font-size:13px; margin-right:4px; }
.rmw-product-price ins  { text-decoration:none; }

/* ── Variation dropdowns (horizontal row) ─── */
.rmw-variations-wrap {
    display:flex; flex-direction:row;
    gap:8px; padding:4px 12px 8px;
    align-items:flex-end; flex-wrap:wrap;
}
.rmw-variation-col   { display:flex; flex-direction:column; flex:1; min-width:80px; }
.rmw-variation-label { font-size:11px; font-weight:600; color:#777; text-transform:uppercase; letter-spacing:.4px; margin-bottom:3px; white-space:nowrap; }
.rmw-variation-select {
    width:100%; padding:6px 8px;
    border:1.5px solid #ddd; border-radius:6px;
    font-size:13px; color:#333; background:#fff;
    cursor:pointer; transition:border-color .2s;
}
.rmw-variation-select:focus { outline:none; border-color:#6b0d0d; }
.rmw-variation-select.rmw-select-error {
    border-color:#e74c3c;
    box-shadow:0 0 0 2px rgba(231,76,60,.18);
    animation:rmw-shake .3s ease;
}
@keyframes rmw-shake {
    0%,100% { transform:translateX(0); }
    25%      { transform:translateX(-4px); }
    75%      { transform:translateX(4px); }
}

/* ── Add to cart button ───────────────────── */
.rmw-add-to-cart {
    display:flex; align-items:center; justify-content:center; gap:8px;
    width:100%; padding:12px 20px;
    background:#6b0d0d; color:#fff; border:none;
    font-size:15px; font-weight:600; cursor:pointer;
    transition:background .2s, opacity .2s;
    margin-top:auto; letter-spacing:.3px;
}
.rmw-add-to-cart:hover:not(:disabled) { background:#4a0808; }
.rmw-add-to-cart.loading, .rmw-add-to-cart:disabled { opacity:.65; cursor:wait; }
.rmw-add-to-cart .rmw-cart-icon { font-size:16px; }
.rmw-add-to-cart.added     { background:#27ae60!important; }
.rmw-add-to-cart.btn-error { background:#c0392b!important; }

/* ── Loading / no results ─────────────────── */
.rmw-no-results { text-align:center; padding:40px 20px; color:#888; font-size:16px; }
.rmw-loading    { grid-column:1/-1; display:flex; align-items:center; justify-content:center; padding:60px 20px; }
.rmw-spinner    { width:40px; height:40px; border:4px solid #ddd; border-top-color:#6b0d0d; border-radius:50%; animation:rmw-spin .75s linear infinite; }
@keyframes rmw-spin { to { transform:rotate(360deg); } }

/* ── Cart notification toast ──────────────── */
.rmw-cart-notification {
    position:fixed; bottom:30px; right:30px; z-index:99999;
    background:#6b0d0d; color:#fff;
    padding:14px 20px; border-radius:8px;
    display:flex; flex-direction:column; gap:6px;
    min-width:220px; box-shadow:0 4px 20px rgba(0,0,0,.2);
    animation:rmw-slidein .3s ease;
}
@keyframes rmw-slidein  { from{opacity:0;transform:translateY(20px)} to{opacity:1;transform:translateY(0)} }
.rmw-cart-notification.hiding { animation:rmw-slideout .3s ease forwards; }
@keyframes rmw-slideout { from{opacity:1;transform:translateY(0)} to{opacity:0;transform:translateY(20px)} }
.rmw-notif-text       { font-size:14px; font-weight:600; }
.rmw-view-cart-link   { color:rgba(255,255,255,.85); font-size:13px; text-decoration:underline; font-weight:500; }
.rmw-view-cart-link:hover { color:#fff; }
