/* 
  Marvel Coffee House - Premium Glassmorphic Stylesheet
  Color Palette: Dark Brown, Coffee Brown, Cream, White, Gold
*/

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,600;0,700;0,800;1,600&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
  --bg-dark: #120A06;
  --bg-card: rgba(28, 15, 10, 0.72);
  --bg-card-hover: rgba(38, 20, 14, 0.88);
  --bg-glass: rgba(24, 13, 8, 0.82);
  --coffee-deep: #2A160E;
  --coffee-medium: #4A2718;
  --coffee-light: #6E3D26;
  
  --gold-primary: #D4AF37;
  --gold-light: #F4E4A1;
  --gold-dark: #A3821E;
  --gold-gradient: linear-gradient(135deg, #F5E6AD 0%, #D4AF37 50%, #997519 100%);
  --gold-glow: rgba(212, 175, 55, 0.35);

  --cream-primary: #F9F3EA;
  --cream-muted: #D5C5B5;
  --cream-dark: #9E8E7E;

  --status-available-bg: rgba(46, 125, 50, 0.2);
  --status-available-text: #81C784;
  --status-available-border: rgba(129, 199, 132, 0.4);

  --status-sold-bg: rgba(198, 40, 40, 0.2);
  --status-sold-text: #E57373;
  --status-sold-border: rgba(229, 115, 115, 0.4);

  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 8px;
  
  --shadow-main: 0 10px 30px -5px rgba(0, 0, 0, 0.5), 0 0 15px rgba(212, 175, 55, 0.08);
  --shadow-hover: 0 20px 40px -10px rgba(0, 0, 0, 0.7), 0 0 25px rgba(212, 175, 55, 0.22);
}

/* Reset & Global */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
  font-family: 'Plus Jakarta Sans', sans-serif;
  background-color: var(--bg-dark);
  color: var(--cream-primary);
}

body {
  min-height: 100vh;
  background: 
    radial-gradient(circle at 10% 10%, rgba(212, 175, 55, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 90% 60%, rgba(110, 61, 38, 0.15) 0%, transparent 50%),
    linear-gradient(180deg, #160C07 0%, #100804 100%);
  background-attachment: fixed;
  padding-bottom: 60px;
  line-height: 1.6;
}

/* Layout Container */
.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header & Brand Banner */
.header {
  position: relative;
  text-align: center;
  padding: 40px 20px 25px;
  background: radial-gradient(ellipse at top, rgba(74, 39, 24, 0.4) 0%, transparent 70%);
  border-bottom: 1px solid rgba(212, 175, 55, 0.15);
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 30px;
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid rgba(212, 175, 55, 0.3);
  color: var(--gold-primary);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 16px;
  backdrop-filter: blur(8px);
}

.logo-wrap {
  width: 130px;
  height: 130px;
  margin: 0 auto 16px;
  border-radius: 20px;
  padding: 4px;
  background: var(--gold-gradient);
  box-shadow: 0 0 25px rgba(212, 175, 55, 0.35);
  transition: transform 0.4s ease;
  overflow: hidden;
}

.logo-wrap:hover {
  transform: scale(1.05) rotate(1deg);
}

.logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
  background: var(--bg-dark);
}

.brand-title {
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem;
  font-weight: 700;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.welcome-msg {
  max-width: 540px;
  margin: 0 auto;
  color: var(--cream-muted);
  font-size: 0.98rem;
  font-weight: 400;
}

/* Sticky Navigation & Search Section */
.sticky-wrapper {
  position: sticky;
  top: 0;
  z-index: 900;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
  padding: 16px 0;
  transition: all 0.3s ease;
}

/* Search Bar */
.search-box {
  position: relative;
  max-width: 550px;
  margin: 0 auto 14px;
}

.search-input {
  width: 100%;
  padding: 14px 20px 14px 48px;
  border-radius: 30px;
  border: 1px solid rgba(212, 175, 55, 0.3);
  background: rgba(18, 10, 6, 0.85);
  color: var(--cream-primary);
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  transition: all 0.3s ease;
}

.search-input:focus {
  border-color: var(--gold-primary);
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.25);
  background: rgba(28, 15, 10, 0.95);
}

.search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gold-primary);
  font-size: 1.1rem;
  pointer-events: none;
}

.search-clear {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--cream-dark);
  font-size: 1.2rem;
  cursor: pointer;
  display: none;
  transition: color 0.2s;
}

.search-clear:hover {
  color: var(--gold-primary);
}

/* Category Filter Bar */
.category-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  overflow-x: auto;
  padding: 4px 10px;
  scrollbar-width: none;
}

.category-nav::-webkit-scrollbar {
  display: none;
}

.cat-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 25px;
  border: 1px solid rgba(212, 175, 55, 0.25);
  background: rgba(42, 22, 14, 0.6);
  color: var(--cream-muted);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
}

.cat-btn:hover {
  border-color: var(--gold-primary);
  color: var(--cream-primary);
  background: rgba(74, 39, 24, 0.8);
  transform: translateY(-2px);
}

.cat-btn.active {
  background: var(--gold-gradient);
  color: var(--bg-dark);
  font-weight: 700;
  border-color: transparent;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.35);
}

/* Menu Sections */
.section-wrapper {
  padding-top: 40px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--cream-primary);
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid rgba(212, 175, 55, 0.2);
}

.section-title .cat-icon {
  font-size: 1.8rem;
}

.section-count {
  font-size: 0.85rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
  color: var(--gold-primary);
  background: rgba(212, 175, 55, 0.12);
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid rgba(212, 175, 55, 0.25);
  margin-left: auto;
}

/* Grid Layout */
.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 24px;
  margin-bottom: 45px;
}

/* Menu Card */
.menu-card {
  position: relative;
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(212, 175, 55, 0.18);
  overflow: hidden;
  box-shadow: var(--shadow-main);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

.menu-card:hover {
  transform: translateY(-6px);
  border-color: rgba(212, 175, 55, 0.45);
  box-shadow: var(--shadow-hover);
  background: var(--bg-card-hover);
}

.card-img-wrap {
  position: relative;
  width: 100%;
  height: 210px;
  overflow: hidden;
  background: var(--coffee-deep);
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.menu-card:hover .card-img {
  transform: scale(1.08);
}

/* Badges */
.badge-popular {
  position: absolute;
  top: 14px;
  left: 14px;
  background: var(--gold-gradient);
  color: #120A06;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 5px 12px;
  border-radius: 20px;
  text-transform: uppercase;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
  z-index: 2;
}

.badge-status {
  position: absolute;
  top: 14px;
  right: 14px;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 20px;
  backdrop-filter: blur(10px);
  z-index: 2;
}

.badge-status.available {
  background: var(--status-available-bg);
  color: var(--status-available-text);
  border: 1px solid var(--status-available-border);
}

.badge-status.sold-out {
  background: var(--status-sold-bg);
  color: var(--status-sold-text);
  border: 1px solid var(--status-sold-border);
}

/* Card Body */
.card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 8px;
}

.item-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.22rem;
  font-weight: 700;
  color: var(--cream-primary);
  line-height: 1.3;
}

.item-price {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--gold-primary);
  white-space: nowrap;
  background: rgba(212, 175, 55, 0.1);
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid rgba(212, 175, 55, 0.25);
}

.item-desc {
  color: var(--cream-muted);
  font-size: 0.88rem;
  line-height: 1.55;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex-grow: 1;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid rgba(212, 175, 55, 0.1);
}

.btn-detail {
  width: 100%;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid rgba(212, 175, 55, 0.3);
  background: rgba(212, 175, 55, 0.08);
  color: var(--gold-light);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  text-align: center;
}

.btn-detail:hover {
  background: var(--gold-gradient);
  color: var(--bg-dark);
  border-color: transparent;
  font-weight: 700;
}

/* Sold Out Overlay State */
.menu-card.is-sold-out .card-img {
  filter: grayscale(80%) opacity(0.6);
}

.menu-card.is-sold-out .item-name {
  color: var(--cream-dark);
}

/* Quick View Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 5, 3, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: var(--bg-dark);
  border: 1px solid var(--gold-primary);
  border-radius: var(--radius-lg);
  max-width: 500px;
  width: 100%;
  overflow: hidden;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.8), 0 0 30px rgba(212, 175, 55, 0.3);
  transform: scale(0.9);
  transition: transform 0.3s ease;
  position: relative;
}

.modal-overlay.active .modal-content {
  transform: scale(1);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid var(--gold-primary);
  color: var(--gold-light);
  font-size: 1.2rem;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-img-wrap {
  width: 100%;
  height: 240px;
  overflow: hidden;
}

.modal-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-body {
  padding: 24px;
}

.modal-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  color: var(--gold-light);
  margin-bottom: 8px;
}

.modal-price {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--gold-primary);
  margin-bottom: 14px;
}

.modal-desc {
  color: var(--cream-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 20px;
}

/* Floating Back To Top Button */
.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--gold-gradient);
  color: var(--bg-dark);
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5), 0 0 15px rgba(212, 175, 55, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 850;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  transform: translateY(-4px) scale(1.08);
}

/* Footer */
.footer {
  text-align: center;
  padding: 40px 20px 20px;
  margin-top: 40px;
  border-top: 1px solid rgba(212, 175, 55, 0.15);
  color: var(--cream-dark);
  font-size: 0.85rem;
}

.footer strong {
  color: var(--gold-primary);
}

.footer-admin-link {
  display: inline-block;
  margin-top: 12px;
  color: var(--gold-primary);
  text-decoration: none;
  font-size: 0.8rem;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.footer-admin-link:hover {
  opacity: 1;
  text-decoration: underline;
}

/* Developer Credit Section */
.dev-credit-box {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px dashed rgba(212, 175, 55, 0.25);
  font-size: 0.88rem;
  color: var(--cream-muted);
}

.dev-title {
  font-size: 0.9rem;
  margin-bottom: 6px;
}

.dev-title strong {
  color: var(--gold-light);
  font-weight: 700;
}

.dev-contacts {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.dev-contact-item {
  color: var(--gold-primary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease, transform 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.dev-contact-item:hover {
  color: var(--gold-light);
  text-decoration: underline;
  transform: translateY(-1px);
}

.dev-sep {
  color: rgba(212, 175, 55, 0.4);
}

/* No Results Box */
.no-results {
  text-align: center;
  padding: 60px 20px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px dashed rgba(212, 175, 55, 0.3);
  grid-column: 1 / -1;
  display: none;
}

.no-results-icon {
  font-size: 3rem;
  margin-bottom: 12px;
  display: block;
}

/* Responsive Rules */
@media (max-width: 600px) {
  .header {
    padding: 30px 15px 20px;
  }
  .logo-wrap {
    width: 105px;
    height: 105px;
  }
  .brand-title {
    font-size: 1.9rem;
  }
  .cat-btn {
    padding: 8px 16px;
    font-size: 0.85rem;
  }
  .menu-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .card-img-wrap {
    height: 190px;
  }
}
