/* ==========================================================================
   Theme customisation (WordPress + HivePress device specs site)
   Contents
   1. Tokens
   2. Base
   3. WP blocks
   4. Utilities
   5. Components (focus, tooltip, thumbnails, footer, toast)
   6. Spec tables
   7. Comparison table
   8. Quick specs, prices, badges
   9. Reviews + skeleton loader
  10. Related devices carousel
  11. HivePress: listings grid, listing page, sidebar
  12. Listing search / hero
  13. Forms: review modal, Select2, filters, listing-update form
  14. Online-store table, topbar
  15. Sidebar widgets
  16. Listing view page (new layout)
  17. Front page
  18. Custom sidebar widget shortcodes
  19. Reduced motion
   ========================================================================== */


/* 1. TOKENS
-------------------------------------------------------------- */
:root {
  --bg-page: #f5f5f3;
  --bg-main: #ffffff;
  --bg-soft: #f1f0ec;
  --border: #d1dbd2;
  --border-accent: #e6e4dd;
  --border-color-2: #bbc1e1;

  --color-50: #e8eaf6;
  --color-100: #c5cae9;
  --color-200: #9fa8da;
  --color-300: #7986cb;
  --color-400: #5c6bc0;
  --color-500: #3f51b5;
  --color-600: #3949ab;
  --color-700: #303f9f;
  --color-800: #283593;
  --color-900: #283593;

  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);

  --rounded-sm: 0.25rem;
  --rounded-md: 0.375rem;
  --rounded-lg: 0.5rem;
  --rounded-xl: 0.75rem;
  --rounded-full: 9999px;

  --bg-warning: #faeeda;
  --text-warning: #854f0b;

  --text-primary: #1a1a18;
  --text-secondary: #5b5a54;
  --text-muted: #8a8880;
  /* Was referenced but never defined. currentColor keeps the old (inherited)
     look; change to a real colour, e.g. #2563eb, for accent links/icons. */
  --text-accent: currentColor;

  --footer: #17171a;
  --footer-heading: #f4f3f0;
  --footer-text: #a8a6a0;
  --footer-hover: #ffffff;
  --footer-divider: #2c2c30;
  --footer-accent: #5b9bd9;
  --footer-copy: #0f0f11;
  --footer-copy-text: #726f68;
}


/* 2. BASE
-------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

.bg-color-600 {
  background-color: var(--color-600);
}

.bg-color-700 {
  background-color: var(--color-700);
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-page);
  color: #374151;
  margin: 0;
}

a {
  text-decoration: none;
}

button:disabled {
  cursor: not-allowed;
  pointer-events: none;
}

input,
select,
textarea {
  border-radius: var(--rounded-md) !important;
  border-color: var(--border-color-2);
}


/* 4. UTILITIES
-------------------------------------------------------------- */

/* Typography */
.text-xs {
  font-size: 0.675rem;
}

.text-sm {
  font-size: 0.75rem;
}

.text-md {
  font-size: 1rem;
}

.text-lg {
  font-size: 1.125rem;
}

.text-xl {
  font-size: 1.25rem;
}

.text-2xl {
  font-size: 1.675rem;
}

.text-3xl {
  font-size: 1.875rem;
}

.text-4xl {
  font-size: 2.25rem;
}

.text-5xl {
  font-size: 3rem;
}

.font-bold {
  font-weight: 700;
}

.font-semibold {
  font-weight: 600;
}

.font-medium {
  font-weight: 500;
}

.text-white {
  color: #ffffff;
}

.text-gray-200 {
  color: #e5e7eb;
}

.text-gray-500 {
  color: #6b7280;
}

.text-gray-600 {
  color: #4b5563;
}

.text-gray-800 {
  color: #1f2937;
}

.text-gray-900 {
  color: #111827;
}

.text-yellow-400 {
  color: #facc15;
}

.text-color-600 {
  color: var(--color-600);
}

.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

/* Layout, flex & grid */
.flex {
  display: flex;
}

.grid {
  display: grid;
}

.hidden {
  display: none;
}

.block {
  display: block;
}

.inline-block {
  display: inline-block;
}

.items-center {
  align-items: center;
}

.items-start {
  align-items: flex-start;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.space-y-6> :not([hidden])~ :not([hidden]) {
  margin-top: 1.5rem;
}

.gap-2 {
  gap: 0.5rem;
}

.gap-4 {
  gap: 1rem;
}

.gap-6 {
  gap: 1.5rem;
}

.grid-cols-1 {
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

.grid-cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* Sizing & spacing */
.w-full {
  width: 100%;
}

.w-8 {
  width: 2rem;
}

.w-10 {
  width: 2.5rem;
}

.mw-8 {
  min-width: 2rem;
}

.h-full {
  height: 100%;
}

.h-10 {
  height: 2.5rem;
}

.h-2-5 {
  height: 0.625rem;
}

.flex-1 {
  flex: 1 1 0%;
}

.p-0 {
  padding: 0;
}

.p-2 {
  padding: 0.5rem;
}

.p-3 {
  padding: 0.75rem;
}

.p-4 {
  padding: 1rem;
}

.p-6 {
  padding: 1.5rem;
}

.pt-3 {
  padding-top: 0.75rem;
}

.pr-6 {
  padding-right: 1.5rem;
}

.py-2 {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.py-3 {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.py-4 {
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.px-2 {
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

.px-3 {
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}

.px-4 {
  padding-left: 1rem;
  padding-right: 1rem;
}

.px-5 {
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.px-6 {
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.m-0 {
  margin: 0;
}

.m-3 {
  margin: 0.75rem;
}

.m-auto {
  margin: auto;
}

.ml-auto {
  margin-left: auto;
}

.ml-1 {
  margin-left: 0.25rem;
}

.mr-2 {
  margin-right: 0.5rem;
}

.mr-4 {
  margin-right: 1rem;
}

.mt-1 {
  margin-top: 0.25rem;
}

.mt-8 {
  margin-top: 2rem;
}

.mb-2 {
  margin-bottom: 0.5rem;
}

.mb-3 {
  margin-bottom: 0.75rem;
}

.mb-6 {
  margin-bottom: 1.5rem;
}

.mb-8 {
  margin-bottom: 2rem;
}

.mb-12 {
  margin-bottom: 3rem;
}

/* NOTE: name suggests horizontal spacing but this sets margin-bottom. Check usage. */
.space-x-1 {
  margin-bottom: 0.25rem;
}

/* Borders & shadows */
.rounded-lg {
  border-radius: var(--rounded-lg);
}

.rounded-xl {
  border-radius: var(--rounded-xl);
}

.rounded-full {
  border-radius: var(--rounded-full);
}

.border {
  border-width: 1px;
  border-style: solid;
  border-color: #e5e7eb;
}

.border-t {
  border-top: 1px solid #e5e7eb;
}

.border-b {
  border-bottom: 1px solid #e5e7eb;
}

.border-solid {
  border-style: solid;
}

.border-dash {
  border-style: dashed;
}

.border-gray-300 {
  border-color: #d1d5db;
}

.shadow-md {
  box-shadow: var(--shadow-md);
}

.shadow-lg {
  box-shadow: var(--shadow-lg);
}

.shadow-xl {
  box-shadow: var(--shadow-xl);
}

/* Backgrounds & interactivity */
.bg-white {
  background-color: #ffffff;
}

.bg-gray-50 {
  background-color: #f9fafb;
}

.bg-gray-100 {
  background-color: #f3f4f6;
}

.bg-gray-200 {
  background-color: #e5e7eb;
}

.bg-yellow-400 {
  background-color: #facc15;
}

.hover\:bg-gray-100:hover {
  background-color: #f3f4f6;
}

.hover\:shadow-xl:hover {
  box-shadow: var(--shadow-xl);
}

.transition-all {
  transition-property: all;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 300ms;
}

.transition-colors {
  transition-property: background-color, border-color, color, fill, stroke;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 300ms;
}

.transition-shadow {
  transition-property: box-shadow;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 300ms;
}

.duration-300 {
  transition-duration: 300ms;
}

/* Misc */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border-width: 0;
}

.menu-item--user-account,
.menu-item--user-login {
  display: none;
}

.loop-entry .entry-header .entry-title {
  line-height: 1.2;
}

.object-cover {
  object-fit: cover;
}

.overflow-hidden {
  overflow: hidden;
}

/* Despite the name this sets width, not position. position added so it
   behaves like the Tailwind class and anchors absolutely-placed children. */
.relative {
  position: relative;
  width: 100%;
}

/* Responsive utilities (md: prefix) */
@media (min-width: 768px) {
  .md\:p-8 {
    padding: 2rem;
  }

  .md\:flex-row {
    flex-direction: row;
  }

  .md\:items-center {
    align-items: center;
  }

  .md\:mt-0 {
    margin-top: 0;
  }

  .md\:col-span-2 {
    grid-column: span 2 / span 2;
  }

  .md\:grid-cols-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }

  .md\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .md\:grid-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .md\:text-5xl {
    font-size: 3rem;
  }

  /* Was 5rem with a comment saying 48px */
  .hero-heading {
    font-size: 3rem;
  }
}


/* 5. COMPONENTS
-------------------------------------------------------------- */
.focus-ring:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.5);
}

/* Thumbnails / gallery */
.thumbnail-container {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
}

.thumbnail-container .thumbnail {
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  border: 2px solid transparent;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  background-color: #ffffff;
}

.thumbnail-container .thumbnail:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.thumbnail-container .thumbnail.active {
  border-color: #3b82f6;
}

.gallery-main-img,
.gallery-main-img #main-image {
  aspect-ratio: 1 / 1;
  object-fit: contain;
  margin-right: auto;
  margin-left: auto;
  max-height: 600px;
  background-color: #ffffff;
  width: 100%;
}

@media (max-width: 640px) {

  .gallery-main-img,
  .gallery-main-img #main-image {
    max-height: 400px;
  }
}

/* Tooltip */
.tooltip {
  position: relative;
  display: inline-block;
  cursor: help;
  border-bottom: 1px dotted #374151;
}

.tooltip .tooltip-text {
  visibility: hidden;
  width: 220px;
  background-color: #1f2937;
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 8px;
  position: absolute;
  z-index: 100;
  bottom: 125%;
  left: 50%;
  margin-left: -110px;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.tooltip:hover .tooltip-text,
.tooltip:focus-within .tooltip-text {
  visibility: visible;
  opacity: 1;
}

/* Footer */
.site-footer {
  background-color: var(--footer);
  color: var(--footer-text);
  font-size: 14px;
}

/* Toast */
.toast-notification {
  position: fixed;
  left: 50%;
  top: auto;
  bottom: 60%;
  transform: translateX(-50%);
  background-color: #333;
  color: #fff;
  padding: 12px 10px;
  border-radius: 8px;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, bottom 0.3s, visibility 0.3s;
  font-size: 0.875rem;
  height: calc(2rem + 10px);
}

.toast-notification.show {
  opacity: 0.7;
  visibility: visible;
  bottom: 55%;
}

.toast-notification.success {
  background-color: #28a745;
}

.toast-notification.error {
  background-color: #dc3545;
}


/* 6. SPEC TABLES
-------------------------------------------------------------- */
.specifications {
  margin-top: 1.5rem;
}

.specifications .key-specs {
  border: 1px solid #e2e8f0;
  background-color: #ffffff;
  border-radius: 0.75rem;
}

.specifications h2 {
  margin: 10px 10px 10px 15px;
  font-weight: 500;
  font-size: 1rem;
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.spec-table th,
.spec-table td {
  padding: 0.9rem 0.75rem;
  vertical-align: top;
}

.spec-table th {
  background-color: transparent;
  color: #334155;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  border-bottom: 1px solid #ffffff;
}

.spec-table td {
  color: #334155;
  border: 0;
}

.spec-table tbody tr:nth-child(odd) td {
  background-color: #ffffff;
}

.spec-table tbody tr:nth-child(even) td {
  background-color: #f8fafc;
}

.spec-table-nested {
  padding: 1rem;
  font-size: 0.95rem;
  background-color: #f1f5f9;
  color: #1f2937;
}

.spec-table-inner-row {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid #e2e8f0;
}

.spec-table-inner-row td {
  line-height: 1.5;
}

.spec-table-inner-row .spec-table-label {
  flex: 0 0 42%;
  color: #475569;
  font-weight: 600;
}

.spec-table-inner-row .spec-table-value {
  flex: 1;
  color: #0f172a;
}

.spec-table-inner-row .spec-table-label,
.spec-table-inner-row .spec-table-value {
  padding: 0.5rem 0.75rem;
}

/* Mobile overrides come AFTER the base rules so they actually apply */
@media (max-width: 47.99em) {
  .spec-table {
    font-size: 0.85rem;
  }

  .spec-table th,
  .spec-table td {
    padding: 0.75rem 0.85rem;
  }

  .spec-table-nested {
    padding: 0.75rem 0.85rem;
  }
}

@media (min-width: 768px) {
  .spec-table td {
    font-size: 100%;
  }

  .device-hero {
    aspect-ratio: 16 / 9;
    object-fit: cover;
  }
}

.device-hero {
  margin-bottom: 2rem;
}


/* 7. COMPARISON TABLE
-------------------------------------------------------------- */
.comparison-table-container {
  overflow-x: auto;
}

.compare-header {
  position: sticky;
  top: 0;
  background-color: #fff;
  z-index: 10;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.compare-cell {
  padding: 1rem;
  font-size: 0.875rem;
  text-align: center;
}

.spec-label-cell {
  font-weight: 600;
  background-color: #f9fafb;
  border-right: 1px solid #e5e7eb;
  text-align: right;
}

.device-header-cell {
  text-align: center;
  position: relative;
}

.device-image {
  width: 100px;
  height: 100px;
  min-width: 100px;
  margin: 0 auto 0.5rem;
}

.remove-device-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 50%;
  cursor: pointer;
}

.has-difference {
  background-color: #f7f7f7;
}

.spec-group-header {
  grid-column: 1 / -1;
  background-color: var(--bg-soft);
  font-weight: bold;
  padding: 0.75rem 1rem;
  cursor: pointer;
  text-align: center;
  justify-content: center;
  text-transform: uppercase;
}

.spec-group-header .toggle-icon {
  float: right;
  transition: transform 0.2s;
}

.spec-group-header.collapsed .toggle-icon {
  transform: rotate(-90deg);
}

.compare-row.hidden {
  display: none;
}

@media (max-width: 47.99em) {
  .device-image {
    width: 75px;
    height: 75px;
    min-width: 75px;
  }

  .device-footer-row .device-spec-cell {
    display: none;
  }

  .device-footer-row .device-spec-cell.active {
    display: block;
  }
}


/* 8. QUICK SPECS, PRICES, BADGES
-------------------------------------------------------------- */
.specs-container {
  display: flex;
  flex-direction: row;
  gap: 1rem;
  margin: 0;
  padding: 0;
  min-height: 100%;
}

.quick-specs-section {
  flex: 1;
  width: 100%;
}

.reviews-top {
  justify-content: space-between;
}

.reviews-top .review-stats {
  padding-top: 0.225rem;
}

.specs-horizontal-grid {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
}

.specs-horizontal-grid::-webkit-scrollbar {
  height: 6px;
}

.specs-horizontal-grid::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

.specs-horizontal-grid::-webkit-scrollbar-thumb {
  background: #c0c0c0;
  border-radius: 10px;
}

.specs-column {
  flex: 0 0 100%;
  width: 100%;
}

.spec-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.75rem;
  flex: 1 1 auto;
  min-height: 68px;
  padding: 0.75rem;
  margin-bottom: 0.75rem;
  background-color: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 1rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.spec-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.spec-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  background-color: #eff6ff;
  border-radius: 50%;
  color: #4338ca;
  font-size: 1rem;
}

.spec-label {
  font-size: 0.75rem;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 0.15rem;
  text-align: left;
}

.spec-value {
  font-size: 1rem;
  color: #0f172a;
  text-align: left;
}

.specs-section {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(244, 246, 248, 0.95) 100%);
  border: 1px solid #e2e8f0;
  box-shadow: 0 15px 50px rgba(15, 23, 42, 0.04);
}

.device-header-inner {
  max-width: 100%;
}

.device-title {
  font-size: 2rem;
  line-height: 1.05;
  margin-bottom: 0.5rem;
}

.device-header .text-prose {
  font-size: 0.95rem;
  color: #475569;
}

@media (max-width: 47.99em) {
  .spec-label {
    display: none;
  }

  .spec-value {
    font-size: 0.8rem;
  }

  .spec-item {
    justify-content: flex-start;
  }

  .specs-column {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }

  .device-hero #featured-image {
    aspect-ratio: 3 / 4;
    object-fit: cover;
  }
}

/* Prices / stores */
.store-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  margin-bottom: 0.5rem;
  background-color: #f9fafb;
  border-radius: 0.5rem;
  border: 1px solid #e5e7eb;
}

.store-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  background-color: #e0e7ff;
  border-radius: 0.5rem;
}

.store-info {
  flex-grow: 1;
}

.store-price {
  text-align: right;
}

.store-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: #1f2937;
}

.store-location {
  font-size: 0.75rem;
  color: #6b7280;
}

.price {
  font-size: 0.875rem;
  font-weight: 700;
  color: #1f2937;
}

.badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  text-transform: uppercase;
  margin-left: 0.5rem;
}

.badge.new {
  background: #d4edda;
  color: #155724;
}

.badge.updated {
  background: #e8f4fd;
  color: #0c5460;
}

.best-price {
  background-color: #ecfdf5;
  color: #047857;
  min-width: 0;
}

.online-store {
  background-color: #dbeafe;
  color: #1e40af;
  padding-bottom: 0;
  display: inline-block;
  max-width: 100%;
}

.add-to-compare-btn {
  padding-top: 10px;
  padding-bottom: 10px;
}

.add-to-compare-btn i {
  margin-right: 5px;
}


/* 9. REVIEWS + SKELETON
-------------------------------------------------------------- */
#reviews-container {
  position: relative;
  min-height: 140px;
  opacity: 1;
  transition: opacity 0.1s ease;
}

#reviews-container[aria-busy="true"] {
  opacity: 0.8;
}

#reviews-container .listing-review-card {
  margin-top: 0;
  margin-bottom: 10px;
}

.reviews-summary-inner {
  background-color: #ffffff;
  padding: 1rem;
  border-radius: var(--rounded-xl);
  box-shadow: var(--shadow-md);
  margin-bottom: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

@media (min-width: 48em) {
  .reviews-summary-inner {
    flex-direction: row;
  }
}

#pagination-container ul {
  gap: 0.5rem;
}

#pagination-container li button {
  display: inline-block;
  min-width: 32px;
  height: 32px;
  padding: 6px 7px 6px 8px;
  font-size: 0.875rem;
  line-height: normal;
  vertical-align: middle;
}

@media (max-width: 480px) {
  #pagination-container li button {
    min-width: 28px;
    height: 28px;
    padding: 6px 7px 6px 6px;
    font-size: 0.8rem;
  }
}

.hp-reviews-section #reviews-heading {
  font-weight: unset;
  font-size: 1.25rem;
}

.reviews-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
  .reviews-header {
    align-items: center;
    flex-direction: row;
  }

  .sort-reviews {
    margin-top: 0;
  }
}

.sort-reviews-label {
  display: block;
  font-weight: 500;
  font-size: 0.75rem;
}

.sort-reviews-select {
  width: 100%;
  padding: 0.5rem 1.5rem 0.5rem 0.5rem;
  border-width: 1px;
  border-color: #e5e7eb;
  border-radius: 0.5rem;
  font-size: 1rem;
}

/* Skeleton loader (visible unless .hidden is added) */
.reviews-skeleton {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 0.5rem 0;
}

.reviews-skeleton.hidden {
  display: none;
}

.skeleton-item {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem;
  border-radius: 0.5rem;
  background: #fff;
  box-shadow: var(--shadow-md);
}

.skeleton-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.skeleton-avatar,
.skeleton-title,
.skeleton-date,
.skeleton-stars,
.skeleton-text {
  background: linear-gradient(to right, #f3f4f6, #e5e7eb, #f3f4f6);
  background-size: 200% 100%;
  border-radius: 4px;
  animation: shimmer 1.8s infinite linear;
}

.skeleton-avatar {
  width: 40px;
  height: 40px;
  border-radius: 9999px;
}

.skeleton-title {
  width: 120px;
  height: 16px;
}

.skeleton-date {
  width: 80px;
  height: 14px;
  margin-left: auto;
}

.skeleton-stars {
  width: 100px;
  height: 14px;
}

.skeleton-text {
  width: 100%;
  height: 40px;
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }

  100% {
    background-position: 200% 0;
  }
}


/* 10. RELATED DEVICES CAROUSEL
-------------------------------------------------------------- */
#related-heading {
  font-size: 16px;
  font-weight: unset;
}

#related-heading::after,
#reviews-heading::after {
  content: " ";
  display: inline-block;
  height: 3px;
  width: 12px;
  margin-left: 4px;
  background-color: #737171;
}

.related-section {
  position: relative;
}

.carousel-container {
  display: flex;
  gap: 1.5rem;
  padding-bottom: 2rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  /* Hide scrollbar */
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.carousel-container::-webkit-scrollbar {
  display: none;
}

.related-card {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  box-sizing: border-box;
  flex: 0 0 45%;
  scroll-snap-align: start;
  background-color: #ffffff;
  border-radius: 0.5rem;
  border: 1px solid #e5e7eb;
  overflow: hidden;
}

.relative img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
}

.card-content-wrapper {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  box-sizing: border-box;
  height: auto;
  margin-top: -8px;
  background: #fff;
  border-top-left-radius: 0.5rem;
  border-top-right-radius: 0.5rem;
}

.card-content {
  flex: 1 1 auto;
  display: inline-flex;
  flex-direction: column;
  justify-content: start;
  min-height: 0;
  padding: 1rem;
}

.card-title {
  font-size: 1.125rem;
  font-weight: 500;
  line-height: 1.6;
}

.card-description {
  font-size: 0.875rem;
  color: #6b7280;
  margin-top: 0.25rem;
}

/* Carousel nav buttons (shown on large screens) */
.carousel-nav {
  display: none;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 3rem;
  height: 3rem;
  background-color: rgba(255, 255, 255, 0.9);
  border: 1px solid #e5e7eb;
  border-radius: 9999px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: all 0.3s ease;
  /* was #dedede on white: nearly invisible */
  color: var(--text-secondary);
  padding: 0;
}

.carousel-nav:hover {
  background-color: #fff;
  transform: translateY(-50%) scale(1.05);
}

.carousel-nav:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

#prevBtn {
  left: -1rem;
}

#nextBtn {
  right: -1rem;
}

@media (max-width: 47.99em) {
  .carousel-container {
    gap: 0.5rem;
  }

  .related-card .card-content {
    padding: 0.5rem;
  }

  .card-title {
    font-size: 12px;
    line-height: 1.4;
    margin: 0 0 2px;
    font-weight: 500;
  }
}

@media (min-width: 48em) and (max-width: 63.99em) {
  .carousel-container {
    gap: 0.5rem;
  }

  .related-card {
    flex-basis: 31%;
  }

  .card-title {
    font-size: 1rem;
  }
}

@media (min-width: 1024px) {
  .related-card {
    flex-basis: 22%;
  }

  .carousel-nav {
    display: flex;
    align-items: center;
    justify-content: center;
  }
}


/* 11. HIVEPRESS: LISTINGS GRID, LISTING PAGE, SIDEBAR
-------------------------------------------------------------- */
.key-features,
.device-price,
.specifications {
  border-bottom: 1px solid #9ca3af;
  padding-bottom: 1rem;
}

/* Listings page cards */
.hp-page.site-main .hp-row {
  gap: 1rem;
  margin-left: unset;
  margin-right: unset;
}

.hp-page__content.hp-col-sm-8,
.hp-page__content.hp-col-sm-8.hp-col-xs-12 {
  padding: 0;
}

.hp-listings .hp-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.hp-listing--view-block {
  gap: 0;
  height: 100%;
  position: relative;
  box-sizing: border-box;
  background-color: var(--bg-main);
  border: 1px solid var(--border);
  border-radius: var(--rounded-lg);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hp-listing--view-block:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.listings-wrapper .hp-listings .hp-grid__item {
  padding: unset;
  margin-bottom: 0;
  max-width: 100%;
}

.pagination .nav-links {
  justify-content: flex-start;
}

.hp-listing--view-block .hp-listing__content {
  padding: 0 0.75rem 0.75rem;
}

.hp-listing--view-block .hp-listing__header,
.hp-listing--view-block .hp-listing__header img,
.hp-listing__header .hp-listing__image {
  aspect-ratio: 1 / 1 !important;
  object-fit: contain;
}

.hp-listings .hp-listing__title {
  display: inline-block;
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  font-weight: 500;
  overflow: hidden;
}

@media (max-width: 63.99em) {
  .hp-listings .hp-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {

  .hp-listing--view-block .hp-listing__header,
  .hp-listing--view-block .hp-listing__header img {
    aspect-ratio: 1 / 1;
    object-fit: contain;
    /* was "fill", which stretched images */
  }

  .hp-listing.hp-listing--view-block .hp-listing__header {
    margin: 0;
    width: 100%;
  }

  .hp-listing.hp-listing--view-block .hp-listing__content {
    padding: 0.75rem;
  }
}

/* Device sidebar */
.device-sidebar {
  display: flex;
  flex-direction: column;
}

.device-sidebar .widget,
.primary-sidebar .widget {
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--rounded-md);
  background-color: var(--bg-main);
}

.device-sidebar .widget:not(:last-child),
.primary-sidebar .widget:not(:last-child) {
  /* was :not(last-child) */
  margin-bottom: 1rem;
}

/* Listing page layout */
.text-prose {
  font-size: 1rem;
  color: var(--text-muted);
}

.hp-listing--view-page {
  margin: 0;
}

.hp-page__footer:not(:first-child) {
  margin-top: 2rem;
}

.hp-page__header:not(:last-child) {
  margin-bottom: 2rem;
}

@media (min-width: 64em) {
  .hp-page__content {
    max-width: 100%;
    position: sticky;
    top: 20px;
    align-self: flex-start;
  }

  .device-sidebar {
    position: sticky;
    top: 20px;
    width: 100%;
  }

  .hp-listing--view-page {
    display: grid;
    grid-template-columns: minmax(0, 6fr) 3fr;
    gap: 1rem;
    align-items: flex-start;
  }

  .device-hero-inner {
    display: grid;
    grid-template-columns: 3fr 3fr;
    gap: 0.5rem;
  }
}

@media (max-width: 63.99em) {
  .hp-listing--view-page {
    display: block;
  }
}


/* 12. LISTING SEARCH / HERO
-------------------------------------------------------------- */
.listing-hero-section {
  position: relative;
  padding: 4rem 1rem;
  margin: -5rem -1.5rem 0;
  /* couples to theme padding; revisit if the theme changes */
  background: linear-gradient(135deg, #e0f2fe80 0%, #e4e4e45c 50%);
  text-align: center;
}

.listing-hero-section::before {
  content: '';
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  min-height: 10%;
  pointer-events: none;
  /* matches body background (was #f8f9fa, which left a seam) */
  background: linear-gradient(180deg, rgba(245, 245, 243, 0) 0%, rgba(245, 245, 243, 1) 100%);
}

.listing-hero-heading {
  margin-top: 2rem;
  margin-bottom: 2rem;
  font-size: 1.5rem;
  font-weight: 800;
  color: #484747;
  opacity: 0.8;
}

.listing-search-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  max-width: 768px;
  margin: 1rem auto;
}

.hp-form--listing-search {
  flex-grow: 1;
  display: flex;
  flex-direction: row;
  justify-content: unset;
  background-color: #ffffff;
  border: 1px solid transparent;
  border-radius: 0.75rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.07);
  transition: border-color 0.2s ease;
  align-items: unset;
}

.hp-form--listing-search:focus-within {
  border-color: #3b82f6;
  /* was red (debug leftover) */
}

.hp-form--listing-search .hp-field.hp-field--search {
  flex-grow: 1;
  max-height: 3.25rem;
  padding: 1rem 1.25rem;
  border: none;
  outline: none;
  font-size: 1rem;
  color: #1f2937;
  background: transparent;
}

.hp-form--listing-search input.hp-field.hp-field--search::placeholder {
  color: #9ca3af;
}

.hp-form--listing-search .hp-form__button {
  display: inline-block;
  width: 100%;
  height: 100%;
  min-height: 30px;
  padding: 0.5rem 0.785rem 0.5rem 0.85rem;
  border: none;
  background-color: transparent;
  color: #6b7280;
  cursor: pointer;
  transition: color 0.2s ease;
}

.listing-search-container .hp-block.hp-form--primary .hp-form__button:hover {
  color: #3b82f6;
}

.listing-search-container .hp-block.hp-form--primary .hp-form__button i {
  font-size: 1.25rem;
}

.hp-form--listing-search .hp-form__button::after {
  content: '\f002';
  font-family: "Font Awesome 5 Free";
  /* "Font Awesome 6 Free" if you upgrade */
  font-weight: 900;
  font-size: 1.25rem;
}

.hp-form--listing-search .hp-form__fields {
  margin-bottom: 0 !important;
  padding: 0;
  gap: 0;
  flex: 1;
}

.listing-search-container .button.button--large.hp-button.hp-button--wide.hp-button--mobile.hp-button--listing-filter {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 3.25rem;
  height: 3.25rem;
  background-color: #ffffff;
  border: none;
  border-radius: 0.75rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.07);
  color: #374151;
  cursor: pointer;
  padding: 0;
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.listing-search-container .button.button--large.hp-button.hp-button--wide.hp-button--mobile.hp-button--listing-filter:hover {
  background-color: #f9fafb;
}

.listing-search-container .button.button--large.hp-button.hp-button--wide.hp-button--mobile.hp-button--listing-filter i {
  font-size: 1.25rem;
  margin: 0;
}

.listing-search-container .button.button--large.hp-button.hp-button--wide.hp-button--mobile.hp-button--listing-filter span {
  display: none;
}

/* Featured categories */
.f-categories {
  width: 100%;
  margin-top: 10px;
  margin-bottom: 15px;
}

.f-categories-inner {
  display: inline-block;
  margin-right: auto;
  margin-left: auto;
}

.f-categories-inner span {
  display: inline-block;
  margin-bottom: 5px;
  background-color: rgba(255, 255, 255, 0.2);
}


/* 13. FORMS
-------------------------------------------------------------- */

/* --- Review submit modal ---
   NOTE: these rules used Tailwind @apply, which plain CSS ignores. They are
   now real CSS, so the modal will pick up styling it never had. */
.hp-modal {
  padding: 1rem;
  border-radius: 0.75rem;
}

.hp-modal h3 {
  line-height: normal;
}

.hp-modal .hp-form {
  margin: 0 auto !important;
  padding: 0;
  background-color: #fff;
  border-radius: 0.375rem;
  overflow: hidden;
}

.hp-form__fields .hp-form__field:focus,
.hp-field.select2-hidden-accessible:focus,
.hp-field--textarea:focus {
  outline: none;
  border-color: #3b82f6;
}

.hp-modal .hp-form__messages {
  padding: 1rem;
  margin-bottom: 1rem;
  font-size: 0.875rem;
  border-radius: var(--rounded-md);
  background-color: #f0f9ff;
  color: #0c4a6e;
  border: 1px solid #bae6fd;
}

.hp-modal .hp-form__messages--success {
  background-color: #f0fdf4;
  color: #166534;
  border-color: #6ee7b7;
  font-size: 90%;
}

.hp-modal .hp-form__messages--error {
  background-color: #fef2f2;
  color: #991b1b;
  border-color: #fca5a5;
  font-size: 90%;
}

.hp-modal .hp-form__messages:empty {
  display: none;
}

.hp-modal .hp-form__fields {
  margin-bottom: 1.5rem;
}

.hp-modal .hp-form__fields>*+* {
  margin-top: 0;
}

.hp-modal .hp-form__field {
  display: flex;
  flex-direction: column;
}

.hp-modal .hp-form__label,
.hp-modal .hp-form__label span {
  font-size: 0.85rem;
  font-weight: 500;
  color: #374151;
  margin-bottom: 5px;
}

.hp-modal .hp-form__label {
  display: block;
}

.hp-modal .hp-field--textarea {
  display: block;
  width: 100%;
  min-height: 120px;
  margin-top: 0.25rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: var(--rounded-md);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  resize: vertical;
}

.hp-modal .hp-field--textarea::placeholder {
  color: #9ca3af;
}

.hp-modal .hp-field--textarea:focus {
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.5);
}

.hp-modal .hp-form__footer {
  display: flex;
  justify-content: flex-end;
}

.hp-modal .hp-form__button {
  display: inline-flex;
  justify-content: center;
  padding: 0.75rem 1rem;
  border-radius: 0.325rem;
  font-size: 0.875rem;
  font-weight: 500;
  transition: background-color 0.15s;
}

.hp-modal .hp-form__button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px #3b82f6;
}

@media (max-width: 640px) {
  .hp-modal .hp-form {
    margin: 0.5rem;
  }

  .hp-modal .hp-form__button {
    width: 100%;
  }
}

/* --- Select2 --- */
.hp-field::-ms-expand {
  display: none;
}

.select2-container--default .select2-selection--single {
  height: 2.5rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--rounded-md);
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
  line-height: 2.5rem;
  padding-left: 0.75rem;
  color: #6b7280;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 2.5rem;
  right: 0.5rem;
}

.select2-dropdown {
  border: 1px solid var(--border) !important;
  border-radius: 0.375rem !important;
  font-family: system-ui, -apple-system, sans-serif;
  overflow: hidden;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.select2-dropdown--below {
  border-top-left-radius: 0 !important;
  border-top-right-radius: 0 !important;
}

.select2-dropdown--above {
  border-bottom-left-radius: 0.375rem !important;
  border-bottom-right-radius: 0.375rem !important;
}

.select2-results>.select2-results__options {
  max-height: 200px;
  overflow-y: auto;
  background-color: #fff;
  font-size: 0.875rem;
}

.select2-results__option {
  display: block;
  padding: 2px 0.75rem;
  color: #1f2937;
  cursor: pointer;
  transition: background-color 0.1s, color 0.1s;
}

.select2-container--default .select2-results__option--highlighted[aria-selected],
.select2-results__option--highlighted[aria-selected] {
  background-color: #3b82f6 !important;
  color: #fff !important;
}

.select2-results__option--disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.select2-results__message {
  padding: 0.75rem;
  text-align: center;
  color: #6b7280;
  font-size: 0.875rem;
  font-style: italic;
}

.select2-search--dropdown {
  padding: 0;
}

.select2-search--dropdown .select2-search__field {
  width: 100%;
  padding: 0.5rem;
  font-size: 0.875rem;
  outline: none;
  border-bottom: 1px solid #e5e7eb;
  border-color: #e5e7eb !important;
}

/* --- Sidebar / filter modal fields --- */
.hp-row .hp-page__sidebar #listing_filter_modal {
  margin: 0.75rem 0;
  margin-top: 0;
  padding: 0;
}

.hp-row .hp-page__sidebar .hp-form__field .hp-field__label.hp-form__label,
#listing_filter_modal .hp-form__field .hp-field__label.hp-form__label {
  margin-bottom: 10px;
}

.hp-row .hp-page__sidebar .hp-form__field.hp-form__field--checkboxes .hp-field.hp-field--checkboxes ul,
#listing_filter_modal .hp-form__field.hp-form__field--checkboxes .hp-field.hp-field--checkboxes ul {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 10px;
  padding-bottom: 5px;
}

.hp-row .hp-page__sidebar .hp-form__field.hp-form__field--checkboxes .hp-field.hp-field--checkboxes>ul>li,
#listing_filter_modal .hp-form__field.hp-form__field--checkboxes .hp-field.hp-field--checkboxes>ul>li {
  margin: 0;
  padding: 0;
  line-height: normal;
}

.hp-row .hp-page__sidebar .hp-form__field.hp-form__field--checkboxes .hp-field.hp-field--checkboxes>ul>li>label,
#listing_filter_modal .hp-form__field.hp-form__field--checkboxes .hp-field.hp-field--checkboxes>ul>li>label,
.hp-row .hp-page__sidebar .hp-form__fields .hp-form__field.hp-form__field--radio .hp-field.hp-field--radio ul>li>label,
#listing_filter_modal .hp-form__fields .hp-form__field.hp-form__field--radio .hp-field.hp-field--radio ul>li>label {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 5px;
  padding: 0;
  margin-bottom: 0.75rem;
}

.hp-row .hp-page__sidebar .hp-form__field.hp-form__field--checkboxes .hp-field.hp-field--checkboxes>ul>li>label>input,
#listing_filter_modal .hp-form__field.hp-form__field--checkboxes .hp-field.hp-field--checkboxes>ul>li>label>input,
.hp-row .hp-page__sidebar .hp-form__fields .hp-form__field.hp-form__field--radio .hp-field.hp-field--radio ul>li>label>input,
#listing_filter_modal .hp-form__fields .hp-form__field.hp-form__field--radio .hp-field.hp-field--radio ul>li>label>input {
  margin: 0;
  padding: 0;
  vertical-align: middle;
}

.hp-row .hp-page__sidebar .hp-form__field.hp-form__field--checkboxes .hp-field.hp-field--checkboxes>ul>li>label>span,
#listing_filter_modal .hp-form__field.hp-form__field--checkboxes .hp-field.hp-field--checkboxes>ul>li>label>span,
.hp-row .hp-page__sidebar .hp-form__fields .hp-form__field.hp-form__field--radio .hp-field.hp-field--radio ul>li>label>span,
#listing_filter_modal .hp-form__fields .hp-form__field.hp-form__field--radio .hp-field.hp-field--radio ul>li>label>span {
  margin: 0;
  padding: 0;
  font-size: 1rem;
  line-height: 1;
  vertical-align: middle;
}

.hp-page__sidebar .hp-field--checkboxes ul li:not(:last-child),
.hp-field--radio ul li:not(:last-child) {
  margin-bottom: 0.75rem;
}

/* Required-field asterisks */
.hp-form .hp-form__label:has(+ [required])>span::after,
.hp-form .hp-field__label:has(+ [required])>span::after {
  content: ' *';
  display: inline;
  color: #ff3860;
}

.row-has-values {
  background-color: #fff9e6;
  border-left: 4px solid #ff9800;
}

.is-now-required::after {
  content: " *";
  color: red;
  font-weight: bold;
}

/* --- Listing / vendor update form --- */
.hp-form.hp-form--listing-update .hp-form__field,
.hp-form.hp-form--vendor-update .hp-form__field {
  margin-bottom: 2.5rem;
}

.hp-form.hp-form--listing-update .hp-field__label.hp-form__label {
  padding-bottom: 10px;
  margin-bottom: 15px;
  font-weight: 600;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.hp-form.hp-form--listing-update .hp-field__label.hp-form__label small {
  display: none;
  color: rgba(0, 0, 0, 0.4);
}

.hp-form.hp-form--listing-update .hp-form__fields .hp-field--checkboxes ul {
  display: grid;
  grid-gap: 12px;
  align-items: center;
}

.hp-form.hp-form--listing-update .hp-form__fields .hp-field--checkboxes ul li {
  margin: 0;
}

.hp-form.hp-form--listing-update .hp-form__fields .hp-field--checkboxes ul li label {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 2px 0 0;
}

@media (min-width: 48em) {
  .hp-form.hp-form--listing-update .hp-form__field {
    flex-direction: row;
    margin-bottom: 20px;
  }

  .hp-form.hp-form--listing-update .hp-form__fields .hp-field--checkboxes ul {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 47.99em) {
  .hp-template--listing-edit-page .hp-form.hp-form--listing-update .hp-form__footer {
    position: sticky;
    z-index: 100;
    bottom: 0;
    padding-bottom: 0;
  }

  /* Un-stick the footer while a text field is focused (on-screen keyboard) */
  .hp-template--listing-edit-page .hp-form.hp-form--listing-update:has(:is(input[type="text"], input[type="search"], input[type="url"], input[type="number"], input[type="email"], input[type="password"], input[type="tel"], textarea):focus) .hp-form__footer {
    position: relative;
  }

  .hp-form.hp-form--listing-update .hp-form__fields .hp-field--checkboxes ul {
    grid-template-columns: repeat(2, 1fr);
  }

  .hp-form.hp-form--listing-update .hp-form__footer .hp-form__button.button-primary {
    max-width: 80%;
    border-radius: 15px;
    box-shadow: var(--shadow-lg);
  }
}

/* --- Custom checkbox --- */
.hp-form.hp-form--listing-update .hp-form__fields :is(.hp-field--checkboxes, .hp-field--checkbox) input[type=checkbox] {
  /* local tokens (renamed --border -> --cb-border so it no longer shadows the global one) */
  --active: #275efe;
  --active-inner: #fff;
  --focus: 2px rgba(39, 94, 254, 0.3);
  --cb-border: var(--border-color-2);
  --cb-border-hover: #275efe;
  --background: #fff;
  --disabled: #f6f8ff;
  --disabled-inner: #e1e6f9;

  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  display: inline-block;
  position: relative;
  vertical-align: top;
  width: 21px;
  height: 21px;
  margin: 0;
  padding: 0;
  outline: none;
  cursor: pointer;
  border: 1px solid var(--bc, var(--cb-border));
  background: var(--b, var(--background));
  border-radius: 7px;
  transition: background 0.3s, border-color 0.3s, box-shadow 0.2s;
}

.hp-form.hp-form--listing-update .hp-form__fields :is(.hp-field--checkboxes, .hp-field--checkbox) input[type=checkbox]::after {
  content: "";
  display: block;
  position: absolute;
  left: 7px;
  top: 4px;
  width: 5px;
  height: 9px;
  border: 2px solid var(--active-inner);
  border-top: 0;
  border-left: 0;
  transform: rotate(var(--r, 20deg));
  opacity: var(--o, 0);
  transition: transform var(--d-t, 0.3s) var(--d-t-e, ease), opacity var(--d-o, 0.2s);
}

.hp-form.hp-form--listing-update .hp-form__fields :is(.hp-field--checkboxes, .hp-field--checkbox) input[type=checkbox]:checked {
  --b: var(--active);
  --bc: var(--active);
  --d-o: 0.3s;
  --d-t: 0.6s;
  --d-t-e: cubic-bezier(0.2, 0.85, 0.32, 1.2);
  --o: 1;
  --r: 43deg;
}

.hp-form.hp-form--listing-update .hp-form__fields :is(.hp-field--checkboxes, .hp-field--checkbox) input[type=checkbox]:disabled {
  --b: var(--disabled);
  cursor: not-allowed;
  opacity: 0.9;
}

.hp-form.hp-form--listing-update .hp-form__fields :is(.hp-field--checkboxes, .hp-field--checkbox) input[type=checkbox]:disabled:checked {
  --b: var(--disabled-inner);
  --bc: var(--cb-border);
}

.hp-form.hp-form--listing-update .hp-form__fields :is(.hp-field--checkboxes, .hp-field--checkbox) input[type=checkbox]:hover:not(:checked):not(:disabled) {
  --bc: var(--cb-border-hover);
}

.hp-form.hp-form--listing-update .hp-form__fields :is(.hp-field--checkboxes, .hp-field--checkbox) input[type=checkbox]:focus {
  box-shadow: 0 0 0 var(--focus);
}

.hp-form.hp-form--listing-update .hp-form__fields :is(.hp-field--checkboxes label, .hp-field--checkbox label) span {
  display: inline-block;
  vertical-align: middle;
  max-width: 100%;
  margin: 0 5px;
  padding-top: 3px;
  font-size: 90%;
  line-height: 1;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}


/* 14. ONLINE-STORE TABLE, TOPBAR
-------------------------------------------------------------- */
#online-store {
  max-width: 100%;
}

#online-store table tbody {
  display: flex;
  flex-direction: column;
  max-width: 100%;
  gap: 5px;
}

#online-store table tbody tr {
  display: block;
  position: relative;
  padding: 10px;
  border: unset;
  border-radius: var(--rounded-md);
}

#online-store table tbody tr td {
  display: flex;
  flex-direction: row;
  box-sizing: border-box;
  width: 100%;
  max-width: 90%;
  margin: 0;
  border: unset;
}

#online-store table tbody tr td:is(:first-child, :last-child) {
  display: block;
  box-sizing: border-box;
  right: 4px;
  width: 10%;
  min-width: 10%;
  max-width: 10%;
  min-height: 10%;
  margin: 0;
  text-align: center;
}

#online-store table tbody tr td:first-child {
  top: 5px;
}

#online-store table tbody tr td:last-child {
  bottom: 4px;
}

@media (min-width: 48em) {
  #online-store table tbody tr {
    display: flex;
    flex-direction: row;
    gap: 10px;
    align-items: center;
    padding: 20px;
  }

  #online-store table tbody tr td:is(:first-child, :last-child) {
    display: block;
    width: unset;
    min-width: unset;
    max-width: 10%;
    height: unset;
    min-height: unset;
    padding: 5px 10px 0;
    box-shadow: var(--shadow-md);
  }

  #online-store table tbody tr td {
    width: 100%;
    max-width: unset;
  }
}

.hp-page__topbar.hp-page__topbar--separate {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  padding: 0;
  background-color: var(--border);
  border-radius: 15px;
}

.hp-page__topbar.hp-page__topbar--separate .hp-menu--tabbed.hp-menu.hp-menu--listing-manage {
  margin: 0;
  box-sizing: border-box;
  border: unset;
}

.hp-page__topbar.hp-page__topbar--separate .hp-listing__actions.hp-listing__actions--secondary {
  display: flex;
  flex-flow: row nowrap;
  justify-content: space-between;
  min-height: 0;
  margin: 0;
  padding: 1rem;
}

@media (max-width: 47.99em) {
  .hp-page__topbar.hp-page__topbar--separate .hp-listing__actions.hp-listing__actions--secondary span {
    display: none;
  }

  .hp-page__topbar.hp-page__topbar--separate .hp-listing__actions.hp-listing__actions--secondary i {
    margin: 0;
  }
}


/* 15. SIDEBAR WIDGETS (generic)
-------------------------------------------------------------- */
.hp-page__sidebar {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.hp-page__sidebar .widget {
  padding: 1rem;
  background-color: var(--bg-main);
  border: 1px solid var(--border);
  border-radius: var(--rounded-md);
}

.hp-page__sidebar .widget:not(:last-child) {
  margin-bottom: 1rem;
}

.hp-page__sidebar .widget ul,
.hp-page__sidebar .widget ol {
  margin: unset;
  list-style: none;
}

.listing-section-title,
.listing-widget-title,
.widget-title,
.widget__title,
.primary-sidebar.widget-area .widget-title,
.sidebar-widget .wp-block-heading,
.widget--sidebar .wp-block-heading,
.hp-page__sidebar .wp-block-heading,
.widget--sidebar h2,
.widget--sidebar h3,
.widget--sidebar h4 {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 0;
  padding-bottom: 0.75rem;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.widget-title::after,
.widget__title::after,
.sidebar-widget .wp-block-heading::after,
.widget--sidebar .wp-block-heading::after,
.hp-page__sidebar .wp-block-heading::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--bg-soft);
}

.view-all-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  font-size: 13px;
  text-decoration: none;
  color: unset;
}

.view-all-link::before {
  content: ' ';
  display: inline-block;
  flex: none;
  width: 5px;
  height: 30px;
  background-color: #eee;
}

/* Brands grid */
.brands-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.brand-link {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  background: #f8f9fa;
  border: 1px solid #eee;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.brand-link:hover {
  background: #e9ecef;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  text-decoration: none;
}

.brand-logo {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Recently updated list */
.devices-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.devices-list li {
  border-bottom: 1px solid #f0f0f0;
}

.devices-list li:last-child {
  border-bottom: none;
}

.device-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  color: #333;
  text-decoration: none;
  transition: color 0.2s ease;
}

.device-link:hover {
  color: #0066cc;
}

.device-name {
  flex-grow: 1;
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

/* Series list */
.series-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.series-device-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0.75rem;
  margin: 0.25rem 0;
  color: #333;
  text-decoration: none;
  background: #f8f9fa;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.series-device-link:hover {
  background: #e9ecef;
  transform: translateX(4px);
  text-decoration: none;
  color: #0066cc;
}

.series-device-name {
  font-size: 0.9rem;
}

.series-device-meta {
  font-size: 0.8rem;
  color: #6c757d;
}

/* Competitors (base styles; the sidebar widget overrides these in section 18) */
.competitors-wrapper {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-gap: 0.5rem;
  padding: 5px 0;
}

.competitor-cards {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 100%;
  padding: 5px 0;
  overflow: hidden;
}

.competitor-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 100%;
  padding: 0.75rem;
  overflow: hidden;
  background: #f8f9fa;
  border: 1px solid transparent;
  border-radius: 8px;
  text-decoration: none;
  color: #333;
  transition: all 0.2s ease;
}

.competitor-card:hover {
  background: #fff;
  border-color: #dee2e6;
  transform: translateY(-2px);
  box-shadow: 0 3px 3px rgba(0, 0, 0, 0.1);
  text-decoration: none;
  color: #333;
}

.competitor-image {
  flex-shrink: 0;
  min-width: 96px;
  max-width: 96px;
  min-height: 128px;
  max-height: 128px;
  margin: 0 auto 0.75rem;
  aspect-ratio: 3 / 4;
  background: #dedede;
  border-radius: 0.25rem;
}

.competitor-image img {
  min-width: 96px;
  max-width: 96px;
  min-height: 128px;
  max-height: 128px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 0.25rem;
}

.competitor-info {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 0;
}

.competitor-info h4 {
  max-width: 100%;
  margin: 0 auto;
  font-size: 0.95rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.competitor-price {
  display: none;
  margin: 0.25rem auto 0;
  font-size: 0.85rem;
  font-weight: 500;
  color: #28a745;
}


/* 16. LISTING VIEW PAGE (new layout)
-------------------------------------------------------------- */
.device-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.device-breadcrumb-item {
  color: var(--text-secondary);
}

/* Merged from three earlier .device-header blocks. The old flex layout and its
   48em "flex-direction: row / align-items: center" rule were dead or harmful
   once this became a grid, so they were dropped. */
.device-header {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e2e8f0;
}

.device-header-left-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.device-header-title {
  margin: 0 0 4px;
}

@media (max-width: 48em) {
  .device-header-title {
    font-size: 1.5rem;
  }

}

.device-header-description {
  margin: 0;
  font-size: 14px;
  color: var(--text-secondary);
}

.device-header-reviews {
  padding: 0 1rem;
}

.quick-specs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
}

.quick-specs-item {
  padding: 1rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
}

.quick-specs-item i {
  font-size: 18px;
  color: var(--text-accent);
}

.quick-specs-item-label {
  margin: 10px 0 2px;
  font-size: 12px;
  color: var(--text-muted);
}

.quick-specs-item-value {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
}

.device-prices {
  flex-shrink: 0;
  text-align: right;
}

.prices-label {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
}

.prices-value {
  margin: 0;
  font-size: 22px;
  font-weight: 500;
}

.device-featured-img {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 13;
  margin-bottom: 1.5rem;
  padding: 20px;
  background: var(--bg-main);
  border-radius: 12px;
}

.device-featured-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 0.5rem;
  transition-property: all;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 300ms;
}

/* Buy widget + compare box */
.device-header-right {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.buy-container {
  padding: 1rem 1.25rem;
  background: #fff;
  border: 0.5px solid #d1d2db;
  border-radius: 12px;
}

.buy-title {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--text-secondary);
}

.buy-store {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-top: 0.5px solid #d1d2db;
}

.buy-store-inner {
  display: flex;
  align-items: center;
  gap: 10px;
}

.buy-store-inner i {
  font-size: 20px;
}

.buy-store-name {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
}

.buy-store-type {
  margin: 0;
  font-size: 12px;
  color: var(--text-muted);
}

.buy-store-price-outer {
  text-align: right;
}

.buy-store-price {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
}

.buy-store-price-outer a {
  font-size: 12px;
  color: var(--text-accent);
  text-decoration: none;
}

.compare-box {
  padding: 1rem 1.25rem;
  background-color: var(--bg-main);
  border: 0.5px solid var(--border);
  border-radius: 0.75rem;
}

.compare-box h3 {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

.add-compare-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 95%;
  margin-right: auto;
  margin-left: auto;
  margin-bottom: 0.25rem;
  border-radius: 2rem;
  padding-top: 10px;
  padding-left: 1rem;
  padding-right: 1rem;
  padding-bottom: 10px;
  transition-property: background-color, border-color, color, fill, stroke;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 300ms;
  color: #ffffff;
  font-weight: 500;
  font-size: 0.675rem;
  background-color: var(--color-600);
}

.add-compare-btn i {
  font-size: 16px;
}

.comparison-slot {
  background-color: #f3f4f6;
  border-radius: var(--rounded-lg);
  padding: 0.5rem;
  justify-content: space-between;
  align-items: center;
  display: flex;
}

.comparison-slot-img {
  background-color: #f3f4f6;
  border-radius: 10px;
  padding: 0.5rem;
  justify-content: space-between;
  align-items: center;
  display: flex;
  width: 50px;
  height: 50px;
  object-fit: contain;
}

@media (min-width: 64em) {
  .device-header-right {
    position: sticky;
    top: 20px;
    align-self: flex-start;
  }
}

@media (max-width: 63.99em) {
  .device-header {
    grid-template-columns: 1fr;
  }
}

/* Specifications groups */
.spec-groups {
  margin-bottom: 1.5rem;
  border-radius: 12px;
  overflow: hidden;
}

.spec-group {
  border: 0.5px solid var(--border);
  background-color: #eee;
  overflow: hidden;
}

.spec-group:not(:last-child) {
  margin-bottom: 5px;
}

.spec-group:first-child {
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
}

.spec-group:last-child {
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
}

.spec-summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  font-size: 18px;
  font-weight: 500;
  cursor: pointer;
}

.spec-summary-label {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Mobile: label left / value right, one line */
.spec-fields {
  padding: 0 14px 2px;
  background-color: var(--bg-main);
}

.spec-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  font-size: 13px;
}

.d-spec-label {
  color: var(--text-secondary);
}

@media (max-width: 63.99em) {
  .spec-row {
    gap: 15px;
  }

  .spec-row:not(:last-child) {
    border-bottom: 1px solid var(--border);
  }

  .d-spec-label {
    min-width: 80px;
    max-width: 100px;
  }
}

/* Desktop: grid of cards, label above value */
@media (min-width: 64em) {
  .spec-groups {
    border: 0.5px solid var(--border);
  }

  .spec-group {
    border: unset;
  }

  .spec-group summary {
    pointer-events: none;
  }

  .spec-chevron {
    display: none;
  }

  .spec-groups details::details-content,
  .spec-groups details> :not(summary) {
    display: grid;
  }

  .spec-group:not([open])>.spec-fields {
    display: grid;
  }

  .spec-fields {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.5px;
    padding: 0;
    background: #e3e3e3;
    border-radius: 0.25rem;
    overflow: hidden;
  }

  .spec-fields:not(:last-child) {
    margin-bottom: 10px;
  }

  .spec-row {
    flex-direction: column;
    justify-content: flex-start;
    padding: 12px 14px;
    background: #fff;
  }

  .d-spec-label {
    margin-bottom: 10px;
  }

  .d-spec-value {
    font-size: 14px;
  }
}


/* 17. FRONT PAGE
-------------------------------------------------------------- */
.search-section {
  padding: 2.5rem 0 2rem;
  text-align: center;
}

.search-label {
  margin: 0 0 6px;
}

.search-sub {
  margin: 0 0 1.25rem;
  font-size: 14px;
  color: var(--text-secondary);
}

.search-bar {
  position: relative;
  max-width: 420px;
  margin: 0 auto;
}

/* Section header rows share one pattern */
.latest-devices-top,
.from-blog-top,
.week-popular {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.latest-devices-top-left,
.from-blog-top-left,
.week-popular-top-left {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
}

.latest-devices-top-right,
.from-blog-top-right,
.week-popular-top-right {
  font-size: 13px;
  color: var(--text-accent);
  text-decoration: none;
}

/* Latest devices */
.latest-devices {
  margin-bottom: 2.5rem;
}

.latest-devices .hp-listings {
  margin-bottom: unset;
}

.latest-devices .hp-grid__item {
  margin-bottom: unset;
  padding: 0;
}

.latest-devices .hp-listings .hp-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1rem;
  margin: 0;
}

@media (max-width: 63.99em) {
  .latest-devices .hp-listings .hp-row {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 47.99em) {
  .latest-devices .hp-listings .hp-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* From the blog */
.from-blog-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.from-blog-item-content {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 9;
  margin-bottom: 10px;
  padding: 10px;
  background: var(--bg-main);
  border-radius: 12px;
}

.from-blog-item-content img {
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  min-width: 100%;
  object-fit: contain;
}

.from-blog-item-content i {
  font-size: 24px;
  color: var(--text-muted);
}

.from-blog-item-title {
  margin: 0;
  font-size: 18px;
  margin-bottom: 1.5rem;
  padding-right: 10px;
  padding-left: 10px;
  letter-spacing: -0.1px;
  text-align: center;
}

@media (max-width: 47.99em) {

  /* was "47.99" with no unit, so it never applied */
  .from-blog-list {
    grid-template-columns: 1fr;
  }
}

/* Ad spaces */
.front-ad-space {
  margin-bottom: 2.5rem;
}

.front-ad-space-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 90px;
  font-size: 12px;
  color: var(--text-muted);
  background: var(--bg-main);
  border-radius: 12px;
}

.sidebar-ad-space {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 4 / 3;
  margin-bottom: 1rem;
  background: var(--bg-main);
  border-radius: var(--rounded-lg);
}

/* Popular this week */
.week-popular-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 2.5rem;
}

.week-popular-item {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 10px 0;
  margin-right: 15px;
  border-bottom: 0.5px solid var(--border);
  text-decoration: none;
  color: inherit;
}

.week-popular-count {
  width: 16px;
  font-size: 13px;
  color: var(--text-muted);
}

.week-popular-item-img {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  background: var(--bg-main);
  border-radius: 8px;
}

.week-popular-item-img img {
  width: 36px;
  height: 36px;
  object-fit: cover;
  border-radius: 8px;
}

.week-popular-item i {
  font-size: 16px;
  color: var(--text-muted);
}

.week-popular-item-title {
  flex: 1;
  font-size: 14px;
}

@media (max-width: 47.99em) {

  /* was 47.77em */
  .week-popular-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Featured brands */
.featured-brands-front {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 2.5rem;
}

.featured-brands-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 13px;
  text-decoration: none;
  color: var(--text-primary);
  background: var(--bg-main);
  border-radius: 20px;
}


/* 18. CUSTOM SIDEBAR WIDGET SHORTCODES
-------------------------------------------------------------- */

/* Top brands */

.fs-top-brands-widget .brands-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.fs-top-brands-widget .brand-link {
  display: block;
  padding: 9px 10px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.3;
  text-decoration: none;
  color: unset;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.fs-top-brands-widget .brand-link:hover {
  border-color: rgba(0, 0, 0, 0.18);
  background: rgba(0, 0, 0, 0.03);
}

/* Recently updated devices */

.fs-recent-devices-widget .devices-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.fs-recent-devices-widget .device-item {
  margin: 0;
  padding: 0;
}

.fs-recent-devices-widget .device-link {
  display: flex;
  align-items: center;
  justify-content: start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  text-decoration: none;
}

.fs-recent-devices-widget .device-name {
  min-width: 0;
  line-height: 1.35;
}

.fs-recent-devices-widget .badge {
  flex: 0 0 auto;
  font-size: 10px;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.65;
}

/* Device series */

.fs-series-widget .series-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.fs-series-widget .series-item {
  margin: 0;
}

.fs-series-widget .series-device-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  text-decoration: none;
}

.fs-series-widget .series-device-name {
  min-width: 0;
  font-size: 14px;
  line-height: 1.35;
}

.fs-series-widget .series-device-meta {
  flex: 0 0 auto;
  font-size: 14px;
  opacity: 0.6;
}

/* Similar devices */

.fs-competitors-widget .competitors-wrapper {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.fs-competitors-widget .competitor-card {
  display: flex;
  flex-direction: row;
  /* base .competitor-card is a column */
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 9px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 7px;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.fs-competitors-widget .competitor-card:hover {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.16);
}

/* min/max resets: the base .competitor-image sets min 96x128, which was
   overriding this 50x50 size. */
.fs-competitors-widget .competitor-image {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 50px;
  width: 50px;
  height: 50px;
  min-width: 0;
  max-width: none;
  min-height: 0;
  max-height: none;
  margin: 0;
  aspect-ratio: auto;
  overflow: hidden;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.04);
}

.fs-competitors-widget .competitor-image img {
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  max-width: none;
  min-height: 0;
  max-height: none;
  aspect-ratio: auto;
  object-fit: contain;
}

.fs-competitors-widget .competitor-info {
  min-width: 0;
}

.fs-competitors-widget .competitor-info .device-title {
  display: inline-block;
  margin: 0;
  padding: 0;
  font-size: 13px;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fs-competitors-widget .competitor-brand {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  line-height: 1.2;
  opacity: 0.6;
}

@media (max-width: 480px) {
  .fs-competitors-widget .competitors-wrapper {
    grid-template-columns: 1fr;
  }
}

.device-item-image {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  background: var(--bg-soft);
  border-radius: 6px;
}

.device-item-image-placeholder i {
  font-size: 14px;
  color: var(--text-muted);
}


/* 19. REDUCED MOTION
-------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

.primary-sidebar p,
.device-sidebar p,
.sidebar-widget p,
.widget--sidebar p,
.hp-page__sidebar p {
  margin: 0;
}