/**
 * home.css — Homepage specific layout and component styling
 *
 * Scoped to is_front_page() (page 446).
 * Adheres strictly to design tokens in style.css and primitives in base.css.
 *
 * @package flatsome-child
 */

/* ==========================================================================
   Hero Section & Slider
   ========================================================================== */
.acc-hero-section {
  padding: var(--sp-4) 0 var(--sp-6);
}

.acc-hero-wrap {
  display: flex;
  gap: var(--sp-5);
  align-items: stretch;
}

.acc-hero-main {
  flex: 0 0 calc(68% - (var(--sp-5) / 2));
  min-width: 0;
  display: flex;
}

.acc-hero-slider {
  width: 100%;
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-1);
  overflow: hidden;
  position: relative;
}

/* All cells are in-flow and fully measurable by Flickity */
.acc-hero-slide {
  width: 100% !important;
  min-width: 100% !important;
  flex: 0 0 100% !important;
  display: block;
  box-sizing: border-box;
}

/* Once Flickity is enabled, hide non-current cells so painted descendants do not overlap */
.acc-hero-slider.flickity-enabled .acc-hero-slide:not(.is-current) {
  visibility: hidden !important;
  pointer-events: none !important;
}

.acc-hero-slider.flickity-enabled .acc-hero-slide.is-current {
  visibility: visible !important;
  pointer-events: auto !important;
}

.acc-hero-slide-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 380px;
  padding: var(--sp-8) 56px;
  box-sizing: border-box;
}

.acc-hero-slide-text {
  flex: 1 1 58%;
  max-width: 58%;
  padding-right: var(--sp-6);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.acc-hero-pill-row {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  margin-bottom: var(--sp-3);
}

.acc-hero-pill-row .acc-badge {
  position: static;
  white-space: nowrap;
  display: inline-flex;
}

.acc-hero-title {
  font-family: var(--font-heading);
  font-size: var(--fs-2xl);
  font-weight: 800;
  line-height: var(--lh-tight);
  text-wrap: balance;
  color: var(--c-ink);
  margin: 0 0 var(--sp-3);
}

.acc-hero-title a {
  color: var(--c-ink);
  text-decoration: none;
  transition: color 0.15s ease;
}

.acc-hero-title a:hover {
  color: var(--c-primary);
}

.acc-hero-pricing {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-bottom: var(--sp-4);
}

.acc-hero-price-prefix {
  font-size: var(--fs-sm);
  color: var(--c-muted);
  font-weight: 500;
}

.acc-hero-price-current {
  font-family: var(--font-heading);
  font-size: var(--fs-2xl);
  font-weight: 800;
  color: var(--c-price);
  line-height: 1;
}

.acc-hero-price-current .woocommerce-Price-amount {
  color: var(--c-price);
}

.acc-hero-price-old {
  font-size: var(--fs-base);
  color: var(--c-text);
  text-decoration: line-through;
}

.acc-hero-trust-bullets {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4);
  margin-bottom: var(--sp-6);
}

.acc-hero-bullet {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-sm);
  color: var(--c-text);
  font-weight: 500;
  position: relative;
}

.acc-hero-bullet svg {
  flex-shrink: 0;
  color: var(--c-success);
}

.acc-hero-bullet-text {
  display: inline;
  position: relative;
  z-index: 1;
}

.acc-hero-actions {
  display: flex;
  gap: var(--sp-3);
  align-items: center;
}

.acc-hero-actions .acc-btn {
  display: inline-flex;
}

.acc-hero-slide-media {
  flex: 0 0 42%;
  max-width: 42%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.acc-hero-slide-media a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.acc-hero-img {
  max-width: 100%;
  max-height: 270px;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--r-md);
  transition: transform 0.25s ease;
}

.acc-hero-slide:hover .acc-hero-img {
  transform: scale(1.02);
}

.acc-hero-placeholder {
  width: 180px;
  height: 180px;
  border-radius: var(--r-lg);
  background: var(--c-subtle);
  border: 1px dashed var(--c-line-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-muted);
}

/* Hero Slider Flickity Controls */
.acc-hero-slider .flickity-prev-next-button {
  width: 38px;
  height: 38px;
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  box-shadow: var(--sh-1);
  color: var(--c-ink);
  opacity: 0.9;
  transition: all 0.2s ease;
  z-index: 5;
}

.acc-hero-slider .flickity-prev-next-button.previous {
  left: 12px;
}

.acc-hero-slider .flickity-prev-next-button.next {
  right: 12px;
}

.acc-hero-slider .flickity-prev-next-button:hover {
  background: var(--c-primary);
  color: var(--c-surface);
  border-color: var(--c-primary);
  opacity: 1;
}

.acc-hero-slider .flickity-page-dots {
  bottom: 12px;
  z-index: 5;
}

.acc-hero-slider .flickity-page-dots .dot {
  width: 8px;
  height: 8px;
  margin: 0 4px;
  background: var(--c-line-strong);
  opacity: 0.7;
  transition: all 0.2s ease;
}

.acc-hero-slider .flickity-page-dots .dot.is-selected {
  width: 22px;
  border-radius: var(--r-pill);
  background: var(--c-primary);
  opacity: 1;
}

/* Side Promo Tiles */
.acc-hero-side {
  flex: 0 0 calc(32% - (var(--sp-5) / 2));
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.acc-promo-tile {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r-lg);
  padding: var(--sp-5);
  box-shadow: var(--sh-1);
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.acc-promo-tile:hover {
  transform: translateY(-2px);
  box-shadow: var(--sh-2);
  border-color: var(--c-primary-line);
}

.acc-promo-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: var(--r-md);
  background: var(--c-primary-soft);
  color: var(--c-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--sp-3);
}

.acc-promo-content {
  margin-bottom: var(--sp-3);
}

.acc-promo-badge {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--c-primary);
  display: block;
  margin-bottom: var(--sp-1);
}

.acc-promo-title {
  font-family: var(--font-heading);
  font-size: var(--fs-lg);
  font-weight: 700;
  line-height: var(--lh-tight);
  margin: 0 0 var(--sp-1);
  color: var(--c-ink);
}

.acc-promo-title a {
  color: var(--c-ink);
  text-decoration: none;
}

.acc-promo-title a:hover {
  color: var(--c-primary);
}

.acc-promo-count {
  font-size: var(--fs-sm);
  color: var(--c-muted);
  margin: 0;
}

.acc-promo-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--c-primary);
  text-decoration: none;
  transition: gap 0.15s ease;
}

.acc-promo-link:hover {
  gap: 7px;
  color: var(--c-primary-hover);
}

/* ==========================================================================
   Category Tiles Row
   ========================================================================== */
.acc-cat-tiles-section {
  padding: var(--sp-4) 0 var(--sp-8);
}

.acc-cat-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--sp-3);
}

.acc-cat-card {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  box-shadow: var(--sh-1);
  text-decoration: none;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.acc-cat-card:hover {
  transform: translateY(-2px);
  border-color: var(--c-primary);
  box-shadow: var(--sh-2);
}

.acc-cat-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: var(--r-sm);
  background: var(--c-primary-soft);
  color: var(--c-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.acc-cat-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.acc-cat-name {
  font-family: var(--font-heading);
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--c-ink);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.acc-cat-num {
  font-size: var(--fs-xs);
  color: var(--c-muted);
  line-height: 1.2;
}

/* ==========================================================================
   Flash Sale Section
   ========================================================================== */
.acc-flash-sale-section {
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r-lg);
  padding: var(--sp-6) var(--sp-6) var(--sp-8);
  margin: var(--sp-6) 0 var(--sp-10);
  box-shadow: var(--sh-1);
}

.acc-flash-sale-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--sp-4);
  margin-bottom: var(--sp-6);
  padding-bottom: var(--sp-4);
  border-bottom: 1px solid var(--c-line);
}

.acc-flash-sale-title-group {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
}

.acc-flash-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--c-hot);
  color: var(--c-surface);
  font-size: var(--fs-xs);
  font-weight: 800;
  padding: 6px 12px;
  border-radius: var(--r-pill);
  letter-spacing: 0.05em;
}

.acc-flash-sale-head .acc-section-title {
  margin: 0;
}

.acc-flash-timer-wrap {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
}

.acc-flash-timer-label {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--c-muted);
}

.acc-countdown-clock {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.acc-clock-segment {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--c-ink);
  color: var(--c-surface);
  border-radius: var(--r-sm);
  padding: 4px 8px;
  min-width: 44px;
}

.acc-clock-num {
  font-family: var(--font-heading);
  font-size: var(--fs-md);
  font-weight: 800;
  line-height: 1.1;
}

.acc-clock-sub {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  opacity: 0.8;
}

.acc-clock-colon {
  font-family: var(--font-heading);
  font-size: var(--fs-lg);
  font-weight: 800;
  color: var(--c-ink);
}

.acc-flash-products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-4);
}

.acc-flash-card {
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  padding: var(--sp-4);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--sh-1);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.acc-flash-card:hover {
  transform: translateY(-2px);
  border-color: var(--c-hot);
  box-shadow: var(--sh-2);
}

.acc-flash-card-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--c-subtle);
  margin-bottom: var(--sp-3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.acc-flash-card-thumb a {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
}

.acc-flash-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.acc-flash-card-thumb .acc-badge--sale {
  position: absolute;
  top: 8px;
  left: 8px;
}

.acc-flash-card-title {
  font-family: var(--font-heading);
  font-size: var(--fs-sm);
  font-weight: 700;
  line-height: var(--lh-tight);
  margin: 0 0 var(--sp-2);
  color: var(--c-ink);
  min-height: 38px;
}

.acc-flash-card-title a {
  color: var(--c-ink);
  text-decoration: none;
}

.acc-flash-card-title a:hover {
  color: var(--c-primary);
}

.acc-flash-card-price {
  display: flex;
  align-items: baseline;
  gap: var(--sp-2);
  margin-bottom: var(--sp-3);
}

.acc-flash-price-current {
  font-family: var(--font-heading);
  font-size: var(--fs-lg);
  font-weight: 800;
  color: var(--c-price);
}

.acc-flash-price-current .woocommerce-Price-amount {
  color: var(--c-price);
}

.acc-flash-price-old {
  font-size: var(--fs-sm);
  color: var(--c-price-old);
}

.acc-flash-btn {
  width: 100%;
  justify-content: center;
}

/* ==========================================================================
   Product Sections (Grid spacing, price contrast & header integration)
   ========================================================================== */
.acc-home-section {
  padding: var(--sp-6) 0 var(--sp-8);
}

.acc-home-section .acc-section-head {
  margin-bottom: var(--sp-5);
}

/* Ensure struck-through regular prices meet 4.5:1 WCAG AA contrast (replaces 60% opacity) */
del,
.price del,
.product-small del,
.product-small .price del,
.product-small .price-wrapper del {
  opacity: 1 !important;
  color: var(--c-text) !important;
}

del *,
.price del *,
.product-small del *,
.product-small .price del *,
.product-small .price-wrapper del * {
  opacity: 1 !important;
  color: var(--c-text) !important;
}

/* Shared product card spacing overrides for home grid */
.acc-home-section .product-small.col {
  padding: 0 var(--sp-2) var(--sp-4);
}

/* ==========================================================================
   Customer Testimonials Section
   ========================================================================== */
.acc-testimonials-section {
  padding: var(--sp-8) 0 var(--sp-10);
  background: var(--c-page);
}

.acc-testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-5);
}

.acc-testi-card {
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r-lg);
  padding: var(--sp-6);
  box-shadow: var(--sh-1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.acc-testi-stars {
  display: flex;
  gap: 3px;
  color: var(--c-line-strong);
  margin-bottom: var(--sp-3);
}

.acc-testi-star.is-active {
  color: var(--c-warn);
}

.acc-testi-content {
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  color: var(--c-text);
  font-style: italic;
  margin: 0 0 var(--sp-5);
}

.acc-testi-footer {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding-top: var(--sp-3);
  border-top: 1px solid var(--c-line);
}

.acc-testi-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--c-primary-soft);
  color: var(--c-primary);
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: var(--fs-base);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.acc-testi-author-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.acc-testi-name {
  font-family: var(--font-heading);
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--c-ink);
  line-height: 1.2;
}

.acc-testi-verified {
  font-size: var(--fs-xs);
  color: var(--c-success);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
  margin-top: 2px;
}

.acc-testi-prod-link {
  font-size: var(--fs-xs);
  color: var(--c-primary);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.acc-testi-prod-link:hover {
  text-decoration: underline;
}

.acc-testi-date {
  font-size: 11px;
  color: var(--c-muted);
  margin-top: 2px;
}

/* ==========================================================================
   Order Steps Explainer
   ========================================================================== */
.acc-steps-section {
  padding: var(--sp-6) 0 var(--sp-8);
}

.acc-steps-container {
  margin-top: var(--sp-4);
}

.acc-steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-5);
}

.acc-step-card {
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r-lg);
  padding: var(--sp-6) var(--sp-5);
  box-shadow: var(--sh-1);
  display: flex;
  gap: var(--sp-4);
  align-items: flex-start;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.acc-step-card:hover {
  transform: translateY(-2px);
  border-color: var(--c-primary-line);
  box-shadow: var(--sh-2);
}

.acc-step-badge {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: var(--r-md);
  background: var(--c-primary-soft);
  color: var(--c-primary);
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: var(--fs-xl);
  display: flex;
  align-items: center;
  justify-content: center;
}

.acc-step-num {
  line-height: 1;
}

.acc-step-body {
  flex: 1;
  min-width: 0;
}

.acc-step-title {
  font-family: var(--font-heading);
  font-size: var(--fs-md);
  font-weight: 700;
  color: var(--c-ink);
  margin: 0 0 var(--sp-2);
  line-height: var(--lh-tight);
}

.acc-step-desc {
  font-size: var(--fs-sm);
  line-height: var(--lh-body);
  color: var(--c-muted);
  margin: 0;
  text-wrap: pretty;
}

/* ==========================================================================
   Trust Cards Row (Compact - 3 allowed claims only, no descriptions)
   ========================================================================== */
.acc-trust-section {
  padding: var(--sp-4) 0 var(--sp-10);
}

.acc-trust-row,
.trust-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-4);
  margin: 0;
}

.acc-trust-card,
.trust-card {
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r-lg);
  padding: var(--sp-4) var(--sp-6);
  box-shadow: var(--sh-1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  margin: 0;
}

.acc-trust-icon,
.trust-card-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: var(--r-md);
  background: var(--c-primary-soft);
  color: var(--c-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: initial;
}

.acc-trust-body,
.trust-card-text {
  flex: 0 1 auto;
}

.acc-trust-title,
.trust-card-text h3 {
  font-family: var(--font-heading);
  font-size: var(--fs-base);
  font-weight: 700;
  color: var(--c-ink);
  margin: 0;
  line-height: var(--lh-tight);
  white-space: nowrap;
}

/* ==========================================================================
   Responsive Adaptations (1440px to 390px)
   ========================================================================== */
@media (max-width: 1100px) {
  .acc-cat-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 992px) {
  .acc-hero-wrap {
    flex-direction: column;
  }

  .acc-hero-main,
  .acc-hero-side {
    flex: 0 0 100%;
    width: 100%;
  }

  .acc-hero-side {
    flex-direction: row;
  }

  .acc-promo-tile {
    flex: 1;
  }

  .acc-cat-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .acc-testimonials-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .acc-steps-grid,
  .acc-trust-row,
  .trust-grid {
    grid-template-columns: 1fr;
    gap: var(--sp-3);
  }

  .acc-flash-products-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .acc-testimonials-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .acc-hero-side {
    flex-direction: column;
  }

  .acc-hero-slide-inner {
    flex-direction: column-reverse;
    padding: var(--sp-5) var(--sp-4);
    text-align: center;
    min-height: auto;
  }

  .acc-hero-slide-text {
    flex: 0 0 100%;
    max-width: 100%;
    padding-right: 0;
    align-items: center;
  }

  .acc-hero-title {
    font-size: var(--fs-xl);
  }

  .acc-hero-pricing {
    justify-content: center;
  }

  .acc-hero-trust-bullets {
    justify-content: center;
  }

  .acc-hero-actions {
    flex-direction: column;
    width: 100%;
  }

  .acc-hero-actions .acc-btn {
    width: 100%;
    justify-content: center;
  }

  .acc-hero-slide-media {
    flex: 0 0 auto;
    max-width: 100%;
    margin-bottom: var(--sp-4);
  }

  .acc-hero-img {
    max-height: 180px;
  }

  .acc-cat-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--sp-2);
  }

  .acc-cat-card {
    padding: var(--sp-2) var(--sp-3);
  }

  .acc-cat-icon {
    width: 32px;
    height: 32px;
  }

  .acc-flash-sale-head {
    flex-direction: column;
    align-items: flex-start;
  }
}
