/* ===============================
   AR MENU - Augmented Reality Jelovnik
   Matches Shenoa Bar design system
================================ */

/* Hero Section */
.ar-hero-section {
  position: relative;
  min-height: 45vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.ar-hero-background {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.ar-hero-background .parallax-layer {
  position: absolute;
  inset: 0;
}

.ar-hero-background .layer-1 {
  background: radial-gradient(ellipse at 30% 50%, rgba(37, 84, 156, 0.15) 0%, transparent 70%);
}

.ar-hero-background .layer-2 {
  background: radial-gradient(ellipse at 70% 50%, rgba(37, 84, 156, 0.08) 0%, transparent 60%);
}

.ar-hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 0 20px;
}

.ar-hero-title {
  font-family: var(--font-serif, 'Cormorant Garamond', serif);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 300;
  line-height: 1.2;
  margin-bottom: 16px;
}

.ar-hero-title .title-line {
  display: block;
}

.ar-hero-title .title-accent {
  color: var(--amber-accent, #25549C);
  font-style: italic;
}

.ar-hero-subtitle {
  font-family: var(--font-sans, 'Raleway', sans-serif);
  font-size: 1rem;
  color: var(--smoky-gray, #5E5E5E);
  max-width: 500px;
  margin: 0 auto;
}

/* ===============================
   AR Modes Section
================================ */
.ar-modes-section {
  padding: 60px 20px 40px;
}

.ar-modes-container {
  max-width: 900px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.ar-mode-card {
  position: relative;
  background: var(--glass-tint, rgba(255, 255, 255, 0.08));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 32px 24px;
  text-align: center;
  transition: var(--transition-fast, all 0.3s ease);
}

.ar-mode-card:hover {
  border-color: rgba(37, 84, 156, 0.3);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(37, 84, 156, 0.1);
}

.ar-mode-featured {
  border-color: rgba(37, 84, 156, 0.25);
  background: linear-gradient(135deg, rgba(37, 84, 156, 0.08) 0%, rgba(255,255,255,0.04) 100%);
}

.ar-mode-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--amber-accent, #25549C);
  color: #fff;
  padding: 4px 16px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ar-mode-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 20px;
  color: var(--amber-accent, #25549C);
}

.ar-mode-card h3 {
  font-family: var(--font-serif, 'Cormorant Garamond', serif);
  font-size: 1.5rem;
  margin-bottom: 12px;
  color: var(--porcelain-white, #F4F4F4);
}

.ar-mode-card p {
  font-size: 0.9rem;
  color: var(--smoky-gray, #5E5E5E);
  line-height: 1.6;
  margin-bottom: 20px;
}

.ar-mode-tech {
  display: block;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.25);
  margin-top: 16px;
  font-family: monospace;
}

.ar-mode-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  transition: var(--transition-fast, all 0.3s ease);
  cursor: pointer;
  border: none;
}

.ar-mode-btn-secondary {
  background: var(--glass-tint, rgba(255, 255, 255, 0.08));
  color: var(--porcelain-white, #F4F4F4);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.ar-mode-btn-secondary:hover {
  background: var(--amber-accent, #25549C);
  border-color: var(--amber-accent, #25549C);
  color: #fff;
}

/* ===============================
   AR Food Gallery Grid
================================ */
.ar-gallery-section {
  padding: 40px 20px 60px;
}

.ar-gallery-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 40px;
}

.ar-gallery-header h2 {
  font-family: var(--font-serif, 'Cormorant Garamond', serif);
  font-size: 2rem;
  margin-bottom: 12px;
}

.ar-gallery-header p {
  font-size: 0.9rem;
  color: var(--smoky-gray, #5E5E5E);
}

.ar-food-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

.ar-food-card {
  background: var(--glass-tint, rgba(255, 255, 255, 0.08));
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  overflow: hidden;
  transition: var(--transition-fast, all 0.3s ease);
}

.ar-food-card:hover {
  border-color: rgba(37, 84, 156, 0.2);
  transform: translateY(-2px);
}

.ar-food-image {
  position: relative;
  width: 100%;
  height: 180px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.3);
}

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

.ar-food-card:hover .ar-food-image img {
  transform: scale(1.05);
}

.ar-food-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: rgba(255, 255, 255, 0.15);
}

.ar-badge-3d {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--amber-accent, #25549C);
  color: #fff;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 1px;
}

.ar-food-info {
  padding: 16px;
}

.ar-food-info h3 {
  font-family: var(--font-serif, 'Cormorant Garamond', serif);
  font-size: 1.2rem;
  margin-bottom: 6px;
}

.ar-food-price {
  font-size: 0.95rem;
  color: var(--amber-accent, #25549C);
  font-weight: 600;
  display: block;
  margin-bottom: 12px;
}

.ar-view-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #25549C 0%, #1a3d6e 100%);
  color: #F4F4F4;
  border: 2px solid rgba(212, 175, 55, 0.3);
  padding: 10px 20px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(37, 84, 156, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.ar-view-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 84, 156, 0.5), 0 0 16px rgba(212, 175, 55, 0.3);
  background: linear-gradient(135deg, #2d66b8 0%, #25549C 100%);
  border-color: rgba(212, 175, 55, 0.6);
}

.ar-view-btn svg {
  filter: drop-shadow(0 0 3px rgba(212, 175, 55, 0.5));
}

.ar-coming-soon {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.3);
  font-style: italic;
}

.ar-no-items {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--smoky-gray, #5E5E5E);
  padding: 40px;
}

/* ===============================
   Demo Section (model-viewer)
================================ */
.ar-demo-section {
  padding: 40px 20px 60px;
}

.ar-demo-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 32px;
}

.ar-demo-header h2 {
  font-family: var(--font-serif, 'Cormorant Garamond', serif);
  font-size: 2rem;
  margin-bottom: 12px;
}

.ar-demo-header p {
  font-size: 0.9rem;
  color: var(--smoky-gray, #5E5E5E);
}

.ar-demo-container {
  max-width: 700px;
  margin: 0 auto;
}

/* Hide AR button on desktop - only show on mobile devices */
@media (min-width: 769px) {
  model-viewer::part(default-ar-button) {
    display: none !important;
  }
}

/* model-viewer progress bar */
.model-viewer-progress {
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.1);
  position: absolute;
  bottom: 0;
  left: 0;
}

.model-viewer-progress-bar {
  height: 100%;
  background: var(--amber-accent, #25549C);
  transition: width 0.3s;
}

.ar-demo-info {
  margin-top: 24px;
}

.ar-demo-instructions {
  background: var(--glass-tint, rgba(255, 255, 255, 0.08));
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 24px;
}

.ar-demo-instructions h3 {
  font-family: var(--font-serif, 'Cormorant Garamond', serif);
  font-size: 1.2rem;
  margin-bottom: 12px;
}

.ar-demo-instructions ol {
  padding-left: 20px;
}

.ar-demo-instructions li {
  font-size: 0.9rem;
  color: var(--smoky-gray, #5E5E5E);
  margin-bottom: 8px;
  line-height: 1.5;
}

.ar-demo-instructions strong {
  color: var(--porcelain-white, #F4F4F4);
}

/* ===============================
   Marker Section
================================ */
.ar-marker-section {
  padding: 40px 20px 80px;
}

.ar-marker-container {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

.ar-marker-container h2 {
  font-family: var(--font-serif, 'Cormorant Garamond', serif);
  font-size: 2rem;
  margin-bottom: 12px;
}

.ar-marker-container > p {
  font-size: 0.9rem;
  color: var(--smoky-gray, #5E5E5E);
  margin-bottom: 32px;
}

.ar-marker-grid {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.ar-marker-item {
  background: var(--glass-tint, rgba(255, 255, 255, 0.08));
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 24px;
  max-width: 280px;
}

.ar-marker-image {
  width: 180px;
  height: 180px;
  margin: 0 auto 16px;
  background: #fff;
  border-radius: 12px;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ar-marker-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.ar-marker-item p {
  font-size: 0.85rem;
  color: var(--smoky-gray, #5E5E5E);
  margin-bottom: 8px;
}

.ar-marker-item strong {
  color: var(--porcelain-white, #F4F4F4);
}

.ar-marker-desc {
  line-height: 1.5;
}

.ar-download-btn {
  display: inline-block;
  margin-top: 12px;
  padding: 8px 20px;
  background: var(--glass-tint-light, rgba(255, 255, 255, 0.12));
  color: var(--porcelain-white, #F4F4F4);
  border-radius: 10px;
  text-decoration: none;
  font-size: 0.85rem;
  transition: var(--transition-fast, all 0.3s ease);
}

.ar-download-btn:hover {
  background: var(--amber-accent, #25549C);
  color: #fff;
}

.ar-qr-info {
  background: var(--glass-tint, rgba(255, 255, 255, 0.08));
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 24px;
}

.ar-qr-info h3 {
  font-family: var(--font-serif, 'Cormorant Garamond', serif);
  font-size: 1.3rem;
  margin-bottom: 10px;
}

.ar-qr-info p {
  font-size: 0.9rem;
  color: var(--smoky-gray, #5E5E5E);
  line-height: 1.6;
}

.ar-qr-info code {
  background: rgba(37, 84, 156, 0.2);
  color: var(--amber-accent, #25549C);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.85rem;
}

/* ===============================
   3D/AR Modal
================================ */
.model-viewer-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10001;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  align-items: center;
  justify-content: center;
  padding: 40px;
  animation: fadeInModal 0.3s ease;
}

.model-viewer-modal.active {
  display: flex;
}

@keyframes fadeInModal {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-content-wrapper {
  position: relative;
  width: 100%;
  max-width: 900px;
  background: linear-gradient(135deg, rgba(12, 12, 12, 0.98) 0%, rgba(26, 26, 46, 0.98) 100%);
  border-radius: 24px;
  border: 2px solid rgba(37, 84, 156, 0.4);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(212, 175, 55, 0.1) inset;
  overflow: hidden;
  animation: slideUpModal 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUpModal {
  from {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-header {
  padding: 24px 32px;
  background: linear-gradient(180deg, rgba(37, 84, 156, 0.15) 0%, transparent 100%);
  border-bottom: 1px solid rgba(37, 84, 156, 0.3);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Cormorant Garamond', serif;
  font-size: 26px;
  font-weight: 600;
  color: #F4F4F4;
  letter-spacing: 0.5px;
  margin: 0;
}

.modal-title svg {
  width: 28px;
  height: 28px;
  color: #d4af37;
  filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.6));
}

.modal-close-btn {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(37, 84, 156, 0.15);
  border: 1px solid rgba(37, 84, 156, 0.3);
  color: #F4F4F4;
  font-size: 24px;
  font-weight: 300;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.modal-close-btn:hover {
  background: rgba(37, 84, 156, 0.25);
  border-color: rgba(212, 175, 55, 0.5);
  transform: rotate(90deg);
  box-shadow: 0 0 16px rgba(212, 175, 55, 0.3);
}

.modal-viewer-container {
  position: relative;
  padding: 0;
  background: #0C0C0C;
}

.modal-info-bar {
  padding: 20px 32px;
  background: rgba(37, 84, 156, 0.08);
  border-top: 1px solid rgba(37, 84, 156, 0.2);
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-info-bar svg {
  width: 20px;
  height: 20px;
  color: #d4af37;
  flex-shrink: 0;
}

.modal-info-bar p {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.6;
  margin: 0;
}

.modal-info-bar strong {
  color: #F4F4F4;
  font-weight: 600;
}

/* ===============================
   Steam/Smoke Effects
================================ */
.ar-demo-container,
.ar-modal-content {
  position: relative;
}

/* Animated steam particles overlay */
.ar-demo-container::before,
.ar-modal-content::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 200px;
  background:
    radial-gradient(ellipse at 20% 100%, rgba(255, 255, 255, 0.15) 0%, transparent 40%),
    radial-gradient(ellipse at 50% 100%, rgba(255, 255, 255, 0.12) 0%, transparent 35%),
    radial-gradient(ellipse at 80% 100%, rgba(255, 255, 255, 0.1) 0%, transparent 40%);
  animation: steam-rise 4s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
  opacity: 0.7;
  mix-blend-mode: screen;
}

@keyframes steam-rise {
  0% {
    transform: translateY(0) scale(1);
    opacity: 0;
  }
  20% {
    opacity: 0.7;
  }
  100% {
    transform: translateY(-80px) scale(1.5);
    opacity: 0;
  }
}

/* Glow effect on model viewer */
model-viewer {
  filter: drop-shadow(0 5px 15px rgba(212, 175, 55, 0.2));
  transition: filter 0.5s ease;
}

model-viewer:hover {
  filter: drop-shadow(0 8px 25px rgba(212, 175, 55, 0.4));
}

/* Pulsing shadow animation */
@keyframes shadow-pulse {
  0%, 100% {
    filter: drop-shadow(0 5px 15px rgba(212, 175, 55, 0.2));
  }
  50% {
    filter: drop-shadow(0 8px 30px rgba(212, 175, 55, 0.5));
  }
}

.ar-demo-container model-viewer,
.ar-modal-content model-viewer {
  animation: shadow-pulse 3s ease-in-out infinite;
}

/* Loading shimmer effect */
@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

model-viewer::part(default-progress-bar) {
  background: linear-gradient(
    90deg,
    var(--amber-accent, #25549C) 0%,
    rgba(212, 175, 55, 0.8) 50%,
    var(--amber-accent, #25549C) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
}

/* ===============================
   Responsive
================================ */
@media (max-width: 768px) {
  .ar-hero-section {
    min-height: 35vh;
  }

  .ar-hero-title {
    font-size: clamp(1.6rem, 6vw, 2.5rem);
  }

  .ar-modes-container {
    grid-template-columns: 1fr;
  }

  .ar-food-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
  }

  .ar-food-image {
    height: 140px;
  }

  .ar-food-info {
    padding: 12px;
  }

  .ar-food-info h3 {
    font-size: 1rem;
  }

  .ar-demo-container model-viewer {
    height: 300px !important;
  }

  .ar-marker-image {
    width: 140px;
    height: 140px;
  }

  /* 3D/AR Modal responsive */
  .model-viewer-modal {
    padding: 0;
  }

  .modal-content-wrapper {
    max-width: 100%;
    height: 100vh;
    border-radius: 0;
    border: none;
    display: flex;
    flex-direction: column;
  }

  .modal-header {
    padding: 20px 24px;
  }

  .modal-title {
    font-size: 20px;
  }

  .modal-title svg {
    width: 24px;
    height: 24px;
  }

  .modal-close-btn {
    width: 40px;
    height: 40px;
  }

  .modal-viewer-container {
    flex: 1;
    display: flex;
  }

  .modal-viewer-container model-viewer {
    height: 100% !important;
    min-height: unset !important;
  }

  .modal-info-bar {
    padding: 16px 24px;
  }

  .modal-info-bar p {
    font-size: 13px;
  }
}
