/*!
Theme Name: Rimzone delivery
Theme URI: http://underscores.me/
Author: Underscores.me
Author URI: http://underscores.me/
Description: Custom Zomato Style Food Delivery Theme
Version: 1.0.0
Requires PHP: 5.6
License: GNU General Public License v2 or later
Text Domain: rimzone-delivery
*/

/* ==========================================================================
   1. RESET & BASE VARIABLES
   ========================================================================== */
:root {
    --primary-color: #e23744;
    --secondary-color: #2b2d42;
    --bg-light: #f8f8f8;
    --text-dark: #1c1c1c;
    --text-muted: #696969;
    --white: #ffffff;
    --border-color: #e8e8e8;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --radius: 12px;
}

html {
    box-sizing: border-box;
    line-height: 1.15;
    -webkit-text-size-adjust: 100%;
}

*, *::before, *::after {
    box-sizing: inherit;
}

body {
    margin: 0;
    font-family: 'Okra', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 16px;
    color: var(--text-dark);
    background-color: var(--bg-light);
}

/* ==========================================================================
   2. HEADER & NAVIGATION
   ========================================================================== */
.site-header {
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 15px 0;
}

.site-header .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.main-navigation ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 25px;
}

.main-navigation a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: color 0.2s ease;
}

.main-navigation a:hover {
    color: var(--primary-color);
}

/* ==========================================================================
   3. HERO SEARCH SECTION
   ========================================================================== */
.hero-search-section {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.6)), url('https://images.unsplash.com/photo-1504674900247-0877df9cc836?auto=format&fit=crop&w=1350&q=80') center/cover no-repeat;
    padding: 100px 20px;
    text-align: center;
    color: var(--white);
}

.hero-search-section h1 {
    font-size: 2.8rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.hero-search-section p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.hero-search-form {
    max-width: 650px;
    margin: 0 auto;
    display: flex;
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    padding: 5px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.hero-search-form input[type="search"],
.hero-search-form input[type="text"] {
    flex: 1;
    border: none;
    padding: 15px 20px;
    font-size: 1rem;
    outline: none;
    color: var(--text-dark);
}

.hero-search-form button {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 0 30px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.hero-search-form button:hover {
    background: #c82834;
}

/* ==========================================================================
   4. RESTAURANT & FOOD GRID
   ========================================================================== */
.site-main {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.section-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 25px;
    color: var(--text-dark);
}

.restaurant-grid,
.grid-layout {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.restaurant-card,
.post-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color);
}

.restaurant-card:hover,
.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.restaurant-card img,
.post-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.restaurant-info {
    padding: 20px;
}

.restaurant-info h3 {
    margin: 0 0 8px 0;
    font-size: 1.3rem;
    color: var(--text-dark);
}

.restaurant-info p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.restaurant-rating {
    display: inline-block;
    background: #24963f;
    color: var(--white);
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.85rem;
    float: right;
}

/* ==========================================================================
   5. BUTTONS, FORMS & UTILITIES
   ========================================================================== */
button,
.button,
input[type="submit"] {
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

button:hover,
.button:hover,
input[type="submit"]:hover {
    background-color: #c82834;
}

.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute !important;
    width: 1px;
    word-wrap: normal !important;
}

/* ==========================================================================
   6. RESPONSIVE DESIGN
   ========================================================================== */
@media screen and (max-width: 768px) {
    .hero-search-section h1 {
        font-size: 2rem;
    }

    .hero-search-form {
        flex-direction: column;
        background: transparent;
        box-shadow: none;
        gap: 10px;
    }

    .hero-search-form input[type="search"],
    .hero-search-form input[type="text"],
    .hero-search-form button {
        width: 100%;
        border-radius: 6px;
        padding: 14px;
    }

    .restaurant-grid {
        grid-template-columns: 1fr;
    }
}
/* ==========================================
   GLOBAL LAYOUT & MOBILE OVERFLOW FIXES
========================================== */
*, *::before, *::after {
    box-sizing: border-box !important;
}

html, body {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important; /* Prevents Horizontal Scroll Bar */
    margin: 0;
    padding: 0;
}

#page, .site, .site-header, .site-content, main {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden;
}

/* ==========================================
   MOBILE HEADER FIXES
========================================== */
.header-container {
    max-width: 100% !important;
    padding: 10px 15px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
}

.site-branding .custom-logo-text {
    font-size: 1.2rem !important;
    white-space: nowrap;
}

.main-navigation .nav-menu {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.cart-btn, .auth-btn {
    padding: 6px 10px !important;
    font-size: 0.82rem !important;
    white-space: nowrap !important;
}

/* ==========================================
   MOBILE HERO SEARCH BANNER FIXES
========================================== */
.hero-search-section {
    width: 100% !important;
    min-height: auto !important;
    padding: 30px 15px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    background-size: cover !important;
    background-position: center !important;
}

.hero-content {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
}

.hero-content h1 {
    font-size: 1.5rem !important;
    line-height: 1.3 !important;
    word-break: break-word !important;
    margin-bottom: 10px !important;
}

.hero-content p#location-status {
    font-size: 0.85rem !important;
    word-break: break-word !important;
    padding: 0 5px !important;
}

/* Mobile Search Form Layout Fix */
.hero-search-form {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    gap: 10px !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
}

.hero-search-form input[type="text"] {
    width: 100% !important;
    border-radius: 8px !important;
    padding: 12px 15px !important;
    font-size: 0.9rem !important;
}

.hero-search-form button {
    width: 100% !important;
    border-radius: 8px !important;
    padding: 12px !important;
    font-size: 0.95rem !important;
}

/* Container & Grid Responsiveness */
.container {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 15px !important;
    margin: 20px auto !important;
}

.restaurant-grid {
    grid-template-columns: 1fr !important; /* Mobile Single Column Grid */
    gap: 15px !important;
}
