/* custom.css - Bibas Shop enhancements */

.floating-cta {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: linear-gradient(135deg, #4CAF50, #45a049);
  color: #ffffff;
  padding: 14px 24px;
  border-radius: 48px;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4);
  z-index: 1001;
  transition: all .3s ease;
  text-decoration: none;
}

.floating-cta:hover {
  background: linear-gradient(135deg, #45a049, #388E3C);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(76, 175, 80, 0.5);
  text-decoration: none;
}

@media (min-width: 768px) {
  .floating-cta { display: none; }
}

.benefit-emoji {
  font-size: 2.8rem;
  display: block;
  margin-bottom: 10px;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

/* Hero CTA enhancement */
.cta-button {
  background: linear-gradient(135deg, #4CAF50, #45a049) !important;
  box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
  transition: all 0.3s ease !important;
}

.cta-button:hover {
  background: linear-gradient(135deg, #45a049, #388E3C) !important;
  transform: translateY(-3px) !important;
  box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4) !important;
}

/* Hero CTA fix */
@media (max-width: 768px) {
  #accueil .cta-button {
    display: inline-block;
    max-width: 90%;
    white-space: normal;
    line-height: 1.3;
    word-break: break-word;
    font-size: 1.05em;
  }
}

/* Mobile full-screen nav overlay */
@media (max-width: 768px) {
  header nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.98), rgba(69, 160, 73, 0.98));
    transform: translateY(-100%);
    transition: transform 400ms ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  header nav.nav--visible {
    transform: translateY(0);
  }

  header nav ul {
    flex-direction: column;
    margin: 0;
  }

  header nav ul li {
    border: none;
    margin: 1em 0;
  }

  header nav ul li a {
    font-size: 1.4em;
    color: white !important;
    padding: 10px 20px;
    border-radius: 25px;
    transition: background-color 0.3s ease;
  }

  header nav ul li a:hover {
    background-color: rgba(255, 255, 255, 0.2);
    text-decoration: none;
  }
}

/* Enhanced product cards */
.product-card {
  transition: all 0.3s ease;
  border: 1px solid #e0e0e0;
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  border-color: #4CAF50;
}

/* Smooth scrolling enhancement */
html {
  scroll-behavior: smooth;
}

/* Loading animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.product-card {
  animation: fadeInUp 0.6s ease-out;
}

/* Enhanced header */
header {
  background: linear-gradient(135deg, #4CAF50, #45a049);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Mobile touch targets and spacing improvements */
@media (max-width: 768px) {
  .products-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 0 1rem;
  }
  
  .product-card {
    margin: 0;
    padding: 1.5rem;
    border-radius: 12px;
  }
  
  .product-card img {
    width: 100%;
    height: auto;
    max-height: 180px;
    border-radius: 8px;
  }
  
  .product-card .cta-button {
    padding: 14px 28px;
    font-size: 1.1em;
    min-height: 44px; /* iOS touch target */
    width: 100%;
  }
  
  /* Improve touch targets */
  .cta-button,
  .submit-button,
  button {
    min-height: 44px;
    min-width: 44px;
  }
  
  /* Better spacing for mobile */
  .benefit-emoji {
    font-size: 2.2rem;
  }
  
  /* Floating CTA mobile optimization */
  .floating-cta {
    bottom: 15px;
    right: 15px;
    padding: 12px 20px;
    font-size: 0.9em;
  }
}

/* Ultra small devices optimization */
@media (max-width: 480px) {
  .products-grid {
    gap: 1rem;
    padding: 0 0.5rem;
  }
  
  .product-card {
    padding: 1rem;
    border-radius: 10px;
  }
  
  .product-card img {
    max-height: 150px;
  }
  
  .product-card h3 {
    font-size: 1.3em;
  }
  
  .product-card .product-price {
    font-size: 1.2em;
  }
  
  .product-card .product-description {
    font-size: 0.9em;
  }
}

/* Landscape orientation fixes */
@media (max-height: 500px) and (orientation: landscape) {
  #accueil .banner {
    min-height: 200px;
    padding: 20px;
  }
  
  .floating-cta {
    display: none; /* Hide floating CTA in landscape */
  }
}

/* Admin link (hidden by default) */
.admin-link {
  position: fixed;
  bottom: 10px;
  left: 10px;
  font-size: 0.8rem;
  opacity: 0.5;
  transition: opacity 0.3s ease;
}

.admin-link:hover {
  opacity: 1;
}
