/* ============================================
   ChickSweets — style.css
   Handcrafted Chicken-Shaped Candies & Lollipops
   ============================================ */

/* CSS Variables */
:root {
  --primary: #F4A259;
  --secondary: #5B8E7D;
  --accent: #BC4749;
  --bg: #FFF8F0;
  --bg-alt: #FEF0E1;
  --text: #2D2A26;
  --text-muted: #6B6560;
  --border: #E8DDD4;
  --white: #FFFFFF;
  --shadow: rgba(45, 42, 38, 0.1);
  --shadow-hover: rgba(45, 42, 38, 0.18);
  --transition: 300ms ease-out;
  --transition-fast: 150ms ease-out;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Nunito', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Baloo 2', cursive;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
}

h1 {
  font-size: clamp(2rem, 5vw, 3rem);
}

h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
}

h3 {
  font-size: clamp(1.25rem, 3vw, 1.5rem);
}

p {
  margin-bottom: 1rem;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--primary);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Utility Classes */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.section-padding {
  padding: 5rem 0;
}

.text-center {
  text-align: center;
}

.text-muted {
  color: var(--text-muted);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  font-family: 'Nunito', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.btn-primary {
  background-color: var(--accent);
  color: var(--white);
  box-shadow: 0 4px 15px rgba(188, 71, 73, 0.3);
}

.btn-primary:hover {
  background-color: #a33e40;
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(188, 71, 73, 0.4);
}

.btn-secondary {
  background-color: var(--secondary);
  color: var(--white);
  box-shadow: 0 4px 15px rgba(91, 142, 125, 0.3);
}

.btn-secondary:hover {
  background-color: #4a7a6a;
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(91, 142, 125, 0.4);
}

.btn-outline {
  background-color: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
}

.btn-outline:hover {
  background-color: var(--accent);
  color: var(--white);
  transform: translateY(-2px);
}

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.btn-primary:focus-visible,
.btn-secondary:focus-visible {
  outline-color: var(--white);
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: var(--bg);
  transition: box-shadow var(--transition);
}

.header.scrolled {
  box-shadow: 0 2px 20px var(--shadow);
}

.header-top {
  background-color: var(--bg-alt);
  padding: 0.5rem 0;
  font-size: 0.875rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

.header-main {
  padding: 1rem 0;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo img {
  height: 48px;
  width: auto;
}

.logo-text {
  font-family: 'Baloo 2', cursive;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
}

.nav-desktop {
  display: none;
}

.nav-desktop ul {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-desktop a {
  color: var(--text);
  font-weight: 600;
  padding: 0.5rem 0;
  position: relative;
}

.nav-desktop a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent);
  transition: width var(--transition);
}

.nav-desktop a:hover::after {
  width: 100%;
}

.nav-desktop a:hover {
  color: var(--accent);
}

.nav-desktop a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 4px;
}

.header-cta {
  display: none;
}

/* Burger Button */
.burger-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text);
  font-size: 1.5rem;
  transition: color var(--transition-fast);
}

.burger-btn:hover {
  color: var(--accent);
}

.burger-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 8px;
}

/* Mobile Menu */
.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--bg);
  z-index: 1001;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  transform: translateX(100%);
  transition: transform var(--transition);
}

.mobile-menu.active {
  transform: translateX(0);
}

.mobile-menu-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text);
  font-size: 1.5rem;
}

.mobile-menu-close:hover {
  color: var(--accent);
}

.mobile-menu-close:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 8px;
}

.mobile-menu ul {
  list-style: none;
  text-align: center;
}

.mobile-menu li {
  margin-bottom: 1.5rem;
}

.mobile-menu a {
  font-family: 'Baloo 2', cursive;
  font-size: 1.5rem;
  color: var(--text);
  font-weight: 600;
}

.mobile-menu a:hover {
  color: var(--accent);
}

.mobile-menu .btn {
  margin-top: 2rem;
}

/* Hero Section */
.hero {
  padding: 4rem 0 6rem;
  text-align: center;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-alt) 100%);
}

.hero-content {
  max-width: 700px;
  margin: 0 auto;
}

.hero-tagline {
  display: inline-block;
  padding: 0.5rem 1rem;
  background-color: var(--primary);
  color: var(--white);
  border-radius: 50px;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.hero h1 {
  margin-bottom: 1rem;
}

.hero h1 span {
  color: var(--accent);
}

.hero-description {
  font-size: 1.125rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

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

.hero-scroll {
  margin-top: 3rem;
  animation: bounce 2s infinite;
}

.hero-scroll a {
  color: var(--text-muted);
  font-size: 1.5rem;
}

.hero-scroll a:hover {
  color: var(--accent);
}

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

/* Products Section */
.products {
  padding: 5rem 0;
  background-color: var(--bg);
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  margin-bottom: 0.75rem;
}

.section-header p {
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.product-card {
  background-color: var(--white);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 4px 20px var(--shadow);
  transition: all var(--transition);
  position: relative;
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 30px var(--shadow-hover);
}

.product-card-image {
  position: relative;
  padding-top: 100%;
  overflow: hidden;
}

.product-card-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition);
}

.product-card:hover .product-card-image img {
  transform: scale(1.08);
}

.product-card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.5rem;
  background: linear-gradient(transparent, rgba(45, 42, 38, 0.9));
  color: var(--white);
  transform: translateY(100%);
  transition: transform var(--transition);
}

.product-card:hover .product-card-overlay {
  transform: translateY(0);
}

.product-card-content {
  padding: 1.25rem;
  text-align: center;
}

.product-card h3 {
  margin-bottom: 0.5rem;
  font-size: 1.125rem;
}

.product-card-price {
  color: var(--accent);
  font-weight: 700;
  font-size: 1.25rem;
}

.product-card-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background-color: var(--accent);
  color: var(--white);
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* FAQ Section */
.faq {
  padding: 5rem 0;
  background-color: var(--bg-alt);
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.faq-card {
  background-color: var(--white);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 4px 15px var(--shadow);
  transition: all var(--transition);
  border-left: 4px solid var(--primary);
}

.faq-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px var(--shadow-hover);
  border-left-color: var(--accent);
}

.faq-card h3 {
  font-size: 1rem;
  margin-bottom: 0.75rem;
  color: var(--text);
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.faq-card h3 i {
  color: var(--primary);
  font-size: 1.25rem;
  margin-top: 0.125rem;
}

.faq-card p {
  color: var(--text-muted);
  font-size: 0.9375rem;
  margin: 0;
  padding-left: 2rem;
}

/* Testimonials Section */
.testimonials {
  padding: 5rem 0;
  background-color: var(--bg);
}

.testimonial-slider {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
}

.testimonial-slide {
  display: none;
}

.testimonial-slide.active {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.testimonial-image {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--primary);
  box-shadow: 0 8px 25px var(--shadow);
}

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

.testimonial-content {
  text-align: center;
  max-width: 600px;
}

.testimonial-quote {
  font-size: 1.25rem;
  font-style: italic;
  color: var(--text);
  margin-bottom: 1.5rem;
  position: relative;
  padding: 0 2rem;
}

.testimonial-quote::before {
  content: '\201C';
  font-family: 'Baloo 2', cursive;
  font-size: 4rem;
  color: var(--primary);
  opacity: 0.3;
  position: absolute;
  top: -1.5rem;
  left: 0;
}

.testimonial-author {
  font-weight: 700;
  color: var(--text);
}

.testimonial-role {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.testimonial-rating {
  color: var(--primary);
  margin-top: 0.5rem;
}

.testimonial-nav {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 2rem;
}

.testimonial-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: var(--border);
  border: none;
  cursor: pointer;
  transition: all var(--transition);
}

.testimonial-dot.active,
.testimonial-dot:hover {
  background-color: var(--accent);
  transform: scale(1.2);
}

.testimonial-dot:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* CTA Section */
.cta {
  padding: 5rem 0;
  background: linear-gradient(135deg, var(--primary) 0%, #e8944c 100%);
  position: relative;
  overflow: hidden;
}

.cta::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 60%;
  height: 200%;
  background: rgba(255, 255, 255, 0.1);
  transform: rotate(15deg);
  pointer-events: none;
}

.cta-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

.cta-content {
  color: var(--white);
}

.cta-content h2 {
  color: var(--white);
  margin-bottom: 1rem;
}

.cta-content p {
  opacity: 0.9;
  margin-bottom: 1.5rem;
  font-size: 1.125rem;
}

.cta-features {
  list-style: none;
  margin-bottom: 2rem;
}

.cta-features li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  font-weight: 500;
}

.cta-features i {
  color: var(--white);
  background-color: rgba(255, 255, 255, 0.2);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
}

.cta-form-wrapper {
  background-color: var(--white);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.cta-form h3 {
  text-align: center;
  margin-bottom: 1.5rem;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  font-size: 0.875rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid var(--border);
  border-radius: 12px;
  font-family: 'Nunito', sans-serif;
  font-size: 1rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  background-color: var(--bg);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(244, 162, 89, 0.15);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.form-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.form-checkbox input {
  width: 20px;
  height: 20px;
  margin-top: 0.125rem;
  accent-color: var(--accent);
}

.form-checkbox label {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0;
}

.form-checkbox a {
  color: var(--accent);
  text-decoration: underline;
}

.cta-form .btn {
  width: 100%;
  margin-top: 0.5rem;
}

/* Footer */
.footer {
  background-color: var(--text);
  color: var(--white);
  padding: 2rem 0;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  text-align: center;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-logo img {
  height: 40px;
  width: auto;
}

.footer-logo span {
  font-family: 'Baloo 2', cursive;
  font-size: 1.25rem;
  font-weight: 700;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem 2rem;
  list-style: none;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.875rem;
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--primary);
}

.footer-contact {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.875rem;
}

.footer-contact a {
  color: var(--primary);
}

.footer-bottom {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.5);
}

/* Scroll to Top Button */
.scroll-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  background-color: var(--accent);
  color: var(--white);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: 0 4px 15px rgba(188, 71, 73, 0.4);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition);
  z-index: 100;
}

.scroll-top.visible {
  opacity: 1;
  visibility: visible;
}

.scroll-top:hover {
  background-color: #a33e40;
  transform: translateY(-4px);
}

.scroll-top:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 2px;
}

/* Cookie Popup */
.cookie-popup {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: var(--text);
  color: var(--white);
  padding: 1.25rem;
  z-index: 9999;
  transform: translateY(100%);
  transition: transform var(--transition);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
}

.cookie-popup.visible {
  transform: translateY(0);
}

.cookie-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  text-align: center;
}

.cookie-content p {
  font-size: 0.875rem;
  margin: 0;
  opacity: 0.9;
}

.cookie-content a {
  color: var(--primary);
  text-decoration: underline;
}

.cookie-buttons {
  display: flex;
  gap: 0.75rem;
}

.cookie-buttons .btn {
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
}

/* Policy Pages */
.policy-page {
  padding: 4rem 0;
  min-height: calc(100vh - 200px);
}

.policy-content {
  max-width: 800px;
  margin: 0 auto;
}

.policy-content h1 {
  margin-bottom: 0.5rem;
}

.policy-date {
  color: var(--text-muted);
  margin-bottom: 2rem;
  font-size: 0.875rem;
}

.policy-content h2 {
  font-size: 1.5rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: var(--accent);
}

.policy-content h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.policy-content p,
.policy-content li {
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.policy-content ul,
.policy-content ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.policy-content li {
  margin-bottom: 0.5rem;
}

/* Thank You Page */
.thank-you {
  padding: 6rem 0;
  text-align: center;
  min-height: calc(100vh - 200px);
  display: flex;
  align-items: center;
}

.thank-you-content {
  max-width: 600px;
  margin: 0 auto;
}

.thank-you-icon {
  width: 100px;
  height: 100px;
  background: linear-gradient(135deg, var(--secondary), #4a7a6a);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 2rem;
  color: var(--white);
  font-size: 3rem;
}

.thank-you h1 {
  margin-bottom: 1rem;
  color: var(--secondary);
}

.thank-you p {
  color: var(--text-muted);
  font-size: 1.125rem;
  margin-bottom: 2rem;
}

/* Responsive */
@media (min-width: 768px) {
  .nav-desktop {
    display: block;
  }

  .header-cta {
    display: block;
  }

  .burger-btn {
    display: none;
  }

  .header-main {
    padding: 0.75rem 0;
  }

  .hero {
    padding: 5rem 0 7rem;
  }

  .testimonial-slide.active {
    flex-direction: row;
    gap: 3rem;
  }

  .testimonial-content {
    text-align: left;
  }

  .testimonial-quote::before {
    left: -1rem;
  }

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

  .cookie-content {
    flex-direction: row;
    text-align: left;
    justify-content: space-between;
  }

  .footer-content {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

@media (min-width: 1024px) {
  .products-grid {
    grid-template-columns: repeat(5, 1fr);
  }

  .faq-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .testimonial-image {
    width: 180px;
    height: 180px;
  }
}

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

.animate-fade-in-up {
  animation: fadeInUp 0.6s ease-out forwards;
}

/* Focus States for Accessibility */
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Selection */
::selection {
  background-color: var(--primary);
  color: var(--white);
}

/* Smooth Image Loading - background for lazy loaded images */
img[loading="lazy"] {
  background-color: var(--bg-alt);
}

/* Body overflow control for mobile menu */
body.menu-open {
  overflow: hidden;
}
