:root {
    --font-main: "Open Sans", -apple-system, sans-serif;
    --color-dark: #2D3E2E;
    --color-white: #FAF8F3;
    --bg-canvas: #ffffff;
    --border-light: #E3DDD0;
    --color-inspire: #7A9C6B;
    --color-sage-light: #E8F0E0;
    --color-sage-mid: #C5D6B8;
    --color-warm-green: #6B7F4E;
    --color-forest: #2D3E2E;
    --gradient-forest: linear-gradient(135deg, #2D3E2E 0%, #6B7F4E 100%);
    --gradient-page: linear-gradient(180deg, #f5f8f2 0%, #ffffff 100%);
}

body {
    background: #ffffff;
    color: var(--color-dark);
    font-family: var(--font-main);
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

html {
    overflow-x: hidden;
}

@media (max-width: 768px) {
    body {
        padding-top: 80px;
    }
}

/* --- Minimalist Header Layout --- */
.navbar-custom {
    background: #ffffff;
    border-bottom: 1px solid rgba(45, 62, 46, 0.12);
    height: calc(72px + env(safe-area-inset-top));
    padding-top: env(safe-area-inset-top);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1050;
    transition: background 0.4s ease, border-color 0.4s ease;
}
.navbar-custom.drawer-active {
    background: var(--color-forest);
    border-bottom-color: var(--color-forest);
}
.navbar-custom.drawer-active .brand-logo-text,
.navbar-custom.drawer-active .nav-auth-link,
.navbar-custom.drawer-active .menu-toggle-icon,
.navbar-custom.drawer-active #notifBadge {
    color: #fff !important;
}
.navbar-custom.drawer-active .menu-toggle-icon {
    color: #fff;
}
.navbar-custom.drawer-active #notificationBell svg {
    stroke: #fff;
}

body {
    padding-top: calc(72px + env(safe-area-inset-top));
    transition: margin-left 0.3s ease-in-out;
}

.header-container {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    width: 100%;
    height: 100%;
    padding: 0 24px;
}

@media (max-width: 768px) {
    .navbar-custom {
        height: auto;
        min-height: 60px;
        padding: 10px 0;
    }
    .header-container {
        grid-template-columns: auto 1fr auto;
        padding: 0 12px;
        gap: 8px;
    }
    .brand-section {
        grid-column: 1;
        grid-row: 1;
    }
    .auth-section {
        grid-column: 3;
        grid-row: 1;
    }
    .brand-logo-text {
        font-size: 1.2rem;
    }
}

.brand-section {
    display: flex;
    align-items: center;
    gap: 8px;
}

.menu-toggle-icon {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--color-forest);
    cursor: pointer;
    display: flex;
    align-items: center;
}

.brand-logo-text {
    font-weight: 800;
    letter-spacing: -0.05em;
    color: var(--color-forest);
    font-size: 1.7rem;
    text-decoration: none;
}

.search-section {
    max-width: 720px;
    width: 100%;
    justify-self: center;
}

.header-search-bar {
    background-color: var(--color-sage-light);
    border: 1px solid transparent;
    border-radius: 8px;
    height: 44px;
    font-size: 14px;
    font-weight: 400;
    padding-left: 40px;
    transition: all 0.2s ease;
}

.header-search-bar:focus {
    background-color: var(--color-white);
    border-color: var(--color-warm-green);
    box-shadow: 0 0 0 2px rgba(107, 127, 78, 0.15);
}

.search-input-wrapper {
    position: relative;
    width: 100%;
}

.search-icon-lens {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    transition: stroke 0.2s ease;
}

.auth-section {
    display: flex;
    align-items: center;
    gap: 20px;
    justify-self: end;
}

.nav-auth-link {
    font-weight: 600;
    font-size: 14px;
    color: var(--color-forest);
    text-decoration: none;
    letter-spacing: -0.01em;
}

.nav-auth-link:hover {
    color: var(--color-forest);
    opacity: 0.7;
}

.btn-forest {
    background: var(--gradient-forest);
    border-color: var(--color-forest);
    color: #FAF8F3;
    border-radius: 10px;
}
.btn-forest:hover {
    background: linear-gradient(135deg, #3D5240 0%, #5A6F42 100%);
    border-color: #3D5240;
    color: #FAF8F3;
}

.btn-outline-forest {
    background-color: transparent;
    border-color: var(--color-sage-mid);
    color: var(--color-forest);
    border-radius: 10px;
}
.btn-outline-forest:hover {
    background-color: var(--color-sage-light);
    border-color: var(--color-warm-green);
    color: var(--color-forest);
}

.card-earthy {
    border-color: var(--border-light) !important;
    background-color: var(--color-white) !important;
    border-radius: 12px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.card-earthy:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(45, 62, 46, 0.08) !important;
}

/* --- Global Button Animations --- */
.btn {
    transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.btn:active {
    transform: scale(0.96);
}
.btn-forest:hover, .btn-outline-forest:hover {
    transform: translateY(-1px);
}
.btn-forest:hover {
    box-shadow: 0 4px 12px rgba(45, 62, 46, 0.2);
}
.btn-outline-forest:hover {
    box-shadow: 0 4px 12px rgba(107, 127, 78, 0.12);
}

/* Larger request cards */
.request-card {
    padding: 0.5rem !important;
}
.request-card .request-title {
    font-size: 1rem !important;
    line-height: 1.5 !important;
}
.request-card .request-category {
    font-size: 1.1rem !important;
}
.request-card .request-meta {
    font-size: 0.85rem !important;
}
.request-card .request-meta span {
    font-size: 0.85rem !important;
}

/* Nav links */
.nav-auth-link, .menu-toggle-icon {
    transition: all 0.15s ease;
}

/* Search dropdown items */
#searchDropdown > div {
    transition: background 0.15s ease;
}

/* Search bar below banner */
.search-bar-below-nav {
    background: none;
    border-bottom: none;
}
.search-bar-below-nav .search-icon-lens {
    stroke: rgba(255,255,255,0.8);
}
.search-bar-below-nav .header-search-bar {
    background-color: var(--color-forest);
    border: 1px solid rgba(255,255,255,0.2);
    color: var(--color-white);
    border-radius: 10px;
    height: 44px;
    font-size: 14px;
    padding-left: 40px;
    transition: all 0.2s ease;
}
.search-bar-below-nav .header-search-bar::placeholder {
    color: #fff;
}
.search-bar-below-nav .header-search-bar:focus {
    background-color: var(--color-forest);
    border-color: rgba(255,255,255,0.4);
    box-shadow: 0 0 0 2px rgba(255,255,255,0.15);
}
.search-bar-below-nav .search-section {
    max-width: 720px;
    width: 100%;
    margin: 0 auto;
}

/* Banner carousel */
.banner-carousel {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
}
.banner-carousel .carousel-track {
    display: flex;
    transition: transform 0.5s ease;
}
.banner-carousel .carousel-slide {
    min-width: 100%;
    height: 240px;
    background-size: cover;
    background-position: center;
    position: relative;
}
.banner-carousel .carousel-slide .overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(45,62,46,0.85) 0%, rgba(45,62,46,0.4) 60%, rgba(45,62,46,0.1) 100%);
}
.banner-carousel .carousel-slide .content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 32px;
    color: #fff;
}
.banner-carousel .carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: none;
    border: none;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.banner-carousel .carousel-arrow:hover {
    opacity: 0.7;
}
.banner-carousel .carousel-arrow.prev { left: 12px; }
.banner-carousel .carousel-arrow.next { right: 12px; }
.banner-carousel .carousel-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}
.banner-carousel .carousel-dots button {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.4);
    cursor: pointer;
    padding: 0;
    transition: background 0.2s;
}
.banner-carousel .carousel-dots button.active {
    background: #fff;
}
@media (max-width: 768px) {
    .banner-carousel .carousel-slide {
        height: 180px;
    }
    .banner-carousel .carousel-slide .content {
        padding: 0 20px;
    }
    .banner-carousel .carousel-slide .content h1 {
        font-size: 1.2rem !important;
    }
    .banner-carousel .carousel-slide .content p {
        font-size: 0.8rem !important;
    }
    .banner-carousel .carousel-arrow {
        width: 28px;
        height: 28px;
    }
}

/* Bottom navbar */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: #1a2a1b;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: space-around;
    z-index: 1040;
}
.bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    text-decoration: none;
    color: rgba(255,255,255,0.7);
    font-size: 11px;
    font-weight: 500;
    padding: 6px 16px;
    border-radius: 12px;
    transition: all 0.15s ease;
}
.bottom-nav a:hover,
.bottom-nav a.active {
    color: var(--color-white);
    background: rgba(255,255,255,0.12);
}
.bottom-nav a svg {
    width: 22px;
    height: 22px;
}
body {
    padding-bottom: 72px;
}

@media (min-width: 769px) {
    .bottom-nav {
        display: none;
    }
    body {
        padding-bottom: 0;
    }
}

/* Offcanvas below navbar */
#sideMenu {
    top: calc(72px + env(safe-area-inset-top));
    height: calc(100vh - 72px - env(safe-area-inset-top) - 64px);
    border-radius: 0 20px 20px 0;
    box-shadow: 4px 0 20px rgba(45,62,46,0.12);
}
.body-push {
    transition: margin-left 0.3s ease-in-out;
    margin-left: 220px;
}
@media (max-width: 768px) {
    #sideMenu {
        top: 60px !important;
        height: calc(100vh - 60px - 64px) !important;
        border-radius: 0 16px 16px 0 !important;
        box-shadow: 4px 0 20px rgba(45,62,46,0.12);
    }
    .body-push {
        margin-left: 0 !important;
    }
}
/* Offcanvas links - these are now inline-styled */

/* Back link */
.back-link {
    transition: all 0.15s ease;
}
.back-link:hover {
    transform: translateX(-3px);
}

/* Notification dropdown */
#notifDropdown .notif-item {
    transition: background 0.15s ease;
    border-bottom: 1px solid var(--border-light);
}
#notifDropdown .notif-item:last-child {
    border-bottom: none;
}
#notifDropdown .notif-item:hover {
    background: var(--color-sage-light);
}
#notifDropdown .notif-item.unread {
    background: #f0f7eb;
}
#notifDropdown .notif-item.unread:hover {
    background: #e4efda;
}
@media (max-width: 576px) {
    #notifDropdown {
        width: calc(100% - 32px) !important;
        right: 16px !important;
        top: 66px !important;
        max-height: 60vh !important;
    }
}
#notificationBell {
    transition: opacity 0.15s ease;
}
#notificationBell:hover {
    opacity: 0.8;
}

/* Drawer timeline styles */
.drawer-timeline-item {
    position: relative;
    padding-bottom: 20px;
    padding-left: 16px;
}
.drawer-timeline-item:last-child {
    padding-bottom: 0;
}
.drawer-timeline-item::before {
    content: '';
    position: absolute;
    left: -20px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #E5E7EB;
}
.drawer-timeline-item:last-child::before {
    bottom: auto;
    height: 12px;
}
.drawer-timeline-item::after {
    content: '';
    position: absolute;
    left: -24px;
    top: 2px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #2D3E2E;
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px #2D3E2E;
}
.drawer-timeline-item:first-child::after {
    background: #2D3E2E;
}
.drawer-timeline-item:not(:first-child)::after {
    background: #93C5FD;
    box-shadow: 0 0 0 2px #93C5FD;
}

/* Utility classes */
.form-control-sage {
    border-radius: 10px;
    background: var(--color-sage-light);
    border: 1px solid var(--border-light);
}
.form-label-sage {
    font-weight: 600;
    font-size: 13px;
    color: #6c757d;
}
.badge-fast-track {
    display: inline-block;
    background: #2D3E2E;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
}
.badge-status {
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    display: inline-block;
}

/* Shared Horizontal Scroll */
.hscroll-wrap {
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.hscroll-wrap::-webkit-scrollbar { display: none; }
.hscroll {
    display: flex;
    flex-wrap: nowrap;
    gap: 12px;
    padding: 0 16px 4px;
    min-width: max-content;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 16px 12px;
}
.section-header h2 {
    font-size: 17px;
    font-weight: 700;
    color: var(--color-forest);
    margin: 0;
}
.section-header a {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-warm-green);
    text-decoration: none;
}

.svc-scroll { gap: 12px; }

.svc-hcard {
    flex-shrink: 0;
    width: 160px;
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}
.svc-hcard:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(45,62,46,0.10);
}
.svc-hcard.ft-highlight {
    border: 2px solid #2D3E2E;
}
.svc-hcard-img {
    width: 100%;
    height: 110px;
    object-fit: cover;
    display: block;
}
.svc-hcard-placeholder {
    width: 100%;
    height: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #4A5E3A 0%, #6B7F4E 50%, #8BA07A 100%);
    color: #fff;
    font-weight: 700;
    font-size: 14px;
}
.svc-hcard-body {
    padding: 10px 12px 12px;
}
.svc-hcard-body .svc-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-forest);
    line-height: 1.3;
    margin-bottom: 4px;
}
.svc-hcard-body .svc-price-label {
    font-size: 10px;
    color: #999;
    font-weight: 600;
}
.svc-hcard-body .svc-price {
    font-size: 15px;
    font-weight: 700;
    color: var(--color-forest);
    margin-bottom: 4px;
}
.svc-hcard-body .svc-rating {
    display: flex;
    align-items: center;
    gap: 4px;
}
.svc-hcard-body .svc-rating .star-icon {
    color: #f59e0b;
    width: 13px;
    height: 13px;
}
.svc-hcard-body .svc-rating .rating-num {
    font-size: 12px;
    font-weight: 600;
    color: var(--color-forest);
}
.svc-hcard-body .svc-rating .rating-count {
    font-size: 11px;
    color: #999;
}

.modal-content-elevated {
    border-radius: 16px;
    border: none;
}
.info-box {
    background-color: var(--color-sage-light);
    border-radius: 10px;
    padding: 12px 16px;
}
.section-label-sm {
    font-size: 11px;
    color: #888;
    font-weight: 700;
    letter-spacing: 0.08em;
}
.hover-lift {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.hover-lift:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}
.search-wrap {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}
.search-wrap .search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    stroke: #8B9B7A;
}
.search-wrap input {
    width: 100%;
    height: 48px;
    border-radius: 14px;
    border: 1px solid var(--border-light);
    font-size: 15px;
    padding: 0 16px 0 44px;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.search-wrap input:focus {
    outline: none;
    border-color: var(--color-forest);
    box-shadow: 0 0 0 3px rgba(45,62,46,0.1);
}
.svc-placeholder {
    background: linear-gradient(135deg, #4A5E3A 0%, #6B7F4E 50%, #8BA07A 100%);
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.svc-name {
    font-weight: 700;
    font-size: 14px;
    color: var(--color-forest);
    margin-bottom: 2px;
}
.svc-price {
    font-weight: 700;
    font-size: 15px;
    color: var(--color-forest);
}
.svc-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
}
.star-icon {
    color: #f59e0b;
    font-size: 13px;
}
.rating-num {
    font-weight: 700;
    color: var(--color-forest);
}
.rating-count {
    color: #999;
    font-size: 11px;
}

/* Booking overlay/drawer only on booking pages */
body:not(.has-booking) #bookingOverlay,
body:not(.has-booking) #bookingDrawer {
    display: none !important;
    pointer-events: none !important;
}

/* Booking Drawer */
#bookingDrawer .saved-addr-card {
    transition: all 0.15s;
}
#bookingDrawer .saved-addr-card:hover {
    border-color: var(--color-sage-mid);
    background: #EEECE4;
}
@media (max-width: 768px) {
    #bookingDrawer {
        top: calc(65px + env(safe-area-inset-top)) !important;
    }
    #bookingDrawerHeader {
        border-radius: 20px 20px 0 0 !important;
    }
    #drawer {
        top: calc(65px + env(safe-area-inset-top)) !important;
    }
}
