/* ========================================================
   Campus Kitchen :: Frontend Styling
   ======================================================== */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Devanagari:wght@100..900&family=Noto+Sans:ital,wght@0,100..900;1,100..900&family=Roboto:ital,wght@0,100..900;1,100..900&display=swap');

:root {
  --ck-bg-light: #f8fafc;
  --ck-card-bg: #ffffff;
  --ck-border: #e2e8f0;
  --ck-text-main: #0f172a;
  --ck-text-muted: #64748b;
  --ck-veg: #16a34a;
  --ck-nonveg: #dc2626;

  --bs-border-radius: 12px;
  --bs-border-radius-sm: 8px;
  --bs-border-radius-lg: 16px;
  --bs-border-radius-xl: 20px;
}

/* 1. Body & Canvas Background */
body.user-panel {
  background-color: var(--ck-bg-light) !important;
  color: var(--ck-text-main);
  font-family: var(--bs-font-noto-sans, 'Noto Sans', 'Roboto', sans-serif);
  padding-bottom: 70px;
}

@media (min-width: 992px) {
  body.user-panel {
    padding-bottom: 0px;
  }
}

body.user-panel .ct-container {
  background-color: transparent !important;
  top: auto;
  padding-top: 65px;
  min-height: calc(100vh - 65px);
}

@media (min-width: 992px) {
  body.user-panel .ct-container {
    padding-top: 72px;
  }
}

/* 2. Primary Color Overrides */
.btn-primary,
[data-ct-preset] .btn-primary {
  background-color: var(--bs-primary) !important;
  border-color: var(--bs-primary) !important;
  color: #ffffff !important;
  transition: all 0.2s ease-in-out;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
[data-ct-preset] .btn-primary:hover {
  background-color: var(--bs-primary-hover, #039185) !important;
  border-color: var(--bs-primary-hover, #039185) !important;
  color: #ffffff !important;
  transform: translateY(-1px);
}

.btn-outline-primary,
[data-ct-preset] .btn-outline-primary {
  color: var(--bs-primary) !important;
  border-color: var(--bs-primary) !important;
  background-color: transparent !important;
  transition: all 0.2s ease-in-out;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active {
  background-color: var(--bs-primary) !important;
  border-color: var(--bs-primary) !important;
  color: #ffffff !important;
}

.text-primary {
  color: var(--bs-primary) !important;
}

.bg-primary {
  background-color: var(--bs-primary) !important;
}

/* 3. Header */
.ct-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1025;
  background: var(--ct-header-background, #ffffff) !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04) !important;
  transition: background 0.2s ease, box-shadow 0.2s ease;
  height: 65px;
}

.ct-header .header-wrapper {
  height: 65px;
  display: flex;
  align-items: center;
}

/* Location Selector Pill */
.user_selected_location {
  cursor: pointer;
  background: transparent;
  transition: background 0.15s ease;
}

.user_selected_location:hover {
  background: rgba(var(--bs-primary-rgb), 0.08) !important;
}

.header-location-title {
  color: var(--bs-body-color, #1e293b);
  font-weight: 700;
}

.header-location-address {
  color: #64748b;
}

/* Homepage Hero & Header contrast */
body.homepage-marker .ct-header {
  border-bottom-color: transparent !important;
}

/* 5. Home Hero Section */
.home-hero-section {
  position: relative;
  background: linear-gradient(135deg, var(--bs-primary) 0%, var(--bs-primary-active, #026960) 100%);
  border-radius: 0 0 28px 28px;
  margin-bottom: 1.25rem;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.home-hero-section.has-banners::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.72) 0%, rgba(0, 0, 0, 0.25) 50%, rgba(0, 0, 0, 0) 100%);
  z-index: 2;
  pointer-events: none;
}

.home-hero-section #hero-banners-splide {
  position: relative;
  z-index: 1;
  width: 100%;
}

.home-hero-section #hero-banners-splide img {
  height: auto !important;
  max-height: 380px;
  width: 100%;
  object-fit: cover;
  border-radius: 0 0 28px 28px !important;
}

.hero-content-overlay {
  position: relative;
  z-index: 3;
  padding: 1.25rem 1rem 1.5rem 1rem;
}

.home-hero-section.has-banners .hero-content-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
}

/* Search Bar Container & Input */
.home-search-bar-container {
  width: 100%;
  transition: all 0.25s ease;
}

.home-search-input-group {
  display: flex;
  align-items: center;
  background: #ffffff;
  border-radius: 50px;
  padding: 0 16px;
  height: 50px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  gap: 10px;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.home-search-input-group:focus-within {
  box-shadow: 0 6px 26px rgba(0, 0, 0, 0.22);
  transform: translateY(-1px);
}

.home-search-icon {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  color: var(--bs-primary);
}

.home-search-icon i {
  font-size: 22px;
}

.home-search-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 0.95rem;
  color: #1e293b;
  padding: 0;
  line-height: 1;
}

.home-search-input::placeholder {
  color: #94a3b8;
}

/* Veg Only Pill Button */
.veg-only-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 48px;
  padding: 0 14px;
  border-radius: 50px;
  border: 2px solid rgba(255, 255, 255, 0.7);
  background: rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
  white-space: nowrap;
  line-height: 1;
  user-select: none;
}

.veg-only-pill:hover {
  background: rgba(0, 0, 0, 0.45);
  border-color: #ffffff;
}

.veg-only-pill:active {
  transform: scale(0.96);
}

.veg-only-pill.veg-active {
  background: #16a34a !important;
  border-color: #16a34a !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(22, 163, 74, 0.4);
}

.veg-only-pill.veg-active .veg-pill-icon {
  border-color: #ffffff !important;
}

.veg-only-pill.veg-active .veg-pill-icon::after {
  background-color: #ffffff !important;
}

.veg-pill-icon {
  width: 18px !important;
  height: 18px !important;
  border-color: rgba(255, 255, 255, 0.9) !important;
  flex-shrink: 0;
  background: transparent;
}

.veg-pill-icon::after {
  background-color: #4ade80 !important;
  height: 10px !important;
  width: 10px !important;
}

/* 6. Promo Banners */
.first-order-banner {
  border-radius: 16px;
  background: linear-gradient(135deg, #ff6b35, #f7a56d);
  padding: 1.5px;
  margin-top: 0;
}

.first-order-banner-inner {
  background: linear-gradient(135deg, #fff8f5, #fff0e6);
  border-radius: 15px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.first-order-icon { font-size: 24px; flex-shrink: 0; }
.first-order-title { font-weight: 700; color: #e8430a; font-size: 14px; line-height: 1.3; }
.first-order-sub   { font-size: 11px; color: #7a3500; margin-top: 2px; }
.first-order-close {
  background: none; border: none; font-size: 20px; color: #e8430a;
  cursor: pointer; padding: 0; line-height: 1; flex-shrink: 0;
}

.app-download-banner {
  border-radius: 16px;
  background: linear-gradient(135deg, #fff3ee, #fff9f6);
  border: 1px solid #ffd4bc;
  position: relative;
  overflow: hidden;
}

.app-download-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 38px 12px 14px;
}

.app-download-icon-wrap { flex-shrink: 0; }
.app-download-title { font-weight: 700; color: #1e293b; font-size: 13px; line-height: 1.3; }
.app-download-sub   { font-size: 11px; color: #7a3500; margin-top: 2px; }
.app-download-arrow { flex-shrink: 0; margin-left: auto; }
.app-download-close {
  position: absolute;
  top: 8px; right: 10px;
  background: none; border: none;
  font-size: 18px; color: #94a3b8;
  cursor: pointer; line-height: 1; padding: 0;
}
.app-download-close:hover { color: #e8430a; }

/* 7. Category Splide */
#category-splide .splide__slide {
  width: 90px;
}

#category-splide img {
  transition: transform 0.3s ease-in-out !important;
  width: 3.8em;
  height: 3.8em;
}

#category-splide .card-title {
  font-size: 0.75rem !important;
  line-height: 1.2;
}

@media (min-width: 768px) {
  #category-splide .splide__slide {
    width: 115px;
  }
  #category-splide img {
    width: 5em;
    height: 5em;
  }
  #category-splide .card-title {
    font-size: 0.85rem !important;
  }
}

#category-splide a:hover img {
  transform: scale(1.12);
}

/* 8. Food / Restaurant Cards */
.restaurant-card {
  transition: all 0.25s ease;
  border-radius: 16px;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.restaurant-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.1) !important;
}

.restaurant-card .restaurant-image-wrapper {
  position: relative;
  overflow: hidden;
  background: #f1f5f9;
}

.restaurant-card .restaurant-image {
  transition: transform 0.35s ease;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.restaurant-card:hover .restaurant-image {
  transform: scale(1.06);
}

.restaurant-card .restaurant-image-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0.4) 100%);
  pointer-events: none;
}

/* 9. Mobile Bottom Navigation Bar */
.ct-mob-footer {
  display: none;
  background: #ffffff;
  height: 60px;
  align-items: center;
  justify-content: space-between;
  position: fixed;
  z-index: 1027;
  left: 0;
  right: 0;
  bottom: 0;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.06);
  padding: 0 8px;
}

.ct-mob-footer .ct-mob-footer-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6px 4px;
  color: #64748b;
  text-decoration: none;
  transition: color 0.2s ease, transform 0.15s ease;
  width: 100%;
  position: relative;
  flex: 1;
  background: transparent;
  border-radius: 0;
}

.ct-mob-footer .ct-mob-footer-link .footer-icon {
  font-size: 22px;
  line-height: 1;
  margin-bottom: 2px;
  transition: transform 0.2s ease;
  position: relative;
}

.ct-mob-footer .ct-mob-footer-link .footer-text {
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
  margin: 0;
  letter-spacing: 0.3px;
}

.ct-mob-footer .ct-mob-footer-link.active {
  color: var(--bs-primary) !important;
}

.ct-mob-footer .ct-mob-footer-link.active .footer-icon {
  transform: translateY(-1px);
}

.ct-mob-footer .ct-mob-footer-link.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 32px;
  height: 3px;
  background: var(--bs-primary);
  border-radius: 0 0 4px 4px;
}

.ct-mob-footer .ct-mob-footer-link:hover {
  color: var(--bs-primary);
}

@media (max-width: 991.98px) {
  .ct-mob-footer {
    display: flex;
  }
}

/* 10. Dark Mode Overrides */
[data-ct-theme="dark"] body.user-panel,
[data-ct-theme="dark"] body.user-panels {
  background-color: #0b1120 !important;
  color: #f1f5f9;
}

[data-ct-theme="dark"] .ct-header {
  background: rgba(15, 23, 42, 0.96) !important;
  border-bottom-color: rgba(255, 255, 255, 0.08) !important;
}

[data-ct-theme="dark"] .header-location-title {
  color: #f8fafc !important;
}

[data-ct-theme="dark"] .header-location-address {
  color: #94a3b8 !important;
}

[data-ct-theme="dark"] .home-search-input-group {
  background: #1e293b;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

[data-ct-theme="dark"] .home-search-input {
  color: #f8fafc;
}

[data-ct-theme="dark"] .home-search-input::placeholder {
  color: #64748b;
}

[data-ct-theme="dark"] .ct-mob-footer {
  background: #0f172a;
  border-top-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
}

[data-ct-theme="dark"] .restaurant-card {
  background: #1e293b;
  border-color: rgba(255, 255, 255, 0.06);
}

[data-ct-theme="dark"] .first-order-banner-inner {
  background: linear-gradient(135deg, #2d1206, #3a1a08);
}
[data-ct-theme="dark"] .first-order-title { color: #ff8c55; }
[data-ct-theme="dark"] .first-order-sub   { color: #c47a4a; }
[data-ct-theme="dark"] .first-order-close { color: #ff8c55; }

[data-ct-theme="dark"] .app-download-banner {
  background: linear-gradient(135deg, #261108, #1e0d04);
  border-color: #4d2210;
}
[data-ct-theme="dark"] .app-download-title { color: #f0e0d8; }
[data-ct-theme="dark"] .app-download-sub   { color: #b07050; }
[data-ct-theme="dark"] .app-download-close { color: #664433; }

/* 11. Recommended Splide Equal Width & Food Cards */
#recommended-splide .splide__slide {
  width: 58vw;
  max-width: 250px;
}

@media (min-width: 576px) {
  #recommended-splide .splide__slide {
    width: 220px;
    max-width: 220px;
  }
}

@media (min-width: 768px) {
  #recommended-splide .splide__slide {
    width: calc(33.333% - 0.75rem);
    max-width: 260px;
  }
}

@media (min-width: 992px) {
  #recommended-splide .splide__slide {
    width: calc(25% - 0.75rem);
    max-width: 270px;
  }
}

/* Lazysizes Smooth Blur-Up Effect */
.lazyload {
  opacity: 0.6;
  filter: blur(4px);
  transition: opacity 0.35s ease, filter 0.35s ease, transform 0.35s ease;
}

.lazyloaded {
  opacity: 1;
  filter: blur(0);
}

