/* IMPORT FONTS */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500;600&display=swap');

/* ROOT VARIABLES (LIGHT THEME) */
:root {
  --bg: #f8f3e8;
  --bg-alt: #f4ead7;
  --surface: #ffffff;
  --surface-alt: #f8f9fb;
  --footer-bg: #f4ead7;
  --text: #5a4632;
  --muted-text: #937f69;
  --border-subtle: rgba(0, 0, 0, 0.05);
  --border-strong: #dde1e7;
  --shadow: 0 8px 24px rgba(0, 0, 0, .08);
  --accent: #8b6b4a;
  --btn: #d9a565;
  --btn-hover: #c28b4e;
  --danger: #b56a6a;
  --star: #e6b947;
  --radius: 16px;
  --radius-sm: 12px;
}

/* DARK THEME */
[data-theme="dark"] {
  --bg: #171412;
  --bg-alt: #1f1b18;
  --surface: #221e1a;
  --surface-alt: #26211d;
  --footer-bg: #1f1b18;
  --text: #e8dccb;
  --muted-text: #b8a58c;
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-strong: rgba(255, 255, 255, 0.12);
  --shadow: 0 8px 16px rgba(0, 0, 0, .45);
  --accent: #d1b892;
  --btn: #b88a56;
  --btn-hover: #9f7445;
  --danger: #d78888;
}

/* BASE + TYPOGRAPHY */
html,
body {
  height: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
  scroll-behavior: smooth;
  transition: background 0.4s, color 0.4s;
}

body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  overflow-x: hidden;
}

main {
  flex: 1;
}

h1,
h2,
h3,
h4 {
  font-family: "Cormorant Garamond", serif;
  font-weight: 600;
  letter-spacing: .4px;
}

* {
  box-sizing: border-box;
  transition-timing-function: cubic-bezier(.25, .46, .45, .94);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color .2s ease;
}

a:hover {
  text-decoration: underline;
}

.container,
.container1 {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
}

.narrow {
  max-width: 560px;
}

/* BUTTONS */
button,
.btn {
  background: var(--btn);
  color: #fff;
  border: none;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 600;
  transition: background .25s ease, transform .25s ease, box-shadow .25s ease;
}

button:hover,
.btn:hover {
  background: var(--btn-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.16);
}

button:active,
.btn:active {
  transform: translateY(0);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.10);
}

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

button.link,
.link {
  background: transparent;
  color: var(--accent);
  padding: 6px 10px;
  box-shadow: none;
}

button.link:hover,
.link:hover {
  background: transparent;
  transform: none;
  text-decoration: underline;
}

/* NAVBAR */
[data-navbar] {
  background: var(--bg);
  color: var(--text);
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: var(--shadow);
}

[data-theme="dark"] [data-navbar] {
  background: var(--bg-alt);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 10px 16px;
}

.brand a {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  color: var(--text);
}

.nav-logo {
  height: 32px;
}

.links {
  display: flex;
  gap: 12px;
  margin-left: 10px;
  transition: max-height .35s ease, opacity .3s ease;
}

.actions {
  margin-left: auto;
  display: flex;
  gap: 12px;
  align-items: center;
}

.cart [data-cart-count] {
  display: inline-flex;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  justify-content: center;
  align-items: center;
  font-size: 12px;
}

/* Icons */
.icon {
  width: 20px;
  height: 20px;
  margin-right: 6px;
  opacity: 0.9;
}

.icon path {
  fill: currentColor;
}

[data-theme="dark"] img.icon {
  filter: invert(1);
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: transparent;
  border: none;
  font-size: 1.6rem;
  color: var(--accent);
  cursor: pointer;
}

/* HERO */
.hero {
  padding: 64px 0;
  background: linear-gradient(180deg, var(--bg) 0%, var(--surface) 100%);
}

.hero .card {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 26px;
  align-items: center;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px;
  border: 1px solid var(--border-subtle);
  transition: transform .35s ease, box-shadow .35s ease;
}

.hero .card:hover {
  transform: translateY(-5px) scale(1.015);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

.hero img {
  width: 100%;
  border-radius: var(--radius);
}

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

.card {
  background: var(--surface);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  padding: 12px;
  border: 1px solid var(--border-subtle);
  transition: transform .35s ease, box-shadow .35s ease, opacity .3s ease;
}

.card:hover {
  transform: translateY(-5px) scale(1.015);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

.grid .card>img {
  display: none;
}

/* card image container */
.card .img-wrap {
  position: relative;
  width: 100%;
  height: 160px;
  overflow: hidden;
  background: var(--bg-alt);
  border-radius: 12px;
}

/* images */
.card .img-wrap img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform .7s cubic-bezier(.22, .61, .36, 1), opacity .6s ease;
}

.card .img-main {
  opacity: 1;
}

.card .img-hover {
  opacity: 0;
}

/* hover zoom + swap */
.card:hover .img-main {
  opacity: 0;
  transform: scale(1.12);
}

.card:hover .img-hover {
  opacity: 1;
  transform: scale(1.12);
}

.card .details {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.45s ease, opacity 0.45s ease, margin-top 0.3s ease;
}

.card .details.open {
  max-height: 600px;
  opacity: 1;
  margin-top: 10px;
}


#products .card {
  opacity: 0;
  transform: translateY(10px);
}

#products .card.card-visible {
  opacity: 1;
  transform: translateY(0);
}


/* FORMS */
.form-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  border: 1px solid var(--border-subtle);
  transition: box-shadow .35s ease, transform .35s ease;
}

.input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: var(--surface);
  transition: border-color .25s ease, box-shadow .25s ease, background .25s ease;
  color: var(--text);
}

.input:hover {
  border-color: var(--accent);
  background: #fffdf7;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .input:hover {
  background: var(--surface-alt);
}

.input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(139, 107, 74, .15);
  outline: none;
}

label {
  font-weight: 600;
}

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.error {
  color: var(--danger);
  margin-top: 6px;
}

/* TABS */
.tabs {
  display: flex;
  border-bottom: 1px solid var(--border-strong);
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.tabs button {
  background: transparent;
  color: var(--text);
  padding: 10px 14px;
  border-bottom: 3px solid transparent;
}

.tabs button.active {
  border-color: var(--accent);
  color: var(--accent);
}

/* TOAST */
.toast {
  position: fixed;
  right: 16px;
  bottom: 16px;
  background: var(--surface);
  color: var(--text);
  padding: 10px 14px;
  border-radius: 12px;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .4s, transform .4s;
  pointer-events: none;
  z-index: 2000;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
  animation: fadeOut 4s forwards;
}

@keyframes fadeOut {

  0%,
  80% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
}

/* CART ROW */
.cart-row {
  display: grid;
  grid-template-columns: 60px 1fr auto auto auto;
  gap: 12px;
  align-items: center;
  border-bottom: 1px solid var(--border-strong);
  padding: 10px 0;
}

/* THANK YOU PAGE */
main.container {
  padding: 60px 0;
  text-align: center;
}

.thankyou-heading {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.4em;
  font-family: "Cormorant Garamond", serif;
}

.order-no-label {
  font-size: 0.8em;
  font-weight: 500;
  color: var(--muted-text);
}

.order-no {
  font-weight: 600;
  color: var(--accent);
}

.payment-line {
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 1.6em;
}

/* FOOTER */
footer {
  background-color: var(--footer-bg);
  padding: 30px 40px;
  color: var(--text);
  margin-top: auto;
  box-shadow: 0 -4px 28px rgba(0, 0, 0, 0.06);
  transition: background .35s ease;
}

footer:hover {
  background: var(--bg-alt);
}

.footer-container {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
}

.footer-left,
.footer-center,
.footer-right {
  flex: 1;
  min-width: 200px;
}

.footer-left p {
  font-weight: 600;
  margin-bottom: 10px;
}

.cards img {
  height: 30px;
  margin-right: 8px;
}

.footer-center {
  text-align: center;
  font-weight: 600;
  line-height: 2;
}

.footer-right {
  text-align: right;
}

.footer-right a {
  color: var(--text);
  margin-bottom: 6px;
}

.footer-right a:hover {
  text-decoration: underline;
}

/* REVIEWS */

.reviews {
  padding: 60px 0;
  text-align: center;
}

.reviews h2 {
  font-family: "Cormorant Garamond", serif;
  margin-bottom: 26px;
  color: var(--text);
  font-size: 2rem;
}

.reviews .container {
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 0 40px;
}


/* wrapper that holds arrows + slider */
.reviews-wrapper {
  display: flex;
  align-items: center;
  width: 100%;
  justify-content: space-between;
}

.reviews-grid {
  flex: 1;
  display: flex;
  gap: 20px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 10px 0 30px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}


.reviews-grid::-webkit-scrollbar {
  display: none;
}

.review-card {
  min-width: 260px;
  flex: 0 0 auto;
  scroll-snap-align: start;
  background: var(--surface);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  padding: 20px;
  border: 1px solid var(--border-subtle);
}

/* arrows */
.review-prev,
.review-next {
  flex-shrink: 0;
  /* don't push inward */
}

.review-prev:hover,
.review-next:hover {
  background: var(--btn);
  color: #fff;
}




/* CHECKOUT */
.checkout-grid {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 28px;
  align-items: start;
}

.checkout-box {
  background: var(--surface);
  padding: 20px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 20px;
  border: 1px solid var(--border-subtle);
  transition: box-shadow .35s ease, transform .35s ease;
}

.payment-option {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 6px 0;
  font-weight: 600;
}

#cardPanel {
  display: none;
  margin-top: 14px;
  animation: fadeIn .25s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.summary-box {
  background: var(--surface);
  padding: 20px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border-subtle);
  transition: box-shadow .35s ease, transform .35s ease;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin: 10px 0;
  font-size: 0.95rem;
}

/* Promo box */
.promo-box {
  margin: 20px 0 25px;
  padding: 18px 20px;
  background: var(--surface-alt);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
}

.promo-box h3 {
  margin: 0 0 6px;
  font-size: 20px;
  color: var(--text);
}

.promo-box p {
  margin: 0 0 12px;
  font-size: 14px;
  color: var(--text);
}

.promo-btn {
  display: inline-block;
  padding: 10px 20px;
  background: #1a1a1a;
  color: white;
  border-radius: 6px;
  text-decoration: none;
  transition: 0.2s;
}

.promo-btn:hover {
  background: #333;
}

[data-theme="dark"] .promo-btn {
  background: #e8dccb;
  color: #1a1a1a;
}

[data-theme="dark"] .promo-btn:hover {
  background: #ffffff;
}


/* Smooth fade on scroll */
.scroll-fade {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .7s ease, transform .7s ease;
}

.scroll-fade.show {
  opacity: 1;
  transform: translateY(0);
}

/* Sections soft hover lift */
section,
.form-card,
.checkout-box,
.summary-box,
.review-card {
  transition: box-shadow .35s ease, transform .35s ease;
}

section:hover .section-title,
.form-card:hover,
.checkout-box:hover,
.summary-box:hover,
.review-card:hover {
  transform: translateY(-2px);
}

/* SHOP PAGE LAYOUT */
.shop-page h1 {
  margin-top: 24px;
  margin-bottom: 10px;
}

.shop-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px;
  align-items: flex-start;
  margin-top: 18px;
}

/* SIDEBAR */
.shop-sidebar {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 16px 20px;
  position: sticky;
  top: 90px;
  height: fit-content;
  border: 1px solid var(--border-subtle);
}

.shop-sidebar .filter-block+.filter-block {
  margin-top: 18px;
}

.shop-sidebar h2 {
  font-size: 0.95rem;
  margin: 0 0 8px;
}

.shop-sidebar label {
  display: block;
  font-size: 0.9rem;
  margin: 4px 0;
  cursor: pointer;
}

.shop-sidebar input[type="checkbox"] {
  margin-right: 6px;
}

/* RESET BUTTON */
.reset-btn {
  width: 100%;
  margin-bottom: 12px;
  font-size: 0.9rem;
}

/* PRICE FILTER */
.price-inputs {
  display: flex;
  gap: 10px;
  margin-bottom: 8px;
}

.price-inputs .field {
  flex: 1;
}

.price-inputs label {
  font-size: 0.8rem;
  margin-bottom: 2px;
  display: block;
}

.price-display {
  font-size: 0.85rem;
  margin-bottom: 8px;
  color: var(--text);
}

/* DOUBLE SLIDER */
.double-slider {
  position: relative;
  height: 32px;
}

.double-slider input[type="range"] {
  position: absolute;
  left: 0;
  right: 0;
  width: 100%;
  pointer-events: none;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
}

.double-slider input[type="range"]::-webkit-slider-thumb {
  pointer-events: all;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--surface);
  box-shadow: 0 0 0 2px rgba(0, 0, 0, .08);
  cursor: pointer;
  -webkit-appearance: none;
}

.double-slider input[type="range"]::-moz-range-thumb {
  pointer-events: all;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--surface);
  box-shadow: 0 0 0 2px rgba(0, 0, 0, .08);
  cursor: pointer;
}

.double-slider input[type="range"]::-webkit-slider-runnable-track,
.double-slider input[type="range"]::-moz-range-track {
  height: 6px;
  border-radius: 3px;
  background: transparent;
}

.slider-track {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 6px;
  transform: translateY(-50%);
  border-radius: 3px;
  background: #ddd;
}

[data-theme="dark"] .slider-track {
  background: #3b332c;
}

/* SHOP CONTROLS */
.shop-main {
  min-width: 0;
}

.shop-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.product-count {
  font-size: 0.9rem;
  opacity: 0.8;
}

.sort-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sort-wrap label {
  font-size: 0.9rem;
}

/* THEME TOGGLE */
.theme-toggle {
  width: 48px;
  height: 24px;
  border-radius: 24px;
  padding: 2px;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  position: relative;
  transition: .3s all;
  margin-left: 12px;
}

.theme-toggle .icon {
  font-size: 15px;
  z-index: 2;
  line-height: 1;
}

.theme-toggle::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  left: 2px;
  transition: .3s;
}

[data-theme="dark"] .theme-toggle {
  background: var(--btn);
}

[data-theme="dark"] .theme-toggle::after {
  transform: translateX(24px);
}

/* ACCESSIBILITY + RESPONSIVE */
@media (prefers-contrast: high) {
  :root {
    --text: #3a2a18;
    --accent: #6b4f32;
    --btn: #b58347;
  }
}

/* NAVBAR MOBILE */
@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .links {
    flex-direction: column;
    width: 100%;
    align-items: center;
    background: var(--surface);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
  }

  .links.show {
    max-height: 260px;
    opacity: 1;
    padding: 10px 0;
  }

  .actions {
    order: 2;
    width: 100%;
    justify-content: center;
    margin-top: 10px;
    gap: 20px;
  }

  .nav-inner {
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px;
  }

  .hero .card {
    grid-template-columns: 1fr;
    text-align: center;
  }

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

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

  .cart-row {
    grid-template-columns: 50px 1fr auto;
    gap: 8px;
    font-size: 0.9rem;
  }
}

/* SMALL SCREENS */
@media (max-width: 480px) {
  .nav-inner {
    flex-direction: column;
    gap: 8px;
  }

  .hero {
    padding: 40px 0;
  }

  .thankyou-heading {
    font-size: 1.6rem;
  }

  .footer-container {
    flex-direction: column;
    text-align: center;
    gap: 20px;
  }

  .footer-left,
  .footer-center,
  .footer-right {
    text-align: center;
    width: 100%;
  }

  .cards img {
    margin: 0 4px;
  }
}

/* REDUCED MOTION */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  .card:hover {
    transform: none;
  }

  .toast {
    animation: none;
  }
}

/* MOBILE NAV + LAYOUT */
@media (max-width: 768px) {

  .nav-toggle {
    display: block;
  }

  .links {
    flex-direction: column;
    width: 100%;
    align-items: center;
    background: var(--surface);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    border: 1px solid var(--border-subtle);
  }

  .links.show {
    max-height: 260px;
    opacity: 1;
    padding: 10px 0;
  }

  .actions {
    order: 2;
    width: 100%;
    justify-content: center;
    margin-top: 10px;
    gap: 20px;
  }

  .nav-inner {
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px;
  }

  .hero .card {
    grid-template-columns: 1fr;
    text-align: center;
  }

  /* Keep product layout compact */
  .grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }

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

  .cart-row {
    grid-template-columns: 50px 1fr auto;
    gap: 8px;
    font-size: 0.9rem;
  }

  /* sidebar moves above on shop page */
  .shop-layout {
    grid-template-columns: 1fr;
  }

  .shop-sidebar {
    position: static;
    order: -1;
    background: var(--surface);
    border: 1px solid var(--border-subtle);
  }
}


/* ABOUT PAGE */

.narrow {
  max-width: 760px;
}

.form-card.about {
  padding: 36px;
  font-size: 1.08rem;
  line-height: 1.75;
}

.form-card.about p {
  margin-bottom: 1.2rem;
}

.about-images {
  display: flex;
  gap: 1.2rem;
  margin-bottom: 2.2rem;
}

.about-images img {
  width: 50%;
  height: 220px;
  object-fit: cover;
  border-radius: 14px;
  filter: brightness(92%);
  transition: .4s ease;
}

.about-images img:hover {
  filter: brightness(100%);
  transform: scale(1.02);
}

h1,
h2,
h3 {
  font-family: "Cormorant Garamond", serif;
  letter-spacing: 0.5px;
}


/* SMALL SCREEN DESIGN TUNING */
@media (max-width: 480px) {

  .nav-inner {
    flex-direction: column;
    gap: 8px;
  }

  .hero {
    padding: 40px 0;
  }

  .thankyou-heading {
    font-size: 1.6rem;
  }

  footer {
    padding: 26px;
  }

  .footer-container {
    flex-direction: column;
    text-align: center;
    gap: 20px;
  }

  .footer-left,
  .footer-center,
  .footer-right {
    text-align: center;
    width: 100%;
  }

  .cards img {
    margin: 0 4px;
  }
}