/* style.css - Cuddle Kingdom
   Updated: Darker, more contrasted pastel theme for better readability.
   Keep comments for maintainability.
*/

/* ---------- Variables & base ---------- */
:root {
  --bg: #d8aad8;
  /* darker, softer background */
  --card: #f0cbe5;
  /* slightly off-white for cards */
  --muted: #45008a;
  /* deeper muted color */
  --accent: #e77cbe;
  /* richer pink */
  --accent-2: #f4c67a;
  /* warmer yellow */
  --accent-3: #269cdb;
  /* deeper blue */
  --accent-4: #a8e6c1;
  /* richer mint */
  --text: #3a2a4a;
  /* darker text for contrast */
  --radius: 16px;
  --shadow: 0 8px 24px rgba(58, 42, 74, 0.15);
  /* deeper shadow */
  --max-width: 1200px;
}

* {
  box-sizing: border-box
}

html,
body {
  height: 100%
}

body {
  margin: 0;
  font-family: "Baloo 2", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  background: linear-gradient(180deg, var(--bg), #b183b1);
  /* darker gradient */
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.4;
}



/* ----------------------------------
   DARK MODE THEME VARIABLES
---------------------------------- */
body.dark-mode {
  --bg: #1a1a1a;
  --card: #2a2a2a;
  --muted: #e0e0e0;
  --accent: #ff69b4;
  --accent-2: #ffd36e;
  --accent-3: #4aa8ff;
  --accent-4: #6effc3;
  --text: #ffffff;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  background: linear-gradient(180deg, #1a1a1a, #000);
  color: var(--text);
}

/* Header in Dark Mode */
body.dark-mode .site-header {
  background: linear-gradient(90deg, #222, #111);
  border-bottom: 2px solid rgba(255, 255, 255, 0.15);
}

body.dark-mode .brand .site-title {
  color: #fff;
}
body.dark-mode .site-tag {
  color: #ccc;
}

/* Nav Buttons */
body.dark-mode .nav-btn {
  color: #eee;
}
body.dark-mode .nav-btn:hover {
  color: #fff;
}

/* Cards + Product Boxes */
body.dark-mode .product-card {
  background: #2b2b2b;
  border-color: rgba(255, 255, 255, 0.2);
}

/* Contact section cards */
body.dark-mode .contact-info,
body.dark-mode .contact-form {
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(10px);
}

body.dark-mode .contact-form input,
body.dark-mode .contact-form textarea {
  background: #333;
  color: #fff;
}

/* Map border shadow */
body.dark-mode .map-container {
  box-shadow: 0 8px 18px rgba(255, 255, 255, 0.1);
}

/* Social buttons */
body.dark-mode .social {
  background: #333;
}
body.dark-mode .social:hover {
  background: #444;
}

/* Toast */
body.dark-mode .toast {
  color: #fff;
}

/* ----------------------------------
   DARK MODE for Contact Section
---------------------------------- */
body.dark-mode .contact-wrapper {
  background: linear-gradient(145deg, #1a1a1a, #000);
  box-shadow: var(--shadow);
}

/* Left + Right Side */
body.dark-mode .left-side,
body.dark-mode .right-side {
  color: #fff;
}

/* Contact Info + Form Cards */
body.dark-mode .contact-info,
body.dark-mode .contact-form {
  background: rgba(255, 255, 255, 0.07);
  box-shadow: 0 5px 15px rgba(255,255,255,0.08);
  color: #fff;
}

/* Inputs */
body.dark-mode .contact-form input,
body.dark-mode .contact-form textarea {
  background: #2b2b2b;
  color: #f5f5f5;
  box-shadow: 0 3px 8px rgba(255,255,255,0.08);
}

body.dark-mode .contact-form input::placeholder,
body.dark-mode .contact-form textarea::placeholder {
  color: #ccc;
}

/* Social Buttons */
body.dark-mode .social {
  background: #333;
  color: #fff;
}

body.dark-mode .social:hover {
  background: #444;
  box-shadow: 0 6px 18px rgba(255,255,255,0.15);
}

/* Map Container */
body.dark-mode .map-container {
  box-shadow: 0 8px 18px rgba(255,255,255,0.1);
}

/* Section Header */
body.dark-mode .section-header h3 {
  color: #fff;
}
body.dark-mode .section-header .subtle {
  color: #bbb;
}




.container {
  width: 94%;
  max-width: var(--max-width);
  margin: 0 auto
}

/* ---------- Header ---------- */
.site-header {
  padding: 18px 0;
  border-bottom: 2px solid rgba(106, 90, 122, 0.2);
  /* deeper border */
  background: linear-gradient(90deg, rgba(240, 232, 240, 0.8), rgba(232, 216, 232, 0.8));
  /* darker header bg */
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px
}

.brand .site-title {
  margin: 0;
  color: #5a3b6a;
  /* darker brand color */
  letter-spacing: 0.5px;
}

.brand .site-tag {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted)
}

/* nav */
.main-nav {
  display: flex;
  gap: 10px;
  align-items: center
}

.nav-btn {
  background: transparent;
  border: 0;
  padding: 8px 12px;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  color: var(--muted);
  transition: all .18s ease;
}

.nav-btn:hover {
  transform: translateY(-2px);
  color: var(--text)
}

.nav-btn.active {
  background: linear-gradient(90deg, var(--accent-3), var(--accent));
  color: #fff;
  box-shadow: var(--shadow)
}

/* cart badge */
.cart-badge {
  background: var(--accent);
  color: #fff;
  padding: 2px 8px;
  border-radius: 999px;
  margin-left: 8px;
  font-weight: 700;
  font-size: 0.85rem;
}

/* ---------- Home / Hero ---------- */
.home-section {
  padding: 36px 0
}

.home-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: center
}

.hero-left {
  padding: 12px
}

.hero-title {
  font-size: 2rem;
  margin: 0;
  color: #6a3b6a
}

/* darker title */
.hero-slogan {
  font-size: 1.05rem;
  margin: 8px 0;
  color: var(--muted)
}

.hero-desc {
  color: var(--muted);
  margin-top: 12px
}

.hero-cta {
  margin-top: 18px;
  display: flex;
  gap: 10px;
  align-items: center
}

/* buttons */
.btn-primary {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border: 0;
  color: #3a2a4a;
  /* darker text on buttons */
  padding: 12px 18px;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform .14s ease, box-shadow .14s ease;
}

.btn-primary:hover {
  transform: translateY(-4px)
}

.btn-secondary {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  /* slightly darker secondary */
  border: 2px solid rgba(106, 90, 122, 0.3);
  /* deeper border */
  color: #3a2a4a;
  padding: 10px 14px;
  border-radius: 12px;  
  font-weight: 700;
  cursor: pointer;
}

/* ---------- Slider ---------- */
.slider {
  position: relative;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(180deg, #fdfdfd, #f0e8f0);
  /* darker slider bg */
  box-shadow: var(--shadow);
  padding: 8px;
}

.slides {
  position: relative;
  height: 320px
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .9s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.slide.active {
  opacity: 1
}

.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.95);
  border: 0;
  padding: 8px 12px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 1.6rem;
  box-shadow: 0 6px 18px rgba(58, 42, 74, 0.1);
  /* deeper shadow */
}

.slider-btn.prev {
  left: 12px
}

.slider-btn.next {
  right: 12px
}

.slider-dots {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 12px;
  display: flex;
  gap: 6px
}

.slider-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(106, 90, 122, 0.3);
  cursor: pointer
}

/* deeper dots */
.slider-dot.active {
  background: var(--accent)
}

/* ---------- Products ---------- */
.section {
  padding: 28px 0
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px
}

.section-header h3 {
  margin: 0
}

.subtle {
  color: var(--muted);
  font-size: 0.95rem
}

.products-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(4, 1fr);
  /* desktop default */
}

/* Product card */
.product-card {
  background: var(--card);
  border-radius: 14px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease;
  border: 1px solid rgba(160, 140, 180, 0.4);
  /* deeper border */
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 36px rgba(58, 42, 74, 0.2)
}

.product-media {
  width: 100%;
  padding: 8px 0
}

.product-media img {
  width: 140px;
  height: 140px;
  object-fit: cover;
  border-radius: 12px;
  background: linear-gradient(180deg, #fdfdfd, #f0e8f0);
  margin: 0 auto
}

.product-title {
  font-weight: 700;
  margin: 10px 0 6px;
  font-size: 1rem;
  color: #5a3b6a
}

/* darker title */
.product-price {
  color: #4a5a3a;
  font-weight: 800;
  margin-bottom: 8px
}

/* darker price */
.product-actions {
  display: flex;
  gap: 8px;
  align-items: center
}

/* Add to cart cute button */
.add-btn {
  background: linear-gradient(90deg, var(--accent-4), var(--accent));
  border: 0;
  padding: 8px 12px;
  border-radius: 12px;
  color: #3a2a4a;
  font-weight: 700;
  cursor: pointer;
  transition: transform .12s ease;
  box-shadow: 0 8px 20px rgba(106, 90, 122, 0.15)
}

.add-btn:hover {
  transform: scale(1.04)
}

.qty-indicator {
  font-weight: 700;
  color: var(--muted)
}

/* ---------- Cart styles ---------- */
.cart-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 60;
}

.cart-modal[aria-hidden="false"] {
  display: block;
}

.cart-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(26, 18, 34, 0.4);
  z-index: 60;
  /* BACKDROP */
}

.cart-panel {
  position: fixed;
  right: 0;
  top: 0;
  height: 100%;
  width: 420px;
  background: linear-gradient(180deg, #fdfdfd, #f0e8f0);
  box-shadow: -12px 0 40px rgba(58, 42, 74, 0.15);
  display: flex;
  flex-direction: column;

  padding: 16px;
  border-radius: 16px 0 0 16px;
  overflow: hidden;

  z-index: 70;
  /* PANEL ABOVE BACKDROP */
}

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(106, 90, 122, 0.1);
  padding-bottom: 8px
}

.close-cart {
  background: transparent;
  border: 0;
  font-size: 1.4rem;
  cursor: pointer
}

.cart-items {
  flex: 1;
  overflow: auto;
  padding: 12px 6px
}

.cart-row {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px 6px;
  border-bottom: 1px dashed rgba(106, 90, 122, 0.2)
}

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

.cart-meta {
  flex: 1
}

.cart-qty {
  display: flex;
  gap: 6px;
  align-items: center
}

.qty-btn {
  background: #fdfdfd;
  border: 1px solid rgba(106, 90, 122, 0.4);
  padding: 6px 8px;
  border-radius: 8px;
  cursor: pointer
}

/* darker buttons */
.cart-total {
  font-weight: 900;
  color: #3a2a4a
}

/* darker total */
.cart-footer {
  border-top: 1px solid rgba(106, 90, 122, 0.1);
  padding-top: 12px
}
/* ---------- Toast ---------- */
.toast {
  position: fixed;
  right: 20px;
  bottom: 22px;
  background: linear-gradient(90deg, var(--accent-3), var(--accent));
  color: #3a2a4a;
  padding: 12px 18px;
  border-radius: 12px;
  box-shadow: var(--shadow);
  transform: translateY(18px);
  opacity: 0;
  transition: opacity .24s ease, transform .24s ease;
  z-index: 80
}

.toast.show {
  opacity: 1;
  transform: translateY(0)
}
/* ---------- Section Header ---------- */
.section-header h3 {
  font-size: 2rem;
  color: #4b2a65;
  margin-bottom: 8px;
}

.section-header .subtle {
  color: #6a3b9a;
  font-size: 1rem;
}

/* ---------- Main Wrapper ---------- */
.contact-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  padding: 35px;
  margin-top: 25px;
  border-radius: 20px;
  background: linear-gradient(145deg, #6a3b9a, #f4e8f4);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.12);
}

/* FIXED → Left Side takes 35% (contact info + form stacked) */
.left-side {
  width: 35%;
  display: flex;
  flex-direction: column;
  gap: 25px;
}

/* Contact Info Card */
.contact-info {
  background: rgba(255, 255, 255, 0.18);
  padding: 20px;
  border-radius: 15px;
  backdrop-filter: blur(8px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

/* Contact Form Card */
.contact-form {
  background: rgba(255, 255, 255, 0.18);
  padding: 20px;
  border-radius: 15px;
  backdrop-filter: blur(8px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.15);
  display: flex;
  flex-direction: column;
  gap: 15px;
}

/* ---------- Right Side (Map) ---------- */
.right-side {
  width: 65%;
}

.map-container {
  width: 100%;
  height: 820px;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 8px 18px rgba(0,0,0,0.15);
}

.map-container iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---------- Inputs ---------- */
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px 15px;
  border-radius: 10px;
  border: none;
  background: #fff;
  font-size: 0.95rem;
  color: #333;
  box-shadow: 0 3px 8px rgba(0,0,0,0.08);
}

.contact-form textarea {
  resize: none;
}

/* ---------- Social Buttons ---------- */
.socials {
  display: flex;
  gap: 12px;
  margin-top: 15px;
  flex-wrap: wrap;
}

.social {
  background: #6a3b9a;
  padding: 10px 18px;
  border-radius: 12px;
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: 0.2s ease-in-out;
}

.social:hover {
  background: #4b227d;
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.14);
}

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .contact-wrapper {
    flex-direction: column;
  }

  .left-side,
  .right-side {
    width: 100%;
  }

  .map-container {
    height: 300px;
  }
}


/* ---------- Responsive ---------- */
@media (max-width:1024px) {
  .products-grid {
    grid-template-columns: repeat(3, 1fr)
  }

  .home-grid {
    grid-template-columns: 1fr;
    gap: 18px
  }

  .slider {
    max-width: 100%
  }
}

@media (max-width:700px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr)
  }

  .header-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px
  }

  .cart-panel {
    width: 100%;
    max-width: 420px;
    border-radius: 0
  }

  .slides {
    height: 220px
  }
}

@media (max-width:420px) {
  .product-media img {
    width: 120px;
    height: 120px
  }

  .slides {
    height: 180px
  }

  .site-title {
    font-size: 1.2rem
  }
}