/* public-menu.css — Next.js müşteri menüsü (kırmızı tema) */

.public-menu {
    --pm-red: #e31837;
    --pm-red-mid: #c41230;
    --pm-red-deep: #9a0f1c;
    --pm-bg: #f9fafb;
    --pm-card: #ffffff;
    --pm-text: #0f172a;
    --pm-muted: #9ca3af;
    --pm-border: #f3f4f6;
    min-height: 100dvh;
    background: var(--pm-bg);
    color: var(--pm-text);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    padding-bottom: 7rem;
}

.public-menu * {
    box-sizing: border-box;
}

/* ── Inactive state ── */
.pm-state {
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.25rem;
    background: linear-gradient(145deg, #fef2f2 0%, #fff1f2 100%);
    text-align: center;
}

.pm-state__card {
    max-width: 22rem;
    background: var(--pm-card);
    border-radius: 20px;
    padding: 2rem 1.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

.pm-state__icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    background: #fee2e2;
    color: var(--pm-red);
    display: flex;
    align-items: center;
    justify-content: center;
}

.pm-state h1 {
    margin: 0 0 0.5rem;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--pm-text);
}

.pm-state p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--pm-muted);
}

/* ── Red hero header ── */
.pm-hero {
    color: #fff;
    background: linear-gradient(145deg, var(--pm-red) 0%, var(--pm-red-mid) 45%, var(--pm-red-deep) 100%);
}

.pm-hero__inner {
    max-width: 72rem;
    margin: 0 auto;
    padding: 2.5rem 1rem 0;
}

.pm-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.pm-brand__icon {
    width: 3rem;
    height: 3rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.pm-brand__icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pm-brand__name {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 900;
    line-height: 1.2;
    color: #fff;
}

.pm-brand__meta {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-top: 0.125rem;
}

.pm-brand__stars {
    display: flex;
    gap: 1px;
}

.pm-brand__stars svg {
    width: 12px;
    height: 12px;
    fill: #fde047;
    color: #fde047;
}

.pm-brand__tagline {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    margin-left: 0.25rem;
}

.pm-hero__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    font-size: 0.875rem;
}

.pm-hero__chip {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
}

.pm-hero__chip:hover {
    color: #fff;
}

.pm-hero__search {
    position: relative;
    max-width: 72rem;
    margin: 0 auto;
    padding: 0 1rem 1.25rem;
}

.pm-hero__search svg {
    position: absolute;
    left: 1.875rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    pointer-events: none;
}

.pm-hero__search input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: none;
    border-radius: 1rem;
    background: #fff;
    font-size: 0.875rem;
    font-weight: 500;
    color: #1f2937;
    outline: none;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.pm-hero__search input::placeholder {
    color: #9ca3af;
}

/* ── Category tabs (sticky, horizontal chips — all breakpoints) ── */
.pm-shell {
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.pm-cats-sticky,
.menu-groups {
    position: sticky;
    top: 0;
    z-index: 20;
    width: 100%;
    max-width: 100%;
    grid-column: 1 / -1;
    background: #fff;
    border-bottom: 1px solid var(--pm-border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.pm-cats-sticky__inner,
.category-tabs {
    width: 100%;
    max-width: 72rem;
    margin: 0 auto;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(227, 24, 55, 0.35) transparent;
    -webkit-overflow-scrolling: touch;
}

.pm-cats-sticky__inner::-webkit-scrollbar,
.category-tabs::-webkit-scrollbar {
    height: 4px;
}

.pm-cats-sticky__inner::-webkit-scrollbar-thumb,
.category-tabs::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(227, 24, 55, 0.35);
}

.pm-cats,
.group-list,
.category-tabs .pm-cats {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    width: max-content;
    min-width: 100%;
    margin: 0;
}

.pm-cat,
.category-chip,
.group-button {
    flex: 0 0 auto;
    width: auto;
    min-width: 148px;
    max-width: 280px;
    padding: 0.625rem 1.125rem;
    border: 1px solid var(--pm-border);
    border-radius: 0.75rem;
    background: #f9fafb;
    font-size: 0.8125rem;
    font-weight: 700;
    line-height: 1.25;
    color: #4b5563;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
    transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
}

.pm-cat:hover,
.category-chip:hover,
.group-button:hover {
    background: #fef2f2;
    border-color: #fecaca;
    color: var(--pm-red-mid);
}

.pm-cat.is-active,
.category-chip.is-active,
.group-button.is-active {
    background: var(--pm-red);
    border-color: var(--pm-red);
    color: #fff;
    box-shadow: 0 4px 12px rgba(227, 24, 55, 0.35);
}

/* ── Product list ── */
.pm-body {
    width: 100%;
    max-width: 72rem;
    margin: 0 auto;
    padding: 1rem;
    min-width: 0;
}

.pm-products {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.pm-product {
    display: flex;
    align-items: stretch;
    width: 100%;
    padding: 0;
    border: 1px solid var(--pm-border);
    border-radius: 1rem;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    cursor: pointer;
    text-align: left;
    overflow: hidden;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.pm-product:hover {
    border-color: #fecaca;
    box-shadow: 0 4px 12px rgba(227, 24, 55, 0.1);
}

.pm-product__img-wrap {
    width: 7rem;
    height: 7rem;
    flex-shrink: 0;
    overflow: hidden;
}

.pm-product__img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pm-product__img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    color: #d1d5db;
}

.pm-product__body {
    flex: 1;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
}

.pm-product__name {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.25;
    color: var(--pm-text);
}

.pm-product__desc {
    margin: 0.25rem 0 0;
    font-size: 0.75rem;
    color: var(--pm-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pm-product__options-hint {
    margin: 0.25rem 0 0;
    font-size: 0.75rem;
    font-weight: 500;
    color: rgba(227, 24, 55, 0.8);
}

.pm-product__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.5rem;
}

.pm-product__price {
    font-size: 1.125rem;
    font-weight: 900;
    color: var(--pm-red);
}

.pm-product__add {
    width: 2rem;
    height: 2rem;
    border: none;
    border-radius: 50%;
    background: var(--pm-red);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px -2px rgba(227, 24, 55, 0.33);
    flex-shrink: 0;
    pointer-events: none;
}

.pm-empty-list {
    text-align: center;
    padding: 4rem 1rem;
    color: var(--pm-muted);
}

.pm-empty-list svg {
    display: block;
    margin: 0 auto 0.75rem;
    opacity: 0.3;
}

/* ── Product modal ── */
.pm-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 50;
    display: none;
    align-items: flex-end;
    justify-content: center;
}

.pm-modal-backdrop.is-open {
    display: flex;
}

.pm-modal {
    width: 100%;
    max-width: 72rem;
    max-height: 90dvh;
    background: #fff;
    border-radius: 1.5rem 1.5rem 0 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: pm-slide-up 0.25s ease;
}

@keyframes pm-slide-up {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.pm-modal__img {
    width: 100%;
    height: 13rem;
    object-fit: cover;
}

.pm-modal__body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.pm-modal__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.pm-modal__close {
    width: 2rem;
    height: 2rem;
    border: none;
    border-radius: 50%;
    background: #f3f4f6;
    color: #6b7280;
    cursor: pointer;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pm-modal__name {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 900;
    color: var(--pm-text);
}

.pm-modal__desc {
    margin: 0.25rem 0 0;
    font-size: 0.875rem;
    color: var(--pm-muted);
}

.pm-modal__price {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--pm-red);
    margin: 1rem 0;
}

.pm-modal__section-title {
    margin: 0 0 0.5rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: #374151;
}

.pm-option-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    border: 1px solid var(--pm-border);
    border-radius: 0.75rem;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: border-color 0.15s;
}

.pm-option-row:hover {
    border-color: #fecaca;
}

.pm-option-row.is-selected {
    border-color: #fca5a5;
    background: #fff5f5;
}

.pm-option-row input {
    accent-color: var(--pm-red);
    width: 1rem;
    height: 1rem;
}

.pm-portion-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    border: 1px solid var(--pm-border);
    border-radius: 0.75rem;
    margin-bottom: 0.5rem;
    cursor: pointer;
}

.pm-portion-row.is-selected {
    border-color: #fca5a5;
    background: #fff5f5;
}

.pm-portion-row__price {
    font-weight: 700;
    color: var(--pm-red);
}

.pm-modal__note {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    background: #f9fafb;
    font-size: 0.875rem;
    resize: none;
    outline: none;
    font-family: inherit;
}

.pm-modal__note:focus {
    border-color: #f87171;
}

.pm-modal__footer {
    padding: 0 1.5rem 1.5rem;
}

.pm-btn-add {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 1rem;
    background: var(--pm-red);
    color: #fff;
    font-size: 1rem;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 10px 28px -6px rgba(227, 24, 55, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.pm-view-only {
    text-align: center;
    padding: 0.75rem;
    background: #f9fafb;
    border-radius: 1rem;
    font-size: 0.875rem;
    color: var(--pm-muted);
    font-weight: 500;
}

/* ── Cart bar (bottom) ── */
.pm-cart-bar {
    position: fixed;
    bottom: 1.5rem;
    left: 1rem;
    right: 1rem;
    max-width: 40rem;
    margin: 0 auto;
    z-index: 40;
    display: none;
}

.pm-cart-bar.is-visible {
    display: block;
}

.pm-cart-bar__btn {
    width: 100%;
    padding: 1rem 1.25rem;
    border: none;
    border-radius: 1rem;
    background: var(--pm-red);
    color: #fff;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 12px 32px -4px rgba(227, 24, 55, 0.47);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.pm-cart-bar__count {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 900;
}

.pm-cart-bar__label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ── Cart drawer ── */
.pm-cart-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 60;
    display: none;
}

.pm-cart-backdrop.is-open {
    display: block;
}

.pm-cart {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 70;
    max-height: 85dvh;
    background: #fff;
    border-radius: 1.5rem 1.5rem 0 0;
    transform: translateY(100%);
    transition: transform 0.25s ease;
    display: flex;
    flex-direction: column;
    max-width: 72rem;
    margin: 0 auto;
}

.pm-cart.is-open {
    transform: translateY(0);
}

.pm-cart__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem;
    border-bottom: 1px solid var(--pm-border);
}

.pm-cart__head h2 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 900;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--pm-text);
}

.pm-cart__head h2 svg {
    color: var(--pm-red);
}

.pm-cart__close {
    width: 2rem;
    height: 2rem;
    border: none;
    border-radius: 50%;
    background: #f3f4f6;
    color: #6b7280;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pm-cart__items {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.pm-cart-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: #f9fafb;
    border-radius: 1rem;
    margin-bottom: 0.75rem;
}

.pm-cart-item__name {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--pm-text);
}

.pm-cart-item__detail {
    font-size: 0.75rem;
    color: var(--pm-muted);
    margin-top: 0.125rem;
}

.pm-cart-item__price {
    font-size: 0.875rem;
    font-weight: 900;
    color: var(--pm-red);
    margin-top: 0.25rem;
}

.pm-cart-item__controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.pm-cart-item__qty-btn {
    width: 1.75rem;
    height: 1.75rem;
    border: none;
    border-radius: 50%;
    background: #e5e7eb;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #4b5563;
}

.pm-cart-item__qty-btn--plus {
    background: var(--pm-red);
    color: #fff;
}

.pm-cart__footer {
    padding: 1.25rem;
    border-top: 1px solid var(--pm-border);
}

.pm-cart__total {
    display: flex;
    justify-content: space-between;
    font-size: 1rem;
    font-weight: 900;
    margin-bottom: 0.75rem;
    color: #1f2937;
}

.pm-cart__total span:last-child {
    color: var(--pm-red);
}

.pm-btn-order {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 1rem;
    background: var(--pm-red);
    color: #fff;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 10px 28px -6px rgba(227, 24, 55, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.pm-cart-empty {
    text-align: center;
    padding: 2rem;
    color: var(--pm-muted);
}

/* ── Success overlay ── */
.pm-success {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: linear-gradient(145deg, #ecfdf5 0%, #d1fae5 100%);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    text-align: center;
}

.pm-success.is-visible {
    display: flex;
}

.pm-success__icon {
    width: 5rem;
    height: 5rem;
    border-radius: 50%;
    background: #d1fae5;
    color: #10b981;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
}

.pm-success h2 {
    margin: 0 0 0.5rem;
    font-size: 1.5rem;
    font-weight: 900;
}

.pm-success p {
    margin: 0 0 1.5rem;
    color: var(--pm-muted);
}

.pm-success button {
    width: 100%;
    max-width: 20rem;
    padding: 0.75rem;
    border: none;
    border-radius: 1rem;
    background: #10b981;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

@media (min-width: 768px) {
    .pm-modal-backdrop {
        align-items: center;
        padding: 1rem;
    }

    .pm-modal {
        border-radius: 1.5rem;
    }

    .pm-cat,
    .category-chip,
    .group-button {
        min-width: 168px;
        max-width: 320px;
        padding: 0.7rem 1.25rem;
        font-size: 0.875rem;
    }
}

@media (min-width: 1024px) {
    .pm-products {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
        gap: 1rem;
    }

    .pm-product {
        flex-direction: column;
        height: 100%;
    }

    .pm-product__img-wrap {
        width: 100%;
        height: 10rem;
    }

    .pm-product__body {
        flex: 1;
    }
}

/* Eski sidebar / dikey kategori düzenini tüm genişliklerde devre dışı bırak */
@media (min-width: 0) {
    .public-menu .pm-shell,
    .public-menu .pm-cats-sticky,
    .public-menu .menu-groups,
    .public-menu .pm-body {
        display: block;
        width: 100%;
        max-width: 100%;
    }

    .public-menu .pm-shell {
        display: flex;
        flex-direction: column;
    }

    .public-menu .pm-cats,
    .public-menu .group-list,
    .public-menu .category-tabs .pm-cats {
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        overflow: visible;
        max-height: none;
    }

    .public-menu .pm-cat,
    .public-menu .category-chip,
    .public-menu .group-button {
        display: inline-block;
        width: auto !important;
        min-width: 148px;
        max-width: 320px;
        writing-mode: horizontal-tb;
    }
}
