/* ===========================
   CLEAN MINIMAL DESIGN
   Inspired by Recipe by Rosie
   =========================== */

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

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=DM+Serif+Display:wght@400&display=swap');

:root {
  --primary-color: #e91e63;
  --text-color: #ad1457;
  --text-light: #f48fb1;
  --bg-color: #ffffff;
  --bg-light: #fce4ec;
  --border-color: #f8bbd9;
  --accent-hover: #880e4f;
  --transition: all 0.3s ease;
  --transition-fast: all 0.15s ease;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--bg-color);
  font-weight: 400;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--text-color);
}

/* ===========================
   Skip Link (Accessibility)
   =========================== */

.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary-color);
  color: white;
  padding: 8px 16px;
  text-decoration: none;
  z-index: 100;
}

.skip-link:focus {
  top: 0;
}

/* ===========================
   Container
   =========================== */

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

@media (max-width: 768px) {
  .container {
    padding: 0 20px;
  }
}

/* ===========================
   Header & Navigation
   =========================== */

header {
  background: var(--bg-color);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 50;
  transition: var(--transition);
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  padding-bottom: 24px;
}

.logo a {
  text-decoration: none;
  color: inherit;
}

nav {
  display: flex;
  justify-content: center;
  flex: 1;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 40px;
}

nav a {
  text-decoration: none;
  color: var(--text-color);
  font-weight: 400;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: var(--transition-fast);
  padding: 8px 0;
  position: relative;
}

nav a:hover,
nav a.active {
  color: var(--text-light);
}

.cart-button {
  flex-shrink: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  position: relative;
  transition: var(--transition-fast);
}

.cart-button svg {
  width: 24px;
  height: 24px;
  stroke: var(--text-color);
  stroke-width: 1.5;
}

.cart-button:hover svg {
  stroke: var(--text-light);
}

.cart-count {
  position: absolute;
  top: 0;
  right: 0;
  background: var(--text-color);
  color: white;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  padding: 0 5px;
}

.cart-count.hidden {
  display: none;
}

/* ===========================
   Hero Section
   =========================== */

.hero {
  background: var(--bg-color);
  padding: 120px 0 100px;
  text-align: center;
}

.hero h2 {
  font-size: 56px;
  color: var(--text-color);
  margin-bottom: 24px;
  font-weight: 400;
  line-height: 1.1;
}

.hero p {
  font-size: 18px;
  color: var(--text-light);
  margin-bottom: 40px;
  font-weight: 400;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* ===========================
   Buttons
   =========================== */

.btn {
  display: inline-block;
  padding: 16px 32px;
  text-decoration: none;
  border-radius: 0;
  font-weight: 500;
  transition: var(--transition);
  cursor: pointer;
  border: 1px solid var(--text-color);
  font-size: 14px;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-family: 'DM Sans', sans-serif;
  background: transparent;
}

.btn-primary {
  background: var(--text-color);
  color: white;
  border-color: var(--text-color);
}

.btn-primary:hover,
.btn-primary:focus {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.btn-secondary {
  background: transparent;
  color: var(--text-color);
  border-color: var(--text-color);
}

.btn-secondary:hover {
  background: var(--text-color);
  color: white;
}

.btn-small {
  padding: 12px 24px;
  font-size: 13px;
}

.btn-full {
  width: 100%;
  text-align: center;
}

/* ===========================
   Features Section
   =========================== */

.features {
  padding: 80px 0;
  background: var(--bg-color);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 60px;
  margin-top: 60px;
}

.feature {
  text-align: center;
  padding: 0;
}

.feature h3 {
  font-size: 24px;
  margin-bottom: 16px;
  color: var(--text-color);
}

.feature p {
  color: var(--text-light);
  font-size: 15px;
  line-height: 1.7;
}

/* ===========================
   Products & Recipes Pages
   =========================== */

.products-hero,
.recipes-hero,
.about-hero,
.contact-hero {
  background: var(--bg-color);
  padding: 80px 0 60px;
  text-align: center;
  border-bottom: 1px solid var(--border-color);
}

.products-hero h2,
.recipes-hero h2,
.about-hero h2,
.contact-hero h2 {
  font-size: 48px;
  color: var(--text-color);
  margin-bottom: 16px;
  font-weight: 400;
}

.lead {
  font-size: 16px;
  color: var(--text-light);
}

.products-section,
.recipes-section {
  padding: 80px 0;
}

.product-category,
.recipe-category {
  margin-bottom: 100px;
}

.category-title {
  font-size: 32px;
  color: var(--text-color);
  margin-bottom: 12px;
  text-align: center;
  font-weight: 400;
}

.category-description {
  text-align: center;
  color: var(--text-light);
  font-size: 15px;
  margin-bottom: 60px;
}

.products-grid,
.recipes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 40px;
  margin-top: 60px;
}

.product-card,
.recipe-card {
  background: var(--bg-color);
  overflow: hidden;
  transition: var(--transition);
}

.product-card:hover,
.recipe-card:hover {
  transform: translateY(-4px);
}

.product-image,
.recipe-image {
  width: 100%;
  height: 320px;
  overflow: hidden;
  background: var(--bg-light);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.product-image img,
.recipe-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.product-card:hover .product-image img,
.recipe-card:hover .recipe-image img {
  transform: scale(1.05);
}

.product-info,
.recipe-info {
  padding: 32px 0;
  text-align: center;
}

.product-info h4,
.recipe-info h4 {
  font-size: 20px;
  color: var(--text-color);
  margin-bottom: 12px;
  font-weight: 400;
}

.product-description,
.recipe-description {
  color: var(--text-light);
  font-size: 14px;
  margin-bottom: 20px;
  line-height: 1.6;
}

.product-price,
.recipe-price {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 24px;
  font-family: 'DM Sans', sans-serif;
}

.recipe-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--text-color);
  color: white;
  padding: 8px 16px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.recipe-includes {
  list-style: none;
  padding: 0;
  margin: 20px 0;
  font-size: 13px;
  color: var(--text-light);
  text-align: left;
}

.recipe-includes li {
  padding: 4px 0;
}

.recipe-includes li::before {
  content: "• ";
  margin-right: 8px;
}

.recipes-intro {
  max-width: 700px;
  margin: 0 auto 80px;
  text-align: center;
  font-size: 15px;
  color: var(--text-color);
  line-height: 1.7;
}

/* ===========================
   Order/Recipe Notes
   =========================== */

.order-note,
.recipe-note {
  background: var(--bg-light);
  padding: 40px;
  margin-top: 80px;
  text-align: center;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.order-note p,
.recipe-note p {
  margin: 8px 0;
  font-size: 14px;
  color: var(--text-color);
}

.recipe-note h3 {
  font-size: 24px;
  color: var(--text-color);
  margin-bottom: 16px;
  font-weight: 400;
}

.order-note strong {
  font-weight: 600;
}

/* ===========================
   About & Contact Pages
   =========================== */

.about-content,
.contact-content {
  padding: 80px 0;
}

.about-text,
.contact-info {
  max-width: 700px;
  margin: 0 auto;
}

.about-text h3,
.contact-info h3 {
  font-size: 32px;
  color: var(--text-color);
  margin-top: 60px;
  margin-bottom: 20px;
  font-weight: 400;
}

.about-text h3:first-child,
.contact-info h3:first-child {
  margin-top: 0;
}

.about-text p,
.contact-info > p {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-color);
  margin-bottom: 20px;
}

.contact-methods {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 40px;
  margin: 60px 0;
}

.contact-method {
  background: var(--bg-light);
  padding: 40px;
  text-align: center;
  transition: var(--transition);
}

.contact-method:hover {
  background: var(--bg-color);
  box-shadow: 0 0 0 1px var(--border-color);
}

.contact-method h4 {
  font-size: 20px;
  color: var(--text-color);
  margin-bottom: 12px;
  font-weight: 400;
}

.contact-method p {
  margin: 8px 0;
  font-size: 14px;
}

.contact-method a {
  color: var(--text-color);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
}

.contact-method a:hover {
  color: var(--text-light);
}

.contact-note {
  font-size: 13px;
  color: var(--text-light);
  font-style: italic;
}

.contact-cta {
  background: var(--bg-light);
  padding: 40px;
  margin-top: 60px;
  text-align: center;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.contact-cta h3 {
  font-size: 24px;
  color: var(--text-color);
  margin-bottom: 20px;
  font-weight: 400;
}

.contact-cta p {
  margin: 8px 0;
  font-size: 14px;
}

.note {
  font-size: 13px;
  color: var(--text-light);
  font-style: italic;
  margin-top: 16px;
}

/* ===========================
   Footer
   =========================== */

footer {
  background: var(--bg-color);
  padding: 60px 0;
  text-align: center;
  border-top: 1px solid var(--border-color);
  margin-top: 100px;
}

footer p {
  margin: 8px 0;
  color: var(--text-color);
  font-size: 14px;
}

footer a {
  color: var(--text-color);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
}

footer a:hover,
footer a:focus {
  color: var(--text-light);
}

.copyright {
  font-size: 13px;
  color: var(--text-light);
  margin-top: 16px;
}

/* ===========================
   Floating Cart
   =========================== */

.cart-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  z-index: 99;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.cart-overlay.active {
  opacity: 1;
  visibility: visible;
}

.floating-cart {
  position: fixed;
  top: 0;
  right: -400px;
  width: 400px;
  height: 100vh;
  background: white;
  box-shadow: -2px 0 20px rgba(0, 0, 0, 0.1);
  z-index: 100;
  transition: right 0.3s ease;
  display: flex;
  flex-direction: column;
}

.floating-cart.active {
  right: 0;
}

.cart-header {
  background: var(--text-color);
  color: white;
  padding: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
}

.cart-header h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 400;
}

.close-cart {
  background: transparent;
  border: none;
  color: white;
  font-size: 28px;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.close-cart:hover {
  opacity: 0.7;
}

.cart-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

.cart-items-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cart-items-list .empty-cart {
  text-align: center;
  color: var(--text-light);
  padding: 40px 16px;
  font-style: italic;
  font-size: 14px;
}

.cart-item {
  background: var(--bg-light);
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.cart-item-info {
  flex: 1;
}

.cart-item-name {
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 4px;
  font-size: 14px;
}

.item-type-badge {
  display: inline-block;
  background: var(--text-color);
  color: white;
  font-size: 10px;
  font-weight: 600;
  padding: 3px 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-left: 8px;
}

.cart-item-price {
  color: var(--text-light);
  font-size: 13px;
}

.box-item-quantity {
  display: flex;
  align-items: center;
  gap: 8px;
}

.quantity-btn {
  background: var(--text-color);
  color: white;
  border: none;
  width: 28px;
  height: 28px;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.quantity-btn:hover {
  background: var(--accent-hover);
}

.quantity-number {
  min-width: 30px;
  text-align: center;
  font-weight: 600;
  color: var(--text-color);
  font-size: 14px;
}

.remove-cart-item {
  background: transparent;
  color: var(--text-light);
  border: none;
  padding: 8px;
  cursor: pointer;
  font-size: 18px;
  transition: var(--transition-fast);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.remove-cart-item:hover {
  color: var(--text-color);
}

.cart-footer {
  border-top: 1px solid var(--border-color);
  padding: 24px;
  background: var(--bg-color);
}

.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}

.total-price {
  color: var(--text-color);
}

.btn-full {
  margin-bottom: 12px;
}

.btn-full:last-child {
  margin-bottom: 0;
}

/* ===========================
   Responsive Design
   =========================== */

@media (max-width: 768px) {
  header .container {
    flex-wrap: wrap;
    gap: 20px;
  }

  nav {
    order: 3;
    width: 100%;
  }

  nav ul {
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .hero h2 {
    font-size: 36px;
  }

  .hero p {
    font-size: 16px;
  }

  .hero {
    padding: 80px 0 60px;
  }

  .feature-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .products-hero h2,
  .recipes-hero h2,
  .about-hero h2,
  .contact-hero h2 {
    font-size: 32px;
  }

  .products-grid,
  .recipes-grid {
    grid-template-columns: 1fr;
    gap: 60px;
  }

  .category-title {
    font-size: 28px;
  }

  .contact-methods {
    grid-template-columns: 1fr;
  }

  .floating-cart {
    width: 100%;
    right: -100%;
  }
}

@media (max-width: 480px) {
  .logo {
    font-size: 20px;
  }

  nav ul {
    gap: 16px;
  }

  nav a {
    font-size: 12px;
  }

  .hero h2 {
    font-size: 28px;
  }

  .btn {
    padding: 14px 28px;
    font-size: 13px;
  }

  .container {
    padding: 0 16px;
  }
}

/* ===========================
   Focus Styles (Accessibility)
   =========================== */

a:focus,
button:focus,
.btn:focus {
  outline: 2px solid var(--text-color);
  outline-offset: 2px;
}

/* ===========================
   Additional Utility Classes
   =========================== */

.btn-add-to-box,
.btn-add-recipe {
  background: var(--text-color);
  color: white;
  border: 1px solid var(--text-color);
}

.btn-add-to-box:hover,
.btn-add-recipe:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

#clear-cart {
  margin-bottom: 12px;
}

/* ===========================
   Smooth Animations
   =========================== */

/* Fade in animation for page load */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

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

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Apply animations to elements */
body {
  animation: fadeIn 0.6s ease-out;
}

header {
  animation: fadeInDown 0.8s ease-out;
}

.hero {
  animation: fadeInUp 0.8s ease-out 0.1s backwards;
}

.hero h2 {
  animation: fadeInUp 1s ease-out 0.2s backwards;
}

.hero p {
  animation: fadeInUp 1s ease-out 0.3s backwards;
}

.hero .btn {
  animation: fadeInUp 1s ease-out 0.4s backwards;
}

.feature {
  animation: fadeInUp 0.8s ease-out backwards;
}

.feature:nth-child(1) {
  animation-delay: 0.2s;
}

.feature:nth-child(2) {
  animation-delay: 0.3s;
}

.feature:nth-child(3) {
  animation-delay: 0.4s;
}

.product-card,
.recipe-card {
  animation: fadeInUp 0.7s ease-out backwards;
}

.product-card:nth-child(1),
.recipe-card:nth-child(1) {
  animation-delay: 0.1s;
}

.product-card:nth-child(2),
.recipe-card:nth-child(2) {
  animation-delay: 0.2s;
}

.product-card:nth-child(3),
.recipe-card:nth-child(3) {
  animation-delay: 0.3s;
}

.product-card:nth-child(4),
.recipe-card:nth-child(4) {
  animation-delay: 0.4s;
}

.product-card:nth-child(5),
.recipe-card:nth-child(5) {
  animation-delay: 0.5s;
}

.products-hero,
.recipes-hero,
.about-hero,
.contact-hero,
.subscription-hero {
  animation: fadeInUp 0.8s ease-out 0.1s backwards;
}

.category-title {
  animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

.category-description {
  animation: fadeInUp 0.8s ease-out 0.3s backwards;
}

.pricing-card {
  animation: scaleIn 0.8s ease-out backwards;
}

.pricing-card:nth-child(1) {
  animation-delay: 0.2s;
}

.pricing-card:nth-child(2) {
  animation-delay: 0.3s;
}

.about-text h3,
.contact-info h3 {
  animation: fadeInUp 0.7s ease-out backwards;
}

.about-text p,
.contact-info p {
  animation: fadeInUp 0.7s ease-out 0.1s backwards;
}

.contact-method {
  animation: fadeInUp 0.7s ease-out backwards;
}

.contact-method:nth-child(1) {
  animation-delay: 0.2s;
}

.contact-method:nth-child(2) {
  animation-delay: 0.3s;
}

footer {
  animation: fadeIn 1s ease-out 0.5s backwards;
}

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

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  html {
    scroll-behavior: auto;
  }
}
