/**
 * Dapin47 v2 — UI Components
 * Tombol, kartu produk, badge, testimoni, event, dan panel toko online.
 */

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background-color: var(--primary-color);
  color: #ffffff;
  padding: 12px 28px;
  border-radius: var(--radius-full);
  font-family: var(--nav-font);
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid var(--primary-color);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  border-color: var(--primary-hover);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background-color: transparent;
  color: var(--heading-color);
  padding: 12px 26px;
  border-radius: var(--radius-full);
  font-family: var(--nav-font);
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid var(--border-color);
  cursor: pointer;
  transition: var(--transition);
}

.btn-secondary:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.btn-getstarted {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: var(--whatsapp-color);
  color: #ffffff;
  padding: 8px 22px;
  border-radius: var(--radius-full);
  font-family: var(--nav-font);
  font-weight: 600;
  font-size: 0.9rem;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-getstarted:hover {
  background-color: var(--whatsapp-hover);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.35);
}

.btn-watch-video {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--nav-font);
  font-weight: 600;
  font-size: 1rem;
  color: var(--heading-color);
  padding: 10px 18px;
  cursor: pointer;
}

.btn-watch-video i {
  font-size: 2rem;
  color: var(--primary-color);
  line-height: 1;
  transition: var(--transition);
}

.btn-watch-video:hover {
  color: var(--primary-color);
}

.btn-watch-video:hover i {
  transform: scale(1.15);
}

/* ==========================================================================
   Product Cards (Grid Subgrid / Flex Stretched)
   ========================================================================== */
.product-card {
  background: var(--surface-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(206, 18, 18, 0.2);
}

.product-card-img-wrap {
  position: relative;
  width: 100%;
  padding-top: 100%; /* 1:1 Aspect Ratio */
  overflow: hidden;
  background: #fdfdfd;
}

.product-card-img-wrap img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.product-card:hover .product-card-img-wrap img {
  transform: scale(1.04);
}

.product-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--primary-color);
  color: #ffffff;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-family: var(--nav-font);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.product-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.product-title {
  font-family: var(--heading-font);
  font-size: 1.85rem;
  color: var(--heading-color);
  margin-bottom: 8px;
  line-height: 1.1;
}

.product-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 16px;
  flex-grow: 1;
}

.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--border-light);
  margin-top: auto;
}

.product-price {
  font-family: var(--nav-font);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--primary-color);
}

.product-price small {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
  display: block;
}

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

.btn-share-product {
  background: var(--surface-alt);
  border: 1px solid var(--border-color);
  color: var(--heading-color);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition-fast);
  flex-shrink: 0;
}

.btn-share-product:hover {
  background: var(--primary-light);
  color: var(--primary-color);
  border-color: rgba(206, 18, 18, 0.3);
  transform: translateY(-2px);
}

/* ==========================================================================
   Icon Box / Toko Online Cards
   ========================================================================== */
.icon-box {
  background: var(--surface-color);
  padding: 35px 25px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  text-align: center;
  height: 100%;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.icon-box:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-color);
}

.icon-box .icon-img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  margin-bottom: 18px;
  transition: transform 0.3s ease;
}

.icon-box:hover .icon-img {
  transform: scale(1.1);
}

.icon-box h4 {
  font-family: var(--nav-font);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--heading-color);
}

.icon-box p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

/* ==========================================================================
   Testimonial Item
   ========================================================================== */
.testimonial-item {
  background: var(--surface-color);
  padding: 35px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  margin: 15px auto;
  max-width: 900px;
}

.testimonial-item .testimonial-img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--surface-alt);
  box-shadow: var(--shadow-sm);
  margin: 0 auto;
}

.testimonial-content {
  position: relative;
}

.testimonial-content p {
  font-style: italic;
  font-size: 1.05rem;
  color: var(--text-color);
  margin-bottom: 16px;
}

.testimonial-content .quote-icon-left,
.testimonial-content .quote-icon-right {
  color: var(--primary-color);
  font-size: 1.3rem;
  opacity: 0.6;
}

.testimonial-content h3 {
  font-family: var(--nav-font);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.testimonial-content h4 {
  font-size: 0.88rem;
  color: var(--text-muted);
  font-family: var(--nav-font);
  font-weight: 500;
  margin-bottom: 8px;
}

.stars i {
  color: var(--secondary-color);
  margin-right: 3px;
  font-size: 0.95rem;
}

/* ==========================================================================
   Event Item
   ========================================================================== */
.event-item {
  background-size: cover;
  background-position: center;
  min-height: 380px;
  padding: 30px;
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.event-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.85) 100%);
  z-index: 1;
}

.event-item h3,
.event-item .price,
.event-item .description {
  position: relative;
  z-index: 2;
}

.event-item h3 {
  font-family: var(--heading-font);
  font-size: 2rem;
  color: #ffffff;
  margin-bottom: 8px;
}

.event-item .price {
  background: var(--primary-color);
  color: #ffffff;
  font-family: var(--nav-font);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 4px 14px;
  border-radius: var(--radius-full);
  margin-bottom: 12px;
  display: inline-block;
  align-self: flex-start;
}

.event-item .description {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.45;
  margin: 0;
}

/* ==========================================================================
   Info Items (Kontak)
   ========================================================================== */
.info-item {
  background: var(--surface-color);
  padding: 24px 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  gap: 16px;
  height: 100%;
}

.info-item .icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

.info-item h3 {
  font-family: var(--nav-font);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.info-item p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
}

/* ==========================================================================
   Scroll Top Button
   ========================================================================== */
.scroll-top {
  position: fixed;
  visibility: hidden;
  opacity: 0;
  right: 20px;
  bottom: 20px;
  z-index: 99;
  background: var(--primary-color);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  transition: var(--transition);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  box-shadow: var(--shadow-md);
  cursor: pointer;
}

.scroll-top:hover {
  background: var(--primary-hover);
  color: #ffffff;
  transform: translateY(-3px);
}

.scroll-top.active {
  visibility: visible;
  opacity: 1;
}

/* ==========================================================================
   Banner Stats Section (<picture> responsive)
   ========================================================================== */
.stats-banner {
  position: relative;
  overflow: hidden;
  padding: 60px 0;
  text-align: center;
}

.stats-banner .section-title {
  margin-bottom: 25px;
}

.stats-banner .section-title a {
  text-decoration: none;
}

.stats-banner picture img {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  max-height: 480px;
  object-fit: cover;
  margin: 0 auto;
}

/* Swiper Pagination Styling */
.swiper-pagination-bullet {
  width: 10px;
  height: 10px;
  background: #cbd5e1;
  opacity: 1;
  transition: var(--transition-fast);
}

.swiper-pagination-bullet-active {
  background: var(--primary-color) !important;
  width: 24px;
  border-radius: var(--radius-full);
}

/* ==========================================================================
   Share Modal & Toast Styling
   ========================================================================== */
.share-modal {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  padding: 16px;
}

.share-modal.is-active {
  opacity: 1;
  visibility: visible;
}

.share-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.share-modal-dialog {
  position: relative;
  background: #ffffff;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 440px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  transform: scale(0.92) translateY(10px);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1;
}

.share-modal.is-active .share-modal-dialog {
  transform: scale(1) translateY(0);
}

.share-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-light);
}

.share-modal-title {
  font-family: var(--heading-font);
  font-size: 1.8rem;
  color: var(--heading-color);
  margin: 0;
  line-height: 1;
}

.share-modal-close {
  background: var(--surface-alt);
  border: 1px solid var(--border-color);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  color: var(--text-color);
  cursor: pointer;
  transition: var(--transition-fast);
}

.share-modal-close:hover {
  background: var(--primary-light);
  color: var(--primary-color);
}

.share-modal-body {
  padding: 24px;
}

.share-product-preview {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface-alt);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 12px;
  margin-bottom: 20px;
}

.share-product-preview img {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

.share-product-preview h4 {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--heading-color);
  margin-bottom: 2px;
}

.share-product-preview span {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--primary-color);
}

.share-options-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.share-option-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 6px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: #ffffff;
  color: var(--text-color);
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

.share-option-btn i {
  font-size: 1.45rem;
  line-height: 1;
}

.share-option-btn.share-wa {
  color: #25d366;
  border-color: rgba(37, 211, 102, 0.3);
}
.share-option-btn.share-wa:hover {
  background: #25d366;
  color: #ffffff;
  border-color: #25d366;
}

.share-option-btn.share-fb {
  color: #1877f2;
  border-color: rgba(24, 119, 242, 0.3);
}
.share-option-btn.share-fb:hover {
  background: #1877f2;
  color: #ffffff;
  border-color: #1877f2;
}

.share-option-btn.share-x {
  color: #000000;
  border-color: rgba(0, 0, 0, 0.25);
}
.share-option-btn.share-x:hover {
  background: #000000;
  color: #ffffff;
  border-color: #000000;
}

.share-option-btn.share-copy {
  color: var(--primary-color);
  border-color: rgba(206, 18, 18, 0.3);
}
.share-option-btn.share-copy:hover {
  background: var(--primary-color);
  color: #ffffff;
  border-color: var(--primary-color);
}

.share-input-group {
  display: flex;
  gap: 8px;
}

.share-input-group input {
  flex: 1;
  background: var(--surface-alt);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.share-toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #1f2937;
  color: #ffffff;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  font-size: 0.9rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 10100;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
  pointer-events: none;
}

.share-toast i {
  color: #10b981;
  font-size: 1.1rem;
}

.share-toast.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
