/*
  Asia Best Coffee -- marketing landing page
  Color tone matched to the live brand site (asiabest.co.th):
    --default-color / --heading-color / --accent-color below were
    read directly from that site's CSS custom properties.
*/

:root {
  --default-font: "Sarabun", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --heading-font: "Sarabun", sans-serif;
  --nav-font: "Sarabun", sans-serif;

  --background-color: #ffffff;
  --default-color: #3f4d31;      /* body text -- slightly darkened from brand #53693a for readability */
  --heading-color: #3a4530;      /* headings -- darkened from brand #6c795d for contrast on white */
  --accent-color: #53693a;       /* primary brand olive green */
  --accent-color-light: #bec8b3; /* brand sage accent */
  --accent-color-dark: #35481f;  /* brand dark olive (mobile nav / hover states) */
  --surface-color: #ffffff;
  --contrast-color: #ffffff;

  --nav-color: rgba(255, 255, 255, 0.8);
  --nav-hover-color: #ffffff;
  --nav-dropdown-background-color: #ffffff;
  --nav-dropdown-color: #222222;
  --nav-dropdown-hover-color: #4c672c;
}

body {
  font-family: var(--default-font);
  color: var(--default-color);
  background-color: var(--background-color);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--heading-font);
  color: var(--heading-color);
}

a {
  color: var(--accent-color);
  text-decoration: none;
}

a:hover {
  color: var(--accent-color-dark);
}

.btn-brand {
  background-color: var(--accent-color);
  border-color: var(--accent-color);
  color: #fff;
}

.btn-brand:hover {
  background-color: var(--accent-color-dark);
  border-color: var(--accent-color-dark);
  color: #fff;
}

.btn-brand-outline {
  background-color: transparent;
  border: 1px solid #fff;
  color: #fff;
}

.btn-brand-outline:hover {
  background-color: #fff;
  color: var(--accent-color-dark);
}

.text-brand {
  color: var(--accent-color);
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title .eyebrow {
  display: inline-block;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent-color);
  background: rgba(83, 105, 58, 0.08);
  padding: .3rem .9rem;
  border-radius: 50px;
  margin-bottom: .75rem;
}

.section-title h2 {
  font-weight: 700;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
}

.section-title p {
  color: #6b7563;
  max-width: 640px;
  margin: .5rem auto 0;
}

.section-padding {
  padding: 5rem 0;
}

.bg-alt {
  background-color: #f6f7f2;
}

/* ---------- Header ---------- */
#header {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 1030;
  padding: .85rem 0;
  background-color: rgba(83, 105, 58, 0.96);
  transition: padding .3s ease, background-color .3s ease;
}

#header.scrolled {
  padding: .5rem 0;
  box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .15);
}

#header .navbar-brand {
  color: #fff;
  font-weight: 700;
  font-size: 1.35rem;
  display: flex;
  align-items: center;
  gap: .6rem;
}

#header .navbar-brand img {
  height: 40px;
}

#header .nav-link {
  color: var(--nav-color);
  font-weight: 500;
  padding: .5rem 1rem !important;
}

#header .nav-link:hover,
#header .nav-link.active {
  color: var(--nav-hover-color);
}

/* ---------- Hero ---------- */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  color: #fff;
  background: #2c3a1f;
  overflow: hidden;
}

#hero .hero-carousel,
#hero .hero-carousel .carousel-inner {
  position: absolute;
  inset: 0;
  height: 100%;
}

/* Bootstrap's .carousel-item has auto height by default. Since each hero
   background is an empty element with height: 100%, the item must also have
   an explicit height or the slide can collapse to zero height. */
#hero .hero-carousel .carousel-item {
  height: 100%;
}

#hero .hero-slide {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 1;
}

#hero .hero-carousel .carousel-indicators {
  z-index: 3;
  margin-bottom: 1rem;
}

#hero .hero-carousel .carousel-control-prev,
#hero .hero-carousel .carousel-control-next {
  z-index: 3;
  width: 3rem;
}

#hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(53, 72, 31, .55) 0%, rgba(53, 72, 31, .85) 100%);
}

#hero .hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 7.5rem 0 3rem;
}

#hero .eyebrow {
  display: inline-block;
  border: 1px solid rgba(255, 255, 255, .5);
  border-radius: 50px;
  padding: .35rem 1rem;
  font-size: .85rem;
  letter-spacing: .08em;
  margin-bottom: 1.25rem;
  background: transparent;
  color: #fff;
}

#hero h1 {
  color: #fff;
  font-weight: 800;
  font-size: clamp(2.2rem, 5vw, 3.6rem);
}

#hero p.lead {
  color: rgba(255, 255, 255, .9);
  max-width: 640px;
}

#hero .section-title h2 {
  color: #fff;
}

#hero .section-title p {
  color: rgba(255, 255, 255, .8);
}

/* ---------- Why us icon boxes ---------- */
.icon-box {
  padding: 2rem 1.5rem;
  border-radius: .75rem;
  background: var(--surface-color);
  box-shadow: 0 .5rem 1.5rem rgba(53, 72, 31, .08);
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: transform .25s ease;
}

.icon-box:hover {
  transform: translateY(-6px);
}

.icon-box .icon {
  width: clamp(105px, 12vw, 150px);
  max-width: 100%;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

.icon-box .icon img {
  display: block;
  width: 100%;
  max-width: 150px;
  height: auto;
  object-fit: contain;
  margin-inline: auto;
}

@media (max-width: 767.98px) {
  .icon-box .icon {
    width: clamp(110px, 35vw, 140px);
  }
}

/* ---------- Products ---------- */
.filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .5rem;
  margin-bottom: 2.5rem;
}

.filters li {
  list-style: none;
  padding: .45rem 1.1rem;
  border-radius: 50px;
  border: 1px solid var(--accent-color-light);
  color: var(--accent-color);
  cursor: pointer;
  font-size: .9rem;
  transition: all .2s ease;
}

.filters li.filter-active,
.filters li:hover {
  background: var(--accent-color);
  border-color: var(--accent-color);
  color: #fff;
}

.product-card {
  border-radius: .75rem;
  overflow: hidden;
  background: var(--surface-color);
  box-shadow: 0 .5rem 1.5rem rgba(53, 72, 31, .08);
  height: 100%;
}

.product-card .product-img {
  aspect-ratio: 4 / 3;
  background-size: cover;
  background-position: center;
}

.product-card .badge-type {
  background: var(--accent-color-light);
  color: var(--accent-color-dark);
  font-weight: 600;
}

/* ---------- Process ---------- */
.process-step {
  text-align: center;
  padding: 1.5rem;
}

.process-step .step-number {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  border: 2px solid var(--accent-color);
  color: var(--accent-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  margin: 0 auto 1rem;
}

/* ---------- Stats ---------- */
#stats {
  background: var(--accent-color);
  color: #fff;
}

#stats .stat-number {
  font-size: 2.5rem;
  font-weight: 800;
}

/* ---------- Testimonials ---------- */
#testimonials { background: #fff; }
.review-widget { max-width: 1240px; }
.review-widget-header { position: relative; display: flex; justify-content: center; align-items: center; min-height: 150px; margin-bottom: 2rem; text-align: center; }
.review-heading { display: flex; flex-direction: column; align-items: center; }
.review-title { margin: .7rem 0 .25rem; color: #35481f; font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; letter-spacing: -.035em; }
.review-score-row { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: .55rem; margin-top: .25rem; }
.review-score-row > strong { color: #202124; font-size: 1.7rem; line-height: 1; }
.review-score-row .stars { color: #f9ab00; font-size: 1.55rem; letter-spacing: .08rem; filter: drop-shadow(0 2px 3px rgba(249,171,0,.16)); }
.review-count { color: #777; font-size: .9rem; }
.review-write-btn { position: absolute; right: 0; bottom: 1.25rem; border: 0; border-radius: 999px; color: #4169a1; background: #edf4ff; font-weight: 700; padding: .75rem 1.6rem; box-shadow: 0 3px 12px rgba(65, 105, 161, .12); }
.review-write-btn:hover { color: #fff; background: #55733a; }
.review-carousel { padding: .2rem 2px 1rem; }
.review-carousel .swiper-slide { height: auto; }
.testimonial-card {
  background: var(--surface-color);
  border: 1px solid #e3e7df;
  border-radius: 14px;
  padding: 1.4rem;
  box-shadow: 0 2px 7px rgba(53, 72, 31, .04);
  height: 100%;
}

.testimonial-card .stars {
  color: #f9ab00;
  margin-bottom: .75rem;
}

.review-summary-card { position: relative; min-height: 390px; height: 100%; padding: 1.6rem; overflow: hidden; border: 1px solid #dbe5d3; border-radius: 16px; background: linear-gradient(145deg, #fff 20%, #f3f8ef 100%); box-shadow: 0 12px 35px rgba(53,72,31,.09); }
.review-summary-card::after { content: ''; position: absolute; width: 150px; height: 150px; right: -65px; top: -65px; border-radius: 50%; background: rgba(138,170,104,.12); }
.review-summary-title { position: relative; z-index: 1; display: flex; align-items: center; gap: .85rem; color: #35481f; }
.review-summary-title strong { display: block; font-size: 1.22rem; font-weight: 800; }
.review-summary-title small { display: block; color: #6f7868; font-weight: 500; margin-top: .2rem; }
.review-summary-icon { display: inline-grid; place-items: center; flex: 0 0 48px; height: 48px; border-radius: 50%; color: #fff; font-size: 1.25rem; background: linear-gradient(135deg, #55733a, #8aaa68); box-shadow: 0 7px 18px rgba(85,115,58,.24); }
.review-summary-card > .stars { position: relative; z-index: 1; font-size: 1.5rem; color: #f9ab00; letter-spacing: .08rem; }
.review-breakdown-row { display: grid; grid-template-columns: 34px 1fr 24px; align-items: center; gap: .55rem; margin-top: .48rem; font-size: .78rem; color: #6a7065; }
.review-breakdown-row .progress { height: 7px; background: #e9ece6; }
.review-breakdown-row .progress-bar { background: #f9ab00; border-radius: 99px; }
.review-author { display: flex; align-items: center; gap: .7rem; margin-bottom: 1rem; }
.review-avatar { width: 42px; height: 42px; flex: 0 0 42px; border-radius: 50%; object-fit: cover; }
.review-avatar-fallback { display: inline-grid; place-items: center; color: #fff; background: #55733a; font-weight: 800; }
.review-verified { color: #4285f4; font-size: .9rem; }
.review-text { color: #343832; line-height: 1.6; margin-bottom: 0; overflow-wrap: anywhere; }
.review-card { min-height: 390px; }
.review-placeholder-card { display: flex; flex-direction: column; align-items: flex-start; }
.review-placeholder-icon { display: inline-grid; place-items: center; width: 42px; height: 42px; margin-bottom: 1rem; border-radius: 50%; color: #55733a; background: #edf3e8; font-size: 1.1rem; }
.review-nav { width: 34px; height: 34px; color: #35481f; border: 1px solid #e0e4dc; border-radius: 50%; background: #fff; box-shadow: 0 3px 10px rgba(0,0,0,.09); }
.review-nav::after { font-size: .8rem; font-weight: 800; }
.review-stars-empty { color: #d8d8d2; }
.review-alert { max-width: 760px; }
.review-empty { max-width: 680px; margin: 0 auto; padding: 2.5rem; border: 1px dashed #cbd4c2; border-radius: 18px; color: #66705d; background: #fff; }
.review-modal-content { border: 0; border-radius: 20px; box-shadow: 0 24px 70px rgba(41, 54, 28, .2); }
.review-honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.review-rating { display: inline-flex; flex-direction: row-reverse; gap: .2rem; }
.review-rating input { position: absolute; opacity: 0; pointer-events: none; }
.review-rating label { color: #d8d8d2; cursor: pointer; font-size: 2rem; line-height: 1; transition: color .15s ease, transform .15s ease; }
.review-rating label:hover, .review-rating label:hover ~ label, .review-rating input:checked ~ label { color: #f2a900; }
.review-rating label:hover { transform: scale(1.08); }
.review-rating input:focus-visible + label { outline: 2px solid #55733a; outline-offset: 3px; border-radius: 2px; }
@media (max-width: 767.98px) { .review-widget-header { padding-bottom: 3.6rem; } .review-write-btn { right: 50%; bottom: .25rem; transform: translateX(50%); padding: .65rem 1.1rem; white-space: nowrap; } }

/* ---------- Cookie consent ---------- */
.cookie-consent-banner {
  position: fixed;
  left: 1rem;
  bottom: 1rem;
  z-index: 1090;
  width: min(620px, calc(100% - 2rem));
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid #d8ddd2;
  border-radius: .65rem;
  background: #fff;
  box-shadow: 0 .75rem 2.5rem rgba(29, 42, 20, .18);
}

.cookie-consent-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 2px solid #e11d2e;
  border-radius: 50%;
  color: #e11d2e;
  font-size: 1.35rem;
}

.cookie-consent-copy strong { color: #344329; }
.cookie-consent-copy p { margin: .2rem 0 0; color: #50564c; font-size: .9rem; line-height: 1.45; }
.cookie-consent-copy a { color: #344329; text-decoration: underline; }
.cookie-consent-actions { display: flex; align-items: center; gap: .5rem; }
.btn-cookie-accept, .btn-cookie-decline { border-radius: 999px; padding: .65rem 1.15rem; font-weight: 700; white-space: nowrap; }
.btn-cookie-accept { border: 1px solid #159b16; background: #159b16; color: #fff; }
.btn-cookie-decline { border: 1px solid #cfd4ca; background: #fff; color: #555; }
.btn-cookie-accept:hover { background: #107d11; }
.btn-cookie-decline:hover { background: #f2f4ef; }

@media (max-width: 767.98px) {
  .cookie-consent-banner { grid-template-columns: auto 1fr; align-items: start; }
  .cookie-consent-actions { grid-column: 1 / -1; justify-content: flex-end; }
}

@media (max-width: 420px) {
  .cookie-consent-banner { left: .5rem; bottom: .5rem; width: calc(100% - 1rem); gap: .7rem; padding: .85rem; }
  .cookie-consent-icon { width: 40px; height: 40px; }
  .cookie-consent-actions { justify-content: stretch; }
  .btn-cookie-accept, .btn-cookie-decline { flex: 1; }
}

/* ---------- Gallery ---------- */
#gallery .gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-right: 0;
  margin-left: 0;
}

#gallery .gallery-grid > [class*="col-"] {
  width: auto;
  min-width: 0;
  padding: 0;
}

.gallery-item {
  width: 100%;
  aspect-ratio: 4 / 3;
  display: block;
  border-radius: .5rem;
  overflow: hidden;
  position: relative;
  text-decoration: none;
  cursor: zoom-in;
  box-shadow: 0 .25rem 1rem rgba(30, 44, 20, .08);
  transition: transform .3s ease, box-shadow .3s ease;
}

.gallery-item > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform .35s ease;
}

.gallery-item:hover,
.gallery-item:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 .9rem 2rem rgba(30, 44, 20, .2);
}

.gallery-item:hover > img,
.gallery-item:focus-visible > img {
  transform: scale(1.035);
}

.gallery-item:focus-visible {
  outline: 3px solid #f2ad00;
  outline-offset: 3px;
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: linear-gradient(180deg, rgba(24, 35, 17, .05), rgba(24, 35, 17, .72));
  opacity: 0;
  transition: opacity .3s ease;
}

.gallery-view-btn {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .7rem 1.15rem;
  border-radius: 999px;
  background: #fff;
  color: #35481f;
  font-weight: 700;
  box-shadow: 0 .4rem 1rem rgba(0, 0, 0, .18);
  transform: translateY(12px);
  transition: transform .3s ease;
}

.gallery-item:hover .gallery-overlay,
.gallery-item:focus-visible .gallery-overlay {
  opacity: 1;
}

.gallery-item:hover .gallery-view-btn,
.gallery-item:focus-visible .gallery-view-btn {
  transform: translateY(0);
}

.gallery-modal-content {
  overflow: hidden;
  border: 0;
  border-radius: 1rem;
  background: #111;
}

.gallery-modal-content .modal-header {
  color: #fff;
  background: #1b1b1b;
}

.gallery-modal-body {
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #111;
}

.gallery-modal-image {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: calc(100vh - 130px);
  margin: 0 auto;
  object-fit: contain;
}

@media (max-width: 575.98px) {
  .gallery-modal-content {
    border-radius: 0;
  }

  .gallery-modal-body {
    min-height: 0;
    flex: 1 1 auto;
  }

  .gallery-modal-image {
    max-height: calc(100vh - 62px);
  }
}

@media (hover: none) {
  .gallery-item:active .gallery-overlay {
    opacity: 1;
  }
}

@media (max-width: 767.98px) {
  #gallery .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .75rem;
  }
}

@media (max-width: 399.98px) {
  #gallery .gallery-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Contact ---------- */
#contact .contact-info-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}

#contact .contact-info-item i {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: .6rem;
  background: var(--accent-color);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ---------- Footer ---------- */
#footer {
  background: var(--accent-color-dark);
  color: rgba(255, 255, 255, .85);
}

#footer a {
  color: rgba(255, 255, 255, .75);
}

#footer a:hover {
  color: #fff;
}

#footer h5 {
  color: #fff;
  font-weight: 700;
}

/* ---------- Nav auth / cart controls ---------- */
#header .nav-icon-btn {
  position: relative;
  color: #fff;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .25);
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
}

#header .nav-icon-btn:hover {
  background: rgba(255, 255, 255, .22);
  color: #fff;
}

#header .cart-badge {
  position: absolute;
  top: -.35rem;
  right: -.35rem;
  min-width: 1.15rem;
  height: 1.15rem;
  padding: 0 .3rem;
  border-radius: 50px;
  background: #d9822b;
  color: #fff;
  font-size: .65rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.shop-card {
  background: var(--surface-color);
  border-radius: .75rem;
  overflow: hidden;
  box-shadow: 0 .5rem 1.5rem rgba(0, 0, 0, .15);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.shop-card .shop-card-img {
  aspect-ratio: 1 / 1;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  background-color: #f6f7f2;
}

.shop-card .shop-card-body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.shop-card .form-select-sm,
.shop-card .form-control-sm {
  font-size: .8rem;
}

.shop-card .qty-stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid #dcdfd6;
  border-radius: .5rem;
  overflow: hidden;
}

.shop-card .qty-stepper button {
  border: none;
  background: #f6f7f2;
  width: 1.9rem;
  height: 1.9rem;
  line-height: 1;
  color: var(--accent-color-dark);
}

.shop-card .qty-stepper input {
  width: 2.6rem;
  border: none;
  text-align: center;
  padding: 0;
  font-size: .85rem;
}

.shop-card .qty-stepper input:focus {
  outline: none;
  box-shadow: none;
}

.badge-coming-soon {
  background: #9a9a9a;
}

/* ---------- Cart offcanvas ---------- */
.cart-line-item {
  display: flex;
  gap: .75rem;
  padding: .75rem 0;
  border-bottom: 1px solid #eee;
}

.cart-line-item .cart-line-img {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: .5rem;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  background-color: #f6f7f2;
  flex-shrink: 0;
}

.cart-line-item .cart-line-remove {
  border: none;
  background: none;
  color: #b02a37;
  font-size: 1rem;
  line-height: 1;
}

.cart-empty {
  text-align: center;
  color: #8a9080;
  padding: 3rem 1rem;
}

/* ---------- Back to top ---------- */
.back-to-top {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: var(--accent-color);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all .3s ease;
  z-index: 1040;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
}
