/* ===== GLOBAL RESET ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  overflow-x: hidden; /* prevent mobile cut-off */
  font-family: 'Urbanist', sans-serif;
  background-color: #f4efe9;
  color: #1a1a1a;
  line-height: 1.6;
}

/* ===== HEADER ===== */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 5vw;
  background-color: #fff;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  width: 100%;
  overflow-x: auto; /* allows horizontal scroll if needed */
}

.header::-webkit-scrollbar {
  display: none;
}

.logo-container {
  display: flex;
  align-items: center;
  text-decoration: none;
}

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

.brand-name {
  color: #503234;
  font-weight: bold;
  font-size: 1.4rem;
  margin-left: 10px;
}

/* ===== NAVIGATION MENU ===== */
.nav-menu ul {
  display: flex;
  list-style: none;
  align-items: center;
  overflow-x: auto;
  padding: 0;
  margin: 0;
}

.nav-menu ul li {
  margin-left: 25px;
  flex-shrink: 0; /* prevents shrinking on small screens */
}

.nav-menu ul li a {
  text-decoration: none;
  color: #1a1a1a;
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.3s ease;
}

.nav-menu ul li a:hover,
.nav-menu ul li a.active {
  color: #503234;
}

/* ===== CART ICON ===== */
.cart-icon {
  position: relative;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.cart-icon img.cart-img {
  width: 32px;
  height: 32px;
  transition: transform 0.3s ease;
}

.cart-icon:hover img.cart-img {
  transform: scale(1.1);
}

/* Cart Count Bubble */
.cart-count {
  position: absolute;
  top: -6px;
  right: -6px;
  background-color: #d62828;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: none;

}

/* ===== CART PAGE ===== */
.cart-page {
  max-width: 800px;
  margin: 40px auto;
  padding: 0 20px;
}

.cart-page h1 {
  text-align: center;
  color: #503234;
  margin-bottom: 30px;
}

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

.cart-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: #fafafa;
  border-radius: 12px;
  padding: 10px 15px;
  border: 1px solid #ddd;
}

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

.cart-item-details {
  flex: 1;
  margin-left: 15px;
}

.cart-item-details h3 {
  font-size: 1rem;
  margin-bottom: 5px;
}

.cart-item-details p {
  font-size: 0.9rem;
  color: #503234;
}

.cart-item button {
  background: none;
  border: none;
  color: #e63946;
  font-weight: 600;
  cursor: pointer;
}

/* Total section */
.cart-total {
  text-align: right;
  margin-top: 30px;
  font-size: 1.1rem;
  font-weight: 600;
  color: #503234;
}

.checkout-btn {
  display: inline-block;
  background: #503234;
  color: #fff;
  padding: 12px 30px;
  border-radius: 25px;
  text-decoration: none;
  margin-top: 15px;
  font-weight: 600;
}

.checkout-btn:hover {
  background: #8b5e3c;
}

/* ===== SAVE FOR LATER ===== */
.save-for-later {
  margin-top: 50px;
}

.save-for-later h2 {
  color: #503234;
  margin-bottom: 20px;
}

.save-items {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

/* ===== Hero Section (Updated for Mobile Video) ===== */
.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

.hero-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
  pointer-events: none;
  background-color: #000;
}

/* Fix iOS safe-area (notch cutouts) */
@supports (padding: max(0px)) {
  .hero {
    height: calc(100vh - env(safe-area-inset-top));
  }
}

.hero-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: #fff;
  z-index: 1;
}

.hero-overlay h1 {
  font-size: 3rem;
  margin: 0 0 20px 0;
}

.btn {
  background-color: #503234;
  color: #fff;
  padding: 10px 25px;
  text-decoration: none;
  border-radius: 5px;
  font-weight: 500;
  transition: background-color 0.3s;
}

.btn:hover {
  background-color: #3b2520;
}

/* ===== Sections ===== */
.featured, .category-section, .contact {
  padding: 60px 40px;
}

.featured h2, .category-section h2, .contact h2 {
  text-align: center;
  margin-bottom: 40px;
  font-size: 2rem;
  color: #503234;
}

/* ===== Product Grid ===== */
.product-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  width: 100%;
  box-sizing: border-box;
}

.product-card {
  background-color: transparent;
  text-align: center;
  padding: 10px;
  border-radius: 8px;
  transition: transform 0.3s;
  max-width: 260px;
}

.product-card:hover {
  transform: scale(1.03);
}

.product-card img {
  width: 100%;
  border-radius: 5px;
  display: block;
}

.product-card p {
  margin: 10px 0 5px 0;
  font-weight: 500;
  color: #1a1a1a;
}

.product-card span {
  font-weight: 600;
  color: #1a1a1a;
}

/* ===== Sold Out ===== */
.sold-out {
  color: #d62828;
  font-weight: bold;
  margin-left: 5px;
  font-size: 1rem;
}

/* ===== Contact Form ===== */
.contact-intro {
  text-align: center;
  margin-bottom: 40px;
}

.contact-form {
  max-width: 600px;
  margin: 0 auto;
}

.contact-form .form-row {
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
}

.contact-form input, .contact-form textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
}

.contact-form button.btn {
  width: 100%;
  margin-top: 15px;
}

/* ===== Footer ===== */
.footer {
  text-align: center;
  padding: 20px 0;
  background-color: #fff;
  color: #1a1a1a;
  position: relative;
  width: 100%;
  overflow: visible;
  box-sizing: border-box;
}

.footer .tiktok-link {
  display: inline-block;
  margin-left: 10px;
}

.footer .tiktok-link img {
  width: 30px;
  height: auto;
  vertical-align: middle;
  transition: transform 0.3s ease;
}

.footer .tiktok-link img:hover {
  transform: scale(1.1);
}

/* ===== Fade-in Animations ===== */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== About & Donate Page Specific Styling ===== */
.about-hero {
  background-color: #eae2dc;
  text-align: center;
  padding: 80px 20px;
}

.about-hero h2 {
  font-size: 2.5rem;
  margin-bottom: 10px;
  color: #503234;
}

.about-hero p {
  font-size: 1.1rem;
  color: #4b3b36;
}

.about-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 40px 20px;
}

.about-container .about-section {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 40px;
  align-items: flex-start;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.about-container .about-section img.about-img {
  max-width: 250px;
  width: 100%;
  border-radius: 8px;
  transition: transform 0.3s ease;
}

.about-container .about-section:hover img.about-img {
  transform: scale(1.03);
}

.about-container .about-section .about-text {
  flex: 1;
}

.about-container .about-section h3 {
  margin-top: 0;
  color: #503234;
  cursor: pointer;
  font-size: 1.5rem;
  position: relative;
  transition: color 0.3s ease;
}

.about-container .about-section h3:hover {
  color: #3b2520;
}

/* expandable paragraph rules (desktop hover kept, mobile uses .active via JS) */
.about-container .about-section p {
  margin-top: 10px;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: all 0.5s ease;
  color: #4b3b36;
}

@media (hover: hover) and (pointer: fine) {
  .about-container .about-section:hover p {
    max-height: 500px;
    opacity: 1;
    transition: all 0.5s ease-in-out;
  }
}

/* mobile / touch: JS should toggle .active on the .about-section element */
.about-container .about-section.active p {
  max-height: 800px;
  opacity: 1;
  transition: all 0.5s ease-in-out;
}

/* ===== Responsive Cart & Layout Adjustments ===== */
@media (max-width: 1024px) {
  .header { padding: 15px 3vw; }
  .hero-overlay h1 { font-size: 2.5rem; }
}

@media (max-width: 768px) {
  .nav-menu ul li { margin-left: 15px; }
  .hero-overlay h1 { font-size: 2rem; }
  .cart-icon img.cart-img { width: 26px; height: 26px; }
  .cart-icon #cartCount {
    top: -8px;
    right: -8px;
    font-size: 0.7rem;
  }
}

@media (max-width: 480px) {
  .hero-overlay h1 { font-size: 1.6rem; }
  .cart-icon img.cart-img { width: 22px; height: 22px; }
  .cart-icon #cartCount {
    top: -6px;
    right: -6px;
    font-size: 0.65rem;
  }

  /* keep header & footer spacing comfortable on small screens */
  .header, .footer {
    padding: 12px 4vw;
  }

}

/* ===== RESPONSIVE FIXES ===== */
@media (max-width: 768px) {
  .nav-menu ul li {
    margin-left: 15px;
  }
  .cart-icon img.cart-img {
    width: 28px;
    height: 28px;
  }
  .cart-count {
    top: -5px;
    right: -5px;
    width: 16px;
    height: 16px;
    font-size: 10px;
  }
}

@media (max-width: 480px) {
  .cart-icon img.cart-img {
    width: 24px;
    height: 24px;
  }
  .cart-count {
    top: -4px;
    right: -4px;
  }
  .product-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
}
