/* =============================================
   PETSHOP - shared.css
   Shared styles, navbar, footer, modals
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800;900&family=Fredoka+One&display=swap');

/* CSS Variables */
:root {
  --orange: #FF914D;
  --orange-light: #ffb47a;
  --orange-dark: #e07030;
  --yellow: #FFD166;
  --green: #4CAF50;
  --green-dark: #388E3C;
  --white: #FFFFFF;
  --gray-light: #F5F5F5;
  --gray: #e0e0e0;
  --text-dark: #2d2d2d;
  --text-mid: #555;
  --text-light: #888;
  --shadow: 0 4px 20px rgba(0,0,0,0.10);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.15);
  --radius: 16px;
  --radius-sm: 8px;
  --radius-xl: 32px;
  --font-display: 'Fredoka One', cursive;
  --font-body: 'Nunito', sans-serif;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--text-dark);
  background: var(--white);
  overflow-x: hidden;
}

/* =============================================
   NAVBAR
   ============================================= */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  padding: 0 10rem;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid transparent;
  transition: var(--transition);
}

#navbar.scrolled {
  box-shadow: 0 4px 24px rgba(255, 145, 77, 0.15);
  border-bottom-color: var(--orange-light);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.nav-logo-icon {
  width: 44px; height: 44px;
  background: linear-gradient(135deg, var(--orange), var(--yellow));
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  box-shadow: 0 4px 12px rgba(255,145,77,0.4);
}

.nav-logo-text {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--orange);
  line-height: 1;
}

.nav-logo-text span {
  color: var(--text-dark);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.4rem 0.85rem;
  border-radius: 50px;
  transition: var(--transition);
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--orange);
  background: rgba(255,145,77,0.1);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.cart-btn {
  position: relative;
  background: var(--gray-light);
  border: none;
  width: 44px; height: 44px;
  border-radius: 12px;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}

.cart-btn:hover { background: var(--orange); }
.cart-btn:hover span.cart-icon { filter: brightness(10); }

.cart-count {
  position: absolute;
  top: -4px; right: -4px;
  background: var(--orange);
  color: white;
  font-size: 0.65rem;
  font-weight: 800;
  width: 18px; height: 18px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid white;
}

.btn-schedule {
  background: linear-gradient(135deg, var(--orange), var(--orange-dark));
  color: white;
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: 50px;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 0.85rem;
  cursor: pointer;
  text-decoration: none;
  display: flex; align-items: center; gap: 6px;
  box-shadow: 0 4px 15px rgba(255,145,77,0.4);
  transition: var(--transition);
  white-space: nowrap;
}

.btn-schedule:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255,145,77,0.5);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  border: none;
  background: transparent;
}

.hamburger span {
  display: block;
  width: 24px; height: 2.5px;
  background: var(--text-dark);
  border-radius: 4px;
  transition: var(--transition);
}

.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Mobile Menu */
#mobile-menu {
  display: none;
  position: fixed;
  top: 72px; left: 0; right: 0;
  background: white;
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
  z-index: 999;
  padding: 1.5rem;
  flex-direction: column;
  gap: 0.5rem;
  transform: translateY(-20px);
  opacity: 0;
  transition: var(--transition);
}

#mobile-menu.open {
  display: flex;
  transform: translateY(0);
  opacity: 1;
}

#mobile-menu a {
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 700;
  font-size: 1.05rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

#mobile-menu a:hover { background: var(--gray-light); color: var(--orange); }

#mobile-menu .btn-schedule {
  margin-top: 0.5rem;
  justify-content: center;
}

/* =============================================
   FOOTER
   ============================================= */
footer {
  background: #1a1a2e;
  color: white;
  padding: 4rem 2rem 1.5rem;
  margin-top: 5rem;
}

.footer-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-brand .nav-logo-text { font-size: 1.8rem; }
.footer-brand p {
  color: rgba(255,255,255,0.6);
  line-height: 1.7;
  margin: 1rem 0;
  font-size: 0.9rem;
}

.footer-socials {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.social-btn {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  text-decoration: none;
  font-size: 1rem;
  transition: var(--transition);
  background: rgba(255,255,255,0.1);
  color: white;
}
.social-btn:hover { background: var(--orange); transform: translateY(-3px); }

.footer-col h4 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--yellow);
  margin-bottom: 1.2rem;
}

.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 0.7rem; }
.footer-col ul li a {
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  font-size: 0.9rem;
  transition: var(--transition);
}
.footer-col ul li a:hover { color: var(--orange); padding-left: 4px; }

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 0.9rem;
  color: rgba(255,255,255,0.65);
  font-size: 0.9rem;
}
.footer-contact-item .icon { font-size: 1.1rem; }

.footer-bottom {
  max-width: 1200px;
  margin: 1.5rem auto 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: rgba(255,255,255,0.4);
  font-size: 0.85rem;
}

.footer-paws { font-size: 1.2rem; }

/* =============================================
   SHARED COMPONENTS
   ============================================= */

/* Buttons */
.btn-primary {
  background: linear-gradient(135deg, var(--orange), var(--orange-dark));
  color: white;
  border: none;
  padding: 0.85rem 2rem;
  border-radius: 50px;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex; align-items: center; gap: 8px;
  box-shadow: 0 4px 20px rgba(255,145,77,0.4);
  transition: var(--transition);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(255,145,77,0.5);
}

.btn-secondary {
  background: transparent;
  color: var(--orange);
  border: 2.5px solid var(--orange);
  padding: 0.85rem 2rem;
  border-radius: 50px;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex; align-items: center; gap: 8px;
  transition: var(--transition);
}

.btn-secondary:hover {
  background: var(--orange);
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(255,145,77,0.4);
}

.btn-green {
  background: linear-gradient(135deg, var(--green), var(--green-dark));
  color: white;
  border: none;
  padding: 0.85rem 2rem;
  border-radius: 50px;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex; align-items: center; gap: 8px;
  box-shadow: 0 4px 20px rgba(76,175,80,0.35);
  transition: var(--transition);
}
.btn-green:hover { transform: translateY(-3px); box-shadow: 0 8px 30px rgba(76,175,80,0.5); }

/* Section Title */
.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-tag {
  display: inline-block;
  background: rgba(255,145,77,0.12);
  color: var(--orange);
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 0.35rem 1rem;
  border-radius: 50px;
  margin-bottom: 0.75rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  color: var(--text-dark);
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

.section-title span { color: var(--orange); }

.section-subtitle {
  color: var(--text-mid);
  font-size: 1.05rem;
  max-width: 580px;
  margin: 0 auto;
  line-height: 1.7;
}

/* Section Padding */
section {
  padding: 5rem 2rem;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

/* Cart Notification */
.cart-notif {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: white;
  border-left: 4px solid var(--green);
  padding: 1rem 1.5rem;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  z-index: 2000;
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 8px;
  transform: translateX(120%);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.cart-notif.show { transform: translateX(0); }

/* Cart Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1500;
  display: flex; align-items: flex-start; justify-content: flex-end;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

#cart-modal .modal-panel {
  width: min(420px, 100vw);
  height: 100vh;
  background: white;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

#cart-modal.open .modal-panel { transform: translateX(0); }

.cart-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--gray);
  display: flex; justify-content: space-between; align-items: center;
}

.cart-header h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--orange);
}

.close-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--gray-light);
  cursor: pointer;
  font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.close-btn:hover { background: var(--orange); color: white; }

#cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.5rem;
}

.cart-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-light);
}

.cart-empty span { font-size: 3rem; display: block; margin-bottom: 1rem; }

.cart-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--gray-light);
}

.cart-item img {
  width: 60px; height: 60px;
  object-fit: cover;
  border-radius: 10px;
  background: var(--gray-light);
}

.cart-item-info { flex: 1; }
.cart-item-name { font-weight: 700; font-size: 0.9rem; display: block; }
.cart-item-price { color: var(--orange); font-weight: 800; font-size: 0.95rem; }

.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cart-item-qty button {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 2px solid var(--gray);
  background: transparent;
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}

.cart-item-qty button:hover { border-color: var(--orange); color: var(--orange); }
.cart-item-qty span { font-weight: 800; min-width: 20px; text-align: center; }

.cart-item-remove {
  background: transparent;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  font-size: 0.9rem;
  padding: 4px;
  transition: var(--transition);
}
.cart-item-remove:hover { color: #e53e3e; }

.cart-footer {
  padding: 1.5rem;
  border-top: 1px solid var(--gray);
}

.cart-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  font-weight: 800;
  font-size: 1.1rem;
}

#cart-total { color: var(--orange); font-size: 1.3rem; }

/* Product Modal */
#product-modal .modal-panel {
  width: min(520px, 95vw);
  background: white;
  border-radius: var(--radius-xl);
  padding: 2rem;
  margin: auto;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.85);
  opacity: 0;
  transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#product-modal {
  align-items: center;
  justify-content: center;
}

#product-modal.open .modal-panel { transform: scale(1); opacity: 1; }

.modal-img-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 1.5rem;
  height: 260px;
  background: var(--gray-light);
}

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

.modal-name {
  font-family: var(--font-display);
  font-size: 1.7rem;
  color: var(--text-dark);
}

.modal-price {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--orange);
  margin: 0.5rem 0 0.75rem;
}

.modal-desc {
  color: var(--text-mid);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.modal-actions { display: flex; gap: 1rem; }

/* Animate on Scroll */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.animate-on-scroll.animated { opacity: 1; transform: translateY(0); }
.animate-on-scroll[data-delay="100"] { transition-delay: 0.1s; }
.animate-on-scroll[data-delay="200"] { transition-delay: 0.2s; }
.animate-on-scroll[data-delay="300"] { transition-delay: 0.3s; }
.animate-on-scroll[data-delay="400"] { transition-delay: 0.4s; }

/* Star Rating */
.stars { color: var(--yellow); font-size: 0.95rem; letter-spacing: 2px; }

/* Badges */
.badge {
  display: inline-block;
  padding: 0.25rem 0.7rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 800;
}
.badge-sale { background: #FF4444; color: white; }
.badge-new { background: var(--green); color: white; }
.badge-promo { background: var(--yellow); color: var(--text-dark); }

/* Testimonial Carousel */
.testimonial-carousel {
  position: relative;
  overflow: hidden;
}

.testimonial-slide {
  display: none;
  animation: fadeIn 0.5s ease;
}

.testimonial-slide.active { display: block; }

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

.carousel-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
}

.carousel-prev, .carousel-next {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 2.5px solid var(--orange);
  background: transparent;
  color: var(--orange);
  font-size: 1.2rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.carousel-prev:hover, .carousel-next:hover { background: var(--orange); color: white; }

.carousel-dots { display: flex; gap: 8px; }
.dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--gray);
  cursor: pointer;
  transition: var(--transition);
}
.dot.active { background: var(--orange); width: 24px; border-radius: 4px; }

/* Newsletter Section */
.newsletter-section {
  background: linear-gradient(135deg, var(--orange), var(--yellow));
  border-radius: var(--radius-xl);
  padding: 4rem 3rem;
  text-align: center;
  margin: 0 2rem;
  position: relative;
  overflow: hidden;
}

.newsletter-section::before {
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  content: "\f1b0";
  position: absolute;
  font-size: 10rem;
  opacity: 0.08;
  top: -20px; right: -20px;
  transform: rotate(20deg);
}

.newsletter-section h2 {
  font-family: var(--font-display);
  font-size: 2.2rem;
  color: white;
  margin-bottom: 0.5rem;
}

.newsletter-section p {
  color: rgba(255,255,255,0.85);
  font-size: 1.05rem;
  margin-bottom: 1.5rem;
}

.newsletter-form {
  display: flex;
  max-width: 480px;
  margin: 0 auto;
  gap: 0;
  border-radius: 50px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.newsletter-form input {
  flex: 1;
  padding: 1rem 1.5rem;
  border: none;
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
}

.newsletter-form button {
  background: var(--text-dark);
  color: white;
  border: none;
  padding: 1rem 1.75rem;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition);
}

.newsletter-form button:hover { background: #111; }

/* Page Top Padding (for fixed navbar) */
.page-top { padding-top: 72px; }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 992px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  #navbar { padding: 0 1.25rem; }
  .nav-links { display: none; }
  .btn-schedule { display: none; }
  .hamburger { display: flex; }

  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; gap: 0.5rem; text-align: center; }

  section { padding: 3.5rem 1.25rem; }
  .newsletter-section { padding: 3rem 1.5rem; margin: 0 1.25rem; }
  .newsletter-form { flex-direction: column; border-radius: var(--radius); }
  .newsletter-form input { border-radius: var(--radius-sm); }
  .newsletter-form button { border-radius: var(--radius-sm); }
}

@media (max-width: 480px) {
  .section-title { font-size: 1.7rem; }
  .modal-actions { flex-direction: column; }
}
