/* ==========================================================================
   Coupon Legacy — base styles
   ========================================================================== */

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: #333333;
  font-size: 16px;
  line-height: 1.5;
  background: #ffffff;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

button {
  font-family: inherit;
  border: none;
  background: none;
  cursor: pointer;
}

ul, dl, dt, dd, p, h1, h2, h3 {
  margin: 0;
  padding: 0;
}

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

/* ==========================================================================
   Header
   ========================================================================== */

.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #ffffff;
  box-shadow: 0 0 8px 0 #e1e1e1;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.logo img {
  display: block;
  height: 50px;
  width: auto;
  margin-left: -10px; /* the logo SVG has built-in padding; align the ticket with the page edge */
}

.header-right {
  display: flex;
  align-items: center;
  gap: 24px;
}

/* Search box */

.search-box {
  position: relative;
  width: 300px;
  height: 42px;
}

.search-box input {
  width: 100%;
  height: 42px;
  border: none;
  border-radius: 6px;
  background: #f6f7f8;
  color: #222222;
  font-size: 14px;
  padding: 0 44px 0 12px;
}

.search-box input:focus {
  outline: 2px solid #ff6e00;
}

.search-btn {
  position: absolute;
  right: 0;
  top: 0;
  width: 42px;
  height: 42px;
  cursor: pointer;
}

.search-clear {
  display: none;
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
}

.search-box.has-value .search-clear {
  display: block;
}

.search-panel {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 420px;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 4px 16px 0 rgba(0, 0, 0, 0.12);
  padding: 24px;
  z-index: 30;
}

.search-box.is-open .search-panel {
  display: block;
}

.search-panel-title {
  color: #222222;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 16px;
}

.search-panel-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 0;
}

.search-panel-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 50%;
  padding: 8px;
}

.search-panel-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border: 1px solid #f5f5f5;
  border-radius: 6px;
  padding: 3px;
  background: #ffffff;
}

.search-panel-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 4px;
}

.search-panel-icon--dark {
  background-color: #000000;
}

.search-panel-text p {
  color: #222222;
  font-size: 14px;
  font-weight: 500;
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  background:
    radial-gradient(60% 80% at 50% 8%, rgba(255, 110, 0, 0.14) 0%, rgba(255, 110, 0, 0) 70%),
    radial-gradient(40% 60% at 14% 92%, rgba(255, 170, 90, 0.14) 0%, rgba(255, 170, 90, 0) 70%),
    radial-gradient(40% 60% at 86% 88%, rgba(255, 110, 0, 0.09) 0%, rgba(255, 110, 0, 0) 70%),
    #ffffff;
  padding: 72px 0;
  margin-bottom: 20px;
}

.hero-inner h1 {
  color: #222222;
  font-size: 64px;
  font-weight: 800;
  letter-spacing: 1px;
  line-height: 1.2;
  text-align: center;
  max-width: 880px;
  margin: 0 auto;
}

/* ==========================================================================
   Sections
   ========================================================================== */

.section {
  margin-bottom: 20px;
}

.section-title {
  color: #222222;
  font-size: 28px;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
  padding: 24px 0;
}

/* ==========================================================================
   Carousel
   ========================================================================== */

.carousel {
  position: relative;
  margin: 0 -8px;
  padding: 0 8px;
}

.carousel-viewport {
  overflow: hidden;
  padding-bottom: 32px;
}

.carousel-track {
  display: flex;
  transition: transform 0.5s ease;
}

.carousel-arrow {
  position: absolute;
  top: 40%;
  width: 44px;
  height: 44px;
  margin-top: -22px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.carousel:hover .carousel-arrow {
  display: flex;
}

.carousel-arrow::before {
  content: "";
  width: 10px;
  height: 10px;
  border-top: 2px solid #222222;
  border-right: 2px solid #222222;
}

.carousel-arrow--prev {
  left: -22px;
}

.carousel-arrow--prev::before {
  transform: rotate(-135deg);
  margin-right: -3px;
}

.carousel-arrow--next {
  right: -22px;
}

.carousel-arrow--next::before {
  transform: rotate(45deg);
  margin-left: -3px;
}

.carousel-arrow.is-disabled {
  opacity: 0.35;
  pointer-events: none;
}

.carousel-dots {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.carousel-dots span {
  width: 8px;
  height: 8px;
  border-radius: 8px;
  background: #d9d9d9;
  cursor: pointer;
}

.carousel-dots span.is-active {
  background: #222222;
  border-radius: 8px;
  width: 16px;
}

/* Top store tile */

.top-store-tile {
  flex-shrink: 0;
  width: 158px;
  margin-right: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  padding: 16px;
  transition: box-shadow 0.3s;
}

.top-store-tile:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.top-store-logo {
  height: 60px;
  width: 101px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.top-store-logo img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  border-radius: 8px;
}

.top-store-name {
  color: #222222;
  font-size: 14px;
  font-weight: 500;
  line-height: 21px;
  margin-top: 10px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.top-store-count {
  color: #ff6e00;
  font-size: 13px;
  line-height: 18px;
  text-align: center;
}

/* ==========================================================================
   Coupon grid
   ========================================================================== */

.coupon-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  list-style: none;
}

.coupon-card {
  width: calc(25% - 12px);
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  padding: 12px;
  position: relative;
}

.coupon-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  border: 1px solid #f1f1f1;
  border-radius: 8px;
  padding: 7px;
}

.coupon-logo img {
  width: 64px;
  height: 64px;
  object-fit: contain;
}

.coupon-body {
  padding-top: 8px;
}

.coupon-discount {
  color: #222222;
  font-size: 18px;
  font-weight: 700;
  line-height: 21.6px;
}

.coupon-desc {
  color: #222222;
  font-size: 14px;
  line-height: 21px;
  margin: 8px 0;
  height: 42px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.coupon-btn {
  position: relative;
  display: flex;
  align-items: stretch;
  width: fit-content;
  min-width: 150px;
  max-width: 100%;
  height: 40px;
  border: 1px dashed #ff6e00;
  border-radius: 6px;
  background: #fff4ee;
  overflow: hidden;
  cursor: pointer;
}

.coupon-btn-ribbon {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  padding: 0 12px;
  margin: -1px 0 -1px -1px;
  background: #ff6e00;
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  clip-path: polygon(0 0, 100% 0, 85% 100%, 0% 100%);
  transition: flex-basis 0.25s, min-width 0.25s, opacity 0.25s;
}

.coupon-btn-code {
  flex: 0 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: 0 18px;
  color: #222222;
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.coupon-btn.is-revealed .coupon-btn-ribbon {
  flex-basis: 0;
  min-width: 0;
  padding: 0;
  opacity: 0;
  pointer-events: none;
}

/* ==========================================================================
   Popular stores grid
   ========================================================================== */

.store-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.store-tile {
  width: calc(16.6667% - 13.4px);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  padding: 16px;
  transition: box-shadow 0.2s;
}

.store-tile:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.store-tile-logo {
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.store-tile-logo img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
}

.store-tile-name {
  color: #222222;
  font-size: 14px;
  font-weight: 500;
  line-height: 21px;
  margin-top: 10px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==========================================================================
   Why choose us
   ========================================================================== */

.why-section {
  max-width: 1080px;
  margin: 0 auto;
  padding: 60px 16px 80px;
}

.why-title {
  color: #222222;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
}

.why-row {
  display: flex;
  align-items: center;
  gap: 40px;
  margin-top: 24px;
}

.why-row--reverse {
  flex-direction: row-reverse;
}

.why-row img {
  width: 520px;
  height: 380px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.why-text {
  color: #222222;
  font-size: 16px;
  line-height: 24px;
}

.why-link {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #ff6e00;
  font-weight: 500;
  line-height: 24px;
  margin-top: 16px;
  font-size: 18px;
}

.why-link:hover {
  text-decoration: underline;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
  background-color: #12103a;
  padding-top: 36px;
  color: #fafafb;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px 40px;
}

.footer-logo img {
  display: block;
  margin-left: -10px;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
}

.footer-nav a {
  color: #fafafb;
  font-size: 15px;
  font-weight: 500;
  line-height: 22px;
}

.footer-nav a:hover {
  color: #ff6e00;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.7);
  font-size: 12.5px;
  line-height: 18px;
  margin-top: 28px;
  padding: 16px 0 20px;
  text-align: center;
}

.footer-bottom p + p {
  margin-top: 4px;
}

/* ==========================================================================
   Cookie banner
   ========================================================================== */

.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(53, 53, 53, 0.88);
  padding: 19px 16px 16px;
  z-index: 999;
}

.cookie-banner.is-hidden {
  display: none;
}

.cookie-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 1200px;
  margin: 0 auto;
}

.cookie-inner p {
  flex: 1;
  color: #ffffff;
  font-size: 14px;
  text-align: center;
}

.cookie-inner a {
  color: #00c27e;
}

.cookie-accept {
  background: #00c27e;
  color: #ffffff;
  border-radius: 2px;
  padding: 5px 20px;
  margin-left: 20px;
  flex-shrink: 0;
}

.cookie-accept:hover {
  background: #00ab6f;
}

/* ==========================================================================
   Store detail page
   ========================================================================== */

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #666666;
  font-size: 14px;
  padding: 20px 0 0;
}

.breadcrumb a {
  color: #666666;
}

.breadcrumb a:hover {
  color: #ff6e00;
}

.breadcrumb span.current {
  color: #222222;
  font-weight: 500;
}

.store-page-hero {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 24px 0 32px;
}

.store-page-logo {
  flex-shrink: 0;
  width: 96px;
  height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border: 1px solid #f1f1f1;
  border-radius: 12px;
  padding: 12px;
}

.store-page-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.store-page-title h1 {
  color: #222222;
  font-size: 32px;
  font-weight: 700;
  line-height: 1.25;
}

.store-page-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #ff6e00;
  font-size: 14px;
  font-weight: 500;
  margin-top: 8px;
}

.store-page-meta .category-tag {
  background: #f6f7f8;
  color: #666666;
  border-radius: 4px;
  padding: 2px 8px;
}

.store-page-desc {
  color: #444444;
  font-size: 15px;
  line-height: 1.6;
  max-width: 760px;
  margin-top: 16px;
}

.visit-store-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 16px;
  padding: 10px 20px;
  background: #ff6e00;
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  border-radius: 6px;
}

.visit-store-btn:hover {
  background: #e56300;
}

.related-stores {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 8px;
}

.related-stores .store-tile {
  width: calc(14.2857% - 13.7px);
}

.store-coupon-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  list-style: none;
}

.store-coupon-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  padding: 20px;
}

.store-coupon-info {
  flex: 1;
}

.store-coupon-label {
  color: #222222;
  font-size: 18px;
  font-weight: 700;
}

.store-coupon-desc {
  color: #444444;
  font-size: 14px;
  margin-top: 6px;
}

.store-coupon-item .coupon-btn {
  flex-shrink: 0;
}

.deal-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 200px;
  height: 40px;
  border-radius: 6px;
  background: #ff6e00;
  color: #ffffff;
  font-weight: 700;
  font-size: 15px;
  flex-shrink: 0;
}

.deal-btn:hover {
  background: #e56300;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1024px) {
  .store-tile { width: calc(25% - 12px); }
  .related-stores .store-tile { width: calc(25% - 12px); }
  .coupon-card { width: calc(33.3333% - 11px); }
}

@media (max-width: 900px) {
  .search-box { width: 240px; }
  .hero-inner h1 { font-size: 40px; line-height: 1.25; }
  .why-row, .why-row--reverse { flex-direction: column; }
  .why-row img { width: 100%; height: auto; }
  .store-tile { width: calc(33.3333% - 11px); }
  .coupon-card { width: calc(50% - 8px); }
  .related-stores .store-tile { width: calc(33.3333% - 11px); }
  .store-page-hero { flex-direction: column; text-align: center; }
}

@media (max-width: 560px) {
  .header-right .search-box { display: none; }
  .hero-inner h1 { font-size: 30px; }
  .store-tile { width: calc(50% - 8px); }
  .coupon-card { width: 100%; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .footer-nav { gap: 8px 22px; }
  .related-stores .store-tile { width: calc(50% - 8px); }
  .store-page-title h1 { font-size: 26px; }
  .store-coupon-item { flex-direction: column; align-items: stretch; text-align: center; }
  .store-coupon-item .coupon-btn, .store-coupon-item .deal-btn { width: 100%; max-width: none; margin: 0 auto; }
}
