/* =========================
   CSS VARIABLES
========================= */
:root {
  --bg: #fefefe;
  --card-bg: #fff;
  --accent: #D8EAC4;
  --accent-dark: #8caf63;
  --text-main: #222;
  --text-muted: #666;
  --border-soft: #e6e6e6;

  /* Typography Scale */
  --font-base: 1rem; /* 16px - accessible minimum */
  --line-height-base: 1.6;
  --line-height-heading: 1.3;
}

/* =========================
   GLOBAL RESET
========================= */
* {
  box-sizing: border-box;
}
html{
  font-size: 16px; /* Base for rem units */
}

body {
  margin: 0;
  font-family: 'Poppins', sans-serif;
  background: var(--bg);
  color: var(--text-main);
  line-height: var(--line-height-base);
  font-size: var(--font-base);
}

h1,
h2,
h3,
h4 {
  font-family: 'Playfair Display', serif;
  margin: 0 0 0.5em;
  line-height: var(--line-height-heading);
  font-weight: 600;
}

/* Fluid headings with clamp for smooth responsiveness */
h1 {
  font-size: clamp(2.5rem, 6vw + 1rem, 4rem); /* 40px mobile → 64px large */
}

h2 {
  font-size: clamp(2rem, 5vw + 0.5rem, 3rem); /* 32px → 48px */
}

h3 {
  font-size: clamp(1.5rem, 4vw, 2.5rem); /* 24px → 40px */
}

h4 {
  font-size: clamp(1.25rem, 3vw, 2rem);
}

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

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

/* =========================
   HEADER
========================= */
header {
  background: #EDF6E5;
  padding: 1.2rem 2rem;
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header img {
  width: 100px;
}

nav a {
  margin-left: 1.5rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 0.5rem 0;
}

.hover-underline {
  position: relative;
  display: inline-block;
}

.hover-underline::after,
.hover-underline::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 2px;
  background: #000;
  bottom: -5px;
  left: 0;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s ease-out;
}

.hover-underline::before {
  top: -5px;
  transform-origin: left;
}

.hover-underline:hover::after,
.hover-underline:hover::before {
  transform: scaleX(1);
}

/* =========================
   HERO
========================= */
.hero {
  padding: clamp(3rem, 8vw, 6rem) 2rem;
  text-align: center;
  background:
    linear-gradient(rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.85)),
    url("../assets/Cakin-it-soft-green-pink.png");
  background-size: cover;
  background-position: center;
}

.hero h1 {
  font-size: 3rem;
}

.hero p {
  max-width: 900px;
  margin: 1.5rem auto;
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 500;
}

li {
  font-weight: 550;
  list-style-position: inside;
}

.home-hero {
  background:
    linear-gradient(rgba(255, 255, 255, 0.90), rgba(255, 255, 255, 0.90)),
    url("../assets/Cakin-it-soft-green-pink.png");
  background-position: center;
  background-size: cover;
  text-align: center;
  padding-top: 6em;
  padding-bottom: 7em;
}

/* =========================
   SHOP LAYOUT
========================= */
.shop-layout {
  max-width: 1400px;
  margin: 0 auto;
  padding: 3rem 2rem;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 40px;
}

/* =========================
   FILTER SIDEBAR
========================= */
.filter-sidebar {
  position: sticky;
  top: 120px;
}

.filter-sidebar h4 {
  font-size: 16px;
  margin-bottom: 1rem;
}

.filter-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.filter-item {
  padding: 0.8rem 1rem;
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.2s;
}

.filter-item:hover {
  background: var(--accent);
}

.filter-item.active {
  background: var(--accent-dark);
  color: white;
}

/* =========================
   PRODUCT GRID
========================= */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px;
}

.card {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  text-align: center;
  transition: transform 0.2s;
}

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

.card img {
  width: 100%;
  border-radius: 12px;
  margin-bottom: 1rem;
}

.card label {
  display: block;
  text-align: left;
  font-size: 0.9rem;
  margin: 0.8rem 0 0.3rem;
  color: var(--text-muted);
}

.card select {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 1rem;
}

.card .price {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 1rem 0;
}

.card button {
  width: 100%;
  padding: 1rem;
  background: var(--accent-dark);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.card button:hover {
  background: #7a9b57; /* Darkened version of --accent-dark */
}

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

.card .price {
  font-size: 1.25rem;
  font-weight: 600;
}

/* =========================
   GALLERY
========================= */
.gallery-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

.gallery-container h3 {
  text-align: center;
  margin-bottom: 2rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px;
}

.gallery-grid img {
  width: 100%;
  border-radius: 16px;
  cursor: pointer;
  transition: transform 0.2s;
}

.gallery-grid img:hover {
  transform: scale(1.02);
}

.hidden{
  display: none;
}

/* =========================
   MODAL FORM
========================= */
.modal-form {
  background: white;
  padding: 2rem;
  border-radius: 16px;
  width: 100%;
  max-width: 400px;
  margin: 2rem auto;
}

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

.modal-form label {
  display: block;
  margin: 1rem 0 0.4rem;
  font-size: 0.95rem;
}

.modal-form select,
.modal-form textarea {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  font-size: 1rem;
}

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

.modal-form p {
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 1rem 0;
}

.modal-form button {
  width: 100%;
  padding: 1rem;
  background: var(--accent-dark);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 1rem;
}

/* =========================
   CART
========================= */
#cart-info {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 2rem;
  text-align: center;
  color: var(--text-muted);
}

.checkout-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 2rem;
  display: flex;
  gap: 40px;
}

.cart-side,
.form-side {
  flex: 1;
  background: white;
  padding: 2rem;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.cart-side h3,
.form-side h3 {
  margin-bottom: 1.5rem;
}

.cart-item {
  border-bottom: 1px solid var(--border-soft);
  padding: 1.5rem 0;
}

.cart-item:last-child {
  border-bottom: none;
}

.cart-item-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.cart-item img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 12px;
}

.cart-details {
  flex: 1;
}

.cart-details strong {
  display: block;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.cart-details p {
  margin: 0.3rem 0;
  color: var(--text-muted);
}

.remove-btn {
  background: none;
  border: none;
  color: #dc3545;
  cursor: pointer;
  font-weight: 600;
}

.remove-btn:hover {
  text-decoration: underline;
}

/* =========================
   FORMS
========================= */
form label {
  display: block;
  margin: 1rem 0 0.5rem;
  font-size: 1rem;
  font-weight: 500;
}

form input,
form select,
form textarea,
form button {
  width: 100%;
  padding: 1rem;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  font-size: 1rem; /* Minimum 16px for accessibility */
  font-family: 'Poppins', sans-serif;
}

form textarea {
  min-height: 120px;
  resize: vertical;
}

form button {
  width: 100%;
  padding: 1rem;
  border-radius: 8px;

  background: var(--accent-dark);
  color: white;
  border: none;
  font-weight: 600;
  cursor: pointer;
  margin-top: 1.5rem;
  transition: background 0.2s;
}

form button:hover {
  background: #7a9b57;
}

/* =========================
   CONTACT
========================= */
#contact-container {
  max-width: 600px;
  margin: auto;
  padding: 3rem 2rem;
}

/* =========================
   FOOTER
========================= */
footer {
  background: #FED5C5;
  padding: 3rem 2rem;
  margin-top: 4rem;
  border-top: 1px solid var(--border-soft);
}

.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 40px;
}

.footer-inner div {
  flex: 1;
}

.footer-inner h4 {
  margin-bottom: 1rem;
}

.footer-inner p,
.footer-inner a {
  font-size: 0.9375rem; /* 15px - readable small text */
  color: var(--text-muted);
}

.footer-inner p {
  margin: 0.5rem 0;
}

.footer-inner a {
  transition: color 0.2s;
}

.footer-inner a:hover {
  color: var(--text-main);
}

/* =========================
   NAV TOGGLE (HAMBURGER)
========================= */
#nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
}

#nav-links {
  display: flex;
}

/* =========================
   MEDIA QUERIES (RESPONSIVENESS)
========================= */
@media (max-width: 768px) {
  #nav-toggle {
    display: block;
  }

  #nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
  }

  #nav-links.active {
    display: flex;
  }

  #nav-links a {
    margin-left: 0;
    padding: 1rem;
    border-bottom: 1px solid var(--border-soft);
  }

  header {
    flex-wrap: wrap;
  }

  .shop-layout {
    grid-template-columns: 1fr;
  }

  .filter-sidebar {
    position: relative;
    top: 0;
    margin-bottom: 2rem;
  }

  .filter-list {
    display: block;
    flex-wrap: wrap;
    gap: 10px;
  }

  .filter-item {
    flex: 1 0 auto;
    text-align: center;
  }

  .grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }

  .checkout-container {
    display: block;
    width: 100%;
  }

  .cart-side,
  .form-side {
    margin-bottom: 2rem;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 1.125rem;  
  }

  input, select, textarea, button {
    font-size: 1rem;
    padding: 0.8rem;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 1rem;
  }
  header {
    flex-direction: row;
    justify-content: space-between;
  }

  .hero h1 {
    font-size: 1.8rem;
  }

  .hero p {
    font-size: 1rem;
  }

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

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .gallery-grid img {
    max-width: 100%;
  }

  .footer-inner h4 {
    font-size: 1.2rem;
  }

  .footer-inner p {
    font-size: 0.9rem;
  }
}

/* =========================
   WEDDING PAGE SPECIFIC
========================= */
.wedding-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

.wedding-container p,
.wedding-container ul {
  margin-bottom: 1.5rem;
}

.wedding-container ul li {
  margin-bottom: 0.5rem;
}

.wedding-container h4{
  margin-top: 1em;;
}