/* ============================================
   Zamówienia Restauracja v3.0 — WordPress Plugin CSS
   Jeden shortcode, zakładki Menu/Admin
   ============================================ */

.zr-container {
    --zr-bg: hsl(0, 0%, 98%);
    --zr-fg: hsl(220, 20%, 10%);
    --zr-card: hsl(0, 0%, 100%);
    --zr-primary: hsl(145, 65%, 42%);
    --zr-primary-fg: #fff;
    --zr-secondary: hsl(145, 15%, 94%);
    --zr-muted: hsl(220, 10%, 94%);
    --zr-muted-fg: hsl(220, 8%, 50%);
    --zr-accent: hsl(32, 95%, 55%);
    --zr-accent-fg: #fff;
    --zr-destructive: hsl(0, 72%, 51%);
    --zr-border: hsl(220, 12%, 90%);
    --zr-radius: 1rem;
    --zr-shadow: 0 1px 3px 0 hsl(220 20% 10% / 0.04), 0 4px 16px -2px hsl(220 20% 10% / 0.06);
    --zr-shadow-lg: 0 12px 40px -8px hsl(220 20% 10% / 0.15);
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--zr-fg);
    background: var(--zr-bg);
    line-height: 1.5;
    max-width: 800px;
    margin: 0 auto;
    box-sizing: border-box;
}
.zr-container *, .zr-container *::before, .zr-container *::after { box-sizing: border-box; }

/* Tabs */
.zr-tabs { display: flex; gap: 0; border-bottom: 2px solid var(--zr-border); background: var(--zr-card); position: sticky; top: 0; z-index: 50; }
.zr-tab { flex: 1; padding: 0.875rem 1rem; font-size: 0.9rem; font-weight: 600; border: none; background: none; cursor: pointer; font-family: inherit; color: var(--zr-muted-fg); transition: all 0.15s; border-bottom: 3px solid transparent; margin-bottom: -2px; }
.zr-tab:hover { color: var(--zr-fg); background: hsl(220 10% 96%); }
.zr-tab--active { color: var(--zr-primary); border-bottom-color: var(--zr-primary); }
.zr-tab-content { }
.zr-admin-header-row { display: flex; align-items: center; justify-content: space-between; }
.zr-admin-title { font-size: 1.25rem; font-weight: 800; margin: 0; }

/* Header */
.zr-header { border-bottom: 1px solid var(--zr-border); background: hsl(0 0% 100% / 0.8); backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 50; }
.zr-header-inner { max-width: 800px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 0.75rem 1rem; }
.zr-logo { display: flex; align-items: center; gap: 0.625rem; }
.zr-logo-icon { width: 36px; height: 36px; border-radius: 0.75rem; background: var(--zr-primary); color: var(--zr-primary-fg); display: flex; align-items: center; justify-content: center; font-size: 18px; }
.zr-brand { font-weight: 700; font-size: 1.125rem; letter-spacing: -0.02em; }
.zr-badge { font-size: 0.8rem; padding: 0.25rem 0.75rem; border-radius: 999px; background: var(--zr-secondary); color: var(--zr-muted-fg); font-weight: 500; }

/* Main */
.zr-main { padding: 1.5rem 1rem; display: flex; flex-direction: column; gap: 1.25rem; }
.zr-menu-header {}
.zr-menu-title { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em; margin: 0; }
.zr-menu-sub { font-size: 0.875rem; color: var(--zr-muted-fg); margin: 0.125rem 0 0; }

/* Card */
.zr-card { background: var(--zr-card); border-radius: var(--zr-radius); border: 1px solid var(--zr-border); box-shadow: var(--zr-shadow); overflow: hidden; }

/* Products Grid */
.zr-products-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; }
@media (max-width: 500px) { .zr-products-grid { grid-template-columns: repeat(2, 1fr); } }

.zr-product-thumb { cursor: pointer; border-radius: var(--zr-radius); border: 1px solid var(--zr-border); background: var(--zr-card); box-shadow: var(--zr-shadow); overflow: hidden; transition: transform 0.15s, box-shadow 0.15s; }
.zr-product-thumb:hover { transform: translateY(-2px); box-shadow: var(--zr-shadow-lg); }
.zr-thumb-img { aspect-ratio: 1; overflow: hidden; }
.zr-thumb-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.3s; }
.zr-product-thumb:hover .zr-thumb-img img { transform: scale(1.05); }
.zr-thumb-body { padding: 0.75rem; }
.zr-thumb-name { font-size: 0.875rem; font-weight: 700; margin: 0; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zr-thumb-desc { font-size: 0.75rem; color: var(--zr-muted-fg); margin: 0.25rem 0 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.zr-thumb-bottom { display: flex; align-items: center; justify-content: space-between; margin-top: 0.5rem; }
.zr-thumb-price { font-size: 1rem; font-weight: 800; color: var(--zr-primary); }
.zr-thumb-add { width: 28px; height: 28px; border-radius: 50%; background: var(--zr-primary); color: var(--zr-primary-fg); display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 700; }

/* Modal */
.zr-modal { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; justify-content: center; }
@media (min-width: 640px) { .zr-modal { align-items: center; } }
.zr-modal-backdrop { position: absolute; inset: 0; background: hsl(220 20% 10% / 0.4); backdrop-filter: blur(4px); }
.zr-modal-content { position: relative; background: var(--zr-card); width: 100%; max-width: 32rem; max-height: 85vh; overflow-y: auto; border-radius: 1rem 1rem 0 0; box-shadow: var(--zr-shadow-lg); }
@media (min-width: 640px) { .zr-modal-content { border-radius: 1rem; } }
.zr-modal-image { aspect-ratio: 16/9; overflow: hidden; position: relative; }
.zr-modal-image img { width: 100%; height: 100%; object-fit: cover; }
.zr-modal-close { position: absolute; top: 0.75rem; right: 0.75rem; width: 32px; height: 32px; border-radius: 50%; background: hsl(220 20% 10% / 0.6); color: white; border: none; font-size: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.zr-modal-body { padding: 1.25rem; display: flex; flex-direction: column; gap: 1rem; }
.zr-modal-title { font-size: 1.25rem; font-weight: 800; margin: 0; }
.zr-modal-desc { font-size: 0.875rem; color: var(--zr-muted-fg); margin: 0.25rem 0 0; }
.zr-modal-price { font-size: 1.25rem; font-weight: 800; color: var(--zr-primary); }
.zr-modal-footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: 0.75rem; border-top: 1px solid var(--zr-border); }
.zr-add-btn { font-weight: 700; white-space: nowrap; }

/* Options */
.zr-section { display: flex; flex-direction: column; gap: 0.5rem; }
.zr-label { font-weight: 600; font-size: 0.875rem; display: block; }
.zr-options { display: flex; flex-direction: column; gap: 0.375rem; }
.zr-option { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem; border-radius: var(--zr-radius); border: 1px solid var(--zr-border); cursor: pointer; transition: all 0.15s; }
.zr-option:hover { background: hsl(220 10% 96%); }
.zr-option--active { border-color: var(--zr-primary); background: hsl(145 65% 42% / 0.05); box-shadow: 0 0 0 1px var(--zr-primary); }
.zr-option--danger.zr-option--active { border-color: var(--zr-destructive); background: hsl(0 72% 51% / 0.05); box-shadow: 0 0 0 1px var(--zr-destructive); }
.zr-option-dot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--zr-border); flex-shrink: 0; transition: all 0.15s; }
.zr-option--active .zr-option-dot { border-color: var(--zr-primary); background: var(--zr-primary); box-shadow: inset 0 0 0 3px white; }
.zr-option--danger.zr-option--active .zr-option-dot { border-color: var(--zr-destructive); background: var(--zr-destructive); }
.zr-option-check { width: 18px; height: 18px; border-radius: 4px; border: 2px solid var(--zr-border); flex-shrink: 0; transition: all 0.15s; display: flex; align-items: center; justify-content: center; }
.zr-option--active .zr-option-check { border-color: var(--zr-primary); background: var(--zr-primary); }
.zr-option--active .zr-option-check::after { content: '✓'; color: white; font-size: 12px; font-weight: 700; }
.zr-option-text { flex: 1; font-size: 0.875rem; }
.zr-option-price { font-size: 0.8rem; color: var(--zr-muted-fg); }

/* Quantity */
.zr-quantity-controls { display: flex; align-items: center; gap: 0.5rem; }
.zr-qty-btn { width: 36px; height: 36px; border-radius: 0.75rem; border: 1px solid var(--zr-border); background: var(--zr-card); cursor: pointer; font-size: 1.1rem; display: flex; align-items: center; justify-content: center; transition: all 0.15s; color: var(--zr-fg); }
.zr-qty-btn:hover { background: var(--zr-muted); }
.zr-qty-value { width: 2rem; text-align: center; font-weight: 700; font-size: 1.1rem; }

/* Cart */
.zr-cart-card { padding: 1.25rem; display: flex; flex-direction: column; gap: 0.75rem; }
.zr-cart-title { font-size: 1.125rem; font-weight: 800; margin: 0; }
.zr-cart-item { display: flex; align-items: center; justify-content: space-between; background: hsl(220 10% 94% / 0.5); border-radius: 0.75rem; padding: 0.75rem; }
.zr-cart-item-info { display: flex; flex-direction: column; }
.zr-cart-item-name { font-weight: 600; font-size: 0.875rem; }
.zr-cart-item-size { font-size: 0.75rem; color: var(--zr-muted-fg); }
.zr-cart-item-extras { font-size: 0.75rem; color: var(--zr-muted-fg); }
.zr-cart-item-right { display: flex; align-items: center; gap: 0.5rem; }
.zr-cart-item-price { font-weight: 700; font-size: 0.875rem; }
.zr-cart-remove { background: none; border: none; color: var(--zr-destructive); font-size: 1.25rem; cursor: pointer; padding: 0 0.25rem; line-height: 1; }
.zr-cart-total { display: flex; justify-content: space-between; font-weight: 800; font-size: 1.125rem; padding-top: 0.5rem; border-top: 1px solid var(--zr-border); }
.zr-cart-total-price { color: var(--zr-primary); }

/* Form */
.zr-form-card { padding: 1.25rem; display: flex; flex-direction: column; gap: 1rem; }
.zr-form-title { font-size: 1.125rem; font-weight: 700; margin: 0; }
.zr-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.zr-form-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0.75rem; margin-top: 0.5rem; }
@media (max-width: 500px) { .zr-form-grid { grid-template-columns: 1fr; } .zr-form-grid-3 { grid-template-columns: 1fr 1fr; } }
.zr-field { display: flex; flex-direction: column; gap: 0.25rem; }
.zr-field label { font-size: 0.8rem; font-weight: 500; }
.zr-field-sm { font-size: 0.7rem; color: var(--zr-muted-fg); }
.zr-field input, .zr-field textarea { padding: 0.6rem 0.75rem; border-radius: var(--zr-radius); border: 1px solid var(--zr-border); background: var(--zr-card); font-size: 0.875rem; font-family: inherit; color: var(--zr-fg); transition: border-color 0.15s; outline: none; width: 100%; }
.zr-field input:focus, .zr-field textarea:focus { border-color: var(--zr-primary); box-shadow: 0 0 0 3px hsl(145 65% 42% / 0.1); }
.zr-field textarea { resize: vertical; min-height: 70px; }

.zr-address-section { display: flex; flex-direction: column; gap: 0.5rem; }
.zr-delivery-section { display: flex; flex-direction: column; gap: 0.5rem; }
.zr-delivery-btns { display: flex; gap: 0.5rem; }
.zr-delivery-btn { flex: 1; padding: 0.625rem 1rem; border-radius: var(--zr-radius); border: 1px solid var(--zr-border); background: none; font-size: 0.875rem; font-weight: 600; cursor: pointer; font-family: inherit; transition: all 0.15s; color: var(--zr-fg); }
.zr-delivery-btn:hover { background: hsl(220 10% 96%); }
.zr-delivery-btn--active { border-color: var(--zr-primary); background: hsl(145 65% 42% / 0.05); color: var(--zr-primary); }
.zr-time-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.375rem; margin-top: 0.5rem; }
@media (min-width: 640px) { .zr-time-grid { grid-template-columns: repeat(6, 1fr); } }
.zr-time-btn { padding: 0.5rem; border-radius: 0.5rem; border: 1px solid var(--zr-border); background: none; font-size: 0.75rem; font-weight: 600; cursor: pointer; font-family: inherit; transition: all 0.15s; color: var(--zr-fg); }
.zr-time-btn:hover { background: hsl(220 10% 96%); }
.zr-time-btn--active { border-color: var(--zr-primary); background: var(--zr-primary); color: var(--zr-primary-fg); }

/* Submit */
.zr-sticky-bottom { position: sticky; bottom: 1rem; z-index: 40; }
.zr-submit-btn { width: 100%; height: 56px; border: none; border-radius: 1rem; background: var(--zr-primary); color: var(--zr-primary-fg); font-size: 1.1rem; font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 0.5rem; box-shadow: var(--zr-shadow-lg); transition: transform 0.1s, opacity 0.15s; font-family: inherit; }
.zr-submit-btn:hover:not(:disabled) { opacity: 0.92; }
.zr-submit-btn:active:not(:disabled) { transform: scale(0.98); }
.zr-submit-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Buttons */
.zr-btn { padding: 0.6rem 1.25rem; border: none; border-radius: var(--zr-radius); background: var(--zr-primary); color: var(--zr-primary-fg); font-size: 0.875rem; font-weight: 600; cursor: pointer; font-family: inherit; transition: opacity 0.15s; display: inline-flex; align-items: center; gap: 0.375rem; }
.zr-btn:hover { opacity: 0.9; }
.zr-btn--outline { background: transparent; color: var(--zr-fg); border: 1px solid var(--zr-border); }
.zr-btn--outline:hover { background: var(--zr-muted); opacity: 1; }
.zr-btn--danger { background: var(--zr-destructive); color: #fff; }
.zr-btn--danger:hover { opacity: 0.9; }
.zr-btn--danger-sm { color: var(--zr-destructive); padding: 0.5rem; }
.zr-btn--danger-sm:hover { background: hsl(0 72% 51% / 0.1); }
.zr-btn-open { background: var(--zr-primary); color: var(--zr-primary-fg); font-weight: 700; }
.zr-btn-close-toggle { color: var(--zr-destructive); border-color: hsl(0 72% 51% / 0.3); }
.zr-btn-close-toggle:hover { background: hsl(0 72% 51% / 0.05); }

/* Success */
.zr-success { min-height: 80vh; display: flex; align-items: center; justify-content: center; padding: 2rem 1rem; }
.zr-success-card { max-width: 420px; padding: 2.5rem; text-align: center; }
.zr-success-icon { font-size: 48px; margin-bottom: 1rem; }
.zr-success-title { font-size: 2rem; font-weight: 800; margin: 0 0 0.5rem; }
.zr-success-text { color: var(--zr-muted-fg); margin: 0 0 1.5rem; }

/* Store closed */
.zr-store-closed { min-height: 80vh; display: flex; align-items: center; justify-content: center; padding: 2rem 1rem; }
.zr-closed-card { max-width: 420px; padding: 2.5rem; text-align: center; }
.zr-closed-icon { font-size: 48px; width: 80px; height: 80px; border-radius: 50%; background: hsl(0 72% 51% / 0.1); display: flex; align-items: center; justify-content: center; margin: 0 auto 1rem; color: var(--zr-destructive); font-weight: 800; }
.zr-closed-title { font-size: 1.5rem; font-weight: 700; margin: 0 0 0.5rem; }
.zr-closed-text { color: var(--zr-muted-fg); margin: 0; }

/* Toast */
.zr-toast { position: fixed; bottom: 2rem; left: 50%; transform: translateX(-50%); padding: 0.75rem 1.5rem; border-radius: var(--zr-radius); font-size: 0.875rem; font-weight: 500; z-index: 999; animation: zr-toast-in 0.3s ease; box-shadow: var(--zr-shadow-lg); }
.zr-toast--success { background: var(--zr-primary); color: var(--zr-primary-fg); }
.zr-toast--error { background: var(--zr-destructive); color: #fff; }
@keyframes zr-toast-in { from { opacity: 0; transform: translateX(-50%) translateY(10px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }

/* ==================== ADMIN ==================== */
.zr-admin-main { gap: 1rem; }

/* Store status bar */
.zr-status-alert { display: flex; align-items: center; justify-content: space-between; background: hsl(0 72% 51% / 0.05); border: 1px solid hsl(0 72% 51% / 0.3); border-radius: var(--zr-radius); padding: 1rem; }
.zr-status-alert-info { display: flex; align-items: center; gap: 0.5rem; }
.zr-status-alert-icon { font-size: 1.25rem; }
.zr-status-alert-info strong { color: var(--zr-destructive); font-size: 0.875rem; }
.zr-status-alert-info small { color: var(--zr-muted-fg); font-size: 0.75rem; }

/* Close panel */
.zr-close-panel-card { padding: 1.25rem; display: flex; flex-direction: column; gap: 0.75rem; }
.zr-close-panel-header { display: flex; align-items: center; justify-content: space-between; }
.zr-close-panel-header strong { font-size: 0.875rem; }
.zr-close-panel-x { background: none; border: none; cursor: pointer; font-size: 1rem; color: var(--zr-muted-fg); padding: 0.25rem; }
.zr-btn-confirm-close { width: 100%; }

/* Filters */
.zr-filters { display: flex; flex-direction: column; gap: 0.75rem; }
.zr-search-wrap { position: relative; }
.zr-search-icon { position: absolute; left: 0.75rem; top: 50%; transform: translateY(-50%); font-size: 0.875rem; }
.zr-search-input { width: 100%; padding: 0.6rem 0.75rem 0.6rem 2.25rem; border-radius: var(--zr-radius); border: 1px solid var(--zr-border); background: var(--zr-card); font-size: 0.875rem; font-family: inherit; color: var(--zr-fg); outline: none; }
.zr-search-input:focus { border-color: var(--zr-primary); box-shadow: 0 0 0 3px hsl(145 65% 42% / 0.1); }
.zr-filter-pills { display: flex; gap: 0.375rem; overflow-x: auto; padding-bottom: 0.25rem; }
.zr-filter-pill { display: flex; align-items: center; gap: 0.375rem; padding: 0.375rem 0.75rem; border-radius: 0.5rem; font-size: 0.75rem; font-weight: 600; white-space: nowrap; border: 1px solid var(--zr-border); background: var(--zr-card); cursor: pointer; font-family: inherit; color: var(--zr-fg); transition: all 0.15s; }
.zr-filter-pill:hover { background: hsl(220 10% 96%); }
.zr-filter-pill--active { background: var(--zr-primary); color: var(--zr-primary-fg); border-color: var(--zr-primary); }
.zr-filter-count { font-size: 0.625rem; padding: 0.125rem 0.375rem; border-radius: 999px; background: hsl(0 0% 100% / 0.2); }
.zr-filter-pill:not(.zr-filter-pill--active) .zr-filter-count { background: var(--zr-muted); }

/* Empty state */
.zr-empty { text-align: center; padding: 4rem 1rem; }
.zr-empty-icon { font-size: 48px; margin-bottom: 0.75rem; opacity: 0.3; }
.zr-empty-title { font-size: 1.25rem; color: var(--zr-muted-fg); font-weight: 700; margin: 0; }
.zr-empty-sub { font-size: 0.875rem; color: var(--zr-muted-fg); margin: 0.25rem 0 0; }

/* Orders grid */
.zr-orders-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 640px) { .zr-orders-grid { grid-template-columns: 1fr; } }

/* Order card */
.zr-order-card { padding: 1.25rem; display: flex; flex-direction: column; gap: 0.5rem; }
.zr-order-card--new { box-shadow: 0 0 0 2px var(--zr-primary), var(--zr-shadow); }
.zr-order-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.5rem; }
.zr-order-name-row { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.zr-order-name { font-weight: 700; font-size: 1.1rem; margin: 0; }
.zr-order-meta { font-size: 0.75rem; color: var(--zr-muted-fg); margin-top: 0.125rem; }
.zr-order-delivery { font-size: 0.75rem; font-weight: 600; margin-top: 0.125rem; }
.zr-order-total { font-size: 1.25rem; font-weight: 800; color: var(--zr-primary); white-space: nowrap; }

.zr-status-badge { display: inline-flex; align-items: center; gap: 0.25rem; font-size: 0.7rem; font-weight: 600; padding: 0.15rem 0.5rem; border-radius: 999px; }
.zr-status--new { background: var(--zr-primary); color: var(--zr-primary-fg); }
.zr-status--preparing { background: var(--zr-accent); color: var(--zr-accent-fg); }
.zr-status--ready { background: var(--zr-secondary); color: var(--zr-fg); border: 1px solid var(--zr-border); }
.zr-status--done { background: var(--zr-muted); color: var(--zr-muted-fg); }

.zr-order-item { background: hsl(220 10% 94% / 0.5); border-radius: 0.75rem; padding: 0.75rem; }
.zr-order-item-header { display: flex; justify-content: space-between; font-size: 0.875rem; }
.zr-order-item-name { font-weight: 600; }
.zr-order-item-size { color: var(--zr-muted-fg); font-size: 0.75rem; }
.zr-order-item-extras { font-size: 0.75rem; color: var(--zr-muted-fg); margin-top: 0.125rem; }
.zr-order-note { font-size: 0.8rem; font-style: italic; color: var(--zr-muted-fg); margin: 0; }

.zr-order-actions { display: flex; gap: 0.5rem; margin-top: 0.25rem; }
.zr-order-action-btn { flex: 1; }
.zr-order-print-btn { white-space: nowrap; }
.zr-order-delete-btn { padding: 0.5rem 0.625rem; }