/* sub-category-details.css - Flattened and Scoped */

.market-analysis-dashboard .store-view-page {
  background-color: #f8fafc;
  min-height: 100vh;
  font-family: 'Cairo', sans-serif;
}

.market-analysis-dashboard .store-view-page .back-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #f1f5f9;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dark);
  margin-right: 15px;
  transition: all 0.2s;
  cursor: pointer;
}

.market-analysis-dashboard .store-view-page .back-btn:hover {
  background: #e2e8f0;
  transform: translateX(-2px);
}

.market-analysis-dashboard .store-view-page .store-header {
  background: white;
  padding: 24px;
  border-radius: 16px;
  border: 1px solid var(--border-color);
  margin-bottom: 24px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.market-analysis-dashboard .store-view-page .store-logo {
  width: 64px;
  height: 64px;
  background: #f8fafc;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin-right: 20px;
  border: 1px solid var(--border-color);
}

.market-analysis-dashboard .store-view-page .store-name {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
}

.market-analysis-dashboard .store-view-page .store-info {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 4px;
  display: flex;
  gap: 15px;
  align-items: center;
}

.market-analysis-dashboard .store-view-page .rating {
  color: #f1c40f;
  font-weight: 600;
}

.market-analysis-dashboard .store-view-page .category-badge {
  background: var(--light-green);
  color: var(--primary-green);
  padding: 4px 12px;
  border-radius: 99px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid rgba(0, 191, 165, 0.1);
}

.market-analysis-dashboard .store-view-page .products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 25px;
}

@media (max-width: 576px) {
  .market-analysis-dashboard .store-view-page .products-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
}

.market-analysis-dashboard .store-view-page .product-card {
  background: white;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  padding: 12px;
  display: flex;
  gap: 10px;
  align-items: center;
  transition: all 0.2s;
}

.products-grid .product-card:first-child {
    background: rgb(240, 254, 247) !important;
}

.market-analysis-dashboard .store-view-page .product-card:hover {
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
  border-color: #cbd5e1;
}

@media (max-width: 576px) {
  .market-analysis-dashboard .store-view-page .product-card {
    display: flex;
    align-items: center;
    padding: 12px;
  }
  .market-analysis-dashboard .store-view-page .product-card .product-img-wrap {
    width: 80px;
    height: 80px;
    margin-bottom: 0;
    margin-inline-end: 15px;
  }
  .market-analysis-dashboard .store-view-page .product-card .product-info {
    flex: 1;
  }
  .market-analysis-dashboard .store-view-page .product-card .product-price-section {
    text-align: end;
    margin-top: 0;
    padding-top: 0;
    border-top: none;
    border-inline-start: 1px solid var(--gray-100);
    padding-inline-start: 15px;
    min-width: 90px;
  }
}

.market-analysis-dashboard .store-view-page .product-img-wrap {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 8px;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 6px;
}

.market-analysis-dashboard .store-view-page .product-img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.market-analysis-dashboard .store-view-page .product-info {
  flex: 1;
  min-width: 0;
}

@media (max-width: 480px) {
  .market-analysis-dashboard .store-view-page .product-name {
    white-space: pre-wrap !important;
  }
  .market-analysis-dashboard .store-view-page .product-card .product-img-wrap{
  	margin-inline-end: 0 !important;
  }
  .market-analysis-dashboard .store-view-page .product-card .product-price-section{
  	min-width: 60px !important;
  }
}

.market-analysis-dashboard .store-view-page .product-name {
  font-size: 0.85rem;
  font-weight: 600;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.market-analysis-dashboard .store-view-page .product-brand {
  font-size: 0.7rem;
  margin-top: 2px;
  color: var(--text-muted);
}

.market-analysis-dashboard .store-view-page .product-price-section {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  margin-left: auto;
}

.market-analysis-dashboard .store-view-page .price-label {
  font-size: 0.6rem;
}

.market-analysis-dashboard .store-view-page .price-value {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--primary-green);
}

.market-analysis-dashboard .store-view-page .emoji-svg {
  width: 1.2em;
  height: 1.2em;
  vertical-align: middle;
  object-fit: contain;
}

.market-analysis-dashboard .store-view-page .section-title {
  font-size: 1.25rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

@media (max-width: 768px) {
  .market-analysis-dashboard .store-view-page .store-header .row.align-items-center .col-md-8 {
    flex-direction: column;
    align-items: flex-start !important;
    text-align: start;
  }
  .market-analysis-dashboard .store-view-page .store-header .row.align-items-center .col-md-8 .store-logo {
    margin-bottom: 15px;
    margin-inline-end: 0;
  }
}

/* RTL Overrides for Sub-category Details */
html[dir="rtl"] .market-analysis-dashboard .store-view-page .back-btn {
  margin-right: 0;
  margin-left: 15px;
}

html[dir="rtl"] .market-analysis-dashboard .store-view-page .store-logo {
  margin-right: 0;
  margin-left: 20px;
}

html[dir="rtl"] .market-analysis-dashboard .store-view-page .product-price-section {
  align-items: flex-start;
  margin-left: 0;
  margin-right: auto;
}

html[dir="rtl"] .market-analysis-dashboard .store-view-page .price-value {
  text-align: left;
}

@media (max-width: 576px) {
  html[dir="rtl"] .market-analysis-dashboard .store-view-page .product-card .product-img-wrap {
    margin-right: 0;
    margin-left: 15px;
  }
  html[dir="rtl"] .market-analysis-dashboard .store-view-page .product-card .product-price-section {
    padding-inline-start: 0;
    padding-inline-end: 15px;
    border-inline-start: none;
    border-inline-end: 1px solid var(--gray-100);
    text-align: start;
  }
}