:root {
    --tomasi-gold: #c09a69;
    --tomasi-cream: #fdfaf6;
    --tomasi-ink: #33281f;
    --tomasi-border: rgba(86, 61, 32, 0.12);
    --tomasi-shadow: 0 24px 60px rgba(37, 26, 14, 0.08);
}

/* General Body and Font Styles */
body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--tomasi-cream);
    color: #333;
}

/* Heading Font Styles */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Cormorant Garamond', serif;
}

/* Custom color class */
.border-c09a69 { border-color: var(--tomasi-gold); }
.bg-c09a69 { background-color: var(--tomasi-gold); }
.text-c09a69 { color: var(--tomasi-gold); }
.focus\:ring-c09a69:focus { --tw-ring-color: var(--tomasi-gold); }
.focus\:border-c09a69:focus { --tw-border-opacity: 1; border-color: var(--tomasi-gold); }

/* Navigation Link Styling */
.nav-link { position: relative; transition: color 0.3s; }
.nav-link::after { content: ''; position: absolute; width: 0; height: 1px; bottom: -4px; left: 50%; transform: translateX(-50%); background-color: var(--tomasi-gold); transition: width 0.3s; }
.nav-link:hover::after, .nav-link.active::after { width: 100%; }

/* Hero Section Background */
.hero { background-image: url('https://placehold.co/1920x1080/2d3748/fdfaf6?text=Tomasi'); background-size: cover; background-position: center; }

/* Table Styling */
.table { display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 50%; font-weight: bold; color: white; text-align: center; line-height: 1.2; position: absolute; cursor: pointer; transition: all 0.3s ease; user-select: none; box-shadow: 0 4px 8px rgba(0,0,0,0.2); border: 3px solid rgba(255, 255, 255, 0.7); padding: 5px; }
.table-capacity { display: block; }
.table-id-display { display: block; margin-top: -2px; }

/* Table Status Colors */
.table.available { background-color: #28a745; }
.table.available:hover { transform: scale(1.1); border-color: var(--tomasi-gold); }
.table.selected { background-color: var(--tomasi-gold); transform: scale(1.15); box-shadow: 0 0 15px rgba(192, 154, 105, 0.9); border-color: #fff; }
.table.taken { background-color: #dc3545; cursor: not-allowed; }

/* Admin-specific Table Styles */
.admin-table { cursor: move; }
.admin-table.dragging { opacity: 0.5; z-index: 1000; }
.admin-table.deletable { cursor: crosshair; box-shadow: 0 0 20px rgba(220, 53, 69, 0.9); }
.delete-mode-btn.active { background-color: #c82333; box-shadow: inset 0 2px 4px rgba(0,0,0,0.3); }

/* Seating Area Layout */
.seating-area { 
    position: relative; 
    background-repeat: no-repeat; 
    background-position: top left; 
    background-color: #f0f0f0; 
    border-radius: 0.5rem; 
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1); 
    max-width: 100%;
    margin: 0 auto; 
}

.canvas-wrapper {
    width: 100%;
    position: relative;
    border: 2px dashed #ccc;
}

.admin-seating-canvas {
    position: relative;
    background-size: 100% 100%;
}

/* Modal Styling */
.modal { transition: opacity 0.3s ease; }

/* Reservations List in Admin Panel */
.reservations-table { width: 100%; border-collapse: collapse; }
.reservations-table th, .reservations-table td { border: 1px solid #ddd; padding: 12px; text-align: left; }
.reservations-table th { background-color: #f2f2f2; font-weight: bold; }
.reservations-table tr:nth-child(even) { background-color: #f9f9f9; }
.reservations-table tr:hover { background-color: #f1f1f1; }
.delete-res-btn { background-color: #dc3545; color: white; border: none; padding: 8px 12px; border-radius: 4px; cursor: pointer; }
.delete-res-btn:hover { background-color: #c82333; }

/* --- MENU PAGE STYLES --- */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px; /* Offset for sticky header */
}

.menu-drawer-open {
    overflow: hidden;
}

.menu-section-kicker {
    letter-spacing: 0.35em;
    text-transform: uppercase;
    font-size: 0.78rem;
    color: #8f6b40;
    margin-bottom: 0.85rem;
}

.menu-shell {
    background: linear-gradient(180deg, rgba(253, 250, 246, 0.98), rgba(255, 255, 255, 1));
    border: 1px solid var(--tomasi-border);
    border-radius: 2rem;
    box-shadow: var(--tomasi-shadow);
    padding: 2rem;
}

.menu-toolbar,
.menu-carousel-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
}

.menu-toolbar {
    margin-bottom: 1.25rem;
}

.menu-toolbar-label {
    letter-spacing: 0.28em;
    text-transform: uppercase;
    font-size: 0.72rem;
    font-weight: 600;
    color: #9c7b4f;
    margin-bottom: 0.55rem;
}

.menu-toolbar-copy {
    color: #6b7280;
    font-size: 0.98rem;
    max-width: 42rem;
}

.menu-mobile-toggle,
.menu-mobile-close,
.menu-carousel-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    border-radius: 999px;
    border: 1px solid rgba(192, 154, 105, 0.28);
    background: #fff;
    color: var(--tomasi-ink);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.menu-mobile-toggle {
    padding: 0.9rem 1.2rem;
    font-weight: 600;
}

.menu-mobile-toggle:hover,
.menu-mobile-close:hover,
.menu-carousel-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(192, 154, 105, 0.52);
    box-shadow: 0 12px 28px rgba(52, 33, 16, 0.1);
}

.menu-mobile-overlay {
    position: fixed;
    inset: 0;
    z-index: 70;
    padding: 1rem;
    background: rgba(21, 14, 9, 0.42);
    backdrop-filter: blur(10px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.menu-mobile-overlay.is-open {
    opacity: 1;
    pointer-events: auto;
}

.menu-mobile-panel {
    width: min(100%, 34rem);
    max-height: calc(100vh - 2rem);
    margin-left: auto;
    background: linear-gradient(180deg, #fffaf2, #ffffff);
    border-radius: 1.75rem;
    padding: 1.5rem;
    box-shadow: 0 30px 70px rgba(28, 20, 12, 0.22);
    overflow-y: auto;
    transform: translateY(1.25rem);
    transition: transform 0.25s ease;
}

.menu-mobile-overlay.is-open .menu-mobile-panel {
    transform: translateY(0);
}

.menu-mobile-close,
.menu-carousel-btn {
    width: 3rem;
    height: 3rem;
}

.menu-desktop-nav,
.menu-mobile-nav,
.menu-photo-carousel {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.menu-desktop-nav::-webkit-scrollbar,
.menu-mobile-nav::-webkit-scrollbar,
.menu-photo-carousel::-webkit-scrollbar {
    display: none;
}

.menu-desktop-nav {
    gap: 0.75rem;
    overflow-x: auto;
    padding-bottom: 0.35rem;
    flex: 1;
    margin-bottom: 0;
}

.menu-desktop-nav-shell {
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.8rem;
}

.menu-category-btn {
    flex-shrink: 0;
}

.menu-mobile-nav {
    display: grid;
    gap: 0.8rem;
}

.menu-nav-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    border-radius: 999px;
    border: 1px solid rgba(192, 154, 105, 0.22);
    background: rgba(255, 255, 255, 0.72);
    color: #5b4634;
    font-size: 0.96rem;
    font-weight: 500;
    padding: 0.8rem 1.15rem;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.menu-nav-chip:hover,
.menu-nav-chip.is-active {
    background: var(--tomasi-gold);
    color: #fff;
    border-color: var(--tomasi-gold);
    box-shadow: 0 12px 24px rgba(192, 154, 105, 0.24);
}

.menu-nav-chip-mobile {
    justify-content: flex-start;
    padding: 1rem 1.15rem;
    font-size: 1rem;
}

.menu-carousel-shell {
    margin-bottom: 2rem;
}

.menu-carousel-buttons {
    display: flex;
    gap: 0.75rem;
}

.menu-carousel-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.menu-photo-carousel {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(280px, 32%);
    gap: 1rem;
    overflow-x: auto;
    scroll-snap-type: none;
    padding: 0.35rem 0 0.6rem;
}

.menu-photo-card {
    position: relative;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    border-radius: 1.5rem;
    background: #ebe6df;
    box-shadow: 0 20px 40px rgba(34, 24, 16, 0.12);
}

.menu-photo-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.35s ease;
}

.menu-photo-card:hover .menu-photo-image {
    transform: scale(1.04);
}

.menu-photo-caption {
    position: absolute;
    left: 1rem;
    bottom: 1rem;
    color: #fff;
    font-size: 0.78rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    text-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
}

.menu-category-section {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(251, 246, 239, 0.92));
    border: 1px solid var(--tomasi-border);
    border-radius: 1.75rem;
    box-shadow: 0 18px 40px rgba(37, 26, 14, 0.06);
    padding: 1.75rem;
}

.menu-category-section + .menu-category-section {
    margin-top: 1.25rem;
}

.menu-category-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.4rem;
}

.menu-category-title {
    color: #1f2937;
    font-size: clamp(2rem, 2.6vw, 2.6rem);
    font-weight: 700;
    line-height: 1;
}

.menu-category-count {
    border-radius: 999px;
    background: rgba(192, 154, 105, 0.12);
    color: #8c6b42;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.6rem 0.9rem;
}

.menu-items-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.menu-item-card {
    min-height: 100%;
    background: #fff;
    border: 1px solid rgba(86, 61, 32, 0.08);
    border-radius: 1.35rem;
    padding: 1.2rem;
    box-shadow: 0 12px 30px rgba(42, 29, 16, 0.04);
}

.menu-item-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.85rem;
}

.menu-item-name {
    color: var(--tomasi-ink);
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1;
}

.menu-item-price {
    flex-shrink: 0;
    border-radius: 999px;
    background: rgba(192, 154, 105, 0.12);
    color: #8c6b42;
    font-size: 0.9rem;
    font-weight: 700;
    padding: 0.55rem 0.8rem;
}

.menu-item-description {
    color: #6b7280;
    font-size: 0.96rem;
    line-height: 1.65;
}

.reservation-shell {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(250, 245, 237, 0.92));
    border: 1px solid var(--tomasi-border);
    border-radius: 2rem;
    box-shadow: var(--tomasi-shadow);
    padding: 2.5rem;
}

.reservation-actions-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.reservation-card {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    min-height: 100%;
    background: #fff;
    border: 1px solid rgba(192, 154, 105, 0.22);
    border-radius: 1.6rem;
    padding: 1.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.reservation-card:hover {
    transform: translateY(-3px);
    border-color: rgba(192, 154, 105, 0.45);
    box-shadow: 0 16px 30px rgba(46, 33, 20, 0.09);
}

.reservation-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 999px;
    background: rgba(192, 154, 105, 0.12);
    color: #8c6b42;
}

.reservation-card-label {
    color: #8c6b42;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.24em;
    text-transform: uppercase;
}

.reservation-card-value {
    color: var(--tomasi-ink);
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.4;
    word-break: break-word;
}

.reservation-note {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(86, 61, 32, 0.12);
}

/* --- MOBILE-ONLY STYLES FOR RESERVATIONS --- */
/* On screens smaller than 768px (Tailwind's 'md' breakpoint) */
@media (max-width: 767px) {
    #restaurant-seating {
        display: none; /* Hide the layout by default on mobile */
    }
}

/* --- New Home Section Styles --- */
#home-gallery {
    width: 100%;
}

#hero-video-container {
    flex-shrink: 0;
    width: 369px; /* Adjust width as needed */
    height: 640px; /* Adjust height as needed */
    overflow: hidden;
    border-radius: 1rem;
    box-shadow: 0 0px 10px #0a0a0a;
}

.hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-image-container {
    width: 150px; /* Adjust width as needed */
    height: 240px; /* Adjust height as needed */
    overflow: hidden;
    border-radius: 0.75rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(90%);
    transition: filter 0.3s ease;
}

.gallery-image-container:hover .gallery-image {
    filter: grayscale(0%);
}

.gallery-image-container:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px  #0a0a0a;
}

/* Mobile scrolling */
@media (max-width: 767px) {
    #home {
        align-items: stretch; /* Allow children to define height */
        height: auto;
        padding-top: 1rem; /* Adjust for header */
        padding-bottom: 1rem;
    }

    #home-gallery {
       flex-direction: column;
       gap: 1rem;
    }
    
    .scrollbar-hide::-webkit-scrollbar {
        display: none;
    }
    .scrollbar-hide {
        -ms-overflow-style: none;  /* IE and Edge */
        scrollbar-width: none;  /* Firefox */
    }

    #home-gallery .md\:hidden {
        width: 100%;
        padding-bottom: 1rem;
    }
    #hero-video-container {
        width: 100%;
        height: 640px; /* Adjust height as needed */
    }

}

/* Hide scrollbars for mobile gallery */
.mobile-gallery-carousel {
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;     /* Firefox */
}
.mobile-gallery-carousel::-webkit-scrollbar {
  display: none;
}

.mobile-gallery-item {
  width: 70vw;
  max-width: 320px;
  min-width: 220px;
  margin-right: -24px; /* Overlap for peek effect */
  transition: transform 0.3s cubic-bezier(.4,2,.6,1), box-shadow 0.3s;
  border-radius: 1.25rem;
  box-shadow: 0 2px 12px 0 rgba(0,0,0,0.08);
  background: #fff;
}

.mobile-gallery-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 1.25rem;
  box-shadow: 0 1px 6px 0 rgba(0,0,0,0.06);
  transition: transform 0.3s cubic-bezier(.4,2,.6,1);
  cursor: pointer; /* Make images look clickable */
}

.mobile-gallery-item:active .mobile-gallery-img,
.mobile-gallery-item:focus .mobile-gallery-img {
  transform: scale(1.04);
  box-shadow: 0 4px 16px 0 rgba(0,0,0,0.12);
}

@media (max-width: 768px) {
  .mobile-gallery-carousel {
    gap: 0.5rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
  .mobile-gallery-item {
    width: 70vw;
    min-width: 200px;
    max-width: 320px;
    margin-right: -18px;
  }
  .mobile-gallery-img {
    height: 140px;
  }

  /* Make sure modal covers everything on mobile */
  #image-modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    background: rgba(0,0,0,0.85);
    display: flex;
    align-items: center;
    justify-content: center;
  }
  #image-modal img {
    max-width: 90vw;
    max-height: 80vh;
    border-radius: 1.25rem;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  }
}

/* Gradient overlays for mobile gallery */
.bg-gradient-to-r {
  background: linear-gradient(to right, #fdfaf6 80%, transparent 100%);
}
.bg-gradient-to-l {
  background: linear-gradient(to left, #fdfaf6 80%, transparent 100%);
}

.bg-fdfaf6 {
    background-color: rgb(253, 250, 246);
}

#image-modal.show {
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: scale(1);
}

@media (max-width: 1024px) {
    .menu-photo-carousel {
        grid-auto-columns: minmax(280px, 62%);
    }
}

@media (max-width: 767px) {
    .menu-shell,
    .reservation-shell {
        border-radius: 1.5rem;
        padding: 1.35rem;
    }

    .menu-toolbar,
    .menu-carousel-header,
    .menu-category-header,
    .reservation-note {
        flex-direction: column;
        align-items: flex-start;
    }

    .menu-desktop-nav {
        display: none;
    }

    .menu-mobile-panel {
        width: 100%;
    }

    .menu-photo-carousel {
        grid-auto-columns: minmax(245px, 86%);
    }

    .menu-items-grid,
    .reservation-actions-grid {
        grid-template-columns: 1fr;
    }

    .menu-item-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .menu-item-name {
        font-size: 1.55rem;
    }
}
#image-modal {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.95);
    transition: opacity 0.3s, transform 0.3s;
}
#image-modal img {
    transition: transform 0.3s;
}
#image-modal.show img {
    transform: scale(1);
}
