/* components.css - feature-specific components */

/* Dashboard stats */

.dashboard-grid .stat-card {
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.12), transparent 60%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.98));
}

.stat-card h3 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ht-text-muted);
  margin-bottom: 5px;
}

.stat-value {
  font-size: 20px;
  font-weight: 600;
}

.stat-meta {
  font-size: 11px;
  color: var(--ht-text-muted);
}

/* Empty state */

.empty-state h2 {
  font-size: 20px;
  margin-bottom: 4px;
}

.empty-state p {
  margin-bottom: 12px;
}

/* Auth forms */

.auth-form .btn-primary {
  margin-top: 6px;
}

/* Marketplace product cards */

.product-card {
  background:
    radial-gradient(circle at top, rgba(37, 99, 235, 0.1), transparent 55%),
    linear-gradient(145deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.96));
}

.product-title {
  font-size: 14px;
  font-weight: 500;
}

.product-meta {
  font-size: 12px;
  color: var(--ht-text-muted);
}

.product-price-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-top: 2px;
}

.product-price {
  font-weight: 600;
}

.product-actions {
  margin-top: 8px;
  display: flex;
  gap: 8px;
}

/* Product detail */

.product-detail-info h1 {
  font-size: 22px;
  margin-bottom: 6px;
}

.product-meta-line {
  font-size: 12px;
  color: var(--ht-text-muted);
  display: flex;
  justify-content: space-between;
}

.product-stock {
  margin-top: 6px;
  font-size: 12px;
}

/* Cart */

.cart-item-title a {
  color: var(--ht-text);
  font-size: 14px;
  font-weight: 500;
}

.cart-item-meta {
  margin-top: 4px;
  font-size: 12px;
  color: var(--ht-text-muted);
}

.cart-item-total {
  font-size: 14px;
  font-weight: 600;
}

.cart-summary h2 {
  font-size: 18px;
  margin-bottom: 10px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 4px;
}

.summary-total {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed rgba(148, 163, 184, 0.4);
  font-weight: 600;
}

.summary-actions {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Orders list & detail */

.order-main {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.order-meta {
  font-size: 12px;
  color: var(--ht-text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.order-meta-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.order-total-summary {
  font-weight: 600;
  font-size: 14px;
}

.order-actions {
  margin-top: 8px;
  display: flex;
  gap: 8px;
}

/* Order detail layout */

.order-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 340px) minmax(0, 1.4fr);
  gap: 18px;
  align-items: flex-start;
}

.order-summary-card,
.order-items-card,
.shipment-card {
  margin-bottom: 0;
}

.order-summary-header,
.order-items-header,
.shipment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.order-summary-body {
  font-size: 13px;
}

.order-items-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.order-item-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.order-item-image-wrap {
  width: 72px;
  height: 72px;
  border-radius: var(--ht-radius-md);
  overflow: hidden;
}

.order-item-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.order-item-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.order-item-title {
  font-size: 14px;
  font-weight: 500;
}

.order-item-seller {
  font-size: 12px;
  color: var(--ht-text-muted);
}

.order-item-meta {
  font-size: 12px;
  color: var(--ht-text-muted);
}

.order-item-total {
  font-weight: 600;
  text-align: right;
  font-size: 13px;
}

.order-detail-actions {
  margin-top: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Shipment cards */

.shipment-summary {
  font-size: 13px;
}

.shipment-details {
  margin-top: 8px;
  font-size: 12px;
  color: var(--ht-text-muted);
}

.shipment-card .status-badge {
  font-size: 11px;
}

/* Reels feed */

.reel-card {
  display: grid;
  grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
  gap: 16px;
}

.reel-media {
  border-radius: var(--ht-radius-lg);
  overflow: hidden;
  max-height: 420px;
}

.reel-meta h2 {
  font-size: 18px;
  margin-bottom: 4px;
}

.reel-author {
  font-size: 12px;
  color: var(--ht-text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

.reel-caption {
  font-size: 13px;
  margin-bottom: 12px;
}

.reel-products h3 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ht-text-muted);
  margin-bottom: 6px;
}

.reel-product-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.reel-product-card {
  flex: 0 1 190px;
  border-radius: var(--ht-radius-md);
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(30, 64, 175, 0.5);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.reel-product-card img {
  width: 100%;
  height: 120px;
  object-fit: cover;
}

.reel-product-info h4 {
  font-size: 13px;
  margin-bottom: 2px;
}

.reel-product-info .price {
  font-size: 13px;
}

/* Filters in admin / logistics / influencer areas */

.filter-form,
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.filter-group {
  min-width: 140px;
}

/* Admin users & access requests */

.badge-role {
  font-size: 11px;
  padding-inline: 8px;
}

/* Responsive tweaks for components */

@media (max-width: 960px) {
  .order-detail-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .reel-card {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  .order-item-row {
    grid-template-columns: 60px minmax(0, 1fr);
  }

  .reel-product-card {
    flex: 1 1 100%;
  }
}

/* ====================================== */
/* Landing: tall reels cards (home grid)  */
/* ====================================== */

.reel-card--tall {
  /* re-use .card / .reel-card feel but vertical */
  display: flex;
  flex-direction: column;
  border-radius: var(--ht-radius-lg);
  background:
    radial-gradient(circle at top, rgba(59, 130, 246, 0.16), transparent 60%),
    linear-gradient(150deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.96));
  box-shadow: var(--ht-shadow-subtle);
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.reel-card--tall:hover {
  transform: translateY(-4px);
  box-shadow: var(--ht-shadow-soft);
  border-color: rgba(129, 140, 248, 0.8);
}

.reel-card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit;
}

.reel-card-thumb {
  position: relative;
  overflow: hidden;
}

.reel-card-image {
  width: 100%;
  height: 260px;
  object-fit: cover;
  display: block;
  border-radius: 0;
}

.reel-card-thumb-placeholder {
  width: 100%;
  height: 260px;
  background:
    radial-gradient(circle at 0 0, rgba(59, 130, 246, 0.2), transparent 60%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.98));
}

.reel-card-overlay-top {
  position: absolute;
  top: 10px;
  left: 10px;
}

.reel-card-badge {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  background-color: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.8);
}

.reel-card-body {
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.reel-card-title {
  font-size: 14px;
  font-weight: 500;
}

.reel-card-caption {
  font-size: 12px;
  color: var(--ht-text-soft);
}

.reel-card-meta {
  margin-top: 2px;
  font-size: 11px;
  color: var(--ht-text-muted);
  display: flex;
  justify-content: space-between;
  gap: 6px;
}

/* ====================================== */
/* Landing: product card grid variants    */
/* ====================================== */

.product-grid .product-card {
  border-radius: var(--ht-radius-md);
  overflow: hidden;
  box-shadow: var(--ht-shadow-subtle);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  border: 1px solid rgba(148, 163, 184, 0.18);
  padding: 0;
}

.product-grid .product-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--ht-shadow-soft);
  border-color: rgba(129, 140, 248, 0.9);
}

.product-card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit;
}

.product-thumb {
  position: relative;
  overflow: hidden;
}

.product-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.product-thumb-placeholder {
  width: 100%;
  height: 200px;
  background:
    radial-gradient(circle at top, rgba(59, 130, 246, 0.2), transparent 55%),
    linear-gradient(145deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.96));
}

.product-badge {
  position: absolute;
  width: 120px;
  top: 10px;
  left: 10px;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  background-color: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(96, 165, 250, 0.8);
}

.product-badge--deal {
  background: linear-gradient(to right, #22c55e, #16a34a);
  border-color: rgba(22, 163, 74, 0.8);
}

.product-body {
  padding: 10px 12px 12px;
}

.product-body .product-title {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 4px;
}

.product-desc {
  font-size: 12px;
  color: var(--ht-text-soft);
  margin-bottom: 6px;
}

.product-pricing {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.product-price {
  font-size: 14px;
  font-weight: 600;
}

.product-grid--recommended .product-card {
  /* Optional: slightly different styling for recommended section */
  background:
    radial-gradient(circle at top, rgba(147, 197, 253, 0.12), transparent 60%),
    linear-gradient(145deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.96));
}

/* ====================================== */
/* Landing: "Choose how you use" cards    */
/* ====================================== */

.section--roles {
  padding-top: 40px;
}

.section--roles .section-header {
  max-width: var(--ht-max-width);
  margin: 0 auto 24px;
  text-align: left;
}

.section--roles .cards-grid {
  align-items: stretch;
}

/* Base card look for role cards */
.role-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px 18px 16px;
  gap: 10px;
  border-radius: var(--ht-radius-lg);
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.14), transparent 60%),
    linear-gradient(150deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.96));
  border: 1px solid var(--ht-border-subtle);
  box-shadow: var(--ht-shadow-subtle);
}

/* Icon pill at the top of each card */
.role-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  background: rgba(48, 63, 159, 0.16);
  color: var(--ht-text);
  font-size: 18px;
}

/* Title + body copy */
.role-card h3 {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 4px;
}

.role-card p {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--ht-text-muted);
}

/* Bullet list */
.role-card-list {
  margin: 0 0 10px;
  padding-left: 18px;
  font-size: 12px;
  color: var(--ht-text-muted);
}

.role-card-list li {
  margin-bottom: 3px;
}

/* Call-to-action button aligned to bottom */
.role-card .btn {
  margin-top: 4px;
  width: 100%;
}

.reel-card-video {
    pointer-events: none;
}

/* =========================================
   Title clamping (max 2 lines)
   ========================================= */
.reel-card-title,
.product-title--home {
    display: -webkit-box;
    -webkit-line-clamp: 2;          /* limit to 2 lines in WebKit */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Fallback for non-WebKit: approximate 2 lines */
.reel-card-title,
.product-title--home {
    max-height: 3.2em;              /* assuming ~1.6em line-height */
    line-height: 1.6em;
}

/* =========================================
   Home product cards (landing page)
   ========================================= */
.product-card--home {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Image wrapper with overlay */
.product-card--home .product-card-image-wrap {
    position: relative;
    display: block;
    border-radius: 16px;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: #111;
	border-radius: 0;
}

.product-card--home .product-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
	border-radius: 0;
}

/* Soft gradient at the bottom */
.product-card--home .product-card-image-wrap::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 45%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
}

/* Top badges (deal / recommended) */
.product-card--home .product-card-badges {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
    display: flex;
    gap: 6px;
}

.product-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
}

.product-badge--deal {
    background: linear-gradient(135deg, #ff9800, #ff5722);
}

.product-badge--recommended {
    background: linear-gradient(135deg, #303f9f, #5c6bc0);
}

/* Bottom image footer: price + stock */
.product-card--home .product-card-image-footer {
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 10px;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    font-size: 12px;
}

.product-card-price-tag {
    font-weight: 700;
}

.product-card-stock {
    opacity: 0.9;
}

/* Body */
.product-card--home .product-card-body {
    padding: 20px 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.product-card--home .product-title--home a {
    color: inherit;
    text-decoration: none;
}

.product-card--home .product-title--home a:hover {
    text-decoration: underline;
}

/* Desc + meta rows */
.product-desc--home {
    font-size: 13px;
    color: var(--ht-text-muted, #a0a0a7);
}

.product-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 11px;
    color: var(--ht-text-muted, #a0a0a7);
}

.product-card-meta i {
    font-size: 10px;
}

/* CTA row */
.product-card-cta {
    margin-top: 4px;
    display: flex;
    justify-content: flex-start;
    gap: 8px;
}
