/*
Theme Name: Restaurant Theme
Author: Your Name
Description: Custom restaurant ordering website.
Version: 2.0
*/

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Arial,
        sans-serif;
    background: #fafafa;
    color: #222;
}

body,
button,
input {
    -webkit-tap-highlight-color: transparent;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
}


/* =========================================================
   CONTAINER
========================================================= */

.container {
    width: min(1200px, 92%);
    margin: 0 auto;
}

/* Default-template page wrapper (index.php). Preserves the previous inline
   `padding:60px 0` on tablet/desktop; the mobile override below reduces only
   the TOP padding so the page heading ("Order Food") sits comfortably close to
   the header instead of ~80px below it. Vertical spacing only — no redesign. */
.ro-page-main {
    padding: 60px 0;
}


/* =========================================================
   HEADER
========================================================= */

.site-header {
    position: sticky;
    top: 0;
    z-index: 9999;

    background: rgba(255, 255, 255, 0.96);

    backdrop-filter: blur(12px);

    border-bottom: 1px solid #eeeeee;
}

.header-inner {
    min-height: 70px;

    display: flex;
    align-items: center;
    justify-content: space-between;
}

.restaurant-logo {
    display: flex;
    align-items: center;

    font-size: 21px;
    font-weight: 800;

    white-space: nowrap;
}

.restaurant-logo span {
    margin-right: 7px;
}

.restaurant-logo-img {
    height: 32px;
    width: auto;
    max-width: 120px;
    margin-right: 8px;
    object-fit: contain;
    display: block;
}

.main-navigation {
    display: flex;
    align-items: center;

    gap: 24px;
}

.main-navigation a {
    font-size: 15px;
    font-weight: 600;
}

.main-navigation a:hover {
    opacity: 0.7;
}

.cart-link {
    background: #e63946;

    color: white !important;

    padding: 11px 17px;

    border-radius: 10px;

    font-weight: 700 !important;
}


/* =========================================================
   MOBILE HAMBURGER (desktop = hidden)
========================================================= */

/* On desktop the header-bar actions (Cart + hamburger) are hidden;
   the Cart link inside the nav is shown instead. */
.header-actions {
    display: none;
    align-items: center;
    gap: 10px;
}

.ro-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    padding: 9px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    cursor: pointer;
}

.ro-hamburger span {
    display: block;
    height: 2px;
    width: 100%;
    background: #1e293b;
    border-radius: 2px;
    transition: transform .2s ease, opacity .2s ease;
}


/* =========================================================
   HERO
========================================================= */

.hero {
    min-height: 560px;

    display: flex;
    align-items: center;

    background:
        linear-gradient(
            rgba(0, 0, 0, 0.52),
            rgba(0, 0, 0, 0.52)
        ),
        url("assets/images/hero.jpg")
        center / cover no-repeat;

    color: white;
}

.hero-content {
    max-width: 650px;
}

.hero h1 {
    margin: 0 0 18px;

    font-size: clamp(42px, 6vw, 68px);

    line-height: 1.05;

    font-weight: 800;
}

.hero p {
    margin: 0 0 30px;

    font-size: 20px;

    line-height: 1.6;

    color: #f5f5f5;
}

.primary-button {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    min-height: 52px;

    padding: 0 25px;

    border-radius: 10px;

    background: #e63946;

    color: white;

    font-weight: 700;

    transition: 0.2s;
}

.primary-button:hover {
    transform: translateY(-2px);
}


/* =========================================================
   MENU
========================================================= */

.menu-section {
    padding: 70px 0;
}

.section-title {
    text-align: center;

    margin-bottom: 45px;
}

.section-title h2 {
    margin: 0 0 8px;

    font-size: clamp(30px, 5vw, 42px);

    font-weight: 800;
}

.section-title p {
    margin: 0;

    color: #777;
}


/* =========================================================
   FOOD CATEGORY
========================================================= */

.food-category {
    margin-bottom: 50px;
}

.food-category h3 {
    margin: 0 0 20px;

    font-size: 28px;

    font-weight: 800;
}


/* =========================================================
   FOOD GRID
========================================================= */

.food-grid {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 22px;
}


/* =========================================================
   FOOD CARD
========================================================= */

.food-card {
    overflow: hidden;

    background: white;

    border: 1px solid #eeeeee;

    border-radius: 16px;

    box-shadow:
        0 5px 25px
        rgba(0, 0, 0, 0.06);

    transition:
        transform 0.2s,
        box-shadow 0.2s;
}

.food-card:hover {
    transform: translateY(-3px);

    box-shadow:
        0 12px 35px
        rgba(0, 0, 0, 0.10);
}

.food-image {
    display: block;

    width: 100%;

    height: 210px;

    object-fit: cover;
}

.food-content {
    padding: 18px;
}

.food-content h4 {
    margin: 0 0 7px;

    font-size: 19px;

    font-weight: 800;
}

.food-description {
    margin: 0;

    min-height: 42px;

    color: #777;

    line-height: 1.5;

    font-size: 14px;
}

.food-bottom {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 12px;

    margin-top: 17px;
}

.food-price {
    font-size: 20px;

    font-weight: 800;
}

.add-button,
.add-button:focus {
    border: 0;

    background: #e63946;

    color: white;

    padding: 10px 17px;

    min-height: 42px;

    border-radius: 9px;

    cursor: pointer;

    font-size: 14px;

    font-weight: 800;
}


/* =========================================================
   FOOTER
========================================================= */

.site-footer {
    margin-top: 60px;

    padding: 50px 0 25px;

    background: #181818;

    color: white;
}

.footer-inner {
    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 35px;
}

.footer-column h3 {
    margin: 0 0 12px;
}

.footer-column p {
    margin: 0;

    color: #bbb;

    line-height: 1.7;
}

.footer-bottom {
    margin-top: 35px;

    padding-top: 20px;

    border-top: 1px solid #333;

    color: #999;

    font-size: 14px;
}

/* =========================================================
   POWERED BY OWNSERVE — footer branding row
   Centered, below the copyright. Uses the actual OwnServe logo
   asset unaltered; sized by height with width:auto to preserve
   proportions. The logo art is on a light background, so it sits
   on a small rounded light chip to read cleanly on the dark footer
   without recoloring or cropping the logo itself.
========================================================= */
.footer-powered {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 14px;
    color: #bbb;
    font-size: 13px;
}
.footer-powered-text {
    letter-spacing: .2px;
}
.footer-powered-logo {
    display: block;
    height: 26px;
    width: auto;            /* preserve original proportions */
    max-width: 100%;
    object-fit: contain;
    background: #fff;       /* clean chip for the light-background logo art */
    padding: 5px 9px;
    border-radius: 8px;
}

@media (max-width: 600px) {
    .footer-powered {
        margin-top: 12px;
        font-size: 12px;
    }
    .footer-powered-logo {
        height: 22px;       /* scales down naturally; stays readable */
        padding: 4px 8px;
    }
}


/* =========================================================
   MOBILE CART BAR
========================================================= */

.mobile-cart-bar {
    display: none;
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 900px) {

    .food-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .footer-inner {
        grid-template-columns:
            repeat(2, 1fr);
    }
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 650px) {

    /* Reduce the excessive top gap between the sticky header and the page
       heading on mobile. Combined with the heading's own margin this lands the
       "Order Food" heading ~36px below the header (was ~80px). Bottom padding
       is kept smaller too for balance; desktop/tablet spacing is unchanged. */
    .ro-page-main {
        padding-top: 16px;
        padding-bottom: 24px;
    }

    body {
        padding-bottom: 75px;
    }


    /* HEADER */

    .site-header {
        position: sticky;

        top: 0;
    }

    .header-inner {
        min-height: 62px;
    }

    .restaurant-logo {
        font-size: 18px;
    }

    .main-navigation {
        gap: 0;
    }

    /* Show the header-bar actions (Cart + hamburger) on mobile. */
    .header-actions {
        display: flex;
    }

    .ro-hamburger {
        display: flex;
    }

    /* The Cart link duplicated inside the nav panel is hidden on mobile —
       the header bar already shows Cart. */
    .main-navigation .nav-cart-link {
        display: none;
    }

    /* Turn the primary nav into a slide-down panel below the sticky header. */
    .main-navigation {
        position: fixed;
        top: 62px; /* matches mobile header-inner min-height */
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        background: #fff;
        border-bottom: 1px solid #eee;
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
        padding: 8px 0;
        gap: 0;
        max-height: calc(100vh - 62px);
        overflow-y: auto;
        transform: translateY(-12px);
        opacity: 0;
        visibility: hidden;
        transition: transform .2s ease, opacity .2s ease, visibility .2s;
        z-index: 9998;
    }

    body.ro-nav-open .main-navigation {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .main-navigation a {
        display: block;
        padding: 14px 20px;
        font-size: 16px !important;
        border-bottom: 1px solid #f4f4f4;
    }

    .main-navigation a:last-child {
        border-bottom: none;
    }

    /* Animate the hamburger into an X when open. */
    body.ro-nav-open .ro-hamburger span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }
    body.ro-nav-open .ro-hamburger span:nth-child(2) {
        opacity: 0;
    }
    body.ro-nav-open .ro-hamburger span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .cart-link {
        padding: 9px 13px;

        border-radius: 9px;

        font-size: 13px !important;
    }


    /* HERO */

    .hero {
        min-height: 480px;

        padding: 45px 0;
    }

    .hero-content {
        text-align: center;

        margin: 0 auto;
    }

    .hero h1 {
        font-size: 43px;
    }

    .hero p {
        font-size: 17px;

        line-height: 1.5;
    }

    .primary-button {
        width: 100%;

        min-height: 54px;
    }


    /* MENU */

    .menu-section {
        padding: 45px 0;
    }

    .section-title {
        margin-bottom: 32px;
    }

    .section-title h2 {
        font-size: 31px;
    }


    /* CATEGORY */

    .food-category {
        margin-bottom: 38px;
    }

    .food-category h3 {
        font-size: 23px;

        margin-bottom: 15px;
    }


    /* ONE COLUMN */

    .food-grid {
        grid-template-columns: 1fr;

        gap: 15px;
    }


    /* FOOD CARD */

    .food-card {
        display: grid;

        grid-template-columns: 125px 1fr;

        min-height: 145px;

        border-radius: 14px;
    }

    .food-image {
        width: 125px;

        height: 100%;

        min-height: 145px;

        object-fit: cover;
    }

    .food-content {
        display: flex;

        flex-direction: column;

        justify-content: space-between;

        padding: 14px;
    }

    .food-content h4 {
        font-size: 17px;

        margin-bottom: 4px;
    }

    .food-description {
        font-size: 13px;

        min-height: 0;

        display: -webkit-box;

        -webkit-line-clamp: 2;

        -webkit-box-orient: vertical;

        overflow: hidden;
    }

    .food-bottom {
        margin-top: 10px;
    }

    .food-price {
        font-size: 17px;
    }

    .add-button {
        min-height: 38px;

        padding: 8px 14px;

        border-radius: 8px;
    }


    /* FOOTER */

    .site-footer {
        margin-top: 35px;

        padding: 35px 0 20px;
    }

    .footer-inner {
        grid-template-columns: 1fr;

        gap: 25px;
    }


    /* MOBILE CART */

    .mobile-cart-bar {
        position: fixed;

        left: 10px;
        right: 10px;
        bottom: 10px;

        z-index: 10000;

        display: flex;

        align-items: center;

        justify-content: space-between;

        gap: 12px;

        padding: 12px 14px;

        background: #181818;

        color: white;

        border-radius: 14px;

        box-shadow:
            0 8px 30px
            rgba(0, 0, 0, 0.25);
    }

    .mobile-cart-info {
        display: flex;

        flex-direction: column;

        gap: 2px;
    }

    .mobile-cart-count {
        font-size: 12px;

        color: #bbb;
    }

    .mobile-cart-total {
        font-size: 17px;

        font-weight: 800;
    }

    .mobile-cart-button {
        padding: 11px 15px;

        border-radius: 9px;

        background: #e63946;

        color: white;

        font-size: 14px;

        font-weight: 800;

        white-space: nowrap;
    }

}


/* =========================================================
   HOME PAGE SECTIONS (Phase U-Extension)
   Menu / Offers / About. Anchored sections account for the
   sticky header via scroll-margin-top.
========================================================= */

.ro-home-section {
    scroll-margin-top: 90px;
    margin: 0 auto 48px;
}

.ro-home-section-head {
    text-align: center;
    margin: 10px 0 22px;
}

.ro-home-section-head h2 {
    margin: 0 0 6px;
    font-size: 28px;
    font-weight: 800;
}

.ro-home-section-head p {
    margin: 0;
    color: #64748b;
    font-size: 15px;
}

.ro-home-empty {
    text-align: center;
    padding: 40px 20px;
    color: #94a3b8;
    background: #fff;
    border: 1px dashed #e5e7eb;
    border-radius: 14px;
}

.ro-home-note {
    text-align: center;
    color: #94a3b8;
    font-size: 13px;
    margin-top: 16px;
}

/* ---- OFFERS ---- */
.ro-offers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.ro-offer-card {
    position: relative;
    background: #fff;
    border: 1px solid #fde68a;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(245, 158, 11, 0.08);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ro-offer-badge {
    font-size: 22px;
}

.ro-offer-code {
    font-family: monospace;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 1px;
    color: #92400e;
    background: #fffbeb;
    border: 1px dashed #f59e0b;
    border-radius: 8px;
    padding: 6px 12px;
    align-self: flex-start;
}

.ro-offer-headline {
    font-size: 22px;
    font-weight: 800;
    color: #e63946;
}

.ro-offer-desc {
    font-size: 14px;
    color: #475569;
}

.ro-offer-meta {
    list-style: none;
    padding: 0;
    margin: 4px 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ro-offer-meta li {
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    background: #f1f5f9;
    padding: 4px 10px;
    border-radius: 6px;
}

.ro-offer-cta {
    margin-top: 12px;
    display: inline-block;
    text-align: center;
    background: #1e293b;
    color: #fff;
    padding: 11px 16px;
    border-radius: 10px;
    font-weight: 800;
    font-size: 14px;
}

.ro-offer-cta:hover {
    background: #0f172a;
}

/* ---- ABOUT ---- */
.ro-home-about {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 28px 24px;
}

.ro-about-tagline {
    text-align: center;
    font-size: 16px;
    color: #334155;
    margin: 0 0 18px;
}

.ro-about-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
    max-width: 720px;
    margin: 0 auto;
}

.ro-about-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 16px;
    background: #f8fafc;
    border-radius: 12px;
}

.ro-about-item span {
    font-size: 12px;
    color: #94a3b8;
    font-weight: 700;
}

.ro-about-item strong {
    font-size: 15px;
    color: #1e293b;
}

/* ---- Mobile (375 / 390 / 412) ---- */
@media (max-width: 480px) {
    .ro-home-section {
        scroll-margin-top: 80px;
        margin-bottom: 36px;
    }
    .ro-home-section-head h2 {
        font-size: 23px;
    }
    .ro-offers-grid {
        grid-template-columns: 1fr;
    }
    .ro-home-about {
        padding: 20px 16px;
    }
    .ro-about-details {
        grid-template-columns: 1fr;
    }
}
