/* ========================================
   Wanofi Cafe – styles.css
   Premium Dark-Mode Cafe Theme
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@200;300;400;500;600;700&display=swap');

/* ── CSS Custom Properties ── */
:root {
  --bg-primary: #005461;
  --bg-secondary: #018790;
  --bg-card: #018790;
  --bg-card-alt: rgba(1, 135, 144, 0.95);

  --accent: #00B7B5;
  --accent-hover: #00d2d0;
  --accent-glow: rgba(0, 183, 181, 0.4);
  --accent-subtle: rgba(0, 183, 181, 0.15);

  --caramel: #F4F4F4;
  --caramel-dark: #e0e0e0;
  --amber: #00B7B5;

  --text-primary: #F4F4F4;
  --text-secondary: rgba(244, 244, 244, 0.75);
  --text-heading: #ffffff;
  --text-muted: rgba(244, 244, 244, 0.6);

  --border: rgba(244, 244, 244, 0.15);
  --border-hover: rgba(0, 183, 181, 0.5);
  --shadow: rgba(0, 0, 0, 0.4);
  --shadow-lg: rgba(0, 0, 0, 0.6);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  --transition: 0.3s ease;
  --transition-bounce: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* ── Reset ── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
}

body {
  font-family: 'Oswald', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  padding-left: 256px;
}

/* ── Background Pattern ── */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at 20% 50%, rgba(233, 69, 96, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(200, 149, 108, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 50% 80%, rgba(15, 52, 96, 0.1) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* ── Layout Container ── */
.app-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  position: relative;
  z-index: 1;
}

/* ── Animations ── */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes slideInFromLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale(0.8);
  }

  60% {
    opacity: 1;
    transform: scale(1.05);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }

  100% {
    transform: scale(1);
  }
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }

  100% {
    background-position: 200% 0;
  }
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

.animate-pulse {
  animation: pulse 2s ease-in-out infinite;
}

/* ── Header ── */
header {
  text-align: center;
  padding: 40px 20px;
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-secondary) 50%, var(--bg-primary) 100%);
  color: var(--text-heading);
  border-radius: var(--radius-lg);
  margin-bottom: 30px;
  box-shadow: 0 8px 32px var(--shadow);
  position: relative;
  overflow: hidden;
  animation: slideInFromLeft 0.8s ease-out forwards;
  border: 1px solid var(--border);
}

header::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(233, 69, 96, 0.1), transparent);
  transition: left 0.7s;
}

header:hover::before {
  left: 100%;
}

header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--caramel), var(--accent));
  background-size: 200% 100%;
  animation: shimmer 3s linear infinite;
}

.logo {
  font-family: 'Oswald', sans-serif;
  font-size: 3rem;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  animation: bounceIn 1s ease-out forwards;
  font-weight: 800;
  color: var(--text-heading);
  letter-spacing: 2px;
  text-transform: uppercase;
}

.logo svg {
  color: var(--accent);
  filter: drop-shadow(0 0 8px var(--accent-glow));
}

.tagline {
  font-size: 1.1rem;
  opacity: 0.8;
  font-style: italic;
  animation: fadeIn 0.8s ease-out 0.5s forwards;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
}

/* ── Sidebar Toggle Button ── */
.sidebar-toggle {
  display: none;
  position: fixed;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 200;
  background: linear-gradient(135deg, var(--accent) 0%, #c23152 100%);
  color: white;
  padding: 12px;
  border: none;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  cursor: pointer;
  box-shadow: 0 4px 15px var(--accent-glow);
  transition: all var(--transition);
}

.sidebar-toggle:hover {
  padding-left: 20px;
  box-shadow: 0 0 20px var(--accent-glow);
}

.sidebar-toggle.open {
  transform: translateY(-50%) translateX(256px);
}

/* ── Sidebar ── */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  height: 100%;
  width: 256px;
  background: var(--bg-secondary);
  backdrop-filter: blur(20px);
  z-index: 150;
  box-shadow: 4px 0 30px var(--shadow-lg);
  transform: translateX(0);
  transition: transform 0.3s ease-in-out;
  border-right: 1px solid var(--border);
}

.sidebar.open {
  transform: translateX(0);
}

.sidebar-content {
  padding: 24px;
  padding-top: 80px;
}

.sidebar h3 {
  color: var(--text-heading);
  margin-bottom: 16px;
  font-size: 1.25rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sidebar .nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  font-family: 'Oswald', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  text-align: left;
  width: 100%;
}

.sidebar .nav-link:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-heading);
  padding-left: 20px;
}

.sidebar .nav-link svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
}

.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 140;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
  backdrop-filter: blur(2px);
}

.sidebar-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

/* ── Menu Section ── */
.menu-section {
  margin-bottom: 40px;
  background-color: var(--bg-secondary);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 4px 20px var(--shadow);
  opacity: 0;
  transform: translateY(30px);
  border: 1px solid var(--border);
}

.menu-section.animated {
  animation: slideUp 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.section-header {
  background: linear-gradient(135deg, var(--caramel) 0%, var(--caramel-dark) 100%);
  color: var(--bg-primary);
  padding: 18px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all var(--transition);
  border-bottom: 2px solid rgba(200, 149, 108, 0.3);
}

.section-header:hover {
  background: linear-gradient(135deg, var(--amber) 0%, var(--caramel) 100%);
  padding-left: 30px;
}

.section-header svg {
  color: var(--bg-primary);
  opacity: 0.8;
}

.section-header h2 {
  font-family: 'Oswald', sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.menu-items {
  padding: 24px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

/* ── Menu Item Card ── */
.menu-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-bounce);
  background: var(--bg-card);
  opacity: 0;
  transform: translateY(20px);
  box-shadow:
    0 4px 15px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  position: relative;
}

.menu-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(233, 69, 96, 0.08) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: 1;
}

.menu-item:hover::before {
  opacity: 1;
}

.menu-item.animated {
  animation: slideUp 0.5s ease-out forwards;
}

.menu-item:nth-child(1).animated {
  animation-delay: 0.1s;
}

.menu-item:nth-child(2).animated {
  animation-delay: 0.2s;
}

.menu-item:nth-child(3).animated {
  animation-delay: 0.3s;
}

.menu-item:nth-child(4).animated {
  animation-delay: 0.4s;
}

.menu-item:nth-child(5).animated {
  animation-delay: 0.5s;
}

.menu-item:nth-child(6).animated {
  animation-delay: 0.6s;
}

.menu-item:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.3),
    0 0 30px var(--accent-glow),
    0 0 0 1px var(--border-hover);
  border-color: var(--accent);
}

/* ── Item Image ── */
.item-image {
  height: 200px;
  width: 100%;
  overflow: hidden;
  position: relative;
}

.item-image::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, transparent 0%, transparent 40%, var(--bg-card) 100%);
  z-index: 2;
  pointer-events: none;
}

.item-image::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(233, 69, 96, 0.15) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 3;
}

.menu-item:hover .item-image::after {
  opacity: 1;
}

.item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  filter: brightness(0.85) saturate(1.1);
}

.menu-item:hover .item-image img {
  transform: scale(1.12) rotate(1deg);
  filter: brightness(1) saturate(1.2);
}

/* ── Item Content ── */
.item-content {
  padding: 20px;
  background: var(--bg-card-alt);
  transition: all 0.4s ease;
  position: relative;
  margin-top: -30px;
  z-index: 5;
}

.menu-item:hover .item-content {
  background: rgba(20, 60, 100, 0.95);
}

.item-content h4 {
  color: var(--text-heading);
  margin-bottom: 8px;
  font-size: 1.2rem;
  font-weight: 700;
  transition: all var(--transition);
}

.menu-item:hover .item-content h4 {
  color: var(--accent);
  transform: translateX(5px);
}

.item-content p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 12px;
  min-height: 40px;
  transition: all var(--transition);
  line-height: 1.5;
}

.menu-item:hover .item-content p {
  color: var(--text-primary);
}

/* ── Price Badge ── */
.price {
  font-weight: 800;
  color: var(--caramel);
  font-size: 1.3rem;
  margin-top: 10px;
  text-align: right;
  transition: all var(--transition-bounce);
  position: relative;
  display: inline-block;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(200, 149, 108, 0.15) 0%, rgba(167, 100, 61, 0.1) 100%);
  border: 1px solid rgba(200, 149, 108, 0.25);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.menu-item:hover .price {
  color: var(--bg-primary);
  transform: scale(1.08) translateY(-2px);
  background: linear-gradient(135deg, var(--caramel) 0%, var(--caramel-dark) 100%);
  border-color: transparent;
  box-shadow: 0 4px 15px rgba(244, 244, 244, 0.4);
}

/* ── Item Tag ── */
.item-tag {
  display: inline-block;
  background: var(--accent-subtle);
  color: var(--accent);
  font-size: 0.75rem;
  padding: 4px 12px;
  border-radius: 20px;
  margin-top: 8px;
  margin-right: 8px;
  font-weight: 600;
  transition: all var(--transition-bounce);
  border: 1px solid rgba(233, 69, 96, 0.2);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.menu-item:hover .item-tag {
  background: rgba(233, 69, 96, 0.25);
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 4px 10px rgba(233, 69, 96, 0.2);
  border-color: rgba(233, 69, 96, 0.4);
}

/* ── Sub-section ── */
.sub-section {
  grid-column: 1 / -1;
  margin-top: 25px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  opacity: 0;
  transform: translateY(20px);
}

.sub-section.animated {
  animation: slideUp 0.6s ease-out forwards;
}

.sub-section h3 {
  color: var(--text-heading);
  margin-bottom: 20px;
  font-family: 'Oswald', sans-serif;
  font-size: 1.4rem;
  padding-left: 14px;
  border-left: 4px solid var(--accent);
  transition: all var(--transition);
}

.sub-section:hover h3 {
  padding-left: 20px;
  color: var(--accent);
}

.sub-section-items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

/* ── Footer ── */
footer {
  text-align: center;
  padding: 30px 20px;
  margin-top: 40px;
  color: var(--text-muted);
  font-size: 0.9rem;
  border-top: 1px solid var(--border);
  animation: fadeIn 1s ease-out forwards;
}

footer p {
  margin-bottom: 6px;
}

.highlight {
  color: var(--accent);
  font-weight: bold;
}

/* ── Scroll-to-Top Button ── */
.scroll-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--accent) 0%, #c23152 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: 0 4px 20px var(--accent-glow);
  z-index: 1000;
  opacity: 0;
  transform: translateY(20px);
  transition: all var(--transition);
  border: none;
  pointer-events: none;
}

.scroll-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.scroll-top:hover {
  transform: translateY(-5px) scale(1.1);
  box-shadow: 0 8px 25px var(--accent-glow);
}

/* ── Image Modal ── */
.image-modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.image-modal.open {
  display: flex;
  animation: fadeIn 0.3s;
}

.modal-content {
  margin: auto;
  display: block;
  max-width: 90%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: var(--radius-lg);
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
  animation: bounceIn 0.5s;
}

.close-modal {
  position: absolute;
  top: 20px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  z-index: 2001;
  transition: all var(--transition);
}

.close-modal:hover,
.close-modal:focus {
  color: var(--accent);
  text-decoration: none;
  transform: scale(1.1);
}

#modalCaption {
  margin-top: 20px;
  color: #F4F4F4;
  font-family: 'Oswald', sans-serif;
  font-size: 1.4rem;
  letter-spacing: 1px;
  text-align: center;
}

/* ── Responsive ── */
@media (max-width: 768px) {

  body {
    padding-left: 0;
  }

  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-toggle {
    display: block;
  }

  .menu-items,
  .sub-section-items {
    grid-template-columns: 1fr;
  }

  .logo {
    font-size: 2.2rem;
  }

  .scroll-top {
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
  }

  header {
    padding: 25px 15px;
  }

  .section-header {
    padding: 14px 18px;
  }

  .menu-items {
    padding: 16px;
    gap: 16px;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {

  .menu-items,
  .sub-section-items {
    grid-template-columns: repeat(2, 1fr);
  }
}