/* =================================================
   Home Page Styles (Banner + Products + Testimonials)
   ================================================= */

/* ----- Home Banner Carousel ----- */
.home-banner-section {
  width: 100%;
  margin: 0 0 24px;
  padding: 0;
  background: #f5f6fa;
}
.home-banner-carousel {
  position: relative;
  width: 100%;
  margin: 0;
  overflow: hidden;
}
.home-banner-carousel .carousel-inner,
.home-banner-carousel .carousel-item { width: 100%; }
.home-banner-carousel .banner-link {
  display: block;
  width: 100%;
  height: 100%;
  color: inherit;
  text-decoration: none;
}
.home-banner-carousel .banner-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  transition: transform 6s ease;
}
.home-banner-carousel .carousel-item.active .banner-img {
  transform: scale(1.03);
}

/* Banner controls */
.home-banner-carousel .carousel-control-prev,
.home-banner-carousel .carousel-control-next {
  width: 56px;
  opacity: 0;
  transition: opacity 0.35s ease;
}
.home-banner-carousel:hover .carousel-control-prev,
.home-banner-carousel:hover .carousel-control-next {
  opacity: 1;
}
.home-banner-carousel .carousel-control-prev-icon,
.home-banner-carousel .carousel-control-next-icon {
  width: 44px;
  height: 44px;
  background-color: rgba(0, 0, 0, 0.45);
  border-radius: 50%;
  background-size: 45% 45%;
  backdrop-filter: blur(4px);
}
.home-banner-carousel .carousel-control-prev-icon:hover,
.home-banner-carousel .carousel-control-next-icon:hover {
  background-color: rgba(230, 57, 70, 0.85);
}

/* Banner indicators */
.home-banner-carousel .carousel-indicators {
  margin-bottom: 18px;
  z-index: 15;
}
.home-banner-carousel .carousel-indicators li,
.home-banner-carousel .carousel-indicators [data-bs-target] {
  width: 28px;
  height: 4px;
  border-radius: 4px;
  background-color: rgba(255, 255, 255, 0.5);
  border: none;
  margin: 0 4px;
  transition: background-color 0.3s ease, width 0.3s ease;
  opacity: 1;
}
.home-banner-carousel .carousel-indicators .active {
  background-color: #fff;
  width: 44px;
}

@media (min-width: 1400px) {
  .home-banner-carousel .banner-img { max-height: 620px; object-fit: cover; }
}
@media (max-width: 991px) {
  .home-banner-carousel .carousel-control-prev,
  .home-banner-carousel .carousel-control-next {
    opacity: 1;
    width: 44px;
  }
  .home-banner-carousel .carousel-control-prev-icon,
  .home-banner-carousel .carousel-control-next-icon {
    width: 36px;
    height: 36px;
  }
  .home-banner-carousel .banner-img {
    width: 100%;
    height: auto;
    max-height: none;
    object-fit: contain;
  }
}
@media (max-width: 767px) {
  .home-banner-section { margin-bottom: 16px; }
  .home-banner-carousel .banner-img {
    width: 100%;
    height: auto;
    max-height: none;
    object-fit: contain;
    object-position: center;
  }
  .home-banner-carousel .carousel-indicators { margin-bottom: 10px; }
  .home-banner-carousel .carousel-indicators li,
  .home-banner-carousel .carousel-indicators [data-bs-target] {
    width: 20px;
    height: 3px;
  }
  .home-banner-carousel .carousel-indicators .active { width: 30px; }
  .home-banner-carousel .carousel-control-prev,
  .home-banner-carousel .carousel-control-next { width: 36px; }
  .home-banner-carousel .carousel-control-prev-icon,
  .home-banner-carousel .carousel-control-next-icon {
    width: 30px;
    height: 30px;
  }
}

/* ----- Product Grid Section ----- */
.product-grid-section { padding: 24px 0 40px; }
.product-grid-section .section-heading {
  text-align: center;
  margin: 6px auto 22px;
}
.product-grid-section .section-heading h2 {
  font-size: 26px;
  font-weight: 700;
  color: #1a1a2e;
  margin: 0 0 6px;
  position: relative;
  display: inline-block;
}
.product-grid-section .section-heading h2::after {
  content: "";
  display: block;
  width: 60px;
  height: 3px;
  background: #e63946;
  margin: 8px auto 0;
  border-radius: 2px;
}
.product-grid-section .section-heading p {
  font-size: 14px;
  color: #6b7280;
  margin: 0;
}

.product-grid-section .product-col { margin-bottom: 24px; }

@media (min-width: 992px) {
  .product-grid-section .product-col {
    flex: 0 0 25%;
    max-width: 25%;
  }
}

.product-card {
  position: relative;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #eef0f5;
  box-shadow: 0 2px 8px rgba(16, 24, 40, 0.04);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(16, 24, 40, 0.10);
  border-color: #e63946;
}

.product-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  flex: 1;
}
.product-card-link:hover { text-decoration: none; color: inherit; }

/* Ribbon badges */
.product-badge {
  position: absolute;
  top: 12px;
  left: -6px;
  z-index: 3;
  padding: 5px 14px 5px 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: #fff;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.18);
  clip-path: polygon(0 0, 100% 0, calc(100% - 8px) 50%, 100% 100%, 0 100%, 6px 50%);
  padding-left: 14px;
}
.product-badge::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 6px;
  height: 5px;
  background: inherit;
  filter: brightness(0.6);
  clip-path: polygon(0 0, 100% 0, 100% 100%);
  z-index: -1;
}

.product-badge.badge-new     { background: linear-gradient(135deg, #16a34a, #15803d); }
.product-badge.badge-best    { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.product-badge.badge-sale    { background: linear-gradient(135deg, #fbbf24, #d97706); }
.product-badge.badge-warn    { background: linear-gradient(135deg, #fb923c, #c2410c); }
.product-badge.badge-soon    { background: linear-gradient(135deg, #a855f7, #6d28d9); }
.product-badge.badge-oos     { background: linear-gradient(135deg, #9ca3af, #4b5563); }
.product-badge.badge-default { background: linear-gradient(135deg, #374151, #111827); }

.discount-pct {
  font-size: 12px;
  font-weight: 600;
  color: #16a34a;
  margin-left: 2px;
}

.product-card-img {
  position: relative;
  width: 100%;
  padding-top: 100%;
  background: #ffffff;
  overflow: hidden;
}
.product-card-img img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 12px;
  transition: opacity 0.35s ease, transform 0.5s ease;
}
.product-card-img .hover-display { opacity: 0; }
.product-card:hover .product-card-img .display {
  opacity: 0;
  transform: scale(1.05);
}
.product-card:hover .product-card-img .hover-display {
  opacity: 1;
  transform: scale(1.05);
}
.product-card-img .oos-overlay {
  position: absolute;
  inset: auto 0 0 0;
  bottom: 50%;
  transform: translateY(50%);
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  text-align: center;
  font-weight: 700;
  font-size: 13px;
  padding: 6px 0;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.product-card-info { padding: 14px 14px 8px; }
.product-title {
  font-size: 14.5px;
  font-weight: 600;
  color: #1f2937;
  line-height: 1.4;
  margin: 0 0 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 40px;
}
.product-card:hover .product-title { color: #e63946; }

.product-price {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
}
.product-price .current-price {
  font-size: 17px;
  font-weight: 700;
  color: #2563eb;
}
.product-price .original-price {
  font-size: 13px;
  color: #9ca3af;
  text-decoration: line-through;
  font-weight: 500;
}

@media (max-width: 767px) {
  .product-grid-section { padding: 18px 0 24px; }
  .product-grid-section .section-heading h2 { font-size: 20px; }
  .product-grid-section .section-heading p { font-size: 13px; }
  .product-grid-section .product-col { margin-bottom: 16px; }
  .product-card-info { padding: 12px 12px 14px; }
  .product-title { font-size: 18.5px; min-height: auto; margin-bottom: 2px; }
  .product-price { gap: 10px; row-gap: 6px; }
  .product-price .current-price { font-size: 19px; }
  .product-price .original-price { font-size: 15px; }
  .discount-pct { font-size: 14px; }
  .product-badge {
    font-size: 9px;
    padding: 4px 11px 4px 9px;
    top: 10px;
    left: -4px;
    letter-spacing: 0.3px;
  }
}

/* ----- Testimonials ----- */
.tpl-testimonials {
  padding: 110px 0 70px;
  background: linear-gradient(180deg, #fff7f7 0%, #f5f7fb 100%);
}
.tpl-testimonials__head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 36px;
}
.tpl-testimonials__eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2.2px;
  text-transform: uppercase;
  color: #e63946;
  background: rgba(230, 57, 70, 0.10);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.tpl-testimonials__title {
  position: relative;
  font-size: 32px;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 25px;
  padding-top: 30px;
  line-height: 1.15;
}
.tpl-testimonials__title::after {
  content: "";
  display: block;
  width: 80px;
  height: 3px;
  background: #007bff;
  margin: 10px auto 0;
  border-radius: 2px;
}
.tpl-testimonials__sub {
  font-size: 15px;
  color: #6b7280;
  margin: 0;
  line-height: 1.55;
}

.tpl-testimonials__track {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 8px 4px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.tpl-testimonials__track::-webkit-scrollbar { display: none; height: 0; width: 0; }

.tpl-testimonial-card {
  position: relative;
  flex: 0 0 calc((100% - 40px) / 3);
  min-width: 280px;
  min-height: 290px;
  scroll-snap-align: start;
  background: #fff;
  border-radius: 16px;
  padding: 28px 24px 26px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  border: 1px solid #eef0f5;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  overflow: hidden;
}
.tpl-testimonial-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.10);
  border-color: rgba(230, 57, 70, 0.20);
}

.tpl-quote {
  position: absolute;
  right: -10px;
  bottom: -14px;
  width: 96px;
  height: 96px;
  fill: rgba(230, 57, 70, 0.06);
  pointer-events: none;
}

.tpl-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px dashed #e5e7eb;
}
.tpl-avatar {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  overflow: hidden;
  flex: 0 0 58px;
  background: linear-gradient(135deg, #e63946, #f97316);
  color: #fff;
  font-weight: 700;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid #fff;
  box-shadow: 0 0 0 2px rgba(230, 57, 70, 0.22), 0 4px 12px rgba(230, 57, 70, 0.20);
}
.tpl-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tpl-meta {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.tpl-name {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tpl-desig {
  font-size: 12.5px;
  color: #e63946;
  font-weight: 600;
  margin: 0;
  line-height: 1.3;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  height: 1.3em;
  overflow: hidden;
  position: relative;
}
.tpl-desig__inner {
  display: block;
  white-space: normal;
  word-break: break-word;
  will-change: transform;
}
.tpl-desig.is-scroll .tpl-desig__inner {
  animation: tplDesigVScroll var(--tpl-desig-dur, 6s) linear infinite;
}
.tpl-testimonial-card:hover .tpl-desig.is-scroll .tpl-desig__inner {
  animation-play-state: paused;
}
@keyframes tplDesigVScroll {
  0%, 10%   { transform: translateY(0); }
  90%, 100% { transform: translateY(var(--tpl-desig-shift, 0)); }
}
.tpl-rating {
  display: inline-flex;
  gap: 2px;
  line-height: 1;
  margin-top: 2px;
}
.tpl-rating .tpl-star.on  { fill: #f5a623; }
.tpl-rating .tpl-star.off { fill: #e5e7eb; }

.tpl-msg {
  font-size: 14px;
  color: #475569;
  line-height: 1.7;
  margin: 0;
  text-align: left;
  flex: 1;
  position: relative;
  z-index: 1;
  max-height: calc(1.7em * 5);
  overflow: hidden;
  overscroll-behavior: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.tpl-msg__inner {
  display: block;
}
.tpl-testimonial-card:hover .tpl-msg {
  overflow-y: auto;
}
.tpl-msg::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

@media (max-width: 991px) {
  .tpl-testimonials { padding: 80px 0 52px; }
  .tpl-testimonials__title { font-size: 26px; padding-top: 24px; }
  .tpl-testimonial-card { flex: 0 0 calc((100% - 20px) / 2); }
}
@media (max-width: 640px) {
  .tpl-testimonials { padding: 64px 0 42px; }
  .tpl-testimonials__head { margin-bottom: 26px; }
  .tpl-testimonials__title { font-size: 22px; padding-top: 16px; }
  .tpl-testimonials__sub { font-size: 13.5px; }
  .tpl-testimonial-card { flex: 0 0 88%; min-width: 0; min-height: 260px; padding: 24px 20px 22px; border-radius: 14px; }
  .tpl-quote { width: 80px; height: 80px; }
  .tpl-avatar { width: 52px; height: 52px; flex: 0 0 52px; font-size: 20px; }
  .tpl-name { font-size: 15px; }
  .tpl-desig { font-size: 11.5px; }
  .tpl-msg { font-size: 13.5px; line-height: 1.65; max-height: calc(1.65em * 6); }
}
