/* ==========================================================================
   MYSHOPEE.MY.ID - HIGH CONVERSION MOBILE-FIRST AFFILIATE HUB
   ========================================================================== */

:root {
  --primary: #EE4D2D;
  --primary-dark: #D73211;
  --primary-light: #FFF5F1;
  --primary-gradient: linear-gradient(135deg, #FF5722 0%, #EE4D2D 100%);
  --secondary: #26AA99;
  --accent: #FFBA00;
  --dark: #1E293B;
  --gray-900: #0F172A;
  --gray-700: #334155;
  --gray-500: #64748B;
  --gray-300: #CBD5E1;
  --gray-100: #F1F5F9;
  --gray-50: #F8FAFC;
  --white: #FFFFFF;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 25px rgba(238, 77, 45, 0.18);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-sans);
  background-color: #F6F6F6;
  color: var(--dark);
  line-height: 1.5;
  padding-bottom: 70px;
}

/* CONTAINER */
.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 14px;
}

/* TOP HEADER */
.header-top {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--primary);
  letter-spacing: -0.5px;
}

.brand-logo .shopee-bag {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--primary-gradient);
  border-radius: var(--radius-sm);
  color: var(--white);
  font-size: 1rem;
  box-shadow: 0 2px 6px rgba(238, 77, 45, 0.3);
}

.search-bar-wrap {
  flex: 1;
  position: relative;
}

.search-input {
  width: 100%;
  padding: 9px 14px 9px 36px;
  border-radius: var(--radius-full);
  border: 1px solid var(--gray-300);
  background: var(--gray-50);
  font-size: 0.88rem;
  outline: none;
  transition: all 0.2s ease;
}

.search-input:focus {
  border-color: var(--primary);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(238, 77, 45, 0.15);
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-500);
  font-size: 0.85rem;
  pointer-events: none;
}

/* RUNNING TICKER PROMO */
.promo-ticker {
  background: var(--primary-gradient);
  color: var(--white);
  padding: 7px 0;
  font-size: 0.8rem;
  font-weight: 600;
  overflow: hidden;
  white-space: nowrap;
}

.ticker-content {
  display: inline-block;
  animation: marquee 22s linear infinite;
}

@keyframes marquee {
  0% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

.ticker-link {
  color: #FFF275;
  text-decoration: underline;
  margin-left: 8px;
  font-weight: 700;
}

/* CATEGORY PILLS */
.category-bar {
  background: var(--white);
  padding: 10px 0;
  border-bottom: 1px solid #EBEBEB;
  overflow-x: auto;
  scrollbar-width: none;
}

.category-bar::-webkit-scrollbar {
  display: none;
}

.category-list {
  display: flex;
  gap: 8px;
  white-space: nowrap;
}

.cat-chip {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: 1px solid #E5E7EB;
  background: var(--white);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gray-700);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 4px;
}

.cat-chip:hover, .cat-chip.active {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
  box-shadow: 0 2px 6px rgba(238, 77, 45, 0.25);
}

/* SECTION TITLE */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 18px 0 12px 0;
}

.section-title {
  font-size: 1.05rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--gray-900);
}

.section-badge {
  font-size: 0.75rem;
  background: #FFE8E4;
  color: var(--primary);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-weight: 700;
}

/* PRODUCT GRID */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

@media (min-width: 640px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
  }
}

@media (min-width: 900px) {
  .product-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
  }
}

/* PRODUCT CARD */
.product-card {
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  border: 1px solid #ECEFF1;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  position: relative;
}

.product-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.card-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #F1F5F9;
  overflow: hidden;
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.badge-discount {
  position: absolute;
  top: 8px;
  right: 8px;
  background: #FFD424;
  color: #D73211;
  font-weight: 800;
  font-size: 0.72rem;
  padding: 2px 6px;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.badge-tag {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  color: var(--white);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.card-video-pill {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(238, 77, 45, 0.9);
  color: var(--white);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 4px;
}

.card-body {
  padding: 10px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gray-900);
  line-height: 1.35;
  height: 2.7em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  margin-bottom: 6px;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--gray-500);
  margin-bottom: 6px;
}

.card-rating {
  color: #FFA500;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 2px;
}

.card-price-wrap {
  margin-top: auto;
  padding-top: 4px;
}

.card-price-original {
  font-size: 0.72rem;
  color: var(--gray-500);
  text-decoration: line-through;
}

.card-price-current {
  font-size: 1rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.2;
}

.card-btn-action {
  margin-top: 8px;
  width: 100%;
  padding: 7px;
  background: var(--primary-gradient);
  color: var(--white);
  font-size: 0.78rem;
  font-weight: 700;
  border: none;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(238, 77, 45, 0.2);
  text-decoration: none;
}

.card-btn-action:hover {
  filter: brightness(1.05);
}

/* MODAL DRAWER (DETAIL PRODUK & VIDEO) */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: none;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.modal-backdrop.active {
  display: flex;
  opacity: 1;
}

.modal-sheet {
  background: var(--white);
  width: 100%;
  max-width: 580px;
  max-height: 88vh;
  border-radius: 20px 20px 0 0;
  overflow-y: auto;
  padding: 16px 16px 85px 16px;
  position: relative;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

@media (min-width: 768px) {
  .modal-backdrop {
    align-items: center;
  }
  .modal-sheet {
    border-radius: 20px;
    max-height: 85vh;
  }
}

.modal-close-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: var(--gray-100);
  border: none;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--gray-700);
  z-index: 10;
}

.modal-video-wrap {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #000;
  margin-bottom: 12px;
}

.modal-video-wrap iframe,
.modal-video-wrap video {
  width: 100%;
  height: 100%;
  border: none;
}

.modal-header-info {
  margin-bottom: 12px;
}

.modal-price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 6px 0;
}

.modal-price-val {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary);
}

.modal-price-strikethrough {
  font-size: 0.85rem;
  color: var(--gray-500);
  text-decoration: line-through;
}

.modal-desc-box {
  background: var(--gray-50);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  padding: 12px;
  font-size: 0.85rem;
  color: var(--gray-700);
  margin-bottom: 14px;
}

.modal-highlights {
  list-style: none;
  margin-top: 8px;
}

.modal-highlights li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 4px;
  font-size: 0.82rem;
  color: var(--gray-700);
}

.modal-highlights li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--secondary);
  font-weight: 800;
}

/* STICKY BOTTOM ACTIONS FOR MODAL */
.modal-sticky-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 580px;
  background: var(--white);
  padding: 10px 14px;
  border-top: 1px solid #E5E7EB;
  display: flex;
  gap: 10px;
  z-index: 210;
  box-shadow: 0 -3px 10px rgba(0,0,0,0.06);
}

.btn-cta-shopee {
  flex: 1;
  padding: 12px 16px;
  background: var(--primary-gradient);
  color: var(--white);
  text-decoration: none;
  font-weight: 800;
  font-size: 0.95rem;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: var(--shadow-lg);
  transition: transform 0.15s ease;
}

.btn-cta-shopee:active {
  transform: scale(0.98);
}

.btn-share-wa {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-full);
  background: #25D366;
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 1.25rem;
  box-shadow: 0 3px 8px rgba(37, 211, 102, 0.3);
}

/* FOOTER */
.site-footer {
  margin-top: 30px;
  background: var(--white);
  border-top: 1px solid #E5E7EB;
  padding: 24px 0;
  text-align: center;
  font-size: 0.78rem;
  color: var(--gray-500);
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 8px;
}

.footer-links a {
  color: var(--gray-700);
  text-decoration: none;
  font-weight: 600;
}

.footer-links a:hover {
  color: var(--primary);
}
