/* ============================================================
   KNOTTED & KIND — Global Stylesheet (style.css)
   v2 — Product images replace emoji.
   Shared across: index.html, products.html, contact.html
   ============================================================ */

/* ============================================================
   1. CSS VARIABLES & DESIGN TOKENS
   ============================================================ */
:root {
  --cream:      #faf6f1;
  --beige:      #ede6d9;
  --blush:      #e8c9c0;
  --dusty:      #d4a9a0;
  --sage:       #b8c4b1;
  --warm-gray:  #a89b8c;
  --dark:       #3d3530;
  --mid:        #7a6b5f;
  --radius:     1rem;
  --shadow-sm:  0 4px 16px rgba(61,53,48,0.07);
  --shadow-md:  0 8px 32px rgba(61,53,48,0.1);
  --shadow-lg:  0 20px 60px rgba(61,53,48,0.12);
  --font-display: 'Cormorant Garamond', serif;
  --font-body:    'DM Sans', sans-serif;
  --transition:   0.3s ease;
}

/* ============================================================
   2. RESET & BASE
   ============================================================ */
html { scroll-behavior: smooth; }
*, *::before, *::after { box-sizing: border-box; }

body {
  background-color: var(--cream);
  color: var(--dark);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0.01em;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; }

/* ============================================================
   3. NAVBAR
   ============================================================ */
.navbar {
  background-color: rgba(250, 246, 241, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--beige);
  padding: 1rem 0;
  transition: box-shadow var(--transition);
}

.navbar.scrolled { box-shadow: 0 2px 20px rgba(61,53,48,0.08); }

.navbar-brand {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--dark) !important;
  letter-spacing: 0.03em;
}

.navbar-brand span { color: var(--dusty); font-style: italic; }

.nav-link {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mid) !important;
  padding: 0.4rem 1rem !important;
  transition: color var(--transition);
}

.nav-link:hover, .nav-link.active { color: var(--dark) !important; }
.navbar-toggler { border: none; outline: none; box-shadow: none !important; }

/* ============================================================
   4. BUTTONS
   ============================================================ */
.btn-primary-custom {
  background-color: var(--dark);
  color: var(--cream);
  border: none;
  padding: 0.85rem 2.2rem;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: 100px;
  transition: background var(--transition), transform 0.2s, box-shadow var(--transition);
  font-weight: 400;
  display: inline-block;
  cursor: pointer;
}

.btn-primary-custom:hover {
  background-color: var(--dusty);
  color: var(--cream);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(61,53,48,0.15);
}

.btn-outline-custom {
  background: transparent;
  color: var(--dark);
  border: 1px solid var(--dark);
  padding: 0.85rem 2.2rem;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: 100px;
  transition: all var(--transition);
  font-weight: 400;
  display: inline-block;
  cursor: pointer;
}

.btn-outline-custom:hover {
  background-color: var(--dark);
  color: var(--cream);
  transform: translateY(-2px);
}

.btn-wa {
  background: #25d366;
  color: #fff;
  border: none;
  padding: 0.55rem 1.2rem;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  border-radius: 100px;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: background 0.2s, transform 0.2s;
  font-weight: 400;
  cursor: pointer;
  white-space: nowrap;
}

.btn-wa:hover { background: #1da851; color: #fff; transform: translateY(-1px); }

/* ============================================================
   5. SECTION COMMON STYLES
   ============================================================ */
section { padding: 6rem 0; }

.section-label {
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--dusty);
  font-weight: 500;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 300;
  line-height: 1.2;
  color: var(--dark);
}

.section-divider {
  width: 48px;
  height: 2px;
  background: var(--blush);
  margin: 1.5rem 0;
}

/* ============================================================
   6. PRODUCT CARDS — Real photo layout
   ============================================================ */
.product-card {
  background: var(--cream);
  border: 1px solid var(--beige);
  border-radius: calc(var(--radius) * 1.2);
  overflow: hidden;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
  cursor: pointer;
  height: 100%;
  display: flex;
  flex-direction: column;
}

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

/* Image wrapper — fixed square aspect ratio */
.product-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background-color: var(--beige); /* shown while image loads */
  flex-shrink: 0;
}

/* The actual <img> inside every card */
.product-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;          /* fills the square, crops cleanly */
  object-position: center;
  display: block;
  transition: transform 0.45s ease;
}

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

/* Image loading skeleton shimmer */
.product-img-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--beige) 25%, #f5f0ea 50%, var(--beige) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.6s infinite;
  z-index: 0;
}

/* Once the image loads it sits above the shimmer */
.product-photo { position: relative; z-index: 1; }

@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}

/* Badges — positioned over the image */
.product-badge {
  position: absolute;
  top: 0.8rem;
  left: 0.8rem;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.25rem 0.65rem;
  border-radius: 100px;
  font-weight: 500;
  z-index: 3;
  backdrop-filter: blur(4px);
}

.badge-hot  { background: rgba(212,169,160,0.92); color: #fff; }
.badge-new  { background: rgba(184,196,177,0.92); color: var(--dark); }
.badge-sale { background: rgba(232,180,160,0.92); color: var(--dark); }

/* Wishlist button — top-right corner of image */
.btn-wishlist {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 34px;
  height: 34px;
  background: rgba(250,246,241,0.88);
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  color: var(--dusty);
  cursor: pointer;
  transition: all 0.2s;
  z-index: 3;
  backdrop-filter: blur(4px);
}

.btn-wishlist:hover { background: var(--cream); color: #e05a5a; transform: scale(1.1); }
.btn-wishlist.active { color: #e05a5a; }

/* Card body text */
.product-body {
  padding: 1.3rem 1.4rem 1.4rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-category {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--dusty);
  margin-bottom: 0.25rem;
  font-weight: 500;
}

.product-name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 400;
  margin-bottom: 0.45rem;
  color: var(--dark);
  line-height: 1.2;
}

.product-desc {
  font-size: 0.82rem;
  color: var(--mid);
  line-height: 1.65;
  margin-bottom: 1.1rem;
  flex: 1;
  /* Clamp to 2 lines */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  gap: 0.5rem;
}

.product-price {
  font-family: var(--font-display);
  font-size: 1.45rem;
  color: var(--dusty);
  line-height: 1;
}

.price-original {
  font-size: 0.82rem;
  color: var(--warm-gray);
  text-decoration: line-through;
  margin-left: 0.3rem;
  font-family: var(--font-body);
}

/* ============================================================
   7. PAGE HERO (products.html & contact.html)
   ============================================================ */
.page-hero {
  background: linear-gradient(135deg, var(--beige) 0%, #f0ddd5 100%);
  padding: 5rem 0 3.5rem;
  position: relative;
  overflow: hidden;
}

.breadcrumb-custom {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--warm-gray);
}

.breadcrumb-custom a { color: var(--dusty); }
.breadcrumb-custom span { margin: 0 0.5rem; }

.page-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 300;
  color: var(--dark);
  line-height: 1.1;
}

.page-subtitle { color: var(--mid); font-size: 0.95rem; max-width: 500px; }

/* ============================================================
   8. FOOTER
   ============================================================ */
footer {
  background-color: var(--dark);
  color: var(--cream);
  padding: 4rem 0 1.5rem;
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 300;
  margin-bottom: 0.8rem;
}

.footer-brand span { color: var(--dusty); font-style: italic; }
.footer-tagline { font-size: 0.82rem; color: rgba(250,246,241,0.5); }

.footer-heading {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--dusty);
  margin-bottom: 1.2rem;
  font-weight: 500;
}

.footer-link {
  display: block;
  font-size: 0.88rem;
  color: rgba(250,246,241,0.65);
  margin-bottom: 0.5rem;
  transition: color 0.2s;
}

.footer-link:hover { color: var(--cream); }

.footer-social a {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(250,246,241,0.6);
  margin-right: 0.5rem;
  transition: all 0.2s;
  font-size: 0.85rem;
}

.footer-social a:hover {
  border-color: var(--dusty);
  color: var(--dusty);
  transform: translateY(-2px);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 1.5rem;
  margin-top: 3rem;
  font-size: 0.78rem;
  color: rgba(250,246,241,0.35);
}

/* ============================================================
   9. WHATSAPP FLOATING BUTTON
   ============================================================ */
.wa-float {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 58px;
  height: 58px;
  background: #25d366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #fff;
  box-shadow: 0 8px 24px rgba(37,211,102,0.35);
  z-index: 9999;
  transition: transform var(--transition), box-shadow var(--transition);
  animation: pulse-wa 3s ease-in-out infinite;
}

.wa-float:hover {
  transform: scale(1.1);
  color: #fff;
  box-shadow: 0 12px 32px rgba(37,211,102,0.45);
}

@keyframes pulse-wa {
  0%,100% { box-shadow: 0 8px 24px rgba(37,211,102,0.35), 0 0 0 0 rgba(37,211,102,0.4); }
  50%      { box-shadow: 0 8px 24px rgba(37,211,102,0.35), 0 0 0 12px rgba(37,211,102,0); }
}

/* ============================================================
   10. SCROLL REVEAL ANIMATIONS
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible { opacity: 1; transform: translateY(0); }

.reveal-stagger > * {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-stagger.visible > *:nth-child(1) { opacity:1; transform:translateY(0); transition-delay: 0s; }
.reveal-stagger.visible > *:nth-child(2) { opacity:1; transform:translateY(0); transition-delay: 0.12s; }
.reveal-stagger.visible > *:nth-child(3) { opacity:1; transform:translateY(0); transition-delay: 0.24s; }
.reveal-stagger.visible > *:nth-child(4) { opacity:1; transform:translateY(0); transition-delay: 0.36s; }

/* ============================================================
   11. MARQUEE STRIP
   ============================================================ */
.marquee-strip {
  background-color: var(--dark);
  color: var(--cream);
  padding: 0.8rem 0;
  overflow: hidden;
  white-space: nowrap;
}

.marquee-track {
  display: inline-flex;
  animation: marquee 22s linear infinite;
}

.marquee-item {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 300;
  font-style: italic;
  padding: 0 2.5rem;
  opacity: 0.85;
}

.marquee-dot { color: var(--dusty); font-style: normal; }

@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ============================================================
   12. STAT BLOCKS
   ============================================================ */
.stat-block {
  text-align: center;
  padding: 1.5rem;
  background: var(--cream);
  border-radius: var(--radius);
}

.stat-num {
  font-family: var(--font-display);
  font-size: 2.5rem;
  color: var(--dusty);
  line-height: 1;
}

.stat-label { font-size: 0.78rem; color: var(--mid); letter-spacing: 0.1em; text-transform: uppercase; }

/* ============================================================
   13. FILTER BAR
   ============================================================ */
.filter-bar {
  background: var(--cream);
  border-bottom: 1px solid var(--beige);
  padding: 1rem 0;
  position: sticky;
  top: 73px;
  z-index: 100;
}

.filter-btn {
  background: transparent;
  border: 1px solid var(--beige);
  color: var(--mid);
  border-radius: 100px;
  padding: 0.35rem 1rem;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font-body);
}

.filter-btn:hover, .filter-btn.active {
  background: var(--dark);
  border-color: var(--dark);
  color: var(--cream);
}

.product-count { font-size: 0.82rem; color: var(--warm-gray); }

/* ============================================================
   14. MID-BANNER CTA
   ============================================================ */
.mid-banner {
  background: var(--dark);
  color: var(--cream);
  padding: 3rem;
  border-radius: calc(var(--radius) * 1.5);
  margin: 2rem 0 3rem;
  position: relative;
  overflow: hidden;
}

.mid-banner::before {
  content: '🧵';
  position: absolute;
  font-size: 8rem;
  right: 2rem;
  top: -1rem;
  opacity: 0.08;
  pointer-events: none;
}

.mid-banner-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 300;
  margin-bottom: 0.5rem;
}

.mid-banner-title em { color: var(--blush); font-style: italic; }
.mid-banner p { font-size: 0.88rem; color: rgba(250,246,241,0.65); margin-bottom: 0; }

.btn-cream {
  background: var(--cream);
  color: var(--dark);
  border: none;
  padding: 0.75rem 1.8rem;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 100px;
  transition: all 0.2s;
  font-weight: 400;
  white-space: nowrap;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-cream:hover { background: var(--blush); color: var(--dark); }

/* ============================================================
   15. CONTACT PAGE STYLES
   ============================================================ */
.form-card {
  background: var(--cream);
  border: 1px solid var(--beige);
  border-radius: calc(var(--radius) * 1.5);
  padding: 2.5rem;
  box-shadow: var(--shadow-md);
}

.form-label {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mid);
  font-weight: 500;
  margin-bottom: 0.4rem;
}

.form-control {
  background: var(--beige);
  border: 1px solid transparent;
  border-radius: 0.65rem;
  padding: 0.8rem 1rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--dark);
  font-weight: 300;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.form-control::placeholder { color: var(--warm-gray); }

.form-control:focus {
  background: var(--cream);
  border-color: var(--dusty);
  box-shadow: 0 0 0 3px rgba(212,169,160,0.18);
  outline: none;
}

.form-control.is-valid  { border-color: var(--sage); background: var(--cream); box-shadow: none; }
.form-control.is-invalid { border-color: #c97c6a; background: var(--cream); box-shadow: none; }

.invalid-feedback { font-size: 0.75rem; color: #c97c6a; margin-top: 0.3rem; }

textarea.form-control { resize: vertical; min-height: 130px; }

.btn-submit {
  background-color: var(--dark);
  color: var(--cream);
  border: none;
  padding: 0.9rem 2.4rem;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: 100px;
  width: 100%;
  transition: background var(--transition), transform 0.2s;
  font-weight: 400;
  cursor: pointer;
}

.btn-submit:hover { background-color: var(--dusty); transform: translateY(-2px); }

.success-msg {
  display: none;
  background: #e6f4ea;
  border: 1px solid #b8d9be;
  border-radius: var(--radius);
  padding: 1.2rem 1.5rem;
  color: #3a6b42;
  font-size: 0.88rem;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1.5rem;
}

.success-msg.show { display: flex; }

.char-counter { font-size: 0.72rem; color: var(--warm-gray); text-align: right; margin-top: 0.3rem; }

.info-card {
  background: var(--beige);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  transition: transform var(--transition), box-shadow var(--transition);
}

.info-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

.info-icon {
  width: 46px; height: 46px;
  background: var(--blush);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
  color: var(--dark);
}

.info-label { font-size: 0.7rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--dusty); margin-bottom: 0.2rem; font-weight: 500; }
.info-value { font-size: 0.9rem; color: var(--dark); line-height: 1.5; }
.info-note  { font-size: 0.78rem; color: var(--mid); margin-top: 0.2rem; }

.faq-item { border-bottom: 1px solid var(--beige); padding: 1.3rem 0; }

.faq-question {
  font-family: var(--font-display);
  font-size: 1.15rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  user-select: none;
}

.faq-icon { color: var(--dusty); font-size: 0.9rem; transition: transform var(--transition); flex-shrink: 0; }

.faq-answer { font-size: 0.88rem; color: var(--mid); max-height: 0; overflow: hidden; transition: max-height 0.4s ease, padding 0.3s ease; }

.faq-item.open .faq-answer { max-height: 200px; padding-top: 0.8rem; }
.faq-item.open .faq-icon   { transform: rotate(45deg); }

/* ============================================================
   16. EMPTY STATE
   ============================================================ */
.empty-state {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--mid);
}

.empty-state i { font-size: 3rem; color: var(--blush); margin-bottom: 1rem; display: block; }
.empty-state p { font-family: var(--font-display); font-size: 1.2rem; }

/* ============================================================
   17. TOAST NOTIFICATION
   ============================================================ */
.toast-notify {
  position: fixed;
  bottom: 6rem;
  right: 2rem;
  background: var(--dark);
  color: var(--cream);
  padding: 0.8rem 1.5rem;
  border-radius: 100px;
  font-size: 0.82rem;
  z-index: 10000;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none;
}

.toast-notify.show { opacity: 1; transform: translateY(0); }

/* ============================================================
   18. RESPONSIVE
   ============================================================ */
@media (max-width: 992px) { section { padding: 5rem 0; } }

@media (max-width: 768px) {
  section { padding: 4rem 0; }
  .page-hero { padding: 4rem 0 2.5rem; }
  .form-card { padding: 1.8rem; }
  .mid-banner { padding: 2rem; }
}

@media (max-width: 576px) {
  .product-footer { flex-direction: column; align-items: flex-start; gap: 0.8rem; }
  .btn-wa { width: 100%; justify-content: center; }
}
