:root {
  --primary-red: #ffa9e7;  
  --white: #FFFFFF;
  --text-dark: #333;
  --text-light: #666;
  --hover-red: #ffcaf2;  
  --shadow-color: rgba(0,0,0,0.1);
  --pattern-opacity: 0.1;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scroll-behavior: smooth;
}

html, body {
  height: 100%; /* Ensure full height coverage */
  overflow-x: hidden; /* Prevent horizontal scrolling */
}

body {
  font-family: 'Montserrat', sans-serif;
  background-color: var(--primary-red);
  color: var(--text-dark);
  line-height: 1.6;
  overscroll-behavior-y: contain;
  background-image: url('/patron.jpg');
  background-repeat: repeat;
  background-size: 200px 200px;
  background-attachment: fixed; /* Keep background fixed during scrolling */
  animation: backgroundMove 20s linear infinite;
  min-height: 100vh; /* Ensure full viewport height */
  width: 100vw; /* Ensure full viewport width */
}

@keyframes backgroundMove {
  0% { background-position: 0 0; }
  100% { background-position: 200px 200px; }
}

#particles-js {
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: -1;
  background: var(--primary-red);
  pointer-events: none;
  opacity: 0.7;
}

.digital-card {
  max-width: 600px;
  margin: 2rem auto;
  background-color: rgba(255,255,255,0.95);
  border-radius: 20px;
  box-shadow: 0 15px 40px var(--shadow-color);
  padding: 2.5rem;
  text-align: center;
  animation: fadeIn 1s ease-out;
  position: relative;
  overflow: hidden;
}

.digital-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('/patron.jpg');
  background-repeat: repeat;
  background-size: 200px 200px;
  opacity: var(--pattern-opacity);
  animation: patternMove 30s linear infinite;
  z-index: -1;
}

@keyframes patternMove {
  0% { background-position: 0 0; }
  100% { background-position: 200px 200px; }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.profile-image {
  width: 200px;  
  height: 200px; 
  margin: 0 auto 1.5rem;  
  border-radius: 50%;
  overflow: hidden;
  transition: transform 0.3s ease;
  display: flex;          
  justify-content: center; 
}

.profile-image:hover {
  transform: scale(1.05);
}

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

.business-name {
  font-family: 'Playfair Display', serif;
  color: var(--primary-red);
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  opacity: 0;
  animation: slideIn 1s forwards 0.5s;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.slogan {
  font-style: italic;
  color: var(--text-dark);
  opacity: 0;
  animation: fadeIn 1s forwards 1s;
}

.social-links {
  display: flex;
  justify-content: center;
  margin: 1.5rem 0;
}

.social-icon {
  color: var(--primary-red);
  font-size: 1.5rem;
  margin: 0 10px;
  transition: all 0.3s ease;
}

.social-icon:hover {
  color: var(--text-dark);
  transform: scale(1.2) rotate(360deg);
}

.about-us {
  background-color: rgba(255,43,43,0.05);
  padding: 1.5rem;
  border-radius: 10px;
  margin-bottom: 1.5rem;
}

.about-us h2 {
  color: var(--primary-red);
  margin-bottom: 1rem;
}

.dessert-gallery {
  margin-bottom: 1.5rem;
}

.dessert-gallery h2 {
  text-align: center;
  color: var(--primary-red);
  margin-bottom: 2rem;
  position: relative;
}

.dessert-gallery h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 3px;
  background-color: var(--primary-red);
}

.dessert-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  padding: 1rem;
}

.dessert-card {
  position: relative;
  overflow: hidden;
  border-radius: 15px;
  box-shadow: 0 15px 30px rgba(0,0,0,0.15);
  transition: all 0.4s ease;
  background-color: white;
  aspect-ratio: 1 / 1;
  transform: translateY(0);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.dessert-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(transparent 60%, rgba(0,0,0,0.7));
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 1;
}

.dessert-card:hover::before {
  opacity: 1;
}

.dessert-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.dessert-card a {
  display: block;
  position: relative;
  overflow: hidden;
}

.dessert-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 1 / 1;
  transition: transform 0.4s ease;
}

.dessert-card:hover img {
  transform: scale(1.1);
}

.price-tag {
  display: none;
}

.dessert-details {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 15px;
  color: white;
  z-index: 2;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.4s ease;
}

.dessert-card:hover .dessert-details {
  opacity: 1;
  transform: translateY(0);
}

.dessert-details h3 {
  font-size: 1.2rem;
  margin-bottom: 5px;
}

.dessert-details p {
  font-size: 0.9rem;
}

.action-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.action-buttons button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.action-buttons i {
  transition: transform 0.2s ease;
}

.action-buttons button:hover i {
  transform: scale(1.2) rotate(15deg);
}

.order-btn, .catalog-btn {
  padding: 12px 24px;
  border-radius: 30px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
}

.order-btn {
  background-color: var(--primary-red);
  color: white;
  border: none;
}

.catalog-btn {
  background-color: white;
  color: var(--primary-red);
  border: 2px solid var(--primary-red);
}

.order-btn:hover {
  box-shadow: 0 5px 15px rgba(255,43,43,0.4);
}

.catalog-btn:hover {
  background-color: var(--primary-red);
  color: white;
}

.location-btn {
  background-color: white;
  color: var(--primary-red);
  border: 2px solid var(--primary-red);
  padding: 12px 24px;
  border-radius: 30px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
}

.location-btn:hover {
  background-color: var(--primary-red);
  color: white;
}

.location-btn i {
  transition: transform 0.2s ease;
}

.location-btn:hover i {
  transform: scale(1.2) rotate(15deg);
}

.qr-share-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 50px;
  height: 50px;
  background-color: var(--primary-red);  
  color: white;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  z-index: 10;
}

.qr-share-btn i {
  font-size: 1.5rem;
}

.qr-share-btn:hover {
  background-color: var(--hover-red);  
  transform: scale(1.1);
  box-shadow: 0 6px 8px rgba(0,0,0,0.2);
}

.share-btn {
  position: absolute;
  top: 15px;
  left: 15px;
  width: 50px;
  height: 50px;
  background-color: white;  
  color: var(--primary-red);
  border: 2px solid var(--primary-red);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  z-index: 10;
}

.share-btn i {
  font-size: 1.5rem;
}

.share-btn:hover {
  background-color: var(--primary-red);  
  color: white;
  transform: scale(1.1);
  box-shadow: 0 6px 8px rgba(0,0,0,0.2);
}

.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.5);
  align-items: center;
  justify-content: center;
}

.modal-content {
  background-color: white;
  padding: 2rem;
  border-radius: 15px;
  text-align: center;
  max-width: 400px;
  width: 90%;
  position: relative;
  box-shadow: 0 15px 40px rgba(0,0,0,0.2);
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 2rem;
  cursor: pointer;
  color: var(--primary-red);
}

#qr-code {
  display: flex;
  justify-content: center;
  margin: 1rem 0;
}

#qr-code img {
  max-width: 250px;
  height: auto;
}

*:focus-visible {
  outline: 3px solid var(--primary-red);
  outline-offset: 3px;
}

#loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--primary-red);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  animation: backgroundMove 20s linear infinite;
}

.loading-logo {
  width: 250px;
  height: 250px;
  border-radius: 50%;
  background-color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 15px 40px rgba(0,0,0,0.2);
  cursor: pointer;
  transition: all 0.4s ease;
  animation: pulsate 2s infinite;
}

.loading-logo img {
  width: 200px;
  height: 200px;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.loading-logo:hover {
  transform: scale(1.1);
}

@keyframes pulsate {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes fadeOutLoading {
  from {
    opacity: 1;
    visibility: visible;
  }
  to {
    opacity: 0;
    visibility: hidden;
  }
}

.loading-instruction {
  position: absolute;
  bottom: 50px;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  font-family: 'Montserrat', sans-serif;
  font-size: 1.2rem;
  text-align: center;
  animation: fadeInOut 2s infinite;
}

@keyframes fadeInOut {
  0%, 100% { opacity: 0; }
  50% { opacity: 1; }
}

.copyright {
  text-align: center;
  background-color: rgba(255,255,255,0.2);
  color: white;
  padding: 1rem;
  font-size: 0.9rem;
  position: relative;
  z-index: 10;
}

@media screen and (max-width: 768px) {
  .digital-card {
    margin: 1rem;
    padding: 1.5rem;
    border-radius: 15px;
  }

  .dessert-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .action-buttons {
    flex-direction: column;
  }

  .order-btn, .catalog-btn, .location-btn {
    width: 100%;
    margin-bottom: 10px;
  }

  .copyright {
    font-size: 0.8rem;
    padding: 0.8rem;
  }
}