/*
 * shop-index-spotlight.css
 * Khu vực spotlight trang chủ: category rail, slider/bento, spotlight live,
 * promo bar, promo deals/campaigns, category shortcuts, btn-sm, AI Build entry.
 */

/* ============================================================
   Home banners — full width trong shop-container
   ============================================================ */
.shop-home-banners {
  width: 100%;
  margin: 0 0 var(--space-7);
}

.shop-home-banners__promos {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  width: 100%;
  min-width: 0;
}

.shop-home-banners .shop-spotlight-live {
  margin-top: var(--space-3);
}

/* ============================================================
   Shop Spotlight Live
   ============================================================ */
.shop-spotlight-live {
  width: 100%;
  min-width: 0;
  border-radius: var(--radius-md);
  border: 2px solid var(--color-cyan);
  background: var(--color-white);
  overflow: hidden;
  box-shadow: var(--shadow-md), 0 0 0 1px rgba(255, 122, 0, 0.1);
}

.shop-spotlight-live__wrapper {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
}

.shop-spotlight-live__video {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 6;
  background: #000;
  flex-shrink: 0;
}

.shop-spotlight-live__video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.shop-spotlight-live__badge {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--color-white);
  background: #e53935;
  border-radius: var(--radius-sm);
  box-shadow: 0 2px 8px rgba(229, 57, 53, 0.45);
}

.shop-spotlight-live__pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-white);
  flex-shrink: 0;
  animation: shop-live-pulse 1.4s ease-in-out infinite;
}

.shop-spotlight-live__viewers {
  position: absolute;
  bottom: var(--space-3);
  left: var(--space-3);
  z-index: 2;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  color: var(--color-white);
  background: rgba(11, 36, 59, 0.72);
  border-radius: var(--radius-sm);
  backdrop-filter: blur(4px);
}

.shop-spotlight-live__content {
  display: flex;
  flex-direction: column;
  padding: var(--space-4);
  width: 100%;
  min-width: 0;
  text-align: left;
  background: linear-gradient(135deg, rgba(0, 174, 239, 0.06), rgba(227, 108, 9, 0.05));
  border-top: 1px solid var(--border);
}

.shop-spotlight-live__icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
}

.shop-spotlight-live__icon svg { width: 14px; height: 14px; }
.shop-spotlight-live__icon--live  { background: rgba(229, 57, 53, 0.12); color: #e53935; }
.shop-spotlight-live__icon--time  { background: rgba(0, 174, 239, 0.12); color: var(--color-cyan); }
.shop-spotlight-live__icon--sale  { background: rgba(227, 108, 9, 0.12); color: var(--color-orange); }
.shop-spotlight-live__icon--pay   { background: rgba(0, 174, 239, 0.12); color: var(--color-cyan); }
.shop-spotlight-live__icon--gift  { background: rgba(0, 114, 188, 0.12); color: var(--color-blue); }
.shop-spotlight-live__icon--truck { background: rgba(11, 36, 59, 0.08);  color: var(--primary); }

.shop-spotlight-live__title {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  width: 100%;
  margin: 0 0 var(--space-2) 0;
  font-family: var(--font-display);
  font-size: var(--text-small);
  font-weight: 700;
  line-height: 1.35;
  color: var(--primary);
}

.shop-spotlight-live__title .shop-spotlight-live__icon { flex-shrink: 0; margin-top: 2px; }
.shop-spotlight-live__title > span:last-child { flex: 1; min-width: 0; }

.shop-spotlight-live__desc {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  width: 100%;
  margin: 0 0 var(--space-2) 0;
  font-size: var(--text-small);
  line-height: 1.55;
  color: var(--muted-foreground);
}

.shop-spotlight-live__desc .shop-spotlight-live__icon { flex-shrink: 0; margin-top: 2px; }
.shop-spotlight-live__desc > span:last-child { flex: 1; min-width: 0; }

.shop-spotlight-live__highlights {
  margin: var(--space-1) 0 var(--space-3) 0;
  padding: 0;
  list-style: none;
  width: 100%;
}

.shop-spotlight-live__highlight {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  width: 100%;
  margin-bottom: 6px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--primary);
}

.shop-spotlight-live__highlight:last-child { margin-bottom: 0; }
.shop-spotlight-live__highlight .shop-spotlight-live__icon { flex-shrink: 0; margin-top: 2px; }
.shop-spotlight-live__highlight > span:last-child { flex: 1; min-width: 0; }

.shop-spotlight-live__cta {
  display: inline-flex;
  margin: var(--space-2) auto 0;
}

.shop-spotlight-promos {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  min-width: 0;
}

@keyframes shop-live-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.85); }
}

@media (prefers-reduced-motion: reduce) {
  .shop-spotlight-live__pulse { animation: none; }
}

/* Desktop: Video trái, Content phải */
@media (min-width: 993px) {
  .shop-spotlight-live__wrapper { flex-direction: row; align-items: stretch; }
  .shop-spotlight-live__video { flex: 1 1 60%; max-width: 60%; aspect-ratio: 16 / 6; }
  .shop-spotlight-live__content {
    flex: 1 1 40%;
    max-width: 40%;
    border-top: none;
    border-left: 1px solid var(--border);
    background: transparent;
  }
  .shop-spotlight-live__title { font-size: var(--text-small); line-height: 1.3; }
  .shop-spotlight-live__desc  { font-size: 12px; line-height: 1.45; }
  .shop-spotlight-live__highlight { font-size: 11px; line-height: 1.35; }
  .shop-spotlight-live__icon { width: 20px; height: 20px; }
  .shop-spotlight-live__icon svg { width: 12px; height: 12px; }
}

/* ============================================================
   Slider + Bento tiles
   ============================================================ */
.shop-spotlight-top {
  display: grid;
  grid-template-columns: 1fr 238px;
  gap: var(--space-3);
  min-height: 260px;
}

.shop-slider {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--primary);
  min-height: 260px;
}

.shop-slider__viewport { overflow: hidden; height: 100%; min-height: 260px; }

.shop-slider__track {
  display: flex;
  height: 100%;
  min-height: 260px;
  transition: transform 0.45s var(--ease-out);
}

.shop-slider__slide {
  flex: 0 0 100%;
  position: relative;
  min-height: 260px;
}

.shop-slider__slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shop-slider__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(11, 36, 59, 0.82) 0%, rgba(11, 36, 59, 0.35) 55%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: var(--space-6);
  color: var(--color-white);
  z-index: 1;
}

.shop-slider__overlay-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-2);
  max-width: min(38ch, 92%);
}

.shop-slider__overlay-content .btn-primary {
  width: auto;
  align-self: flex-start;
  margin-top: var(--space-2);
}

.shop-slider__overlay h2 {
  font-family: var(--font-display);
  font-size: clamp(var(--text-h3), 2.5vw, var(--text-h2));
  font-weight: var(--font-display-weight);
  font-style: var(--font-display-style);
  letter-spacing: 0.03em;
  margin: 0;
  max-width: 22ch;
}

.shop-slider__overlay p {
  font-family: var(--font-body);
  font-size: var(--text-small);
  opacity: 0.92;
  margin: 0;
  max-width: 36ch;
}

.shop-slider__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--primary);
  font-size: var(--text-h4);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--duration-fast);
}

.shop-slider__nav:hover { background: var(--color-white); }
.shop-slider__nav--prev { left: var(--space-3); }
.shop-slider__nav--next { right: var(--space-3); }

.shop-slider__dots {
  position: absolute;
  bottom: var(--space-3);
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  gap: var(--space-2);
}

.shop-slider__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  transition: transform var(--duration-fast), background var(--duration-fast);
}

.shop-slider__dot.is-active {
  background: var(--color-white);
  transform: scale(1.2);
}

.shop-spotlight-stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.shop-spotlight-bottom {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
}

.shop-bento-tile {
  position: relative;
  display: block;
  min-height: 115px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  text-decoration: none;
  transition: box-shadow var(--duration-normal), transform var(--duration-fast);
}

.shop-bento-tile--tall { min-height: 0; flex: 1; }

.shop-spotlight-stack .shop-bento-tile { flex: 1; min-height: 122px; }

.shop-bento-tile:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.shop-bento-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shop-bento-tile__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(11, 36, 59, 0.88) 0%, rgba(11, 36, 59, 0.25) 55%, transparent 100%);
  z-index: 1;
}

.shop-bento-tile__body {
  position: relative;
  z-index: 2;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--space-4);
  color: var(--color-white);
}

.shop-bento-tile__badge {
  align-self: flex-start;
  font-size: var(--text-xs);
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  background: var(--color-orange);
  color: var(--color-white);
  margin-bottom: var(--space-2);
}

.shop-bento-tile__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-body);
}

/* ============================================================
   Promo bar + home promo rows + category shortcuts
   ============================================================ */
.shop-promo-bar-wrap {
  background: var(--background-muted);
  border-bottom: 1px solid var(--border);
  position: relative;
  z-index: calc(var(--shop-z-header) - 1);
}

.shop-promo-bar {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  overflow-x: auto;
  padding: 9px 0;
  scrollbar-width: none;
}

.shop-promo-bar::-webkit-scrollbar { display: none; }

.shop-promo-bar__link {
  flex-shrink: 0;
  white-space: nowrap;
  text-decoration: none;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--primary);
  transition: color var(--duration-fast);
}

.shop-promo-bar__link:hover { color: var(--color-blue); }
.shop-promo-bar__link.is-highlight { color: var(--color-orange); }

.shop-promo-deals {
  display: flex;
  gap: var(--space-3);
  overflow-x: auto;
  padding-bottom: var(--space-2);
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.shop-promo-deals > .shop-promo-card {
  position: relative;
  flex: 0 0 220px;
  min-height: 245px;
  display: block;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  text-decoration: none;
  transition: box-shadow var(--duration-normal), transform var(--duration-fast);
}

.shop-promo-deals > .shop-promo-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.shop-promo-deals > .shop-promo-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shop-promo-deals > .shop-promo-card .shop-promo-card__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(11, 36, 59, 0.92) 0%, rgba(11, 36, 59, 0.35) 50%, transparent 100%);
  z-index: 1;
}

.shop-promo-deals > .shop-promo-card .shop-promo-card__body {
  position: relative;
  z-index: 2;
  min-height: 245px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--space-4);
  color: var(--color-white);
}

.shop-promo-deals > .shop-promo-card .shop-promo-card__badge {
  align-self: flex-start;
  font-size: var(--text-xs);
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  background: var(--color-orange);
  margin-bottom: var(--space-2);
}

.shop-promo-deals > .shop-promo-card .shop-promo-card__discount {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  font-size: var(--text-small);
  font-weight: 700;
  padding: 4px 8px;
  background: rgba(227, 108, 9, 0.9);
  border-radius: var(--radius-sm);
}

.shop-promo-deals > .shop-promo-card .shop-promo-card__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-small);
  line-height: 1.35;
  margin-bottom: var(--space-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.shop-promo-deals > .shop-promo-card .shop-promo-card__prices {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-2);
}

.shop-promo-deals > .shop-promo-card .shop-promo-card__price {
  font-weight: 700;
  font-size: var(--text-body);
  color: var(--color-gold);
}

.shop-promo-deals > .shop-promo-card .shop-promo-card__old {
  font-size: var(--text-xs);
  text-decoration: line-through;
  opacity: 0.75;
}

.shop-promo-campaigns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
}

.shop-promo-campaign {
  position: relative;
  display: block;
  min-height: 122px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  text-decoration: none;
  transition: box-shadow var(--duration-normal), transform var(--duration-fast);
}

.shop-promo-campaign:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.shop-promo-campaign img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shop-promo-campaign__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, rgba(11, 36, 59, 0.9) 0%, rgba(11, 36, 59, 0.45) 55%, transparent 100%);
  z-index: 1;
}

.shop-promo-campaign__body {
  position: relative;
  z-index: 2;
  min-height: 122px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--space-5);
  color: var(--color-white);
  max-width: 70%;
}

.shop-promo-campaign__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-h4);
  margin-bottom: var(--space-2);
}

.shop-promo-campaign__desc {
  font-size: var(--text-small);
  opacity: 0.9;
}

.shop-category-shortcuts {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: var(--space-2);
}

.shop-cat-shortcut {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: var(--space-2) var(--space-2);
  background: var(--color-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--primary);
  transition: border-color var(--duration-fast), box-shadow var(--duration-fast);
}

.shop-cat-shortcut:hover {
  border-color: var(--color-blue);
  box-shadow: var(--shadow-sm);
}

.shop-cat-shortcut__thumb {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--background-muted);
}

.shop-cat-shortcut__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shop-cat-shortcut__icon  { display: none; }

.shop-cat-shortcut__label {
  font-size: var(--text-xs);
  font-weight: 600;
  text-align: center;
  line-height: 1.25;
}

@media (max-width: 1200px) {
  .shop-category-shortcuts { grid-template-columns: repeat(6, 1fr); }
}

@media (max-width: 992px) {
  .shop-promo-campaigns { grid-template-columns: 1fr; }
  .shop-category-shortcuts { grid-template-columns: repeat(4, 1fr); }
  .shop-promo-deals > .shop-promo-card { flex: 0 0 200px; min-height: 228px; }
}

@media (max-width: 640px) {
  .shop-category-shortcuts-section { display: none; }
}

/* ============================================================
   Responsive — banners, slider
   ============================================================ */
@media (max-width: 992px) {
  .shop-spotlight-live__wrapper { flex-direction: column; }
  .shop-spotlight-live__video { width: 100%; max-width: 100%; aspect-ratio: 16 / 6; }
  .shop-spotlight-live__content {
    width: 100%;
    max-width: 100%;
    padding: var(--space-3);
    border-left: none;
    border-top: 1px solid var(--border);
  }

  .shop-spotlight-top { grid-template-columns: 1fr; min-height: auto; }

  .shop-slider,
  .shop-slider__viewport,
  .shop-slider__track,
  .shop-slider__slide { min-height: 210px; }

  .shop-spotlight-stack { flex-direction: row; }
  .shop-spotlight-stack .shop-bento-tile { flex: 1; min-height: 105px; }
  .shop-spotlight-bottom { grid-template-columns: repeat(2, 1fr); }

  .shop-slider__dots { padding: var(--space-2) 0; }
  .shop-slider__dot {
    width: 28px;
    height: 10px;
    padding: 12px 4px;
    background-clip: content-box;
    box-sizing: content-box;
  }
}

@media (max-width: 560px) {
  .shop-spotlight-stack { flex-direction: column; }
  .shop-slider__nav { display: none; }
}

@media (max-width: 400px) {
  .shop-spotlight-bottom { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .shop-slider__track { transition: none; }
}

/* ============================================================
   btn-sm
   ============================================================ */
.btn-sm {
  min-height: var(--btn-height);
  height: var(--btn-height);
  padding: 0 var(--btn-padding-sm-x);
  font-size: var(--btn-font-size-sm);
  line-height: 1;
}

/* ============================================================
   AI Build PC entry (home)
   ============================================================ */
.shop-ai-entry {
  margin-bottom: var(--space-6);
  padding: var(--space-5) var(--space-6);
  border: 1px solid var(--border);
  background: var(--surface-solid);
}

.shop-ai-entry__head {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

.shop-ai-entry__badge {
  flex-shrink: 0;
  padding: 4px 10px;
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--color-white);
  background: var(--gradient-tech);
}

.shop-ai-entry__title {
  font-family: var(--font-display);
  font-size: var(--text-h3);
  font-style: italic;
  color: var(--primary);
  margin: 0 0 var(--space-1);
}

.shop-ai-entry__desc {
  margin: 0;
  font-size: var(--text-small);
  color: var(--muted-foreground);
}

.shop-ai-entry__form {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
}

.shop-ai-entry__form input {
  flex: 1 1 220px;
  min-width: 0;
  box-sizing: border-box;
  min-height: var(--btn-height);
  height: var(--btn-height);
  padding: 0 var(--btn-padding-x);
  border: 1px solid var(--border);
  font-family: var(--font-body);
  font-size: var(--text-body);
  background: var(--color-white);
  color: var(--foreground);
}

.shop-ai-entry__form input:focus {
  outline: 2px solid var(--color-cyan);
  outline-offset: 1px;
}

.shop-ai-entry__submit {
  flex-shrink: 0;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .shop-ai-entry { padding: var(--space-4); }
  .shop-ai-entry__submit { width: 100%; }
}
