/* index.css
 * Page-specific styles for index.php
 * - Carousel (left image + right text)
 * - Promotions (activity + item details)
 * - QR / LINE section
 * Updated: 2026-03-04
 */

/* ------------------------------------------------------------
 * Carousel + promo blocks
 * ------------------------------------------------------------ */

.index-ads {
  margin-bottom: 16px;
}

.index-ads .carousel {
  max-width: 980px;
  margin: 0 auto;
}


.index-ads .home-hero-carousel {
  position: relative;
  max-width: 1180px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 18px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, .12);
  background: linear-gradient(135deg, rgba(15, 23, 42, .04), rgba(148, 163, 184, .08));
}

.home-hero-carousel .carousel-slides {
  align-items: stretch;
}

.home-hero-carousel .carousel-slide {
  width: 100%;
}

.home-hero-card {
  position: relative;
  height: clamp(240px, 34vw, 460px);
  background: #f8fafc;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.home-hero-card img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none !important;
  object-position: center center;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.home-hero-card[data-fit-mode="contain"] img {
  object-fit: contain;
}

.home-hero-card[data-fit-mode="cover"] img {
  object-fit: cover;
}

.home-hero-caption {
  position: absolute;
  display: inline-flex;
  align-items: center;
  max-width: min(90%, 520px);
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(15, 23, 42, var(--hero-caption-bg-opacity, .55));
  color: var(--hero-caption-text-color, #fff);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .2px;
  backdrop-filter: blur(6px);
  text-shadow: 0 1px 3px rgba(0,0,0,.28);
}

.home-hero-caption[data-title-position="bottom-left"] {
  left: 18px;
  bottom: 18px;
}

.home-hero-caption[data-title-position="bottom-center"] {
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
}

.home-hero-caption[data-title-position="bottom-right"] {
  right: 18px;
  bottom: 18px;
}

.home-hero-caption[data-title-position="top-left"] {
  left: 18px;
  top: 18px;
}

.home-hero-caption[data-title-position="top-center"] {
  left: 50%;
  top: 18px;
  transform: translateX(-50%);
}

.home-hero-caption[data-title-position="top-right"] {
  right: 18px;
  top: 18px;
}

.home-hero-caption[data-title-position="center"] {
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.home-hero-carousel .carousel-button {
  top: calc(50% - 10px);
}

.carousel-dots {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  display: inline-flex;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, .24);
  backdrop-filter: blur(6px);
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: rgba(255,255,255,.48);
}

.carousel-dot.is-active {
  background: #fff;
  transform: scale(1.18);
}


/* Override global carousel image sizing (shopfront.css sets width:250px + mobile scale) */
.index-ads .idx-slide img{
  width: 100%;
  max-width: 420px;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(0,0,0,.10);
  transform: none !important;
}

.index-ads .carousel-slide{
  text-align: left;
}

/* Slide layout (left image, right text) */
.index-ads .idx-slide{
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: center;
  padding: 14px 16px;
  text-decoration: none;
  color: inherit;
  background: #fff;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,.06);
}

.index-ads .idx-slide:hover{
  box-shadow: 0 12px 28px rgba(0,0,0,.10);
  transform: translateY(-1px);
  transition: .15s ease;
}

.idx-slide-img{
  flex: 0 0 44%;
  display: flex;
  justify-content: center;
}

.idx-slide-text{
  flex: 1 1 auto;
  min-width: 0;
}

.idx-slide-badge{
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(49,154,202,.12);
  color: #125a7a;
  font-weight: 900;
  font-size: 12px;
  letter-spacing: .2px;
}

.idx-slide-title{
  margin-top: 8px;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: .2px;
  color: #111;
  line-height: 1.25;
}

.idx-slide-meta{
  margin-top: 6px;
  color: rgba(0,0,0,.65);
  font-size: 13px;
}

.idx-slide-actions{
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.idx-slide-cta{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(0,0,0,.06);
  font-size: 13px;
  font-weight: 900;
}

.idx-slide-subcta{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(6,199,85,.12);
  color: #0a7a34;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

/* Promo list */
.idx-promo-groups{
  display: grid;
  gap: 12px;
}

.idx-promo-group{
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 14px;
  padding: 12px 12px;
  background: rgba(255,255,255,.95);
}

.idx-promo-head{
  padding-bottom: 10px;
  border-bottom: 1px dashed rgba(0,0,0,.12);
  margin-bottom: 10px;
}

.idx-promo-name{
  font-weight: 900;
  font-size: 15px;
  color: #111;
}

.idx-promo-meta{
  margin-top: 4px;
  font-size: 12px;
  color: rgba(0,0,0,.65);
}

.idx-promo-items{
  display: grid;
  gap: 10px;
}

.idx-promo-item{
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: start;
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 12px;
  padding: 10px 10px;
  background: #fff;
}

.idx-promo-title{
  font-weight: 900;
  font-size: 14px;
  color: #111;
}

.idx-promo-title .code{
  margin-left: 6px;
  font-weight: 800;
  color: rgba(0,0,0,.55);
  font-size: 12px;
}

.idx-promo-rule{
  margin-top: 6px;
  font-size: 13px;
  color: rgba(0,0,0,.75);
  line-height: 1.35;
}

.idx-promo-note{
  margin-top: 6px;
  font-size: 12px;
  color: rgba(0,0,0,.55);
}

.idx-promo-price{
  text-align: right;
  white-space: nowrap;
  padding-left: 6px;
}

.idx-promo-price .p-orig{
  color: rgba(0,0,0,.55);
  font-weight: 800;
  font-size: 12px;
}

.idx-promo-price .p-sale{
  margin-top: 4px;
  color: #b42318;
  font-weight: 900;
  font-size: 16px;
}

@media (max-width: 680px){
  /* Mobile: image centered + stack */
  .index-ads .idx-slide{
    flex-direction: column;
    text-align: center;
  }

  .idx-slide-img{
    width: 100%;
    justify-content: center;
  }

  .index-ads .carousel-slide img{
    max-width: min(92vw, 420px);
    margin: 0 auto;
  }

  .idx-slide-actions{
    justify-content: center;
  }

  .idx-promo-item{
    grid-template-columns: 1fr;
  }

  .idx-promo-price{
    text-align: left;
    display: flex;
    gap: 10px;
    align-items: baseline;
  }
}

.index-home-block {
  max-width: 980px;
  margin: 0 auto 18px auto;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .06);
  padding: 14px 16px;
}

.ihb-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.ihb-head h3 {
  margin: 0;
  font-size: 16px;
  letter-spacing: .2px;
}

.ihb-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.ihb-list li {
  border: 1px solid rgba(0, 0, 0, .06);
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, .9);
}

.ihb-title {
  font-weight: 800;
  font-size: 14px;
  color: #111;
}

.ihb-news-link {
  display: inline-block;
}

.ihb-meta {
  margin-top: 4px;
  font-size: 12px;
  color: rgba(0, 0, 0, .65);
}

.ihb-empty {
  padding: 10px 4px;
  color: rgba(0, 0, 0, .6);
}

.ihb-html {
  font-size: 14px;
  color: #111;
}

@media (max-width: 520px) {
  .index-home-block {
    padding: 12px 12px;
  }

  .ihb-head {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ------------------------------------------------------------
 * QR / LINE section
 * ------------------------------------------------------------ */

/* Keep banner image sane on desktop/mobile */
#special-img {
  max-width: min(980px, 96vw);
  width: 100%;
  display: block;
  margin: 10px auto 18px auto;
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.10);
}

h2 {
  text-align: center;
  font-size: 1.25rem;
  margin: 18px 0 6px 0;
  line-height: 1.35;
}

h3 {
  text-align: center;
  margin: 0 0 10px 0;
  color: rgba(0, 0, 0, .65);
  font-weight: 700;
}

#line-link {
  display: inline-block;
  margin: 10px auto 12px auto;
  color: #fff;
  background-color: #06C755;
  padding: 10px 16px;
  min-width: 180px;
  font-size: 1.05rem;
  text-decoration: none;
  text-align: center;
  border-radius: 999px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.10);
}

#line-link:hover {
  filter: brightness(0.95);
}

#special-img1 {
  width: min(220px, 70vw);
  display: block;
  margin: 12px auto 22px auto;
  cursor: pointer;
  border-radius: 14px;
  border: 6px solid rgba(0, 0, 0, 0.04);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.10);
}

.qr-switch {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  width: fit-content;
  max-width: 100%;
  margin: 12px auto 10px auto;

  padding: 6px;
  background: rgba(0,0,0,.04);
  border-radius: 999px;
}

.qr-btn {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.10);
  background: transparent;
  cursor: pointer;
  font-weight: 900;
}

.qr-btn.active {
  background: #fff;
  color: #06C755;
  border-color: rgba(6,199,85,.35);
  box-shadow: 0 8px 18px rgba(0,0,0,.08);
}

.qr-box {
  text-align: center;
}

@media (max-width: 520px) {
  h2 {
    font-size: 1.05rem;
    margin-top: 10px;
  }
}
