/* ========================================
   Moulya's Kitchen - Global Styles
   Bootstrap 5 Custom Theme
   ======================================== */

/* Google Fonts: loaded via <link> in HTML head for non-blocking load */

/* Font Awesome: load via <link> in each HTML head (not @import) so brand webfonts reliably apply */

/* CSS Custom Properties - Matching React Tailwind Theme */
:root {
  --primary: #D97706;
  --primary-rgb: 217, 119, 6;
  --secondary: #4A6B2F;
  --secondary-rgb: 74, 107, 47;
  --background: #FDF8F0;
  --foreground: #1A1A1A;
  --muted: #F0EBE3;
  --muted-foreground: #666666;
  --card: #FFFFFF;
  --border: #E5DDD3;
  --accent: #D97706;
  --destructive: #DC2626;
}

/* Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--background);
  color: var(--foreground);
  line-height: 1.6;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  line-height: 1.2;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--muted);
}

::-webkit-scrollbar-thumb {
  background: rgba(var(--primary-rgb), 0.4);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(var(--primary-rgb), 0.6);
}

/* ========================================
   Navbar Styles
   ======================================== */
.navbar-mk {
  background-color: rgba(253, 248, 240, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(229, 221, 211, 0.5);
  padding: 0.75rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar-mk .navbar-brand {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  color: var(--foreground);
  font-size: 1.25rem;
}

.navbar-mk .navbar-brand small {
  display: block;
  font-size: 0.625rem;
  font-style: italic;
  color: var(--muted-foreground);
  margin-top: -0.25rem;
}

.navbar-mk .navbar-brand .mk-navbar-logo,
.mk-footer-logo {
  width: 96px;
  height: 96px;
  object-fit: contain;
  display: block;
}

.navbar-mk .nav-link {
  color: rgba(26, 26, 26, 0.7);
  font-weight: 500;
  font-size: 0.875rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  transition: all 0.2s;
}

.navbar-mk .nav-link:hover,
.navbar-mk .nav-link.active {
  color: var(--primary);
  background-color: rgba(var(--primary-rgb), 0.1);
}

.cart-badge {
  position: absolute;
  top: -0.25rem;
  right: -0.25rem;
  background-color: var(--primary);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pulse-badge 0.3s ease-in-out;
}

.favorite-badge {
  position: absolute;
  top: -0.25rem;
  right: -0.25rem;
  background-color: #e11d48;
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.favorite-btn,
.favorite-btn.btn,
.favorite-btn.btn-sm {
  border: none !important;
  background: transparent !important;
  color: #9f1239;
  padding: 0.25rem;
  min-height: 2.5rem;
  min-width: 2.5rem;
  box-shadow: none !important;
  line-height: 1;
}

.favorite-btn i {
  font-size: 1.5rem;
  line-height: 1;
}

.favorite-btn:hover,
.favorite-btn:focus,
.favorite-btn.btn:hover,
.favorite-btn.btn:focus {
  border: none !important;
  background: transparent !important;
  color: #be123c;
  box-shadow: none !important;
}

.favorite-btn.active,
.favorite-btn.btn.active {
  background: transparent !important;
  border: none !important;
  color: #be123c;
}

.favorite-btn:focus-visible {
  outline: 2px solid rgba(var(--primary-rgb), 0.45);
  outline-offset: 2px;
}

@keyframes pulse-badge {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

/* ========================================
   Footer Styles
   ======================================== */
.footer-mk {
  background-color: #1A1A1A;
  color: white;
  padding: 3rem 0 1.5rem;
}

.footer-mk h6 {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 1rem;
  color: white;
}

.footer-mk a:not(.footer-social-link),
.footer-mk .footer-link {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.875rem;
  text-decoration: none;
  transition: color 0.2s;
  display: block;
  margin-bottom: 0.5rem;
}

.footer-mk a:not(.footer-social-link):hover,
.footer-mk .footer-link:hover {
  color: var(--primary);
}

.footer-bottom {
  background-color: #0F0F0F;
  padding: 1rem 0;
  margin-top: 2rem;
}

.mk-dev-credit {
  display: inline-block;
  margin-top: 0.35rem;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s ease;
}

.mk-dev-credit:hover,
.mk-dev-credit:focus-visible {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.mk-site-version-badge {
  display: inline-block;
  margin-left: 0.25rem;
  padding: 0.12rem 0.55rem;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: none;
  vertical-align: middle;
  line-height: 1.4;
  border-radius: 999px;
  background: rgba(217, 119, 6, 0.18);
  color: #fcd34d;
  border: 1px solid rgba(217, 119, 6, 0.45);
  white-space: nowrap;
}

.footer-mk .text-muted .mk-site-version-badge {
  color: var(--primary, #D97706);
  background: rgba(217, 119, 6, 0.1);
  border-color: rgba(217, 119, 6, 0.35);
}

.mk-footer-email {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.85rem;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  word-break: break-all;
  transition: color 0.2s ease;
}

.mk-footer-email:hover,
.mk-footer-email:focus-visible {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.mk-footer-email .bi-envelope {
  flex-shrink: 0;
}

/* Footer social — single horizontal row of brand icons */
.footer-social {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem;
}

.footer-social-link {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.65rem;
  background-color: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.92) !important;
  font-size: 1.125rem;
  line-height: 1;
  text-decoration: none !important;
  margin-bottom: 0 !important;
  transition:
    transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1),
    background-color 0.28s ease,
    background 0.28s ease,
    color 0.28s ease,
    box-shadow 0.28s ease;
}

.footer-social-link:hover {
  color: #fff !important;
  transform: scale(1.1);
}

.footer-social-link:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.footer-mk .footer-social-link:hover,
.bg-dark .footer-social-link:hover {
  color: #fff !important;
}

.footer-social-link.footer-social-fb:hover {
  background-color: #1877f2;
  box-shadow: 0 6px 18px rgba(24, 119, 242, 0.45);
}

.footer-social-link.footer-social-ig:hover {
  background: linear-gradient(
    45deg,
    #f09433 0%,
    #e6683c 25%,
    #dc2743 50%,
    #cc2366 75%,
    #bc1888 100%
  );
  box-shadow: 0 6px 18px rgba(225, 48, 108, 0.4);
}

.footer-social-link.footer-social-yt:hover {
  background-color: #ff0000;
  box-shadow: 0 6px 18px rgba(255, 0, 0, 0.45);
}

.footer-social-link.footer-social-wa:hover {
  background-color: #25d366;
  box-shadow: 0 6px 18px rgba(37, 211, 102, 0.45);
}

/* Ensure FA brand glyphs render (avoid inheritance/font conflicts) */
.footer-social-link i.fa-brands {
  font-family: "Font Awesome 6 Brands", "Font Awesome 5 Brands" !important;
  font-weight: 400 !important;
  font-style: normal !important;
  font-variant: normal !important;
  line-height: 1 !important;
  display: inline-block !important;
  -webkit-font-smoothing: antialiased;
}

/* ========================================
   Button Styles
   ======================================== */
.btn-primary-mk {
  background-color: var(--primary);
  border-color: var(--primary);
  color: white;
  font-weight: 600;
  padding: 0.625rem 1.5rem;
  border-radius: 2rem;
  transition: all 0.2s;
}

.btn-primary-mk:hover {
  background-color: #B96205;
  border-color: #B96205;
  color: white;
  transform: scale(1.05);
}

.btn-secondary-mk {
  background-color: var(--secondary);
  border-color: var(--secondary);
  color: white;
  font-weight: 600;
  padding: 0.625rem 1.5rem;
  border-radius: 2rem;
  transition: all 0.2s;
}

.btn-secondary-mk:hover {
  background-color: #3D5826;
  border-color: #3D5826;
  color: white;
  transform: scale(1.05);
}

/* ========================================
   Card Styles
   ======================================== */
.card-mk {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  transition: all 0.3s;
  overflow: hidden;
}

.card-mk:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  transform: translateY(-4px);
}

.card-mk .card-img-top {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  max-height: 220px;
}

.card-mk .position-relative {
  overflow: hidden;
  background-color: var(--muted);
}

/* ========================================
   Badge Styles
   ======================================== */
.badge-veg {
  background-color: #10B981;
  color: white;
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
}

.badge-offer {
  background-color: var(--primary);
  color: white;
  font-size: 0.75rem;
  padding: 0.375rem 0.75rem;
  border-radius: 9999px;
}

.price-stack,
.price-offer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.5rem;
}

.price-current {
  color: var(--foreground);
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.2;
}

.price-original {
  color: var(--muted-foreground);
  font-size: 0.85rem;
  text-decoration: line-through;
  line-height: 1.1;
}

.badge-special,
.special-ribbon {
  position: absolute;
  top: 18px;
  left: -58px;
  width: 220px;
  text-align: center;
  background: rgba(var(--primary-rgb), 0.95);
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.5px;
  font-size: 0.72rem;
  text-transform: uppercase;
  transform: rotate(-35deg);
  border-top: 2px solid #fff;
  border-bottom: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  pointer-events: none;
  z-index: 2;
  line-height: 1.25;
  padding: 0.15rem 0;
}

.offer-label-badge {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  max-width: calc(100% - 4.5rem);
  background: rgba(var(--primary-rgb), 0.95);
  color: #fff;
  font-weight: 700;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  border-radius: 9999px;
  padding: 0.25rem 0.55rem;
  line-height: 1.2;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  pointer-events: none;
  z-index: 2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.discount-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(var(--primary-rgb), 0.12);
  color: var(--primary);
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 9999px;
  padding: 0.15rem 0.45rem;
  line-height: 1.2;
}

.card-mk.card-sold-out .card-img-top {
  filter: grayscale(100%);
}

.sold-out-ribbon {
  position: absolute;
  top: 18px;
  left: -58px;
  width: 220px;
  text-align: center;
  background: rgba(220, 38, 38, 0.95);
  color: #fff;
  font-weight: 700;
  letter-spacing: 1px;
  font-size: 0.8rem;
  text-transform: uppercase;
  transform: rotate(-35deg);
  border-top: 2px solid #fff;
  border-bottom: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  pointer-events: none;
  z-index: 3;
}

/* ========================================
   Form Styles
   ======================================== */
.form-control-mk {
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 0.625rem 0.875rem;
  font-size: 0.875rem;
  transition: all 0.2s;
}

.form-control-mk:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

/* ========================================
   Section Headers
   ======================================== */
.section-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.emoji,
.section-header .emoji {
  display: none;
}

.section-header h2 {
  font-size: 2rem;
  color: var(--foreground);
  margin-bottom: 0.5rem;
}

.section-header p {
  color: var(--muted-foreground);
  font-size: 1rem;
}

/* ========================================
   Hero Section
   ======================================== */
.hero-section {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  padding: 4rem 0;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.3), transparent);
}

.hero-content {
  position: relative;
  z-index: 1;
}

/* ========================================
   Utility Classes
   ======================================== */
.text-primary-mk {
  color: var(--primary) !important;
}

.text-secondary-mk {
  color: var(--secondary) !important;
}

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

.bg-secondary-mk {
  background-color: var(--secondary) !important;
}

.bg-muted-mk {
  background-color: var(--muted);
}

.rounded-xl {
  border-radius: 0.75rem;
}

.shadow-sm-mk {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* ========================================
   Category Filter Buttons
   ======================================== */
.category-btn {
  padding: 0.375rem 1rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid var(--border);
  background-color: var(--muted);
  color: var(--muted-foreground);
  transition: all 0.2s;
  cursor: pointer;
}

.category-btn:hover {
  background-color: rgba(var(--primary-rgb), 0.1);
  color: var(--primary);
}

.category-btn.active {
  background-color: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* ========================================
   Loading Spinner
   ======================================== */
.spinner-mk {
  width: 2rem;
  height: 2rem;
  border: 3px solid rgba(var(--primary-rgb), 0.2);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ========================================
   Accessibility
   ======================================== */
.skip-to-main {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 1100;
  padding: 0.5rem 1rem;
  background: var(--primary);
  color: #fff;
  border-radius: 0.375rem;
  text-decoration: none;
}

.skip-to-main:focus {
  outline: 2px solid var(--secondary);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .promo-card {
    transition: none;
  }

  .promo-card:hover {
    transform: none;
  }

  .spinner-mk {
    animation: none;
  }
}

/* ========================================
   Promo Cards (Home)
   ======================================== */
.promo-card {
  min-height: 170px;
  border-radius: 22px;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
  position: relative;
  isolation: isolate;
}

.promo-card:hover {
  transform: scale(1.03);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.16);
}

.carousel-banner-img {
  width: 100%;
  height: 260px;
  max-height: 260px;
  object-fit: cover;
  object-position: center;
}

#homeBannerCarousel .carousel-inner {
  max-height: 260px;
}

.promo-card-catering {
  background: linear-gradient(90deg, #bef264, #4ade80);
  color: #1f2937;
}

.promo-card-combo {
  background: linear-gradient(90deg, #1e3a8a, #1d4ed8);
  color: #fff;
}

.promo-card-new {
  background: linear-gradient(90deg, #ec4899, #ef4444);
  color: #fff;
}

.promo-icon {
  font-size: 1.5rem;
  line-height: 1;
}

.promo-image-wrap {
  width: 130px;
  height: 130px;
  min-width: 130px;
  max-width: 130px;
  flex-shrink: 0;
  border-radius: 0.75rem;
  overflow: hidden;
  background-color: rgba(255, 255, 255, 0.2);
}

.promo-image {
  width: 100%;
  height: 100%;
  max-width: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: 0.75rem;
}

@media (max-width: 991.98px) {
  .promo-card {
    flex-direction: column;
    align-items: stretch;
  }

  .promo-image-wrap {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: 160px;
  }
}

@media (max-width: 575.98px) {
  .promo-card {
    flex-direction: column;
    align-items: stretch;
  }

  .promo-image-wrap {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: 140px;
  }
}
