:root {
  --primary: #0071E3;
  --primary-hover: #005bb5;
  --accent: #FF3B30;
  --text-main: #1D1D1F;
  --text-secondary: #515154;
  --bg-body: #F2F4F8;
  --bg-header: #EAF4FF;
  --bg-card: #FFFFFF;
  --shadow-subtle: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-hover: 0 16px 32px rgba(0,0,0,0.12);
  --radius: 16px;
  --border-color: #E5E5E5;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 84px;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s ease;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

header .container {
  padding-left: 0;
}

.not-found {
  padding: 80px 0 120px;
  display: flex;
  justify-content: center;
}

.not-found-card {
  background: var(--bg-card);
  border-radius: 24px;
  padding: 56px 48px;
  box-shadow: var(--shadow-subtle);
  max-width: 620px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.not-found-code {
  font-size: 72px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -2px;
}

.not-found-card h1 {
  font-size: 32px;
}

.not-found-card p {
  color: var(--text-secondary);
  font-size: 17px;
}

.not-found-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 8px;
}

.not-found-primary,
.not-found-secondary {
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.not-found-primary {
  background: var(--primary);
  color: #fff;
}

.not-found-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.not-found-secondary {
  background: rgba(0, 113, 227, 0.08);
  color: var(--primary);
}

.not-found-secondary:hover {
  background: rgba(0, 113, 227, 0.16);
  transform: translateY(-1px);
}

.admin-page {
  padding-top: 40px;
  padding-bottom: 40px;
}

.admin-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.admin-title-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-title-block h1 {
  font-size: 28px;
  font-weight: 800;
}

.admin-message {
  background: #e6fffa;
  color: #004d40;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 14px;
  align-self: flex-start;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}

.admin-inline-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.admin-inline-form input {
  height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid #ddd;
  min-width: 140px;
  font-size: 14px;
}

.admin-btn {
  width: auto;
  padding-inline: 16px;
  border-radius: 999px;
  font-size: 14px;
  white-space: nowrap;
}

.admin-btn-primary {
  background-color: #0071E3;
}

.admin-btn-secondary {
  background-color: #5856D6;
}

.admin-btn-warning {
  background-color: #FF9500;
}

.admin-btn-success {
  background-color: #34C759;
}

.admin-btn-danger {
  background-color: #ff3b30;
  width: 100%;
}

.admin-btn-restore {
  background: #0071E3;
  color: #fff;
}

.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.admin-stats-grid .stat-card {
  background: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.admin-stats-grid .stat-card h3 {
  margin: 0 0 8px;
  color: #666;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.admin-stats-grid .stat-value {
  font-size: 24px;
  font-weight: 700;
  color: #111;
}

.admin-tabs {
  margin-bottom: 16px;
  border-bottom: 1px solid #eee;
  display: flex;
  gap: 8px;
}

.admin-tabs .tab-btn {
  padding: 10px 16px;
  background: none;
  border: none;
  color: #666;
  cursor: pointer;
  font-weight: 500;
  border-bottom: 2px solid transparent;
}

.admin-tabs .tab-btn.active {
  border-bottom-color: #0071E3;
  font-weight: 600;
  color: #000;
}

.admin-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.admin-product-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.admin-product-card-removed {
  opacity: 0.9;
}

.admin-product-image {
  position: relative;
  padding-top: 60%;
  background: #fff;
  border-bottom: 1px solid #f0f0f0;
}

.admin-product-image img {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.admin-badge-discount {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
}

.admin-product-body {
  padding: 12px 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-product-title-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.admin-product-title {
  font-size: 15px;
  font-weight: 600;
}

.admin-product-asin {
  font-size: 12px;
  color: #777;
}

.admin-product-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}

.admin-product-price {
  font-weight: 700;
  font-size: 16px;
}

.admin-product-category {
  font-size: 12px;
  color: #555;
  background: #f5f5f7;
  padding: 3px 8px;
  border-radius: 999px;
}

.admin-product-removed-at {
  font-size: 12px;
  color: #666;
}

.admin-product-actions {
  border-top: 1px solid #f0f0f0;
  padding: 10px 14px 12px;
  display: flex;
  justify-content: flex-end;
}

.admin-edit-form {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: flex-end;
}

.admin-edit-form label {
  font-size: 11px;
  color: #555;
  display: flex;
  flex-direction: column;
}

.admin-edit-form input {
  padding: 4px 6px;
  font-size: 13px;
}

@media (max-width: 768px) {
  .admin-header {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-actions {
    justify-content: flex-start;
  }

  .admin-inline-form {
    width: 100%;
  }

  .admin-inline-form input {
    flex: 1;
  }

  .admin-products-grid {
    grid-template-columns: 1fr;
  }
}

/* Header */
header {
  background: var(--bg-header);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-search-row {
  padding: 16px 0;
  background: var(--bg-header);
}

@media (min-width: 769px) {
  .header-search-row {
    position: sticky;
    top: 70px;
    z-index: 999;
    background: var(--bg-header);
  }
}

.header-search-row .header-search-area {
  flex-direction: row;
  align-items: center;
  gap: 20px;
  max-width: none;
}

.header-search-row .search-bar {
  flex: 1;
  max-width: 600px;
}

.header-search-row .header-discount-slider {
  flex-shrink: 0;
  width: 280px;
}

header .main-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
  gap: 20px;
}

.logo img {
  height: 44px;
  display: block;
}

.search-bar {
  flex: 1;
  max-width: 500px;
  position: relative;
}

.header-search-area {
  flex: 1;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.header-search-row .header-search-area {
  flex-direction: row;
  align-items: center;
  gap: 20px;
  max-width: none;
}

.header-discount-slider {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #F5F5F7;
  border: 1px solid var(--border-color);
  padding: 12px 16px;
  border-radius: 16px;
}

.header-discount-slider label {
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 14px;
}

.header-discount-slider input[type="range"] {
  flex: 1;
  min-width: 140px;
  accent-color: var(--primary);
  height: 6px;
}

.header-discount-slider span {
  font-weight: 800;
  color: var(--primary);
  min-width: 42px;
  font-size: 14px;
  text-align: right;
}

.search-bar input {
  width: 100%;
  padding: 14px 24px;
  padding-right: 52px;
  border-radius: 50px;
  border: 1px solid var(--border-color);
  background-color: #F5F5F7;
  font-size: 17px;
  color: var(--text-main);
  transition: all 0.2s ease;
}

.search-bar input:focus {
  background-color: #fff;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.1);
  outline: none;
}

.search-bar button {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--primary);
  border: none;
  cursor: pointer;
  color: white;
  padding: 10px;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.search-bar button:hover {
  background: var(--primary-hover);
}

.nav-links {
  display: flex;
  gap: 24px;
  padding: 6px 16px;
  border: 2px solid rgba(15, 23, 42, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.install-app-btn {
  display: none;
  align-items: center;
  gap: 6px;
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.install-app-btn:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.back-button {
  background: var(--primary);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.back-button:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.nav-links a {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
  transition: color 0.3s ease;
  padding: 8px 0;
}

.nav-links a:hover {
  color: var(--primary);
}

/* Mobile Menu Button */
.menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    color: var(--text-main);
}

/* Categories Menu (Sub-header) */
.categories-nav {
  background: #fff;
  padding: 15px 0;
  overflow-x: auto;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0,0,0,0.03);
  margin-bottom: 20px;
}

.categories-nav .container {
  display: flex;
  justify-content: center;
  gap: 15px;
}

.cat-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 8px 16px;
  border-radius: 20px;
  background: #F5F5F7;
  transition: all 0.3s ease;
}

.cat-link:hover {
  color: white;
  background: var(--primary);
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 40px 0 20px;
  background: linear-gradient(135deg, #f8fbff 0%, #e6f2ff 100%);
  border-radius: 20px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at top left, rgba(0, 113, 227, 0.05) 0%, transparent 50%);
  pointer-events: none;
}

.hero h1 {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
  color: var(--text-main);
}

.hero p {
  font-size: 16px;
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 12px;
}

/* Deals Grid */
.deals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 30px;
  padding-bottom: 80px;
  max-width: 1400px;
  margin: 0 auto;
}

.deal-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-subtle);
  transition: all 0.3s ease;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid var(--border-color);
}

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

.deal-link-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.deal-image-wrapper {
  position: relative;
  padding-top: 100%; /* Square */
  background-color: #fff;
  overflow: hidden;
  border-bottom: 1px solid #f0f0f0;
  min-height: 280px;
}

.deal-image-wrapper img {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: opacity 0.25s ease, transform 0.3s ease;
  opacity: 0;
  padding: 25px;
}

.deal-card:hover .deal-image-wrapper img {
  transform: translate(-50%, -50%) scale(0.95);
}

.discount-pill {
  position: absolute;
  top: 16px;
  left: 16px;
  background: var(--accent);
  color: white;
  font-size: 14px;
  font-weight: 800;
  padding: 6px 12px;
  border-radius: 8px;
  z-index: 2;
}

.coupon-pill {
  position: absolute;
  top: 16px;
  right: 16px;
  background: #34C759;
  color: white;
  font-size: 13px;
  font-weight: 800;
  padding: 6px 10px;
  border-radius: 8px;
  z-index: 2;
}

.deal-info {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.meta-category {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  margin-bottom: 8px;
  font-weight: 700;
}

.deal-title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 12px;
  color: var(--text-main);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.rating-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

.star-icon {
  color: #FF9F0A;
}

.pricing-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 0;
}

.price-current {
  font-size: 24px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.02em;
}

.price-original {
  font-size: 14px;
  color: var(--text-secondary);
  text-decoration: line-through;
}

.btn-view {
  display: block;
  width: 100%;
  text-align: center;
  background: var(--primary);
  color: white;
  font-weight: 700;
  font-size: 15px;
  padding: 14px 0;
  border-radius: 10px;
  transition: all 0.3s ease;
  margin-top: auto;
}

.btn-view:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
}

.product-details {
  display: grid;
  grid-template-columns: minmax(0, 460px) minmax(0, 1fr);
  gap: 24px;
  padding: 18px 0 30px;
  align-items: start;
}

.product-gallery {
  min-width: 0;
}

.main-image-container {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
  max-height: 420px;
  margin: 0 auto;
}

.main-image-container img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  max-width: 420px;
  max-height: 420px;
  padding: 16px;
}

.thumbnail-list {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  overflow-x: auto;
  padding-bottom: 6px;
  -webkit-overflow-scrolling: touch;
}

.thumbnail {
  width: 64px;
  height: 64px;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  cursor: pointer;
}

.thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8px;
}

.thumbnail.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.10);
}

.product-info {
  min-width: 0;
}

.share-block {
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  background: #fff;
}

.share-title {
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 10px;
  font-size: 14px;
}

.share-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  text-decoration: none;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  padding: 0;
}

.share-facebook {
  background: #e8f0fe;
  color: #0b57d0;
}

.share-facebook:hover {
  background: #dbe7fd;
}

.share-whatsapp {
  background: #e9fbf1;
  color: #1f8f4e;
}

.share-whatsapp:hover {
  background: #dcf7e7;
}

.share-messenger {
  background: #eef1ff;
  color: #304ffe;
}

.share-messenger:hover {
  background: #e3e7ff;
}

.share-email {
  background: #f5f5f7;
  color: #333;
}

.share-email:hover {
  background: #eeeeef;
}

.share-copy {
  background: #f0f1f3;
  color: #333;
}

.share-copy:hover {
  background: #e6e7ea;
}

.share-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.buy-button-large {
  display: block;
  width: 100%;
  text-align: center;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  font-size: 16px;
  padding: 14px 16px;
  border-radius: 12px;
}

.buy-button-large:hover {
  background: var(--primary-hover);
}

@media (max-width: 768px) {
  .product-details {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 12px 0 24px;
  }

  .main-image-container {
    max-height: 320px;
  }

  .main-image-container img {
    max-width: 320px;
    max-height: 320px;
    padding: 12px;
  }

  .thumbnail {
    width: 56px;
    height: 56px;
  }
}

/* Product Page Specific */
.product-header .header-search-area {
  display: none;
}

.product-header .search-bar {
  display: none;
}

/* Top 10 Page Styling */
.top10-hero {
  background: linear-gradient(135deg, var(--primary) 0%, #0051b8 100%);
  color: white;
  padding: 60px 0;
  margin-bottom: 40px;
  border-radius: 20px;
  position: relative;
  overflow: hidden;
}

.top10-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at top right, rgba(255,255,255,0.1) 0%, transparent 50%);
  pointer-events: none;
}

.top10-hero h1 {
  color: white;
  font-size: 42px;
  font-weight: 800;
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}

.top10-hero p {
  color: rgba(255,255,255,0.9);
  font-size: 18px;
  font-weight: 500;
  position: relative;
  z-index: 1;
}

/* Rank badges for top 10 */
.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  color: white;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
  z-index: 2;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Categories Page Styling */
.categories-page-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 0 60px;
}

.category-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
  border-radius: 16px;
  padding: 32px 20px;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(0, 113, 227, 0.08);
  border: 1px solid rgba(0, 113, 227, 0.1);
  position: relative;
  overflow: hidden;
}

.category-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary-hover) 100%);
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0, 113, 227, 0.15);
  border-color: var(--primary);
}

.category-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
  margin-top: 12px;
}

/* Similar Products */
.similar-products {
  background: #F5F5F7;
  padding: 40px 0;
  margin-top: 40px;
}

.similar-products h2 {
  text-align: center;
  margin-bottom: 30px;
  font-size: 28px;
  font-weight: 600;
  color: var(--text-main);
}

.similar-products .products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.similar-products .product-card {
  display: grid;
  grid-template-columns: 110px 1fr;
  align-items: center;
  gap: 14px;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 14px;
}

.similar-products .product-image-container {
  width: 110px;
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 10px;
}

.similar-products .product-image-container img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8px;
}

.similar-products .product-info h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
}

.similar-products .product-price {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.similar-products .deal-price {
  color: var(--accent);
  font-weight: 800;
}

.similar-products .original-price {
  color: var(--text-secondary);
  text-decoration: line-through;
  font-size: 13px;
}

.similar-products .discount-badge {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 8px;
}

.similar-products .loading,
.similar-products .no-products,
.similar-products .error {
  text-align: center;
  padding: 40px;
  color: var(--text-secondary);
  font-size: 16px;
}

.similar-products .view-product-btn {
  display: inline-block;
  background: var(--primary);
  color: white;
  padding: 10px 20px;
  border-radius: 20px;
  text-decoration: none;
  font-weight: 500;
  margin-top: 10px;
  transition: all 0.2s ease;
}

.similar-products .view-product-btn:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

/* Footer */
footer {
  background: #ffffff;
  border-top: 1px solid #E5E5E5;
  padding: 60px 0 40px;
  margin-top: 80px;
  text-align: center;
}

.footer-sticky-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(100deg, #EAF4FF 0%, #EAF4FF 80%, #BFD8FF 100%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(0,0,0,0.08);
  box-shadow: 0 -6px 24px rgba(0, 113, 227, 0.12);
  z-index: 1000;
}

.footer-sticky-nav .container {
  display: flex;
  justify-content: center;
}

.footer-sticky-nav .nav-links {
  display: flex;
  gap: 20px;
  padding: 10px 16px;
  margin: 8px 0;
}

.footer-links {
    display: none;
}

.footer-links a {
    color: var(--text-main);
    font-weight: 600;
    font-size: 14px;
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-text {
    color: var(--text-secondary);
    font-size: 13px;
    max-width: 600px;
    margin: 0 auto 20px;
    line-height: 1.6;
}

/* Loading Animation */
@keyframes shimmer {
  0% { background-position: -1000px 0; }
  100% { background-position: 1000px 0; }
}

.loading-shimmer {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 1000px 100%;
  animation: shimmer 2s infinite linear;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
  .similar-products .product-card {
    grid-template-columns: 90px 1fr;
    gap: 10px;
    padding: 12px;
  }
  .similar-products .product-image-container {
    width: 90px;
    height: 90px;
  }
  .container {
    padding: 0 14px;
  }

  .categories-nav .container {
    justify-content: flex-start;
    padding-left: 15px;
    padding-right: 15px;
  }
  
  header .main-bar {
    flex-wrap: wrap;
    height: auto;
    padding: 10px 14px;
    gap: 10px;
    position: relative;
  }
  
  .header-search-row {
    padding: 10px 14px;
  }
  
  .header-search-row .header-search-area {
    flex-direction: column;
    gap: 10px;
  }
  
  .header-search-row .header-discount-slider {
    width: 100%;
  }
  
  .logo {
    flex: 1;
  }

  .logo img {
    height: 32px;
  }
  
  .menu-btn {
      display: block;
      order: 2;
      padding: 6px;
  }

  .nav-links { 
    display: none;
    flex-direction: column;
    width: 100%;
    order: 4;
    padding-top: 10px;
    border-top: none;
    border: none;
    background: transparent;
    box-shadow: none;
    margin-top: 5px;
    gap: 12px;
  }

  .nav-links.active {
      display: flex;
  }

  .footer-sticky-nav .nav-links {
    display: flex;
    flex-direction: row;
    width: auto;
    border: none;
    background: transparent;
    box-shadow: none;
    margin: 6px 0;
    gap: 12px;
    overflow-x: auto;
    white-space: nowrap;
  }
  
  .header-search-area {
    order: 3;
    width: 100%;
    flex: 0 0 100%;
    max-width: 100%;
    gap: 6px;
  }

  .search-bar {
    max-width: 100%;
  }

  .search-bar input {
    padding: 10px 16px;
    padding-right: 46px;
    font-size: 15px;
  }

  .header-discount-slider {
    padding: 6px 10px;
    gap: 8px;
  }

  .header-discount-slider label,
  .header-discount-slider span {
    font-size: 12px;
  }
  
  .deals-grid {
      grid-template-columns: repeat(2, 1fr);
      gap: 10px;
  }
  
  .deal-info {
      padding: 10px;
  }
  
  .deal-title {
      font-size: 14px;
      margin-bottom: 8px;
  }
  
  .price-current {
      font-size: 18px;
  }
  
  .btn-view {
      padding: 10px 0;
      font-size: 13px;
  }

  .hero h1 { font-size: 24px; }
  .hero p { font-size: 14px; }
  .hero { padding: 16px 0 8px; }
}

/* Category Navigation Display Rules */
@media (max-width: 768px) {
  .categories-nav-desktop {
    display: none;
  }
  .categories-nav-mobile {
    display: block;
  }
}

@media (min-width: 769px) {
  .categories-nav-desktop {
    display: none;
  }
  .categories-nav-mobile {
    display: block;
  }
}

.categories-nav.categories-nav-mobile .container {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  align-items: center;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 6px;
  justify-content: flex-start;
}

@media (min-width: 769px) {
  .categories-nav {
    overflow-x: visible;
    white-space: normal;
  }

  .categories-nav.categories-nav-mobile .container {
    overflow-x: visible;
    flex-wrap: wrap;
    justify-content: center;
    padding-bottom: 0;
  }
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #6e6e73;
  margin: 20px 0 10px;
  flex-wrap: wrap;
}

.breadcrumbs a {
  color: #0071E3;
  font-weight: 500;
}

.breadcrumb-separator {
  color: #9c9ca1;
}

.breadcrumb-current {
  color: #1d1d1f;
  font-weight: 600;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(0, 113, 227, 0.2);
  background: rgba(0, 113, 227, 0.08);
  color: #1d1d1f;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-chip span {
  color: #1d1d1f;
}

.filter-chip:hover {
  border-color: rgba(0, 113, 227, 0.4);
  background: rgba(0, 113, 227, 0.16);
}

.related-links {
  margin: 40px 0 20px;
  background: #f9fafb;
  border-radius: 16px;
  padding: 24px;
}

.related-links h2 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
  color: #1d1d1f;
}

.related-links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.related-links-grid a {
  padding: 12px 14px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e6e6ea;
  font-weight: 600;
  color: #0071E3;
  transition: all 0.2s ease;
  text-align: center;
}

.related-links-grid a:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}
