/* =============================================================
   ShoppingPH — Components
   Buttons · Cards · Badges · Nav · Forms · Widgets
   ============================================================= */


/* ── BUTTONS ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.625rem var(--space-5);
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  line-height: 1;
  letter-spacing: 0.01em;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--duration-base) var(--ease-default);
  white-space: nowrap;
  user-select: none;
}

.btn:active { transform: scale(0.97); }

/* Primary — red CTA */
.btn-primary {
  background: var(--sph-red);
  color: var(--sph-white);
  border: 2px solid var(--sph-red);
  box-shadow: 0 2px 8px rgba(238, 77, 45, 0.3);
}

.btn-primary:hover {
  background: var(--sph-red-dark);
  border-color: var(--sph-red-dark);
  box-shadow: 0 4px 16px rgba(238, 77, 45, 0.4);
  transform: translateY(-1px);
}

/* Secondary — outlined */
.btn-secondary {
  background: transparent;
  color: var(--sph-red);
  border: 2px solid var(--sph-red);
}

.btn-secondary:hover {
  background: var(--sph-red-light);
}

/* Ghost — subtle */
.btn-ghost {
  background: transparent;
  color: var(--sph-gray-700);
  border: 2px solid var(--sph-gray-300);
}

.btn-ghost:hover {
  background: var(--sph-gray-100);
  border-color: var(--sph-gray-400);
}

/* White (on dark backgrounds) */
.btn-white {
  background: var(--sph-white);
  color: var(--sph-red);
  border: 2px solid var(--sph-white);
  font-weight: var(--weight-bold);
}

.btn-white:hover {
  background: var(--sph-red-light);
  border-color: var(--sph-red-light);
}

/* Affiliate CTA — special big button */
.btn-affiliate {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-8);
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  color: var(--sph-white);
  background: linear-gradient(135deg, var(--sph-red) 0%, var(--sph-orange) 100%);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 20px rgba(238, 77, 45, 0.4);
  transition: all var(--duration-base) var(--ease-spring);
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 400px;
  text-align: center;
}

.btn-affiliate::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--sph-red-dark) 0%, var(--sph-red) 100%);
  opacity: 0;
  transition: opacity var(--duration-base) var(--ease-default);
}

.btn-affiliate:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(238, 77, 45, 0.5);
}

.btn-affiliate:hover::before {
  opacity: 1;
}

.btn-affiliate span {
  position: relative;
  z-index: 1;
}

.btn-affiliate .btn-store-logo {
  position: relative;
  z-index: 1;
  height: 20px;
  width: auto;
}

/* Sizes */
.btn-sm {
  padding: 0.375rem var(--space-3);
  font-size: var(--text-xs);
}

.btn-lg {
  padding: 0.875rem var(--space-8);
  font-size: var(--text-md);
}

.btn-icon {
  padding: var(--space-2);
  border-radius: var(--radius-md);
}


/* ── BADGES / TAGS ───────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 0.2em 0.6em;
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  border-radius: var(--radius-sm);
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.badge-red {
  background: var(--sph-red);
  color: var(--sph-white);
}

.badge-red-light {
  background: var(--sph-red-light);
  color: var(--sph-red-dark);
}

.badge-gold {
  background: var(--sph-gold);
  color: #7A4800;
}

.badge-green {
  background: #E8F5E9;
  color: #1B5E20;
}

.badge-gray {
  background: var(--sph-gray-200);
  color: var(--sph-gray-700);
}

/* Label chips (categories, tags) */
.chip {
  display: inline-flex;
  align-items: center;
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  color: var(--sph-gray-700);
  background: var(--sph-gray-100);
  border: 1px solid var(--sph-gray-200);
  border-radius: var(--radius-pill);
  transition: all var(--duration-fast) var(--ease-default);
  cursor: pointer;
}

.chip:hover, .chip.is-active {
  background: var(--sph-red-light);
  border-color: var(--sph-red);
  color: var(--sph-red-dark);
}


/* ── STAR RATINGS ────────────────────────────────────────────── */
.star-rating {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.star-rating__stars {
  display: inline-flex;
  gap: 1px;
  color: var(--sph-gold);
}

.star-rating__stars svg {
  width: 14px;
  height: 14px;
}

.star-rating__value {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  color: var(--sph-gold-dark);
  margin-left: var(--space-1);
}

.star-rating__count {
  font-size: var(--text-xs);
  color: var(--sph-gray-500);
  margin-left: var(--space-1);
}


/* ── PRODUCT CARD ────────────────────────────────────────────── */
.product-card {
  background: var(--surface-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: all var(--duration-slow) var(--ease-out);
  position: relative;
  cursor: pointer;
}

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

.product-card__image-wrap {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--sph-gray-100);
}

.product-card__image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-slow) var(--ease-out);
}

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

.product-card__badge {
  position: absolute;
  top: var(--space-2);
  left: var(--space-2);
}

.product-card__wishlist {
  position: absolute;
  top: var(--space-2);
  right: var(--space-2);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255,255,255,0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--duration-fast) var(--ease-default);
  box-shadow: var(--shadow-sm);
}

.product-card:hover .product-card__wishlist {
  opacity: 1;
}

.product-card__body {
  padding: var(--space-3);
}

.product-card__title {
  font-size: var(--text-sm);
  font-weight: var(--weight-normal);
  color: var(--sph-gray-800);
  line-height: var(--leading-snug);
  margin-bottom: var(--space-2);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.product-card__price {
  font-family: var(--font-display);
  font-size: var(--text-md);
  font-weight: var(--weight-bold);
  color: var(--sph-red);
  margin-bottom: var(--space-1);
}

.product-card__price-original {
  font-size: var(--text-xs);
  color: var(--sph-gray-400);
  text-decoration: line-through;
  margin-left: var(--space-2);
}

.product-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: var(--space-2);
}

.product-card__store {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-xs);
  color: var(--sph-gray-500);
}

.product-card__store-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--sph-red);
  flex-shrink: 0;
}


/* ── SECTION HEADER ──────────────────────────────────────────── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-5);
  padding-bottom: var(--space-4);
  border-bottom: 2px solid var(--sph-gray-200);
  position: relative;
}

.section-header::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 60px;
  height: 2px;
  background: var(--sph-red);
}

.section-header__title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  color: var(--sph-gray-900);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.section-header__title-accent {
  color: var(--sph-red);
}

.section-header__link {
  font-size: var(--text-sm);
  color: var(--sph-red);
  font-weight: var(--weight-medium);
  display: flex;
  align-items: center;
  gap: var(--space-1);
  transition: gap var(--duration-fast) var(--ease-out);
}

.section-header__link:hover {
  gap: var(--space-2);
}


/* ── VERDICT BOX (quick summary at top of reviews) ───────────── */
.verdict-box {
  background: linear-gradient(135deg, var(--sph-gray-900) 0%, #2D2D2D 100%);
  border-radius: var(--radius-xl);
  padding: var(--space-6) var(--space-8);
  color: var(--sph-white);
  margin-bottom: var(--space-8);
  position: relative;
  overflow: hidden;
}

.verdict-box::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: rgba(238, 77, 45, 0.12);
}

.verdict-box::after {
  content: '';
  position: absolute;
  bottom: -30px;
  left: 20%;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: rgba(255, 115, 55, 0.08);
}

.verdict-box__inner {
  position: relative;
  z-index: 1;
}

.verdict-box__score {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: var(--radius-xl);
  background: var(--sph-red);
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: var(--weight-extrabold);
  color: var(--sph-white);
  box-shadow: 0 4px 20px rgba(238, 77, 45, 0.5);
  flex-shrink: 0;
}

.verdict-box__content {
  display: flex;
  gap: var(--space-6);
  align-items: flex-start;
}

.verdict-box__text-wrap {
  flex: 1;
}

.verdict-box__label {
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  margin-bottom: var(--space-1);
}

.verdict-box__headline {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  color: var(--sph-white);
  margin-bottom: var(--space-3);
}

.verdict-box__text {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.75);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-4);
}

.verdict-box__pros-cons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  margin-top: var(--space-4);
}

.verdict-box__pros,
.verdict-box__cons {
  font-size: var(--text-sm);
}

.verdict-box__pros-title,
.verdict-box__cons-title {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  margin-bottom: var(--space-2);
}

.verdict-box__pros-title { color: #4ADE80; }
.verdict-box__cons-title { color: #F87171; }

.verdict-box__pros li,
.verdict-box__cons li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  color: rgba(255,255,255,0.8);
  margin-bottom: var(--space-1);
  font-size: var(--text-xs);
}

.verdict-box__pros li::before {
  content: '✓';
  color: #4ADE80;
  flex-shrink: 0;
  font-weight: bold;
}

.verdict-box__cons li::before {
  content: '✗';
  color: #F87171;
  flex-shrink: 0;
  font-weight: bold;
}

@media (max-width: 640px) {
  .verdict-box {
    padding: var(--space-5);
  }
  .verdict-box__content {
    flex-direction: column;
    gap: var(--space-4);
  }
  .verdict-box__pros-cons {
    grid-template-columns: 1fr;
  }
}


/* ── SPECS TABLE ─────────────────────────────────────────────── */
.specs-table {
  width: 100%;
  border-collapse: collapse;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin: var(--space-6) 0;
}

.specs-table th,
.specs-table td {
  padding: var(--space-3) var(--space-5);
  font-size: var(--text-sm);
  text-align: left;
  border-bottom: 1px solid var(--sph-gray-200);
}

.specs-table thead th {
  background: var(--sph-red);
  color: var(--sph-white);
  font-family: var(--font-display);
  font-weight: var(--weight-semibold);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  border-bottom: none;
}

.specs-table tbody tr:nth-child(odd) td {
  background: var(--sph-white);
}

.specs-table tbody tr:nth-child(even) td {
  background: var(--sph-gray-50);
}

.specs-table tbody tr:last-child td {
  border-bottom: none;
}

.specs-table td:first-child {
  font-weight: var(--weight-semibold);
  color: var(--sph-gray-700);
  width: 35%;
}


/* ── AFFILIATE CTA BLOCK ─────────────────────────────────────── */
.affiliate-cta-block {
  background: var(--sph-red-mist);
  border: 2px solid var(--sph-red-light);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  text-align: center;
  margin: var(--space-8) 0;
}

.affiliate-cta-block__price-wrap {
  margin-bottom: var(--space-4);
}

.affiliate-cta-block__price-label {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  color: var(--sph-gray-500);
  margin-bottom: var(--space-1);
}

.affiliate-cta-block__price {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: var(--weight-extrabold);
  color: var(--sph-red);
  line-height: 1;
}

.affiliate-cta-block__price-note {
  font-size: var(--text-xs);
  color: var(--sph-gray-500);
  margin-top: var(--space-1);
}

.affiliate-cta-block__buttons {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  align-items: center;
}

.affiliate-cta-block__disclaimer {
  font-size: var(--text-xs);
  color: var(--sph-gray-400);
  margin-top: var(--space-3);
  line-height: var(--leading-relaxed);
}


/* ── SEARCH BAR ──────────────────────────────────────────────── */
.search-form {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 560px;
  background: var(--sph-white);
  border-radius: var(--radius-pill);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 2px solid transparent;
  transition: border-color var(--duration-fast) var(--ease-default);
}

.search-form:focus-within {
  border-color: var(--sph-red-light);
}

.search-form input {
  flex: 1;
  padding: 0.625rem var(--space-5);
  font-size: var(--text-sm);
  color: var(--sph-gray-900);
  background: transparent;
  outline: none;
}

.search-form input::placeholder {
  color: var(--sph-gray-400);
}

.search-form__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--sph-red);
  color: var(--sph-white);
  flex-shrink: 0;
  transition: background var(--duration-fast) var(--ease-default);
}

.search-form__btn:hover {
  background: var(--sph-red-dark);
}

.search-form__btn svg {
  width: 18px;
  height: 18px;
}


/* ── SIDEBAR WIDGETS ─────────────────────────────────────────── */
.widget {
  background: var(--surface-card);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-card);
  margin-bottom: var(--space-5);
}

.widget-title {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: var(--weight-bold);
  color: var(--sph-gray-900);
  padding-bottom: var(--space-3);
  margin-bottom: var(--space-4);
  border-bottom: 2px solid var(--sph-red-light);
  position: relative;
}

.widget-title::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 32px;
  height: 2px;
  background: var(--sph-red);
}

/* Category widget list */
.widget-category-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.widget-category-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-sm);
  color: var(--sph-gray-700);
  border-radius: var(--radius-sm);
  transition: all var(--duration-fast) var(--ease-default);
}

.widget-category-list a:hover {
  background: var(--sph-red-light);
  color: var(--sph-red-dark);
  padding-left: var(--space-4);
}

.widget-category-list .count {
  font-size: var(--text-xs);
  background: var(--sph-gray-200);
  color: var(--sph-gray-500);
  padding: 0.1em 0.5em;
  border-radius: var(--radius-pill);
}


/* ── BREADCRUMB ──────────────────────────────────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-1);
  font-size: var(--text-xs);
  color: var(--sph-gray-500);
  margin-bottom: var(--space-4);
}

.breadcrumb a {
  color: var(--sph-gray-500);
  transition: color var(--duration-fast) var(--ease-default);
}

.breadcrumb a:hover {
  color: var(--sph-red);
}

.breadcrumb__sep {
  color: var(--sph-gray-400);
  user-select: none;
}

.breadcrumb__current {
  color: var(--sph-gray-700);
  font-weight: var(--weight-medium);
}


/* ── PAGINATION ──────────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  margin-top: var(--space-10);
}

.pagination a,
.pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--sph-gray-700);
  background: var(--surface-card);
  border: 1px solid var(--sph-gray-200);
  transition: all var(--duration-fast) var(--ease-default);
}

.pagination a:hover {
  background: var(--sph-red-light);
  border-color: var(--sph-red);
  color: var(--sph-red);
}

.pagination .current {
  background: var(--sph-red);
  border-color: var(--sph-red);
  color: var(--sph-white);
}


/* ── LOADING SKELETON ────────────────────────────────────────── */
@keyframes shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}

.skeleton {
  background: linear-gradient(90deg, var(--sph-gray-200) 25%, var(--sph-gray-100) 50%, var(--sph-gray-200) 75%);
  background-size: 800px 100%;
  animation: shimmer 1.4s infinite linear;
  border-radius: var(--radius-sm);
}

.skeleton-card {
  background: var(--surface-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.skeleton-card__img {
  aspect-ratio: 1;
  width: 100%;
}

.skeleton-card__body {
  padding: var(--space-3);
}

.skeleton-line {
  height: 12px;
  margin-bottom: var(--space-2);
  border-radius: var(--radius-sm);
}

.skeleton-line--short { width: 60%; }
.skeleton-line--medium { width: 80%; }
.skeleton-line--full { width: 100%; }


/* ── NOTICE / ALERT ──────────────────────────────────────────── */
.notice {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-4);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  margin-bottom: var(--space-5);
}

.notice-info {
  background: #EFF6FF;
  border-left: 4px solid var(--sph-info);
  color: #1E40AF;
}

.notice-warning {
  background: #FFFBEB;
  border-left: 4px solid var(--sph-warning);
  color: #92400E;
}

.notice-success {
  background: #F0FDF4;
  border-left: 4px solid var(--sph-success);
  color: #166534;
}

/* Affiliate disclosure (required for compliance) */
.affiliate-disclosure {
  background: var(--sph-gray-100);
  border: 1px solid var(--sph-gray-200);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-xs);
  color: var(--sph-gray-500);
  margin-bottom: var(--space-6);
  line-height: var(--leading-relaxed);
}

.affiliate-disclosure a {
  color: var(--sph-red);
  text-decoration: underline;
}


/* ── POST META ───────────────────────────────────────────────── */
.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-xs);
  color: var(--sph-gray-500);
  margin-bottom: var(--space-4);
}

.post-meta__item {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.post-meta__item svg {
  width: 12px;
  height: 12px;
  opacity: 0.7;
}

.post-meta a {
  color: var(--sph-red);
}


/* ── CATEGORY ICON CARDS ─────────────────────────────────────── */
.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-2);
  background: var(--surface-card);
  border-radius: var(--radius-lg);
  text-align: center;
  box-shadow: var(--shadow-card);
  transition: all var(--duration-base) var(--ease-out);
  cursor: pointer;
}

.category-card:hover {
  background: var(--sph-red-light);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.category-card:hover .category-card__icon {
  background: var(--sph-red);
  color: var(--sph-white);
}

.category-card__icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--sph-red-light);
  color: var(--sph-red);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--duration-base) var(--ease-out);
}

.category-card__icon svg {
  width: 24px;
  height: 24px;
}

.category-card__name {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--sph-gray-800);
  line-height: var(--leading-tight);
}


/* ── STORE BADGE ─────────────────────────────────────────────── */
.store-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  border: 1px solid;
}

.store-badge--shopee {
  background: #FFF3F0;
  border-color: #EE4D2D;
  color: #EE4D2D;
}

.store-badge--lazada {
  background: #F0EEFF;
  border-color: #0F146D;
  color: #0F146D;
}

.store-badge--tiktok {
  background: #F0F9FF;
  border-color: #010101;
  color: #010101;
}

.store-badge--zalora {
  background: #FFF8F0;
  border-color: #F7941D;
  color: #F7941D;
}
