/* ==========================================================================
   COMPONENTS
   Brand filter, Search, Phone Cards, Compare Drawer, Specs Modal, Toast
   ========================================================================== */

/* --------------------------------------------------------------------------
   Top Search & Sort Bar
   -------------------------------------------------------------------------- */
.search-top-bar {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 1.15rem 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-md);
}

.search-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.search-box-wrapper {
  position: relative;
  flex: 1;
  min-width: 280px;
}

.search-icon {
  position: absolute;
  left: 1.15rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  display: flex;
  align-items: center;
}

.search-input {
  width: 100%;
  padding: 0.85rem 3.5rem 0.85rem 3rem;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-full);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition-normal);
  -webkit-appearance: none;
}

.search-input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.2);
  background: rgba(15, 23, 42, 0.9);
}

.search-clear-btn {
  position: absolute;
  right: 1.15rem;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: var(--text-muted);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.75rem;
  transition: var(--transition-fast);
  touch-action: manipulation;
  z-index: 2;
}

.search-clear-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.2);
}

.search-shortcut-badge {
  position: absolute;
  right: 1.15rem;
  top: 50%;
  transform: translateY(-50%);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.15rem 0.5rem;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  pointer-events: none;
}

.sort-select-wrapper {
  position: relative;
  min-width: 200px;
}

.sort-select {
  width: 100%;
  height: 100%;
  padding: 0.85rem 2.2rem 0.85rem 1.25rem;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-full);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: var(--transition-normal);
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 16px;
}

.sort-select:focus {
  border-color: var(--accent-indigo);
}

/* ==========================================================================
   HORIZONTAL BRAND FILTER BAR (Top of Right Content - Compact Single-line)
   ========================================================================== */
.brand-bar-section {
  margin-bottom: 1.25rem;
  width: 100%;
}

.brand-bar-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  width: 100%;
  padding: 0;
}

.brand-chip-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.32rem 0.65rem;
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.74rem;
  font-weight: 600;
  font-family: var(--font-main);
  white-space: nowrap;
  cursor: pointer;
  transition: all var(--transition-normal);
  user-select: none;
  text-decoration: none;
  line-height: 1.25;
}

.brand-chip-item:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--accent-cyan);
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(6, 182, 212, 0.15);
}

.brand-chip-item.active {
  background: rgba(6, 182, 212, 0.12);
  color: #38bdf8;
  border-color: #38bdf8;
  font-weight: 700;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.22);
}

.brand-chip-name {
  letter-spacing: -0.1px;
}

/* ==========================================================================
   E-COMMERCE SIDE-BY-SIDE LAYOUT (Sidebar + Main Content)
   ========================================================================== */
.shop-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2rem;
  align-items: flex-start;
  margin-bottom: 3.5rem;
}

/* --------------------------------------------------------------------------
   Left Sidebar Filter
   -------------------------------------------------------------------------- */
.shop-sidebar {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-md);
}

.sidebar-top-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.85rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border-subtle);
}

.sidebar-main-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  letter-spacing: -0.3px;
}

.sidebar-clear-btn {
  background: transparent;
  border: none;
  color: var(--accent-rose);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  transition: var(--transition-fast);
}

.sidebar-mobile-close-btn {
  display: none;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 0.9rem;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

/* Accordion Group */
.sidebar-group {
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 1rem;
}

.sidebar-group:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.sidebar-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  padding: 0.2rem 0;
  margin-bottom: 0.65rem;
  transition: opacity var(--transition-fast);
}

.sidebar-group-header:hover {
  opacity: 0.85;
}

.sidebar-group-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}

.sidebar-group-arrow {
  font-size: 0.7rem;
  color: var(--text-muted);
  transition: transform var(--transition-normal);
}

.sidebar-group.collapsed .sidebar-group-arrow {
  transform: rotate(180deg);
}

.sidebar-group.collapsed .sidebar-group-content {
  display: none;
}

/* Sidebar Vertical Checkbox List */
.sidebar-checkbox-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.sidebar-checkbox-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.4rem 0.55rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  user-select: none;
  transition: all var(--transition-fast);
  color: var(--text-secondary);
  font-size: 0.875rem;
  touch-action: manipulation;
  border: 1px solid transparent;
}

.sidebar-checkbox-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

.sidebar-checkbox-item.checked {
  color: var(--text-primary);
  background: rgba(6, 182, 212, 0.12);
  border-color: rgba(6, 182, 212, 0.3);
  font-weight: 600;
}

.sidebar-cb-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}

.sidebar-cb-box {
  width: 17px;
  height: 17px;
  border-radius: 4px;
  border: 1.5px solid var(--border-medium);
  background: rgba(15, 23, 42, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition-fast);
}

[data-theme="light"] .sidebar-cb-box {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.25);
}

.sidebar-checkbox-item.checked .sidebar-cb-box {
  background: var(--grad-primary);
  border-color: var(--accent-cyan);
}

.sidebar-cb-box::after {
  content: "";
  display: none;
  width: 4px;
  height: 8px;
  border: solid #0f172a;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  margin-top: -2px;
}

.sidebar-checkbox-item.checked .sidebar-cb-box::after {
  display: block;
}

.sidebar-cb-name {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-cb-count {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.sidebar-checkbox-item.checked .sidebar-cb-count {
  color: var(--accent-cyan);
}

/* Custom Price Input Range */
.price-custom-wrap {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.price-custom-inputs {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.price-num-input {
  width: 100%;
  padding: 0.45rem 0.6rem;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.78rem;
  font-family: inherit;
  outline: none;
  transition: var(--transition-fast);
}

.price-num-input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 2px rgba(6, 182, 212, 0.2);
}

[data-theme="light"] .price-num-input {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.2);
}

.price-dash {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.85rem;
}

.price-apply-btn {
  padding: 0.45rem 0.85rem;
  background: rgba(6, 182, 212, 0.15);
  border: 1px solid rgba(6, 182, 212, 0.35);
  color: var(--accent-cyan);
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-fast);
  align-self: flex-end;
}

.price-apply-btn:hover {
  background: var(--accent-cyan);
  color: #0f172a;
}

/* --------------------------------------------------------------------------
   Right Main Section (Phone Cards Showcase)
   -------------------------------------------------------------------------- */
.shop-main {
  flex: 1;
  min-width: 0;
}

.shop-results-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding: 0.85rem 1.25rem;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  flex-wrap: wrap;
  gap: 0.75rem;
}

.shop-results-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.shop-mobile-controls {
  display: none;
  align-items: center;
  justify-content: flex-start;
  gap: 0.65rem;
  margin-bottom: 1.25rem;
  width: 100%;
}

.mobile-filter-open-btn {
  display: none;
  align-items: center;
  gap: 0.55rem;
  padding: 0.65rem 1.25rem;
  background: rgba(20, 26, 38, 0.9);
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: var(--radius-full);
  color: var(--text-primary);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  transition: all var(--transition-fast);
}

.mobile-filter-open-btn:hover {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.7);
  color: #fbbf24;
}

.mobile-filter-open-btn svg {
  color: #f59e0b;
  flex-shrink: 0;
}

.mobile-calc-open-btn {
  display: none;
  align-items: center;
  gap: 0.55rem;
  padding: 0.65rem 1.25rem;
  background: rgba(20, 26, 38, 0.9);
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: var(--radius-full);
  color: var(--text-primary);
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.mobile-calc-open-btn:hover {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.7);
  color: #fbbf24;
}

.mobile-calc-open-btn svg {
  color: #f59e0b;
  flex-shrink: 0;
}

.active-filters-badge {
  background: var(--grad-gold);
  color: #0b0f17;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 800;
  width: 20px;
  height: 20px;
  min-width: 20px;
  padding: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  flex-shrink: 0;
}

.sidebar-mobile-bottom-action {
  display: none;
}

.sidebar-mobile-backdrop {
  display: none;
}

.reset-filters-btn {
  background: none;
  border: none;
  color: var(--accent-rose);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   Phone Card (3D Tilt & Glassmorphism)
   -------------------------------------------------------------------------- */
.phone-card {
  position: relative;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.6rem 0.75rem;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-normal), border-color var(--transition-normal), box-shadow var(--transition-normal);
  overflow: hidden;
  cursor: pointer;
}

.phone-card:hover {
  transform: translateY(-3px);
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.4), 0 0 15px rgba(6, 182, 212, 0.2);
}

.card-top-badges {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.card-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.card-badge.flagship,
.card-badge.phones {
  background: rgba(6, 182, 212, 0.15);
  color: var(--accent-cyan);
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.card-badge.camera,
.card-badge.tablets {
  background: rgba(168, 85, 247, 0.15);
  color: var(--accent-purple);
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.card-badge.gaming,
.card-badge.earphones {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.card-badge.foldable,
.card-badge.accessories {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-amber);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.card-badge.midrange {
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent-blue);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.fav-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.35rem;
  border-radius: 50%;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.fav-btn:hover {
  color: var(--accent-rose);
  background: rgba(244, 63, 94, 0.1);
}

.fav-btn.active {
  color: var(--accent-rose);
}

.card-image-wrap {
  width: 100%;
  height: 135px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.5rem;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.4);
}

.card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.4s ease;
}

.phone-card:hover .card-image {
  transform: scale(1.06);
}

/* Card Condition Badge at bottom-left corner of the image */
.card-image-wrap .card-condition-badge {
  position: absolute;
  bottom: 0.35rem;
  left: 0.35rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  font-size: 0.55rem;
  font-weight: 700;
  padding: 0.12rem 0.38rem;
  border-radius: var(--radius-full);
  letter-spacing: 0.2px;
  line-height: 1.1;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.condition-new {
  background: rgba(16, 185, 129, 0.8);
  color: #ffffff;
  border: 1.5px solid #34d399;
  box-shadow: 0 0 10px rgba(52, 211, 153, 0.25);
}

.condition-used {
  background: rgba(245, 158, 11, 0.8);
  color: #ffffff;
  border: 1.5px solid #fbbf24;
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.25);
}

[data-theme="light"] .condition-new {
  background: rgba(16, 185, 129, 0.3);
  color: #ffffff;
  border: 1.5px solid #059669;
}

[data-theme="light"] .condition-used {
  background: rgba(217, 119, 6, 0.85);
  color: #ffffff;
  border: 1.5px solid #b45309;
}

/* Card Bookmark Button at top-right corner of the image */
.card-bookmark-btn {
  position: absolute;
  top: 0.35rem;
  right: 0.35rem;
  z-index: 3;
  width: 24px;
  height: 24px;
  border-radius: var(--radius-full);
  background: rgba(10, 14, 23, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.card-bookmark-btn svg {
  width: 13px;
  height: 13px;
}

.card-bookmark-btn:hover {
  background: rgba(244, 63, 94, 0.2);
  border-color: rgba(244, 63, 94, 0.6);
  color: #fb7185;
  transform: scale(1.1);
}

.card-bookmark-btn.active {
  background: rgba(244, 63, 94, 0.25);
  border-color: rgba(244, 63, 94, 0.75);
  color: #f43f5e;
  box-shadow: 0 0 16px rgba(244, 63, 94, 0.45);
}

.card-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-brand {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-cyan);
  letter-spacing: 0.75px;
  margin-bottom: 0.2rem;
}

.card-model {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.45rem;
  margin-top: 0.45rem;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.9rem;
}

.card-rating {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--accent-amber);
  font-weight: 700;
}

/* Mini Score Bars */
.card-scores {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1rem;
  padding: 0.75rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.score-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
}

.score-bar-bg {
  flex: 1;
  height: 5px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  margin: 0 0.6rem;
  overflow: hidden;
}

.score-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: var(--grad-primary);
}

/* Highlights preview */
.card-specs-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  font-size: 0.75rem;
}

.card-spec-item {
  display: flex;
  flex-direction: column;
  padding: 0.45rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.card-spec-item .spec-label {
  color: var(--text-muted);
  font-size: 0.68rem;
}

.card-spec-item .spec-val {
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Card Footer */
.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
  margin-top: auto;
}

.card-price {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  margin-top: 0;
  white-space: nowrap;
  line-height: 1.2;
}

.card-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-compare-check {
  padding: 0.5rem 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-compare-check:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.btn-compare-check.selected {
  background: rgba(6, 182, 212, 0.2);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.btn-view-details {
  padding: 0.55rem 0.95rem;
  background: var(--grad-primary);
  border: none;
  border-radius: var(--radius-sm);
  color: #0f172a;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-view-details:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

/* --------------------------------------------------------------------------
   Comparison Floating Bar & Drawer
   -------------------------------------------------------------------------- */
.compare-floating-bar {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(120px);
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(56, 189, 248, 0.4);
  border-radius: var(--radius-full);
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 30px rgba(6, 182, 212, 0.3);
  z-index: 1000;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.compare-floating-bar.visible {
  transform: translateX(-50%) translateY(0);
}

.compare-bar-thumbs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.compare-thumb-slot {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px dashed var(--border-medium);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.compare-thumb-slot.filled {
  border-style: solid;
  border-color: var(--accent-cyan);
  background: var(--bg-surface);
}

.compare-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.compare-thumb-remove {
  position: absolute;
  top: 0;
  right: 0;
  background: rgba(244, 63, 94, 0.9);
  color: white;
  width: 16px;
  height: 16px;
  font-size: 10px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: none;
}

.compare-thumb-slot.filled:hover .compare-thumb-remove {
  display: flex;
  align-items: center;
  justify-content: center;
}

.compare-bar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-open-compare {
  background: var(--grad-primary);
  color: #0f172a;
  font-weight: 800;
  font-size: 0.875rem;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-open-compare:hover {
  transform: scale(1.04);
}

.btn-clear-compare {
  background: transparent;
  color: var(--text-muted);
  border: none;
  font-size: 0.8rem;
  cursor: pointer;
}

/* --------------------------------------------------------------------------
   Comparison Modal
   -------------------------------------------------------------------------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  overflow-y: auto;
}

.modal-backdrop.active {
  display: flex;
}

.modal-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 960px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  padding: 2rem;
}

.modal-close-btn {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
  font-size: 1.25rem;
}

.modal-close-btn:hover {
  background: var(--accent-rose);
  color: white;
}

/* Compare Matrix Table */
.compare-matrix-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.5rem;
}

.compare-matrix-table th,
.compare-matrix-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--border-subtle);
  text-align: left;
  vertical-align: top;
}

.compare-matrix-table th {
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  width: 22%;
}

.compare-matrix-table td {
  font-size: 0.9rem;
  color: var(--text-primary);
}

.compare-col-header {
  text-align: center !important;
}

.compare-col-header img {
  width: 90px;
  height: 90px;
  object-fit: cover;
  object-position: center;
  border-radius: var(--radius-sm);
  margin-bottom: 0.5rem;
}

/* --------------------------------------------------------------------------
   Specs Modal Details
   -------------------------------------------------------------------------- */
.detail-modal-header {
  display: flex;
  gap: 2rem;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.detail-modal-img {
  width: 180px;
  height: 180px;
  object-fit: cover;
  object-position: center;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-md);
  flex-shrink: 0;
}

.detail-modal-title {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.detail-spec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.detail-spec-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.detail-spec-card h4 {
  font-size: 0.85rem;
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

.detail-spec-card p {
  font-size: 0.95rem;
  color: var(--text-primary);
}

/* Highlights List */
.highlights-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.highlight-pill {
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: #a5b4fc;
  font-size: 0.8rem;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
}

/* --------------------------------------------------------------------------
   Toast Notifications
   -------------------------------------------------------------------------- */
.toast-container {
  position: fixed;
  top: 90px;
  right: 24px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-left: 4px solid var(--accent-cyan);
  color: var(--text-primary);
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  animation: fadeIn 0.3s ease, slideUp 0.3s ease;
  pointer-events: auto;
}

/* --------------------------------------------------------------------------
   Mobile UI Optimizations for Shop Layout & Components
   -------------------------------------------------------------------------- */
@media (max-width: 992px) {
  .shop-layout {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .shop-mobile-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
  }

  .mobile-filter-open-btn,
  .mobile-calc-open-btn {
    display: inline-flex;
    align-items: center;
  }

  @media (max-width: 576px) {
    .shop-mobile-controls {
      gap: 0.5rem;
    }

    .mobile-filter-open-btn,
    .mobile-calc-open-btn {
      padding: 0.55rem 0.95rem;
      font-size: 0.82rem;
    }
  }

  /* Off-canvas Filter Drawer on Mobile/Tablet */
  .shop-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 320px;
    max-width: 86vw;
    max-height: 100vh;
    height: 100vh;
    z-index: 2500;
    border-radius: 0 var(--radius-xl) var(--radius-xl) 0;
    transform: translateX(-105%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 10px 0 40px rgba(0, 0, 0, 0.6);
    background: var(--bg-surface);
    padding: 1.5rem 1.25rem calc(5.5rem + env(safe-area-inset-bottom, 0px));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .shop-sidebar.active {
    transform: translateX(0);
  }

  .sidebar-mobile-close-btn {
    display: inline-flex;
  }

  .sidebar-mobile-bottom-action {
    display: block;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-subtle);
  }

  .sidebar-apply-mobile-btn {
    width: 100%;
    padding: 0.75rem 1.5rem;
    background: var(--grad-gold);
    color: #0b0f17;
    font-size: 0.9rem;
    font-weight: 800;
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.35);
    transition: all var(--transition-fast);
  }

  .sidebar-apply-mobile-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.5);
  }

  .sidebar-mobile-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 2400;
    display: none;
  }

  .sidebar-mobile-backdrop.active {
    display: block;
  }
}

@media (max-width: 768px) {

  /* Search Top Bar on Mobile */
  .search-top-bar {
    padding: 1rem;
    border-radius: var(--radius-lg);
    margin-bottom: 1.25rem;
  }

  .search-row {
    flex-direction: column;
    gap: 0.75rem;
  }

  .search-box-wrapper,
  .sort-select-wrapper {
    min-width: 100%;
    width: 100%;
  }

  .search-shortcut-badge {
    display: none;
  }

  .shop-results-bar {
    padding: 0.75rem 1rem;
  }

  /* Phone Card on Mobile (4 Columns) */
  .phone-card {
    padding: 0.35rem 0.35rem 0.45rem;
    border-radius: 6px;
  }

  .card-image-wrap {
    height: 80px;
    margin-bottom: 0.3rem;
    border-radius: 4px;
  }

  .card-image-wrap .card-condition-badge {
    font-size: 0.45rem;
    padding: 0.08rem 0.25rem;
    bottom: 0.2rem;
    left: 0.2rem;
  }

  .card-bookmark-btn {
    width: 20px;
    height: 20px;
    top: 0.2rem;
    right: 0.2rem;
  }

  .card-bookmark-btn svg {
    width: 10px;
    height: 10px;
  }

  .card-model {
    font-size: 0.66rem;
    margin-bottom: 0.3rem;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .card-scores {
    padding: 0.6rem;
  }

  .card-specs-summary {
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem;
    margin-bottom: 1rem;
  }

  .card-footer {
    padding-top: 0.85rem;
  }

  .card-price {
    font-size: 0.68rem;
    line-height: 1.15;
  }

  .btn-compare-check,
  .btn-view-details {
    padding: 0.55rem 0.8rem;
    font-size: 0.78rem;
    touch-action: manipulation;
  }

  /* Compare Floating Bar on Mobile */
  .compare-floating-bar {
    width: calc(100% - 1.5rem);
    max-width: 480px;
    bottom: calc(58px + env(safe-area-inset-bottom, 0px) + 12px);
    padding: 0.6rem 0.85rem;
    gap: 0.65rem;
    justify-content: space-between;
    border-radius: var(--radius-lg);
  }

  .compare-floating-bar>div:first-child {
    font-size: 0.78rem !important;
  }

  .compare-thumb-slot {
    width: 36px;
    height: 36px;
  }

  .btn-open-compare {
    font-size: 0.78rem;
    padding: 0.5rem 0.85rem;
  }

  .btn-clear-compare {
    font-size: 0.72rem;
  }

  /* Modals as Modern Bottom Sheets on Mobile */
  .modal-backdrop {
    padding: 0;
    align-items: flex-end;
  }

  .modal-card {
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    max-height: 88vh;
    padding: 1.25rem 1rem calc(1.5rem + env(safe-area-inset-bottom, 0px));
    width: 100%;
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  }

  /* Drag handle indicator on modal */
  .modal-card::before {
    content: '';
    display: block;
    width: 42px;
    height: 4px;
    background: var(--border-medium);
    border-radius: var(--radius-full);
    margin: 0 auto 1.25rem auto;
  }

  .modal-close-btn {
    top: 0.85rem;
    right: 0.85rem;
    width: 32px;
    height: 32px;
    font-size: 1.1rem;
  }

  /* Detail Modal on Mobile */
  .detail-modal-header {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1.25rem;
  }

  .detail-modal-img {
    width: 140px;
    height: 140px;
    margin: 0 auto;
  }

  .detail-modal-title {
    font-size: 1.45rem;
  }

  .detail-modal-header>div>div:first-of-type {
    justify-content: center;
  }

  .detail-modal-header>div>div:last-of-type {
    justify-content: center;
    flex-wrap: wrap;
  }

  .detail-spec-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
  }

  .detail-spec-card {
    padding: 1rem;
  }

  /* Compare Matrix Table on Mobile */
  .compare-matrix-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    margin-top: 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
  }

  .compare-matrix-table {
    margin-top: 0;
    min-width: 580px;
  }

  .compare-matrix-table th:first-child,
  .compare-matrix-table td:first-child {
    position: sticky;
    left: 0;
    background: var(--bg-surface);
    z-index: 2;
    min-width: 110px;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.35);
  }

  [data-theme="light"] .compare-matrix-table th:first-child,
  [data-theme="light"] .compare-matrix-table td:first-child {
    background: #ffffff;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.08);
  }

  .compare-matrix-table th,
  .compare-matrix-table td {
    padding: 0.75rem 0.65rem;
    font-size: 0.82rem;
  }

  .compare-swipe-hint {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    color: var(--accent-cyan);
    margin-bottom: 0.5rem;
    font-weight: 600;
  }

  /* Toast on Mobile */
  .toast-container {
    top: calc(0.75rem + env(safe-area-inset-top, 0px));
    right: 1rem;
    left: 1rem;
  }

  .toast {
    justify-content: center;
    font-size: 0.82rem;
    padding: 0.75rem 1rem;
  }
}

/* ==========================================================================
   Phone Valuation Calculator Modal
   ========================================================================== */
.valuation-modal-card {
  max-width: 820px;
  background: var(--bg-card);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(245, 158, 11, 0.35);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.65), 0 0 35px rgba(245, 158, 11, 0.15);
  padding: 2rem;
  border-radius: var(--radius-xl);
}

.val-header {
  margin-bottom: 1.5rem;
}

.val-header-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.5rem;
}

.val-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0 0 0.35rem;
}

.val-subtitle {
  color: var(--text-secondary);
  font-size: 0.88rem;
  margin: 0;
  line-height: 1.5;
}

.val-body-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.95fr;
  gap: 1.5rem;
  align-items: start;
}

.val-form-col {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.val-field-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.val-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.val-select {
  width: 100%;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-medium);
  color: var(--text-primary);
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.val-select:focus {
  border-color: rgba(245, 158, 11, 0.6);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

.val-select option {
  background: #0f172a;
  color: #f8fafc;
}

.val-checkboxes-row {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.75rem;
}

.val-check-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.85rem;
  color: var(--text-primary);
  cursor: pointer;
  user-select: none;
}

.val-check-item input[type="checkbox"] {
  accent-color: #f59e0b;
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* Result Column */
.val-result-box {
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.7), rgba(15, 23, 42, 0.95));
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: var(--radius-lg);
  padding: 1.35rem;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

.val-preview-device {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  min-height: 52px;
}

.val-device-img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  background: rgba(0, 0, 0, 0.3);
  border-radius: var(--radius-md);
  padding: 4px;
}

.val-device-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.val-device-name {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-primary);
}

.val-device-specs {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.val-divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 1rem 0;
}

.val-estimate-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #fbbf24;
}

.val-estimate-amount {
  font-size: 1.75rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: #fef08a;
  text-shadow: 0 0 20px rgba(245, 158, 11, 0.4);
  margin: 0.35rem 0 0.2rem;
}

.val-estimate-range {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  margin-bottom: 1rem;
}

.val-breakdown-card {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-size: 0.82rem;
  margin-bottom: 1.25rem;
}

.val-breakdown-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-secondary);
}

.val-breakdown-row strong {
  color: var(--text-primary);
}

.val-cta-actions {
  display: flex;
  flex-direction: column;
}

.val-action-btn {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-full);
  border: none;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.val-action-btn.primary {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #0f172a;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.35);
}

.val-action-btn.primary:hover {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.5);
  transform: translateY(-1px);
}

@media (max-width: 768px) {
  .valuation-modal-card {
    padding: 1.25rem;
  }
  .val-body-grid {
    grid-template-columns: 1fr;
  }
  .val-estimate-amount {
    font-size: 1.45rem;
  }
}

/* Skeleton Card Loader */
.phone-card-skeleton {
  pointer-events: none;
  cursor: default;
}

.skeleton-shimmer {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.04) 25%, rgba(255, 255, 255, 0.09) 50%, rgba(255, 255, 255, 0.04) 75%);
  background-size: 200% 100%;
  animation: skeletonShimmer 1.4s infinite linear;
  border-radius: var(--radius-sm, 6px);
}

@keyframes skeletonShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-sm, 6px);
  margin-bottom: 0.65rem;
}

.skeleton-title {
  width: 72%;
  height: 14px;
  margin-bottom: 0.5rem;
  border-radius: 4px;
}

.skeleton-price {
  width: 48%;
  height: 13px;
  border-radius: 4px;
}

/* --------------------------------------------------------------------------
   Popup Announcement & Promotion Dialog
   -------------------------------------------------------------------------- */
.popup-announcement-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 2800;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s;
}

.popup-announcement-backdrop.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.popup-announcement-card {
  position: relative;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  background: #111827;
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 20px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85), 0 0 30px rgba(56, 189, 248, 0.15);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: scale(0.92) translateY(20px);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.popup-announcement-backdrop.active .popup-announcement-card {
  transform: scale(1) translateY(0);
}

.popup-announcement-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 30;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(8px);
  font-size: 1.25rem;
  line-height: 1;
  padding: 0;
}

.popup-announcement-close:hover {
  background: rgba(239, 68, 68, 0.9);
  border-color: rgba(239, 68, 68, 1);
  transform: scale(1.08);
}

.popup-announcement-header {
  padding: 0.85rem 1.25rem;
  background: rgba(15, 23, 42, 0.75);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.popup-announcement-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: #f8fafc;
  letter-spacing: 0.02em;
}

.popup-announcement-body {
  position: relative;
  width: 100%;
  background: #090d16;
  max-height: 72vh;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.popup-announcement-link {
  display: block;
  width: 100%;
  text-decoration: none;
  cursor: pointer;
}

.popup-announcement-link.no-link {
  cursor: default;
}

.popup-announcement-img {
  width: 100%;
  height: auto;
  max-height: 68vh;
  object-fit: contain;
  display: block;
  transition: opacity 0.2s ease;
}

.popup-announcement-footer {
  padding: 0.75rem 1.25rem;
  background: rgba(15, 23, 42, 0.9);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.popup-announcement-dismiss-opt {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.78rem;
  color: var(--text-secondary, #94a3b8);
  cursor: pointer;
  user-select: none;
}

.popup-announcement-dismiss-opt input {
  accent-color: var(--accent-blue, #38bdf8);
  cursor: pointer;
}

.popup-announcement-btn {
  display: inline-block;
  padding: 0.55rem 1.25rem;
  background: linear-gradient(135deg, #0284c7, #38bdf8);
  color: #0b0f19;
  font-size: 0.84rem;
  font-weight: 700;
  border-radius: var(--radius-md, 8px);
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(56, 189, 248, 0.35);
}

.popup-announcement-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(56, 189, 248, 0.45);
}

@media (max-width: 600px) {
  .popup-announcement-card {
    max-width: 94vw;
    border-radius: 16px;
  }
  .popup-announcement-img {
    max-height: 60vh;
  }
  .popup-announcement-footer {
    padding: 0.65rem 1rem;
    flex-direction: column-reverse;
    align-items: stretch;
  }
  .popup-announcement-btn {
    text-align: center;
    width: 100%;
  }
}