/*
 * It's On Sale — Top 6 Deals of the Day Ticker
 * Locked premium layout — navy #0c1a3d + orange #ee7c1b
 * All classes namespaced .ios-top6-* to prevent theme collisions.
 */

.ios-top6,
.ios-top6 * {
  box-sizing: border-box;
}

.ios-top6 {
  margin: 30px 0;
  padding: 30px 24px;
  background: transparent;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Header strip */
.ios-top6-header {
  max-width: 1480px;
  margin: 0 auto 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.ios-top6-header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}
.ios-top6-pulse-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #e63946;
  box-shadow: 0 0 0 0 rgba(230,57,70,0.75);
  animation: ios-top6-pulse 1.4s infinite;
}
@keyframes ios-top6-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(230,57,70,0.75); }
  70%  { box-shadow: 0 0 0 14px rgba(230,57,70,0); }
  100% { box-shadow: 0 0 0 0 rgba(230,57,70,0); }
}
.ios-top6-kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #ee7c1b;
}
.ios-top6-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
  letter-spacing: -0.01em;
}
.ios-top6-meta {
  font-size: 12px;
  color: #b8bcc9;
  font-style: italic;
}
.ios-top6-meta a {
  color: #f6a85e;
  text-decoration: underline;
  text-decoration-color: rgba(238,124,27,0.4);
}
.ios-top6-meta a:hover {
  color: #ee7c1b;
}

/* The 6-column band */
.ios-top6-grid {
  max-width: 1480px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
}

.ios-top6-card {
  position: relative;
  background: #0c1a3d;
  border: 1px solid rgba(238,124,27,0.22);
  border-radius: 10px;
  padding: 18px 16px 16px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  min-height: 320px;
  transition: all 0.25s ease;
  overflow: hidden;
}
.ios-top6-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: #ee7c1b;
}
.ios-top6-card:hover {
  background: #102350;
  border-color: rgba(238,124,27,0.5);
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.35);
}

/* Rank #1: warm tint + thicker top rail + inverted pill */
.ios-top6-card--top {
  background: linear-gradient(165deg, rgba(238,124,27,0.18) 0%, rgba(238,124,27,0.04) 100%), #0c1a3d;
  border-color: rgba(238,124,27,0.55);
}
.ios-top6-card--top::before {
  height: 6px;
}
.ios-top6-card--top .ios-top6-discount {
  background: #ffffff;
  color: #ee7c1b;
}

/* Rank badge top-right */
.ios-top6-rank {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 30px;
  height: 30px;
  background: #ee7c1b;
  color: #0c1a3d;
  font-family: Georgia, serif;
  font-size: 15px;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(238,124,27,0.4);
  z-index: 2;
}

/* Logo zone */
.ios-top6-logo {
  flex: 0 0 auto;
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 6px 0 14px;
}
.ios-top6-logo img {
  max-width: 88%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
}

/* Store info — fixed-height block so the pill below aligns across all 6 cards */
.ios-top6-text {
  flex: 0 0 auto;
  height: 64px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  overflow: hidden;
  margin-bottom: 6px;
}
.ios-top6-store-name {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
  font-weight: 700;
  color: #ffffff;
  text-align: center;
  margin: 0 0 6px;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ios-top6-category {
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #b8bcc9;
  margin: 0;
}

/* Discount pill — pushed to bottom via margin-top:auto so all 6 align in one row */
.ios-top6-discount {
  margin-top: auto;
  background: #ee7c1b;
  color: #ffffff;
  text-align: center;
  border-radius: 6px;
  padding: 10px 0 8px;
  font-family: Georgia, serif;
  line-height: 1;
}
.ios-top6-discount-num {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.ios-top6-discount-label {
  display: block;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.22em;
  margin-top: 5px;
}

/* Footer */
.ios-top6-footer {
  max-width: 1480px;
  margin: 18px auto 0;
  text-align: center;
}
.ios-top6-cta {
  display: inline-block;
  padding: 10px 22px;
  border: 1.5px solid #ee7c1b;
  color: #ee7c1b;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 999px;
  transition: all 0.2s ease;
}
.ios-top6-cta:hover {
  background: #ee7c1b;
  color: #0c1a3d;
}
.ios-top6-disclaimer {
  margin: 14px 0 0;
  font-size: 11px;
  color: #8b8f9c;
  font-style: italic;
  letter-spacing: 0.02em;
}

/* Empty state */
.ios-top6-empty {
  background: transparent;
  color: #b8bcc9;
  text-align: center;
  padding: 30px;
  font-style: italic;
  font-family: Georgia, serif;
}

/* RESPONSIVE: tablets — 3 columns x 2 rows */
@media (max-width: 1100px) {
  .ios-top6-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .ios-top6-title { font-size: 20px; }
}

/* RESPONSIVE: phones — 2 columns x 3 rows */
@media (max-width: 640px) {
  .ios-top6 {
    padding: 22px 16px;
  }
  .ios-top6-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .ios-top6-card {
    min-height: 280px;
    padding: 14px 12px 12px;
  }
  .ios-top6-logo {
    height: 110px;
    margin: 4px 0 10px;
  }
  .ios-top6-store-name {
    font-size: 15px;
  }
  .ios-top6-discount-num {
    font-size: 24px;
  }
  .ios-top6-header {
    justify-content: center;
    text-align: center;
  }
  .ios-top6-meta {
    flex-basis: 100%;
    text-align: center;
  }
}
