/* ============================================
   Bubbly Handmade Workshop — Enhancements
   ============================================ */

/* --- 1. ACCESSIBILITY: Skip to Content --- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  background: var(--gold);
  color: white;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  font-family: var(--font-accent);
  font-weight: 600;
  z-index: 9999;
  transition: top 0.3s;
}
.skip-link:focus { top: 12px; }

/* --- 2. BACK TO TOP BUTTON --- */
.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--pink);
  color: var(--text-heading);
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  box-shadow: 0 4px 16px var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: all var(--transition);
  z-index: 1500;
  display: flex;
  align-items: center;
  justify-content: center;
}
.back-to-top.visible { opacity: 1; pointer-events: all; }
.back-to-top:hover { background: var(--gold); color: white; transform: translateY(-3px); }

/* --- 3. COOKIE / PRIVACY BANNER --- */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--text-heading);
  color: rgba(255,255,255,0.85);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  z-index: 2500;
  font-size: 0.85rem;
  transform: translateY(100%);
  transition: transform 0.4s ease;
  flex-wrap: wrap;
}
.cookie-banner.show { transform: translateY(0); }
.cookie-banner p { margin: 0; flex: 1; min-width: 200px; }
.cookie-banner .btn { flex-shrink: 0; }

/* --- 4. PRODUCT QUICK VIEW MODAL --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 24px;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }

.modal {
  background: var(--white);
  border-radius: var(--radius);
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.9) translateY(20px);
  transition: transform 0.3s ease;
  box-shadow: 0 24px 64px rgba(0,0,0,0.2);
}
.modal-overlay.open .modal { transform: scale(1) translateY(0); }

.modal-image {
  height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 6rem;
  border-radius: var(--radius) var(--radius) 0 0;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.9);
  font-size: 1.2rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.modal-close:hover { background: var(--pink); }

.modal-body { padding: 24px; }
.modal-body h2 { margin-bottom: 4px; font-size: 1.4rem; }
.modal-body .product-price { font-size: 1.3rem; margin-bottom: 12px; display: block; }
.modal-body .product-desc { 
  -webkit-line-clamp: unset; 
  color: var(--text-light); 
  margin-bottom: 20px; 
  line-height: 1.7;
}
.modal-body .btn { width: 100%; justify-content: center; }

/* --- 5. NEWSLETTER / EMAIL SIGNUP --- */
.newsletter {
  background: linear-gradient(135deg, var(--pink-light), var(--sage-light));
  text-align: center;
}

.newsletter-form {
  display: flex;
  gap: 12px;
  max-width: 460px;
  margin: 24px auto 0;
  flex-wrap: wrap;
  justify-content: center;
}

.newsletter-form input {
  flex: 1;
  min-width: 200px;
  padding: 14px 20px;
  border: 2px solid var(--border);
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-size: 0.95rem;
  background: var(--white);
  transition: border-color var(--transition);
}
.newsletter-form input:focus { outline: none; border-color: var(--pink); }

/* --- 6. TESTIMONIALS / REVIEWS --- */
.testimonials { background: var(--white); }

.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.testimonial-card {
  background: var(--cream);
  padding: 28px;
  border-radius: var(--radius);
  position: relative;
  transition: transform var(--transition);
}
.testimonial-card:hover { transform: translateY(-4px); }

.testimonial-stars { font-size: 1rem; margin-bottom: 12px; color: var(--gold); }

.testimonial-text {
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.7;
  margin-bottom: 16px;
  font-style: italic;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.testimonial-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
}

.testimonial-name {
  font-family: var(--font-accent);
  font-weight: 700;
  font-size: 0.9rem;
}

.testimonial-product {
  font-size: 0.8rem;
  color: var(--text-light);
}

/* --- 7. SEARCH BAR --- */
.search-bar {
  position: relative;
  max-width: 400px;
  margin: 20px auto 0;
}

.search-bar input {
  width: 100%;
  padding: 12px 20px 12px 44px;
  border: 2px solid var(--border);
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-size: 0.95rem;
  background: var(--white);
  transition: border-color var(--transition);
}
.search-bar input:focus { outline: none; border-color: var(--pink); }

.search-bar-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
  color: var(--text-light);
  pointer-events: none;
}

/* --- 8. BREADCRUMBS --- */
.breadcrumbs {
  padding: 12px 0;
  font-size: 0.85rem;
  color: var(--text-light);
}
.breadcrumbs a { color: var(--text-light); }
.breadcrumbs a:hover { color: var(--pink-dark); }
.breadcrumbs span { margin: 0 8px; }

/* --- 9. LOADING SKELETON --- */
.skeleton {
  background: linear-gradient(90deg, var(--border) 25%, var(--pink-light) 50%, var(--border) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

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

/* --- 10. ANNOUNCEMENT BAR --- */
.announcement-bar {
  background: var(--gold);
  color: white;
  text-align: center;
  padding: 8px 16px;
  font-family: var(--font-accent);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
}

.announcement-bar a { color: white; text-decoration: underline; }

/* --- 11. WHATSAPP FLOATING BUTTON --- */
.whatsapp-float {
  position: fixed;
  bottom: 24px;
  left: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25D366;
  color: white;
  font-size: 1.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.3);
  cursor: pointer;
  transition: all var(--transition);
  z-index: 1500;
  text-decoration: none;
}
.whatsapp-float:hover { transform: scale(1.1); box-shadow: 0 6px 24px rgba(37, 211, 102, 0.4); color: white; }

/* --- 12. PROGRESS BAR (Page Load) --- */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--pink), var(--gold));
  z-index: 9999;
  transition: width 0.3s ease;
  border-radius: 0 2px 2px 0;
}

/* --- 13. PRODUCT HOVER QUICK-ADD --- */
.product-card .quick-add-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255,255,255,0.95);
  padding: 12px;
  transform: translateY(100%);
  transition: transform var(--transition);
  text-align: center;
}
.product-card:hover .quick-add-overlay { transform: translateY(0); }

/* --- 14. SMOOTH PAGE TRANSITIONS --- */
body {
  animation: pageIn 0.4s ease;
}
@keyframes pageIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* --- 15. FOCUS STYLES FOR ACCESSIBILITY --- */
*:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

button:focus-visible, a:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

/* --- Print Styles --- */
@media print {
  .header, .footer, .cart-drawer, .cart-overlay, .back-to-top, 
  .cookie-banner, .whatsapp-float, .announcement-bar { display: none !important; }
  body { background: white; color: black; }
  .hero { min-height: auto; padding: 40px 0; }
}
