/* ==========================================================================
   TEMA 4 — Restabook
   Kural: Bu dosya yalnızca düzen ve süsleme içerir. Kullanıcının
   değiştirebildiği özellikler (font, renk, boyut, kenarlık, konum) burada
   YAZILMAZ; başlangıç değerleri theme.json -> defaults içindedir.
   Gerektiğinde --g-* değişkenleri süsleme için okunabilir (örn. köşe çizgileri).
   ========================================================================== */
@layer theme {
    * { box-sizing: border-box; }
    html { scroll-behavior: smooth; }

    body {
        margin: 0;
        background: #ffffff;
        color: #000000;
        font-family: var(--g-products-font_family);
    }

    /* Header ------------------------------------------------------------ */
    /* Yapışkan header: logo büyüdükçe header da büyür, içerik altında kalmaz. */
    .site-header {
        position: sticky;
        top: 0;
        z-index: 20;
        width: 100%;
        background: rgba(255, 255, 255, 0.96);
        border-bottom: 1px solid rgba(193, 157, 96, 0.18);
    }

    .site-header-inner {
        display: flex;
        align-items: center;
        gap: 16px;
        width: min(100%, 1120px);
        margin: 0 auto;
        padding: 14px 20px;
        min-height: 78px;
    }

    .site-logo {
        display: flex;
        flex-direction: column;
        gap: 4px;
        line-height: 1;
        letter-spacing: 0.18em;
        text-decoration: none;
    }

    .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        min-width: 50px;
        height: 50px;
        padding: 0 14px;
        cursor: pointer;
        transition: transform 0.2s ease;
    }

    .menu-toggle:hover { transform: translateY(-1px); }

    .menu-toggle-icon {
        display: inline-flex;
        flex-direction: column;
        gap: 5px;
        width: 22px;
    }

    .menu-toggle-icon span {
        display: block;
        height: 2px;
        border-radius: 999px;
        background: currentColor;
    }

    .menu-toggle-label { letter-spacing: 0.18em; text-transform: uppercase; }

    /* Açılır menü (konum ve açılış ortak katmandan gelir) ------------------ */
    .side-drawer {
        padding: 26px 22px 32px;
        color: #ffffff;
    }

    .side-drawer-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 30px;
    }

    .side-drawer-label {
        margin: 0;
        letter-spacing: 0.4em;
        text-transform: uppercase;
    }

    .drawer-close {
        border: 0;
        background: transparent;
        padding: 0;
    }

    .side-drawer-nav { display: grid; gap: 10px; }
    .side-drawer-nav a { padding: 12px 0; text-decoration: none; }

    /* Sayfa ------------------------------------------------------------- */
    .page-shell {
        width: min(100%, 1120px);
        margin: 0 auto;
        padding: 24px 14px 56px;
    }

    .menu-category { scroll-margin-top: 110px; }
    .menu-category + .menu-category { padding-top: 52px; }

    /* Kategori görseli artık veriden gelir: style="--g-item-image:url(...)" */
    .category-hero {
        position: relative;
        overflow: hidden;
        min-height: 340px;
        background-color: #1b1b1d;
        background-image:
            linear-gradient(180deg, rgba(0, 0, 0, 0.18) 0%, rgba(0, 0, 0, 0.52) 100%),
            var(--g-item-image, none);
        background-position: center;
        background-repeat: no-repeat;
        background-size: cover;
    }

    .category-hero::before,
    .category-hero::after {
        position: absolute;
        border: 1px dotted var(--g-price_line-color);
        content: "";
    }

    .category-hero::before {
        top: 54px; left: 28px;
        width: 58px; height: 58px;
        border-right: 0; border-bottom: 0;
    }

    .category-hero::after {
        right: 28px; bottom: 58px;
        width: 84px; height: 84px;
        border-left: 0; border-top: 0;
    }

    .category-hero-inner {
        position: relative;
        display: flex;
        flex-direction: column;
        justify-content: center;
        min-height: 340px;
        padding: 54px 32px;
    }

    .category-hero-copy { max-width: 300px; width: 100%; margin: 0 auto; }
    .category-hero-copy h2 { margin: 0; padding-bottom: 10px; }

    .category-hero-copy p {
        margin: 0;
        color: var(--g-products_price-color);
        font-family: var(--g-category-font_family);
        font-size: 13px;
        line-height: 1.55;
    }

    .category-index {
        position: absolute;
        left: 32px;
        bottom: 24px;
        margin: 0;
        color: #fff;
        font-size: 44px;
        font-weight: 600;
        line-height: 1;
    }

    /* Ürünler ----------------------------------------------------------- */
    .menu-listing { display: grid; gap: 34px; padding: 40px 12px 0; }

    .dish-item {
        display: grid;
        grid-template-columns: 76px minmax(0, 1fr);
        gap: 18px;
        align-items: start;
    }

    .dish-item.no-image { grid-template-columns: minmax(0, 1fr); }

    .dish-item img {
        display: block;
        width: 76px;
        height: 76px;
        object-fit: cover;
    }

    .dish-body { min-width: 0; }

    .dish-head {
        display: grid;
        /* Ad sütunu daralabilir; uzun adlar alt satıra geçer, fiyat ekrandan taşmaz. */
        grid-template-columns: minmax(0, max-content) minmax(24px, 1fr) auto;
        align-items: start;
        gap: 12px;
        margin-bottom: 10px;
    }

    .dish-head h3 { overflow-wrap: break-word; }

    .dish-head h3 { margin: 0; }

    .dish-line {
        align-self: center;
        height: 0;
        transform: translateY(2px);
    }

    .dish-price { position: relative; top: -4px; line-height: 1; white-space: nowrap; }

    .dish-body p { margin: 0; line-height: 1.8; }
}
