/*
Theme Name: ABSPEDIA
Theme URI: https://abspedia.id
Author: Abspedia
Author URI: https://abspedia.id
Description: Tema WordPress khusus affiliate dengan single landing page, cepat, responsif, dan SEO-ready.
Version: 1.0.0
License: GPL-2.0-or-later
Text Domain: abspedia
*/

:root {
  /* Core Colors */
  --abspedia-green: #23a46e;
  --abspedia-black: #0f1115;
  --abspedia-yellow: #ffd33d;
  --abspedia-blue: #1f6feb;
  --abspedia-white: #ffffff;

  /* Theme Variables - Light Mode (Default) */
  --bg: #f9fafb;
  --text: #111827;
  --card: #ffffff;
  --border: #e5e7eb;
  --muted: #6b7280;
  --header-bg: rgba(255, 255, 255, 0.85);
  --input-bg: #f3f4f6;

  /* Heights */
  --header-control-height: 40px;
  --footer-logo-height: 40px;
}

/* Theme Variables - Dark Mode */
body.dark-mode {
  --bg: #0f1115;
  --text: #f9fafb;
  --card: #1c1f26;
  --border: #2d333b;
  --muted: #9ca3af;
  --header-bg: rgba(15, 17, 21, 0.9);
  --input-bg: rgba(255, 255, 255, 0.06);
}

html {
  scroll-behavior: smooth
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Helvetica, Arial, 'Apple Color Emoji', 'Segoe UI Emoji';
  background: var(--bg);
  color: var(--text);
  transition: background 0.3s ease, color 0.3s ease;
}

a {
  color: var(--abspedia-blue);
  text-decoration: none
}

a:hover {
  color: var(--abspedia-yellow)
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ==========================================================================
   HEADER & NAVIGATION
   ========================================================================== */

header.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--header-bg);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
  transition: all 0.3s ease;
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 70px;
  gap: 20px;
}

.header-left,
.header-right {
  flex: 1;
  display: flex;
  align-items: center;
}

.header-center {
  flex: 2;
  display: flex;
  justify-content: center;
}

.site-branding .custom-logo {
  height: 36px;
  width: auto;
  transition: transform 0.2s;
}

.site-branding .custom-logo:hover {
  transform: scale(1.05);
}

.site-navigation ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 24px;
}

.site-navigation li {
  position: relative;
}

.site-navigation a {
  color: var(--text);
  font-weight: 500;
  font-size: 15px;
  transition: color 0.2s;
  padding: 8px 0;
}

.site-navigation a:hover {
  color: var(--abspedia-blue);
}

body.dark-mode .site-navigation a:hover {
  color: var(--abspedia-yellow);
}

/* Remove bullets from all navigation/footer menus */
.site-header ul,
.site-navigation ul,
.footer-col ul {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

.site-navigation li,
.footer-col li {
  list-style: none !important;
}

.searchbar {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  justify-content: flex-end;
}

.searchbar form {
  display: flex;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 2px;
  transition: all 0.2s;
  max-width: 240px;
  width: 100%;
}

.searchbar form:focus-within {
  border-color: var(--abspedia-blue);
  box-shadow: 0 0 0 3px rgba(31, 111, 235, 0.1);
}

.searchbar input[type="search"] {
  background: transparent;
  border: none;
  height: 36px;
  padding: 0 12px;
  color: var(--text);
  width: 100%;
  font-size: 14px;
}

.searchbar input[type="search"]:focus {
  outline: none;
}

.searchbar button {
  background: var(--abspedia-blue);
  color: #fff;
  border: none;
  border-radius: 8px;
  height: 36px;
  padding: 0 12px;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
}

/* Theme Toggle Refinement */
.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  font-size: 20px;
  border-radius: 10px;
  transition: all 0.2s;
}

.theme-toggle:hover {
  background: var(--border);
}

.theme-toggle .sun {
  display: none;
}

.theme-toggle .moon {
  display: block;
}

body.dark-mode .theme-toggle .sun {
  display: block;
}

body.dark-mode .theme-toggle .moon {
  display: none;
}

/* ==========================================================================
   MOBILE BOTTOM NAVIGATION
   ========================================================================== */

.mobile-bottom-nav {
  display: none;
  /* Desktop hidden */
}

@media (max-width: 768px) {
  .mobile-bottom-nav {
    display: block;
    position: fixed;
    bottom: 16px;
    left: 16px;
    right: 16px;
    z-index: 2000;
    background: rgba(15, 17, 21, 0.75);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
    padding: 12px 8px;
  }

  body:not(.dark-mode) .mobile-bottom-nav {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(0, 0, 0, 0.05);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
  }

  .mobile-bottom-nav-inner {
    display: flex;
    justify-content: space-around;
    align-items: center;
  }

  .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--muted);
    text-decoration: none;
    transition: all 0.2s;
    flex: 1;
  }

  .nav-item svg {
    width: 22px;
    height: 22px;
    transition: transform 0.2s;
  }

  .nav-item span {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
  }

  .nav-item:hover,
  .nav-item.active {
    color: var(--abspedia-blue);
  }

  body.dark-mode .nav-item:hover,
  body.dark-mode .nav-item.active {
    color: var(--abspedia-yellow);
  }

  .nav-item:active svg {
    transform: scale(0.9);
  }
}

/* ==========================================================================
   HERO SLIDER
   ========================================================================== */

.hero-slider {
  position: relative;
  overflow: hidden;
  height: 420px;
  border-radius: 20px;
  background: #000;
}

@media (max-width: 768px) {
  .hero-slider {
    height: 180px;
    border-radius: 12px;
  }
}

.hero-slider .slides {
  display: flex;
  height: 100%;
  transition: transform 0.6s cubic-bezier(0.645, 0.045, 0.355, 1);
}

.hero-slider .slide {
  min-width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  position: relative;
}

.hero-slider .slide::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 60%, rgba(0, 0, 0, 0.6));
}

.slider-dots {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 10;
}

.slider-dots .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: all 0.3s;
}

.slider-dots .dot.active {
  background: #fff;
  width: 24px;
  border-radius: 10px;
}

.slider-controls.desktop-only {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 30px;
}

.slider-button {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  cursor: pointer;
  pointer-events: auto;
  opacity: 0;
  transform: translateX(0);
  transition: all 0.3s;
}

.hero-slider:hover .slider-button {
  opacity: 1;
}

.slider-button#abspedia-prev {
  transform: translateX(-10px);
}

.slider-button#abspedia-next {
  transform: translateX(10px);
}

.hero-slider:hover .slider-button {
  transform: translateX(0);
}

.slider-button:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Product Filter UI Refinement */
.product-filters {
  display: flex;
  gap: 12px;
  margin-bottom: 32px;
  overflow-x: auto;
  padding-bottom: 12px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.product-filters::-webkit-scrollbar {
  display: none;
}

.filter-btn {
  padding: 10px 24px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.filter-btn:hover {
  transform: translateY(-2px);
  background: var(--input-bg);
  border-color: var(--abspedia-blue);
}

.filter-btn.active {
  background: var(--abspedia-blue);
  color: #fff;
  border-color: var(--abspedia-blue);
  box-shadow: 0 4px 12px rgba(31, 111, 235, 0.3);
}

body.dark-mode .filter-btn.active {
  background: var(--abspedia-yellow);
  color: #000;
  border-color: var(--abspedia-yellow);
  box-shadow: 0 4px 12px rgba(255, 211, 61, 0.3);
}

/* ==========================================================================
   PRODUCT GRID & CARDS (UNIFIED SYSTEM)
   ========================================================================== */

.product-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px;
}

/* 4-Column Grids for Portfolio/Review/Blog */

.portfolio-grid,
.review-grid,
.blog-grid {

  display: grid !important;

  grid-template-columns:
    repeat(5, minmax(0, 1fr));

  gap: 24px;

  width: 100%;
}

@media (max-width: 1024px) {

  .product-grid,
  .portfolio-grid,
  .review-grid,
  .blog-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.product-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.product-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.12);
  border-color: var(--abspedia-blue);
}

.product-card .thumb {
  aspect-ratio: 16/9;
  /* Standardized aspect ratio */
  background-size: cover;
  background-position: center;
  border-bottom: 1px solid var(--border);
  transition: transform 0.5s ease;
  display: block;
  background-color: var(--input-bg);
}

.product-card .thumb:empty::before {
  content: 'No Image';
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--muted);
  font-size: 12px;
}

.product-card:hover .thumb {
  transform: scale(1.05);
}

.product-card .content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  gap: 12px;
}

.product-card .title {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text);
  margin: 0;
}

.product-card .desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.price-discount {
  font-size: 18px;
  font-weight: 800;
  color: var(--abspedia-blue);
}

body.dark-mode .price-discount {
  color: var(--abspedia-yellow);
}

.price-normal {
  font-size: 14px;
  text-decoration: line-through;
  color: var(--muted);
}

.cta-row {
  display: flex;
  gap: 10px;
  margin-top: auto;
}

.cta-row .btn,
.product-card .btn {
  flex: 1;
  padding: 10px;
  font-size: 14px;
  border-radius: 10px;
  text-align: center;
  font-weight: 600;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--abspedia-blue);
  color: #fff;
}

.btn-primary:hover {
  background: #1a56b9;
  transform: scale(1.02);
}

.btn-secondary {
  background: var(--input-bg);
  color: var(--text);
  border-color: var(--border);
}

.btn-secondary:hover {
  background: var(--border);
  transform: scale(1.02);
}

body.dark-mode .btn-primary {
  background: var(--abspedia-yellow);
  color: #000;
}

body.dark-mode .btn-primary:hover {
  background: #e6bd35;
}

.hero-slider-wrapper {
  margin-top: 24px;
  margin-bottom: 24px;
}

.premium-slider {
  border-radius: 24px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

/* ==========================================================================
   FOOTER REFINEMENT
   ========================================================================== */

footer.site-footer {
  border-top: 1px solid var(--border);
  background: var(--card);
  padding: 80px 0 40px;
  margin-top: 60px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr !important;
  /* Force 4 columns as requested */
  gap: 48px;
}

.footer-col h4 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 24px;
  color: var(--text);
}

.footer-content {
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
}

.footer-social {
  display: flex;
  gap: 16px;
  margin-top: 24px;
}

.footer-social a {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--input-bg);
  color: var(--text);
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}

.footer-social a:hover {
  background: var(--abspedia-blue);
  color: #fff;
  border-color: var(--abspedia-blue);
  transform: translateY(-3px);
}

body.dark-mode .footer-social a:hover {
  background: var(--abspedia-yellow);
  color: #000;
  border-color: var(--abspedia-yellow);
}

/* ==========================================================================
   MOBILE RESPONSIVE (THEME SYSTEM)
   ========================================================================== */

.mobile-only {
  display: none;
}

@media (max-width: 768px) {
  .mobile-only {
    display: block;
  }

  .desktop-only {
    display: none !important;
  }

  /* Header Mobile Refinement */
  .site-header-inner {
    min-height: 60px;
    padding: 0 12px;
    gap: 8px;
  }

  .header-left {
    flex: 0 0 auto;
  }

  .site-branding .custom-logo {
    height: 24px;
  }

  .header-right {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .searchbar {
    gap: 6px;
    justify-content: flex-end;
  }

  .searchbar form {
    max-width: none;
    flex: 1;
    height: 36px;
    border-radius: 10px;
  }

  .searchbar input[type="search"] {
    height: 34px;
    font-size: 13px;
    padding: 0 10px;
  }

  .searchbar button {
    height: 32px;
    padding: 0 12px;
    font-size: 12px;
    border-radius: 8px;
  }

  .theme-toggle {
    width: 36px;
    height: 36px;
    font-size: 16px;
    border-radius: 10px;
    flex-shrink: 0;
    background: var(--input-bg);
    border: 1px solid var(--border);
  }

  /* Slider Mobile */
  .hero-slider-wrapper {
    margin-top: 12px;
    margin-bottom: 12px;
    padding: 0 12px;
  }

  .hero-slider {
    height: 200px;
    border-radius: 16px;
  }

  .slider-dots {
    bottom: 12px;
  }

  .slider-dots .dot {
    width: 6px;
    height: 6px;
  }

  .slider-dots .dot.active {
    width: 16px;
  }

  /* Unified Grid & Card Mobile */
  .section {
    padding: 32px 0;
  }

  .container {
    padding: 0 16px;
  }

  .product-grid,
  .portfolio-grid,
  .review-grid,
  .blog-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px;
  }

  .product-card {
    border-radius: 16px;
  }

  .product-card .thumb {
    aspect-ratio: 1/1;
    /* Square on mobile for better grid fit */
  }

  .product-card .content {
    padding: 12px;
    gap: 8px;
  }

  .product-card .title {
    font-size: 14px;
    height: 2.8em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .product-card .desc {
    display: none;
    /* Hide desc on mobile cards to save space */
  }

  .price-row {
    flex-direction: column;
    gap: 0;
  }

  .price-discount {
    font-size: 15px;
  }

  .price-normal {
    font-size: 11px;
  }

  /* Horizontal CTA Buttons Mobile */
  .cta-row {
    flex-direction: row !important;
    gap: 6px;
  }

  .cta-row .btn,
  .product-card .btn {
    padding: 8px 4px;
    font-size: 11px;
    border-radius: 8px;
    flex: 1;
  }

  /* Footer Mobile */
  footer.site-footer {
    padding: 40px 0 100px;
    /* Extra space for bottom nav */
  }

  .footer-inner {
    grid-template-columns: 1fr !important;
    gap: 32px;
    text-align: center;
  }

  .footer-social {
    justify-content: center;
  }
}


/* =================================
FINAL UNIFIED CARD LAYOUT
================================= */

.portfolio-item,
.review-item,
.post-item,
.article-item {

  display: flex;
  flex-direction: column;

  background: var(--card);

  border: 1px solid var(--border);

  border-radius: 20px;

  overflow: hidden;

  height: 100%;
}

/* IMAGE */

.portfolio-item img,
.review-item img,
.post-item img,
.article-item img {

  width: 100%;

  aspect-ratio: 16/9;

  object-fit: cover;

  display: block;
}

/* CONTENT AREA */

.portfolio-item>*:not(img),
.review-item>*:not(img),
.post-item>*:not(img),
.article-item>*:not(img) {

  padding-left: 18px;
  padding-right: 18px;
}

/* TITLE */

.portfolio-item h3,
.review-item h3,
.post-item h3,
.article-item h3 {

  font-size: 18px;

  line-height: 1.4;

  margin-top: 18px;
  margin-bottom: 12px;
}

/* DESCRIPTION */

.portfolio-item p,
.review-item p,
.post-item p,
.article-item p {

  color: var(--muted);

  line-height: 1.6;
}

/* BUTTON AREA */

.portfolio-item .btn,
.review-item .btn,
.post-item .btn,
.article-item .btn {

  margin-top: auto;
}

/* FORCE SAME HEIGHT */

.portfolio-grid,
.review-grid,
.blog-grid {

  align-items: stretch;
}

/* =================================
FORCE SAME CARD SIZE
================================= */

.portfolio-item,
.review-item,
.post-item,
.article-item {

  min-width: 0;

  width: 100% !important;

  max-width: none !important;

  box-sizing: border-box;
}

/* FORCE GRID STRETCH */

.portfolio-grid,
.review-grid,
.blog-grid {

  display: grid !important;

  align-items: stretch;

  grid-auto-rows: 1fr;
}

/* FORCE INNER FLEX */

.portfolio-item>*,
.review-item>*,
.post-item>*,
.article-item>* {

  width: 100%;
}

/* FIX BUTTON POSITION */

.portfolio-item .btn,
.review-item .btn,
.post-item .btn,
.article-item .btn {

  margin-top: auto;
}

/* =================================
PREMIUM SECTION BUTTONS
================================= */

.section-action,
.portfolio-action,
.review-action,
.article-action {

  display: flex;

  gap: 12px;

  flex-wrap: wrap;

  margin-top: 20px;
}

.section-action a,
.portfolio-action a,
.review-action a,
.article-action a,

a.view-all-btn,
a.review-btn,
a.portfolio-btn,
a.article-btn {

  display: inline-flex;

  align-items: center;

  justify-content: center;

  padding: 12px 22px;

  border-radius: 14px;

  background: linear-gradient(135deg,
      rgba(31, 111, 235, .15),
      rgba(35, 164, 110, .15));

  border: 1px solid rgba(255, 255, 255, .08);

  color: var(--text);

  font-size: 14px;

  font-weight: 700;

  backdrop-filter: blur(12px);

  transition: .25s ease;

  text-decoration: none;
}

.section-action a:hover,
.portfolio-action a:hover,
.review-action a:hover,
.article-action a:hover,

a.view-all-btn:hover,
a.review-btn:hover,
a.portfolio-btn:hover,
a.article-btn:hover {

  transform: translateY(-3px);

  border-color: rgba(31, 111, 235, .45);

  background: linear-gradient(135deg,
      rgba(31, 111, 235, .28),
      rgba(35, 164, 110, .22));

  color: #fff;
}

a.review-btn,
a.primary-btn {

  background: linear-gradient(135deg,
      var(--abspedia-blue),
      var(--abspedia-green));

  color: #fff;

  border: none;
}

/* =========================
   PREMIUM SECTION BUTTON
========================= */

.section-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 12px 18px;

  border-radius: 14px;

  background: rgba(255, 255, 255, .05);

  border: 1px solid rgba(255, 255, 255, .08);

  color: #00d4ff;

  font-weight: 600;

  text-decoration: none;

  transition: .25s ease;

  backdrop-filter: blur(10px);
}

.section-action-btn:hover {
  transform: translateY(-2px);

  background: rgba(0, 212, 255, .12);

  border-color: rgba(0, 212, 255, .3);

  box-shadow:
    0 8px 24px rgba(0, 212, 255, .15);
}

.section-action-btn.primary {
  background: linear-gradient(135deg,
      #00c896,
      #00d4ff);

  color: #fff;

  border: none;
}

/* =========================
   FIX BUTTON SECTION
========================= */

.section-action-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;

  padding: 12px 18px !important;

  border-radius: 14px !important;

  background: rgba(255, 255, 255, .05) !important;

  border: 1px solid rgba(255, 255, 255, .08) !important;

  color: #00d4ff !important;

  font-weight: 600 !important;

  text-decoration: none !important;

  transition: .25s ease !important;

  backdrop-filter: blur(10px);
}

.section-action-btn:hover {
  transform: translateY(-2px);

  background: rgba(0, 212, 255, .12) !important;

  border-color: rgba(0, 212, 255, .3) !important;

  color: #ffffff !important;

  box-shadow:
    0 8px 24px rgba(0, 212, 255, .15);
}

.section-action-btn.primary {
  background: linear-gradient(135deg,
      #00c896,
      #00d4ff) !important;

  color: #ffffff !important;

  border: none !important;
}

/* force text */
.section-action-btn.primary * {
  color: #ffffff !important;
}

/* =========================
HIDE MOBILE FOOTER MENU
========================= */

.footer-mobile-menu {
  display: none !important;
}

/* =========================
ABSPEDIA SOCIAL PROOF FIX
========================= */