/* 
  Baby N - Elegant White, Black, Gold Theme
  Aesthetic: Premium, Clean, Lux
*/

/* --- Custom Cursor Baby Bottle --- */
html, body {
  cursor: url('images/cursor-bottle.png') 8 8, auto;
}

*, *::before, *::after {
  cursor: inherit;
}

/* --- Import Fonts --- */
@font-face {
  font-family: 'Starborn';
  src: url('fonts/Starborn.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

:root {
  /* Core Colors */
  --color-white: #FFFFFF;
  --color-offwhite: #FAFAFA;
  --color-black: #121212;
  --color-dark-gray: #1E1E1E;
  
  /* Gold Palette for gradients & accents */
  --color-gold-light: #F9F295;
  --color-gold-base: #D4AF37;
  --color-gold-dark: #B8860B;
  
  /* Gradients */
  --gradient-gold: linear-gradient(135deg, #F9F295 0%, #E0AA3E 30%, #B8860B 70%, #F9F295 100%);
  --gradient-dark: linear-gradient(145deg, #1A1A1A 0%, #000000 100%);
  
  /* Typography */
  --font-heading: 'Playfair Display', serif;
  --font-body: 'Outfit', sans-serif;
  
  /* Spacings & Shadows */
  --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.05);
  --shadow-gold: 0 10px 25px rgba(212, 175, 55, 0.2);
  --shadow-dark: 0 15px 35px rgba(0, 0, 0, 0.2);
  --radius-lg: 16px;
  --radius-full: 9999px;
  
  /* Transitions */
  --transition-smooth: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

/* --- Dark Mode Override --- */
body.dark-mode {
  --color-white: #121212;
  --color-offwhite: #1A1A1A;
  --color-black: #FFFFFF;
  --color-dark-gray: #E0E0E0;
  
  --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.5);
  --shadow-dark: 0 15px 35px rgba(0, 0, 0, 0.8);
}

/* Handle specific borders in dark mode */
body.dark-mode #searchInput,
body.dark-mode .filter-toggle-btn,
body.dark-mode .submenu-options,
body.dark-mode .custom-select-options,
body.dark-mode .link-card,
body.dark-mode .product-image,
body.dark-mode .social-icon {
  border-color: #333 !important;
}

body.dark-mode .custom-option:hover,
body.dark-mode .custom-checkbox-option:hover,
body.dark-mode .filter-menu-item:hover {
  background: #252525;
}

/* Fix contrast visibility loops in dark mode */
body.dark-mode .category-dropdown-wrapper .custom-select-trigger {
  color: #1A1A1A; /* Text hitam agar terbaca jelas di background putih */
}

body.dark-mode .custom-option.selected {
  color: #1A1A1A !important; /* Text hitam di atas blok opsi berwarna kuning */
}

body.dark-mode .filter-toggle-btn {
  color: #E0E0E0; /* Text terang untuk tombol filter */
}

body.dark-mode .link-platform.tiktok {
  color: #FFFFFF !important; /* Ikon TikTok logo putih di dark mode */
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--color-offwhite);
  color: var(--color-black);
  font-family: var(--font-body);
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* --- Background Decorations (Subtle) --- */
.background-decor {
  position: absolute;
  top: -150px;
  left: -150px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.08) 0%, rgba(255,255,255,0) 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

.background-decor-2 {
  position: fixed;
  bottom: -200px;
  right: -100px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(26, 26, 26, 0.03) 0%, rgba(255,255,255,0) 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

/* --- Layout --- */
.container {
  max-width: 680px;
  margin: 0 auto;
  padding: 40px 20px;
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
}

/* --- Profile Section --- */
.profile-section {
  text-align: center;
  margin-bottom: 30px;
  width: 100%;
}

.profile-image-container {
  position: relative;
  width: 110px;
  height: 110px;
  margin: 0 auto 20px;
}

.profile-ring {
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  border-radius: 50%;
  background: var(--gradient-gold);
  z-index: 1;
  animation: spin 10s linear infinite;
}

.profile-logo {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 4px solid var(--color-white);
  background-color: var(--color-black);
}

.profile-name {
  font-family: 'Starborn', var(--font-heading);
  font-size: 2.2rem;
  font-weight: normal;
  color: var(--color-black);
  margin-bottom: 8px;
  letter-spacing: 1px;
}

.profile-bio {
  font-size: 0.95rem;
  color: #666;
  max-width: 400px;
  margin: 0 auto 20px;
  font-weight: 300;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 15px;
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--color-white);
  color: var(--color-black);
  font-size: 1.35rem;
  text-decoration: none;
  box-shadow: var(--shadow-soft);
  transition: var(--transition-smooth);
  border: 1px solid rgba(0,0,0,0.05);
}

.social-icon:hover {
  background: var(--gradient-gold);
  color: var(--color-black);
  transform: translateY(-3px);
  box-shadow: var(--shadow-gold);
  border-color: transparent;
}

/* --- Top Controls (Theme & Language) --- */
.top-control-btn {
  position: absolute;
  top: 20px;
  background: var(--color-black);
  color: var(--color-white);
  border: none;
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-soft);
  transition: var(--transition-smooth);
  z-index: 1000;
}

.top-control-btn.theme-btn {
  left: 20px;
  width: 40px;
  height: 40px;
  font-size: 1.1rem;
}

.top-control-btn.lang-btn {
  right: 20px;
  width: 40px;
  height: 40px;
  padding: 0;
}

.top-control-btn:hover {
  background: var(--gradient-gold);
  color: var(--color-black);
  transform: translateY(-2px);
  box-shadow: var(--shadow-gold);
}

.lang-btn .active-lang {
  color: var(--color-gold-light);
}

.lang-btn:hover .active-lang {
  color: var(--color-black);
}

.theme-btn i {
  transition: transform 0.5s ease;
}

.theme-btn.rotating i {
  transform: rotate(360deg);
}

/* --- Search Section --- */
.search-section {
  width: 100%;
  margin-bottom: 20px;
  padding: 0 10px;
}

.search-box {
  position: relative;
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
}

.search-icon {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: #AAA;
  font-size: 1.1rem;
  transition: var(--transition-smooth);
}

#searchInput {
  width: 100%;
  padding: 14px 20px 14px 50px;
  border-radius: var(--radius-full);
  border: 1px solid #EAEAEA;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--color-black);
  background-color: var(--color-white);
  box-shadow: 0 4px 15px rgba(0,0,0,0.03);
  transition: var(--transition-smooth);
  outline: none;
}

#searchInput::placeholder {
  color: #AAA;
  font-weight: 300;
}

#searchInput:focus {
  border-color: var(--color-gold-base);
  box-shadow: var(--shadow-gold);
}

.search-box:focus-within .search-icon {
  color: var(--color-gold-base);
}

/* --- Nav Section (Filter Button + Categories) --- */
.nav-section {
  width: 100%;
  margin-bottom: 25px;
  padding: 0 10px;
  position: relative;
  z-index: 100; /* SOLUSI: Memaksa area navigasi selalu di atas kartu link */
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: center; /* CENTER ALIGNMENT */
  gap: 12px;
  padding-bottom: 5px; 
  max-width: 100%;
  position: relative;
  z-index: 101; /* Fix overlap keanehan */
}

/* Filter Toggle Button */
.filter-toggle-btn {
  background: var(--color-white);
  border: 1px solid #EAEAEA;
  color: #555;
  padding: 10px 18px;
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-smooth);
  flex-shrink: 0;
  height: 40px; /* match dropdown height */
}

.filter-toggle-btn i {
  color: var(--color-gold-base);
}

.filter-toggle-btn:hover, .filter-toggle-btn.active-panel {
  border-color: var(--color-gold-base);
  color: var(--color-black);
  box-shadow: 0 4px 10px rgba(212, 175, 55, 0.1);
}

/* --- Custom Dropdowns (Category + Advanced Filters) --- */
.custom-select-wrapper {
  position: relative;
  user-select: none;
  z-index: 50;
}

/* Base Trigger Mechanics */
.custom-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.custom-select-trigger .icon-right {
  font-size: 0.7rem;
  transition: transform 0.3s ease;
  margin-left: 10px;
}

.custom-select-wrapper.open .custom-select-trigger .icon-right {
  transform: rotate(180deg);
}

/* Primary Black Dropdown (Category) */
.category-dropdown-wrapper {
  width: 200px;
}

.category-dropdown-wrapper .custom-select-options {
  overflow: hidden;
}

.category-dropdown-wrapper .custom-select-trigger {
  background: var(--color-black);
  color: var(--color-gold-light);
  padding: 0 18px;
  height: 40px;
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  white-space: nowrap;
}

.category-dropdown-wrapper .custom-select-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.category-dropdown-wrapper .custom-select-trigger:hover,
.category-dropdown-wrapper.open .custom-select-trigger {
  box-shadow: var(--shadow-dark);
}

/* Base Options Box (Dropdown Container) */
.custom-select-options {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  min-width: 100%;
  background: var(--color-white);
  border-radius: 12px;
  box-shadow: var(--shadow-dark);
  border: 1px solid #EAEAEA;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 999;
}

.custom-select-wrapper.open .custom-select-options {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Option Element (Category Dropdown Items) */
.custom-option {
  padding: 12px 18px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--color-black);
  cursor: pointer;
  transition: background 0.2s ease;
}

.custom-option:hover {
  background: var(--color-offwhite);
  color: var(--color-gold-dark);
}

.custom-option.selected {
  background: var(--color-gold-light);
  color: var(--color-black);
  font-weight: 600;
}

/* Nested Filter Master Menu */
.filter-dropdown-wrapper {
  z-index: 60;
}

.master-filter-options {
  min-width: 170px;
  padding: 8px 0;
}

.filter-menu-item {
  position: relative;
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--color-black);
  transition: background 0.2s ease;
  cursor: pointer;
}

.menu-item-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
}

.menu-item-content i:first-child {
  color: #888;
  margin-right: 8px;
  width: 16px;
  text-align: center;
}

.menu-item-content .chevron-right {
  font-size: 0.65rem;
  color: #aaa;
  transition: transform 0.3s ease;
}

.filter-menu-item.submenu-open {
  background: var(--color-offwhite);
  color: var(--color-gold-dark);
}

.filter-menu-item.submenu-open .chevron-right {
  transform: rotate(90deg);
}

/* Checkbox Option Element */
.custom-checkbox-option {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--color-black);
  cursor: pointer;
  transition: background 0.2s ease;
  user-select: none;
  width: 100%;
}

.custom-checkbox-option:hover {
  background: var(--color-offwhite);
}

.custom-checkbox-option input[type="checkbox"] {
  accent-color: var(--color-gold-base);
  margin-right: 10px;
  cursor: pointer;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* Fix text inheritance on hover */
.filter-menu-item:hover .submenu-options .custom-checkbox-option,
.filter-menu-item.submenu-open .submenu-options .custom-checkbox-option {
  color: var(--color-black); /* Reset color against gold hover */
}

/* Submenu Flyout (Disampingnya) */
.submenu-options {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 0;
  left: 100%; /* Default opens to the right */
  margin-left: 2px;
  background: var(--color-white);
  border-radius: 12px;
  box-shadow: var(--shadow-dark);
  border: 1px solid #EAEAEA;
  min-width: 160px;
  padding: 6px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-10px);
  transition: all 0.3s ease;
  z-index: 1000;
}

/* Menggunakan class .submenu-open saja (diatur via JS) agar kompatibel dengan layar sentuh HP */
.filter-menu-item.submenu-open .submenu-options {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

/* If screen is too small, fallback mobile styling for flyout menu is needed. For simplicity, we ensure minimum width and stack properly. */
@media screen and (max-width: 500px) {
  .submenu-options {
    left: 20%;
    top: 100%;
    margin-left: 0;
    margin-top: -5px;
  }
}

.no-results {
  text-align: center;
  padding: 30px;
  color: #888;
  font-size: 0.95rem;
  width: 100%;
  display: none;
  font-style: italic;
  margin: auto 0;
}

/* --- Links Container --- */
.links-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  flex-grow: 1;
}

/* Link Card */
.link-card {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--color-white);
  padding: 16px 20px;
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: var(--color-black);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(0,0,0,0.03);
  transition: var(--transition-smooth);
  overflow: hidden;
}

/* Card Hover Animation */
.link-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--gradient-gold);
  opacity: 0;
  transition: var(--transition-smooth);
}

.link-card:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: var(--shadow-dark);
  border-color: rgba(212, 175, 55, 0.4);
}

.link-card:hover::before {
  opacity: 1;
}

.product-image {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 12px;
  margin-right: 16px;
  flex-shrink: 0;
  border: 1px solid rgba(0,0,0,0.05);
  box-shadow: 0 4px 8px rgba(0,0,0,0.04);
  transition: transform 0.4s ease, border-color 0.3s ease;
  background: var(--color-offwhite);
}

.link-card:hover .product-image {
  transform: scale(1.05) rotate(1deg);
  border-color: rgba(212, 175, 55, 0.4);
}

.link-content {
  flex-grow: 1;
  padding-right: 10px;
}

.link-content h2 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--color-black);
  line-height: 1.3;
}

.link-content p {
  font-size: 0.8rem;
  color: #777;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 6px;
}

.card-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.card-tags span:not(.card-badge) {
  font-size: 0.65rem;
  color: #666;
  background: #F0F0F0;
  padding: 2px 6px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 3px;
}

.link-platform {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  color: #999;
  font-size: 1.2rem;
  gap: 6px;
}

.link-platform.shopee {
  color: #EE4D2D;
}
.link-platform.tiktok {
  color: #000000;
}

/* Multi-Store Buttons Container */
.link-platforms-container {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  margin-left: auto;
  flex-shrink: 0;
}

/* Tombol Logo Gambar (Shopee & TikTok) */
.platform-buttons {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end;
}

.store-btn-img {
  display: block;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  text-decoration: none;
}

.store-btn-img:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  opacity: 0.92;
}

.store-btn-logo {
  display: block;
  /* Aspek rasio 1743:674 ≈ 2.59:1 → tinggi 28px = lebar 72px */
  height: 28px;
  width: auto;
  max-width: 78px;
  object-fit: contain;
  border-radius: 7px;
}

@media (max-width: 480px) {
  .store-btn-logo {
    height: 24px;
    max-width: 66px;
  }
}

/* TikTok logo di Dark Mode: warna dibalik (hitam → putih) */
body.dark-mode .store-btn-img img[alt="TikTok"] {
  filter: invert(1);
}

.hot-badge {
  background: var(--gradient-gold);
  color: var(--color-black);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 5px rgba(212, 175, 55, 0.3);
}

/* --- Card Badges (Inline kecil, sejajar dengan tag usia) --- */
.card-tags .card-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.62rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.badge-terlaris {
  background: var(--gradient-gold);
  color: #1a1a1a;
}

.badge-promo {
  background: var(--gradient-gold);
  color: #1a1a1a;
}

/* --- Footer --- */
footer {
  margin-top: auto;
  padding-top: 50px;
  text-align: center;
  font-size: 0.8rem;
  color: #999;
  width: 100%;
}

/* --- Animations --- */
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.slide-up {
  opacity: 0;
  transform: translateY(20px);
  animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.fade-in {
  opacity: 0;
  animation: fadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animation-delay-1 { animation-delay: 0.2s; }
.animation-delay-2 { animation-delay: 0.4s; }

@keyframes slideUp {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  to { opacity: 1; }
}

/* Hide element class for JS */
.hidden-card {
  display: none !important;
}

/* Glassmorphism utility if needed */
.glass {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

/* --- Wishlist Star Button --- */

.wishlist-btn {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: #ccc;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, color 0.2s ease;
  z-index: 5;
  padding: 0;
}

.wishlist-btn:hover {
  transform: scale(1.2);
  color: #D4AF37;
}

.wishlist-btn.wishlisted {
  color: #D4AF37;
  text-shadow: 0 0 8px rgba(212, 175, 55, 0.5);
}

.wishlist-btn.wishlisted i {
  animation: starPop 0.3s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

@keyframes starPop {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.4); }
  100% { transform: scale(1); }
}

/* Kartu perlu position relative untuk star absolute */
.link-card {
  position: relative;
}

/* --- Product Toolbar --- */
.product-toolbar {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 4px 8px;
}

.wishlist-home-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  background: var(--color-white);
  color: #777;
  border-radius: var(--radius-full);
  padding: 8px 14px;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
  flex-shrink: 0;
}

.wishlist-home-toggle i {
  color: #B8B8B8;
  transition: var(--transition-smooth);
}

.wishlist-home-toggle:hover {
  color: var(--color-black);
}

.wishlist-home-toggle:hover i {
  color: var(--color-gold-base);
}

.wishlist-home-toggle.active {
  background: rgba(212, 175, 55, 0.12);
  color: var(--color-black);
}

.wishlist-home-toggle.active i {
  color: #D4AF37;
}

/* --- Product Count Bar --- */
.product-count {
  flex: 1;
  text-align: right;
  font-size: 0.78rem;
  color: #999;
  font-weight: 500;
}

/* --- Scroll to Top Button --- */
.scroll-top-btn {
  position: fixed;
  bottom: 24px;
  right: 20px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--gradient-gold);
  color: #1a1a1a;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
  z-index: 9999;
  opacity: 0;
  transform: translateY(20px) scale(0.8);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.scroll-top-btn.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.scroll-top-btn:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.5);
}

/* --- Responsive adjustments (HP 6.3" - 7" portrait) --- */
@media (max-width: 480px) {
  .container {
    padding: 20px 12px;
  }

  .profile-name {
    font-size: 1.7rem;
  }

  .profile-bio {
    font-size: 0.82rem;
  }

  .product-toolbar {
    gap: 10px;
    align-items: center;
  }

  .wishlist-home-toggle {
    padding: 8px 12px;
    font-size: 0.76rem;
  }

  .social-links {
    gap: 9px;
  }

  .social-icon {
    width: 34px;
    height: 34px;
    font-size: 1.05rem;
  }

  .custom-shopee-icon {
    width: 17px !important;
    height: 17px !important;
  }

  /* ---- Kartu Produk ---- */
  .link-card {
    padding: 11px 12px;
    align-items: flex-start;
  }

  .product-image {
    width: 62px;
    height: 62px;
    margin-right: 10px;
    flex-shrink: 0;
  }

  .link-content {
    flex: 1;
    min-width: 0; /* Cegah overflow */
    padding-right: 8px;
  }

  .link-content h2 {
    font-size: 0.83rem;
    line-height: 1.25;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .link-content p {
    font-size: 0.72rem;
    margin-bottom: 5px;
    -webkit-line-clamp: 1;
    line-clamp: 1;
  }

  .card-tags {
    gap: 3px;
    flex-wrap: wrap;
  }

  .card-tags span:not(.card-badge) {
    font-size: 0.58rem;
    padding: 2px 5px;
  }

  .card-tags .card-badge {
    font-size: 0.56rem;
    padding: 2px 5px;
  }

  /* Tombol Toko: susun horizontal berdampingan agar hemat ruang */
  .link-platforms-container {
    flex-shrink: 0;
    gap: 5px;
    align-items: flex-end;
    justify-content: flex-end;
  }

  .platform-buttons {
    flex-direction: column;
    gap: 5px;
    align-items: flex-end;
  }

  .store-btn-logo {
    height: 22px;
    max-width: 60px;
  }

  /* Filter bar */
  .nav-container {
    gap: 7px;
  }

  .filter-toggle-btn {
    padding: 7px 12px;
    font-size: 0.78rem;
    height: 34px;
  }

  .category-dropdown-wrapper {
    width: 160px;
  }

  .category-dropdown-wrapper .custom-select-trigger {
    height: 34px;
    font-size: 0.78rem;
    padding: 0 14px;
  }

  /* Search */
  #searchInput {
    font-size: 0.85rem;
    padding: 11px 16px 11px 42px;
  }
}

/* Layar sangat sempit (misalnya HP lawas) */
@media (max-width: 360px) {
  .product-image {
    width: 58px;
    height: 58px;
  }

  .category-dropdown-wrapper {
    width: 145px;
  }
}

/* Shopee Icon Dark Mode */
body.dark-mode .custom-shopee-icon {
  filter: invert(1);
}
