:root {
    --matte-grey: #F5F5F5;
    --matte-black: #1A1A1A;
}

body {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', sans-serif;
    font-weight: 500;
    color: #0a0a0a;
    background-color: #ffffff;
}

/* Split Interaction Expansion */
@media (min-width: 768px) {
    .split-side {
        width: 50%;
        transition: width 0.7s cubic-bezier(0.16, 1, 0.3, 1);
        overflow: hidden;
    }
    
    #selector:hover .split-side {
        width: 40%;
    }
    
    #selector .split-side:hover {
        width: 60% !important;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 4px;
}
::-webkit-scrollbar-track {
    background: var(--matte-grey);
}
::-webkit-scrollbar-thumb {
    background: #ccc;
}

/* Service Card Styles */
.service-card {
    transition: all 0.4s ease;
    border: 1px solid rgba(0,0,0,0.05);
}
.service-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.02);
    border-color: rgba(0,0,0,0.1);
}

/* Animation utility */
.fade-up {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}
.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Form Styling */
input, select, textarea {
    appearance: none;
    border-radius: 0;
    font-size: 14px;
}

select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
}

/* Status Pill */
.status-pill {
    letter-spacing: 0.05em;
    border-radius: 2px;
}

/* Gallery Scroll */
#gallery-scroll {
    scroll-behavior: smooth;
}

#gallery-scroll::-webkit-scrollbar {
    height: 3px;
}

#gallery-scroll::-webkit-scrollbar-track {
    background: var(--matte-grey);
}

#gallery-scroll::-webkit-scrollbar-thumb {
    background: #999;
}

/* Gallery Animation */
@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.animate-scroll {
    animation: scroll 30s linear infinite;
}

#gallery-scroll:hover .animate-scroll {
    animation-play-state: paused;
}

/* Modal Styles */
#booking-modal {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

#booking-modal:not(.hidden) .relative {
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Button disabled state */
button:disabled {
    cursor: not-allowed;
}

button:disabled:hover {
    background-color: inherit;
}

/* Checkbox styling */
input[type="checkbox"] {
    cursor: pointer;
    accent-color: var(--matte-black);
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid #000;
    border-radius: 0.25rem;
}

input[type="checkbox"]:checked {
    background-color: var(--matte-black);
    border-color: var(--matte-black);
}

input[type="checkbox"]:focus {
    outline: 2px solid var(--matte-black);
    outline-offset: 2px;
}

/* Text enhancements */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: #0a0a0a;
}

p, span, label {
    font-weight: 500;
}

/* Admin status dropdown */
.status-select {
    min-width: 125px;
    appearance: auto;
    border-radius: 0.375rem;
}

.status-select:focus {
    outline: 2px solid rgba(0, 0, 0, 0.15);
    outline-offset: 2px;
}


/* Smooth page transition between main views */
#page-transition {
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
    background: #0a0a0a;
    opacity: 0;
    transform: scaleY(0);
    transform-origin: bottom;
    transition: transform 0.45s cubic-bezier(0.76, 0, 0.24, 1), opacity 0.35s ease;
}

#page-transition.active {
    opacity: 1;
    transform: scaleY(1);
}

body {
    animation: pageEnter 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}

body.is-leaving main,
body.is-leaving section,
body.is-leaving footer {
    transform: translateY(-10px);
    opacity: 0.88;
    transition: transform 0.35s ease, opacity 0.35s ease;
}

.page-hero {
    animation: softReveal 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes pageEnter {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes softReveal {
    from {
        opacity: 0;
        transform: scale(1.015);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}


/* Testimonials */

#testimonials {
    background: #FAFAFA;
}

#testimonials-scroll {
    scroll-behavior: smooth;
}

#testimonials-scroll {
    position: relative;
}

#testimonials-scroll::before,
#testimonials-scroll::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 72px;
    z-index: 2;
    pointer-events: none;
}

#testimonials-scroll::before {
    left: 0;
    background: linear-gradient(to right, #FAFAFA, rgba(250, 250, 250, 0));
}

#testimonials-scroll::after {
    right: 0;
    background: linear-gradient(to left, #FAFAFA, rgba(250, 250, 250, 0));
}

@media (max-width: 640px) {
    #testimonials-scroll::before,
    #testimonials-scroll::after {
        width: 36px;
    }
}

#testimonials-scroll::-webkit-scrollbar {
    height: 3px;
}

#testimonials-scroll::-webkit-scrollbar-track {
    background: var(--matte-grey);
}

#testimonials-scroll::-webkit-scrollbar-thumb {
    background: #999;
}

@keyframes testimonials-scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.animate-testimonials-scroll {
    animation: testimonials-scroll 36s linear infinite;
}

#testimonials-scroll:hover .animate-testimonials-scroll {
    animation-play-state: paused;
}

.testimonial-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.06);
}



/* Public testimonial modal - fixed */
.testimonial-read-more-btn {
    position: relative;
    z-index: 9999;
    pointer-events: auto;
    cursor: pointer;
    background: transparent;
    border: 0;
    padding: 0;
}

.testimonial-card * {
    pointer-events: auto;
}

.public-testimonial-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
}

.public-testimonial-modal.hidden {
    display: none;
}

.public-testimonial-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.62);
}

.public-testimonial-modal-wrap {
    position: relative;
    min-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.public-testimonial-modal-card {
    position: relative;
    width: 100%;
    max-width: 42rem;
    max-height: 90vh;
    overflow-y: auto;
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 24px 80px rgba(0,0,0,0.28);
    animation: testimonialModalIn 0.22s ease-out;
}

.public-testimonial-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 2;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 999px;
    background: rgba(255,255,255,0.92);
    border: 1px solid rgba(0,0,0,0.1);
    font-size: 1.75rem;
    line-height: 1;
    color: rgba(0,0,0,0.65);
    cursor: pointer;
}

.public-testimonial-modal-image {
    width: 100%;
    height: 16rem;
    object-fit: cover;
}

.public-testimonial-modal-placeholder {
    width: 100%;
    height: 7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.05);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: rgba(0,0,0,0.35);
}

.public-testimonial-modal-body {
    padding: 2rem;
}

.public-testimonial-modal-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.public-testimonial-modal-header h3 {
    font-size: 1.5rem;
    line-height: 1.2;
    margin: 0;
}

.public-testimonial-modal-header p {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: rgba(0,0,0,0.4);
    margin-top: 0.5rem;
}

.public-testimonial-modal-rating {
    text-align: right;
    flex-shrink: 0;
}

.public-testimonial-modal-rating span {
    display: block;
    margin-top: 0.25rem;
    font-size: 10px;
    color: rgba(0,0,0,0.45);
    font-weight: 700;
}

.public-testimonial-modal-comment {
    white-space: pre-wrap;
    font-size: 1rem;
    line-height: 1.9;
    color: rgba(0,0,0,0.72);
}

body.modal-open {
    overflow: hidden;
}

@media (max-width: 640px) {
    .public-testimonial-modal-wrap {
        padding: 0.75rem;
        align-items: flex-start;
        padding-top: 2rem;
    }

    .public-testimonial-modal-body {
        padding: 1.35rem;
    }

    .public-testimonial-modal-image {
        height: 12rem;
    }
}


.star-rating {
    letter-spacing: 0.04em;
}

#testimonial-rating {
    accent-color: var(--matte-black);
    height: 10px;
    cursor: pointer;
}

#testimonial-rating::-webkit-slider-runnable-track {
    height: 8px;
    background: rgba(0, 0, 0, 0.35);
    border-radius: 999px;
}

#testimonial-rating::-webkit-slider-thumb {
    margin-top: -5px;
    width: 18px;
    height: 18px;
    background: var(--matte-black);
    border-radius: 999px;
}

#testimonial-rating::-moz-range-track {
    height: 8px;
    background: rgba(0, 0, 0, 0.35);
    border-radius: 999px;
}

#testimonial-rating::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: var(--matte-black);
    border: 0;
    border-radius: 999px;
}


/* Carousel controls for gallery and testimonials */
.carousel-shell {
    position: relative;
}

.carousel-scroll {
    scroll-behavior: smooth;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

.carousel-scroll:hover .animate-scroll,
.carousel-scroll:hover .animate-testimonials-scroll,
.carousel-scroll.is-manual .animate-scroll,
.carousel-scroll.is-manual .animate-testimonials-scroll {
    animation-play-state: paused;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: 1px solid rgba(0,0,0,0.10);
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(8px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.10);
    color: #0a0a0a;
    font-size: 30px;
    line-height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, background 0.2s ease, opacity 0.2s ease;
}

.carousel-btn:hover {
    background: #0a0a0a;
    color: #fff;
    transform: translateY(-50%) scale(1.05);
}

.carousel-btn-left {
    left: 1.25rem;
}

.carousel-btn-right {
    right: 1.25rem;
}

#gallery-scroll,
#testimonials-scroll {
    cursor: grab;
}

#gallery-scroll:active,
#testimonials-scroll:active {
    cursor: grabbing;
}

@media (max-width: 640px) {
    .carousel-btn {
        width: 38px;
        height: 38px;
        font-size: 26px;
    }

    .carousel-btn-left {
        left: 0.75rem;
    }

    .carousel-btn-right {
        right: 0.75rem;
    }
}


/* Mobile-first improvements */
.mobile-menu-toggle { display: none; }
.nav-logo { max-width: 150px; object-fit: contain; }

@media (max-width: 767px) {
    body { font-size: 15px; }
    body.mobile-menu-open { overflow: hidden; }
    #navbar > div { padding: 0.75rem 1rem; position: relative; }
    #navbar .nav-logo { height: 2.35rem; max-width: 118px; }
    .mobile-menu-toggle { display: inline-flex; flex-direction: column; justify-content: center; align-items: center; gap: 4px; width: 42px; height: 42px; border: 1px solid rgba(0,0,0,0.12); border-radius: 999px; background: rgba(255,255,255,0.9); z-index: 60; }
    .mobile-menu-toggle span { display: block; width: 18px; height: 2px; background: #0a0a0a; border-radius: 999px; transition: transform 0.2s ease, opacity 0.2s ease; }
    #navbar.mobile-open .mobile-menu-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
    #navbar.mobile-open .mobile-menu-toggle span:nth-child(2) { opacity: 0; }
    #navbar.mobile-open .mobile-menu-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
    #navbar .nav-links { display: none; position: absolute; top: calc(100% + 0.5rem); left: 1rem; right: 1rem; flex-direction: column; align-items: stretch; gap: 0.25rem; padding: 1rem; background: rgba(255,255,255,0.98); border: 1px solid rgba(0,0,0,0.08); border-radius: 1rem; box-shadow: 0 18px 45px rgba(0,0,0,0.16); backdrop-filter: blur(12px); }
    #navbar.mobile-open .nav-links { display: flex; }
    #navbar .nav-links a, #navbar .nav-links button { width: 100%; text-align: left; justify-content: flex-start; padding: 0.85rem 1rem; border-radius: 0.75rem; color: #0a0a0a !important; background: transparent; }
    #navbar .nav-links button:last-child, #navbar .nav-links .bg-black { text-align: center; justify-content: center; background: #0a0a0a !important; color: #fff !important; }
    #hero { min-height: 100svh; padding: 6rem 1rem 3rem; }
    #hero .relative.z-10 img { height: 5.5rem; max-width: 72vw; object-fit: contain; }
    #hero h1 { font-size: clamp(2rem, 12vw, 3.25rem); line-height: 0.95; max-width: 95vw; }
    #hero p { font-size: 0.95rem; line-height: 1.6; max-width: 85vw; }
    section { scroll-margin-top: 78px; }
    #gallery, #testimonials, #carwash, #detailing, #locations { padding-top: 4rem; padding-bottom: 4rem; }
    #selector { height: auto; min-height: auto; }
    #selector .split-side { min-height: 56svh; width: 100% !important; padding: 3rem 1rem; }
    #selector h2 { font-size: clamp(2rem, 9vw, 3rem); line-height: 1.05; }
    #selector p { font-size: 0.9rem; line-height: 1.45; max-width: 19rem; margin-left: auto; margin-right: auto; }
    .page-hero { min-height: 72svh; padding-top: 6rem; }
    .page-hero h1 { font-size: clamp(2.4rem, 13vw, 4rem); line-height: 0.95; }
    .page-hero p { font-size: 1rem; max-width: 20rem; margin-left: auto; margin-right: auto; }
    .service-card { padding: 1.25rem !important; }
    .carousel-shell { margin-left: -1rem; margin-right: -1rem; padding-left: 1rem; padding-right: 1rem; }
    .carousel-scroll { overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 0.75rem; }
    .carousel-scroll img, .testimonial-card { scroll-snap-align: start; }
    #gallery-scroll img { width: 78vw; height: 13rem; }
    .carousel-btn { width: 36px; height: 36px; font-size: 24px; opacity: 0.94; }
    .carousel-btn-left { left: 0.6rem; }
    .carousel-btn-right { right: 0.6rem; }
    .testimonial-card { width: 82vw !important; min-width: 82vw !important; }
    #locations .grid { gap: 2.5rem; }
    #contact-modal .relative, #booking-modal .relative, #testimonial-modal .relative { width: calc(100vw - 1rem); max-height: 92svh; overflow-y: auto; padding: 1.35rem !important; border-radius: 1rem; }
    #booking-modal .flex.items-center.justify-center, #contact-modal .flex.items-center.justify-center { align-items: flex-start; padding-top: 1rem; padding-bottom: 1rem; }
    #booking-form .grid { gap: 1rem; }
    input, select, textarea, #booking-form button, #contact-modal a, #contact-modal button { min-height: 48px; font-size: 16px; }
    #pickup-fields .flex { flex-direction: column; align-items: stretch; }
    #pickup-fields button { width: 100%; }
    #service-price-display { font-size: 1.35rem; padding: 0.85rem !important; }
}

@media (max-width: 767px) {
    body.font-['Inter'] > .max-w-6xl header, body.font-['Inter'] section > .flex { flex-direction: column; align-items: stretch; gap: 1rem; }
    body.font-['Inter'] header .flex.items-center.gap-4 { flex-wrap: wrap; gap: 0.5rem; }
    body.font-['Inter'] header button, body.font-['Inter'] section button { flex: 1 1 auto; min-height: 42px; }
    body.font-['Inter'] table { min-width: 920px; }
    #detail-modal > div { max-height: 92svh; width: calc(100vw - 1rem); }
}


/* Managed gallery cards */
#gallery-admin-list img,
#testimonial-admin-list img {
    background: #f3f3f3;
}


#whatsapp-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    z-index: 999;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 15px 35px rgba(0,0,0,0.3);
}


/* Admin authentication */
body.admin-locked > :not(#admin-login-screen) {
    display: none !important;
}

#admin-login-screen {
    display: none;
}

body.admin-locked #admin-login-screen {
    display: flex;
}

#admin-login-screen input {
    border-radius: 0.75rem;
}

@media (max-width: 767px) {
    #admin-login-screen > div {
        padding: 1.5rem !important;
        border-radius: 1rem;
    }
}
