:root {
  --cart-shadow: 0 24px 70px rgba(15, 23, 42, 0.18);
}

.product-card .product-footer {
  display: grid;
  grid-template-columns: 4.9rem minmax(0, 1fr);
  align-items: stretch;
  width: 100%;
  gap: 0.5rem;
}

.product-card .product-footer > * {
  min-width: 0;
}

.product-card .product-footer .product-link {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  justify-items: center;
  justify-content: stretch;
  min-width: 0;
  width: 100%;
  min-height: 2.45rem;
  gap: 0.32rem;
  padding: 0.56rem 0.72rem;
  font-size: 0.64rem;
  letter-spacing: 0.07em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-card .product-footer .product-link > span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-card .product-footer .product-link > .material-symbols-outlined {
  display: none;
}

.product-cart-button,
.detail-add-to-cart {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border: 0;
  cursor: pointer;
  font: inherit;
  text-transform: uppercase;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease,
    color 0.2s ease,
    opacity 0.2s ease;
}

.product-cart-button {
  width: 100%;
  min-width: 0;
  min-height: 2.45rem;
  overflow: hidden;
  padding: 0.56rem 0.66rem;
  border: 1px solid rgba(32, 116, 230, 0.24);
  border-radius: 1rem;
  background: linear-gradient(180deg, rgba(32, 116, 230, 0.08), rgba(53, 194, 118, 0.1));
  box-shadow: 0 8px 18px rgba(32, 116, 230, 0.08);
  color: var(--primary);
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.product-cart-button:hover,
.detail-add-to-cart:hover {
  transform: translateY(-1px);
}

.product-cart-button:hover {
  border-color: rgba(32, 116, 230, 0.4);
  box-shadow: 0 10px 22px rgba(32, 116, 230, 0.14);
  color: var(--navy);
}

.product-cart-button .material-symbols-outlined,
.detail-add-to-cart .material-symbols-outlined {
  font-size: 1rem;
}

.product-cart-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-cart-button.is-added,
.detail-add-to-cart.is-added {
  background: linear-gradient(180deg, rgba(53, 194, 118, 0.16), rgba(32, 116, 230, 0.14));
  border-color: rgba(53, 194, 118, 0.48);
  box-shadow: 0 16px 30px rgba(53, 194, 118, 0.18);
}

.product-intro-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem 1.25rem;
  align-items: start;
}

.detail-cart-actions {
  display: grid;
  gap: 0.75rem;
  justify-items: end;
}

.detail-add-to-cart {
  min-height: 3rem;
  padding: 0.9rem 1.2rem;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary) 0%, #2f89ed 60%, var(--accent) 100%);
  box-shadow: 0 18px 34px rgba(32, 116, 230, 0.2);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.detail-add-to-cart:hover {
  box-shadow: 0 22px 38px rgba(32, 116, 230, 0.24);
}

.fhl-floating-cart {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 90;
  overflow: visible;
  pointer-events: none;
  opacity: 0;
  transform: translateY(1rem);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.fhl-floating-cart.has-items,
.fhl-floating-cart.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.fhl-cart-trigger {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.9rem;
  height: 3.9rem;
  min-width: 3.9rem;
  min-height: 3.9rem;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(10, 25, 49, 0.96);
  box-shadow: var(--cart-shadow);
  color: #fff;
  cursor: pointer;
  pointer-events: auto;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}

.fhl-cart-trigger:hover {
  transform: translateY(-2px);
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.24);
  border-color: rgba(53, 194, 118, 0.38);
}

.fhl-cart-trigger.is-pulse {
  animation: fhl-cart-pulse 0.55s ease;
}

.fhl-cart-trigger .material-symbols-outlined {
  font-size: 1.55rem;
}

.fhl-cart-trigger-icon {
  display: inline-flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: transparent;
  color: #fff;
  flex-shrink: 0;
}

.fhl-cart-trigger-copy {
  display: none;
  min-width: 0;
  gap: 0.15rem;
  text-align: left;
}

.fhl-cart-trigger-kicker {
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.68);
}

.fhl-cart-trigger-title {
  font-size: 0.92rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: #fff;
}

.fhl-cart-trigger-note {
  font-size: 0.72rem;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.7);
}

.fhl-cart-count {
  position: absolute;
  top: -0.15rem;
  right: -0.1rem;
  display: inline-flex;
  min-width: 1.75rem;
  min-height: 1.75rem;
  align-items: center;
  justify-content: center;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: linear-gradient(90deg, #ef4444, #f97316);
  color: #fff;
  box-shadow: 0 10px 22px rgba(239, 68, 68, 0.32);
  font-size: 0.74rem;
  font-weight: 900;
  flex-shrink: 0;
}

.fhl-cart-trigger.is-highlighted {
  background: linear-gradient(90deg, rgba(10, 25, 49, 0.98), rgba(23, 63, 122, 0.96));
  box-shadow:
    0 28px 80px rgba(15, 23, 42, 0.24),
    0 0 0 3px rgba(53, 194, 118, 0.16);
}

.fhl-cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.1);
  backdrop-filter: blur(2px);
  display: none;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.fhl-floating-cart.is-open .fhl-cart-overlay {
  opacity: 1;
  pointer-events: auto;
}

.fhl-floating-cart.is-open .fhl-cart-trigger {
  opacity: 0;
  pointer-events: none;
  transform: translateY(0.85rem) scale(0.96);
}

.fhl-cart-panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + 0.85rem);
  width: min(22.5rem, calc(100vw - 1rem));
  max-height: min(68vh, 34rem);
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, 0.56);
  border-radius: 1.5rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(246, 250, 253, 0.94));
  backdrop-filter: blur(20px) saturate(155%);
  box-shadow:
    0 30px 90px rgba(15, 23, 42, 0.2),
    0 0 0 1px rgba(148, 163, 184, 0.12);
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  transform: translateY(1rem) scale(0.98);
  transform-origin: bottom right;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.fhl-cart-panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  opacity: 0.9;
}

.fhl-floating-cart.is-open .fhl-cart-panel,
.fhl-floating-cart.is-hover-preview .fhl-cart-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.fhl-cart-panel::after {
  content: "";
  position: absolute;
  right: 1.8rem;
  bottom: -0.5rem;
  width: 1rem;
  height: 1rem;
  border-right: 1px solid rgba(148, 163, 184, 0.12);
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(246, 250, 253, 0.98);
  transform: rotate(45deg);
}

.fhl-cart-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.9rem 0.85rem 0.7rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0.08));
}

.fhl-cart-panel-head h2 {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  color: var(--navy);
}

.fhl-cart-panel-head p {
  margin: 0.15rem 0 0;
  max-width: 14rem;
  font-size: 0.69rem;
  line-height: 1.45;
  color: var(--muted);
}

.fhl-cart-close {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  padding: 0;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(10px);
  color: var(--navy);
  cursor: pointer;
}

.fhl-cart-close .material-symbols-outlined {
  font-size: 1.15rem;
}

.fhl-cart-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(247, 250, 252, 0.42));
}

.fhl-cart-items {
  flex: 1;
  min-height: 0;
  padding: 0.6rem 0.7rem 0;
  overflow-y: auto;
}

.fhl-cart-empty {
  padding: 2.2rem 0.5rem 2rem;
  text-align: center;
}

.fhl-cart-empty .material-symbols-outlined {
  font-size: 2rem;
  color: rgba(100, 116, 139, 0.7);
}

.fhl-cart-empty h3 {
  margin: 0.75rem 0 0.35rem;
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--navy);
}

.fhl-cart-empty p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.7;
}

.fhl-cart-item {
  display: grid;
  grid-template-columns: 3.4rem minmax(0, 1fr);
  align-items: start;
  gap: 0.65rem;
  padding: 0.65rem;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 1rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(248, 251, 253, 0.78));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.52),
    0 8px 18px rgba(15, 23, 42, 0.035);
}

.fhl-cart-item + .fhl-cart-item {
  margin-top: 0.55rem;
}

.fhl-cart-item-thumb {
  display: block;
  align-self: start;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  border-radius: 0.8rem;
  background: linear-gradient(180deg, #f8fafc, #eef4f7);
}

.fhl-cart-item-thumb img {
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.fhl-cart-item-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  align-items: stretch;
  gap: 0.22rem;
}

.fhl-cart-item-title {
  display: -webkit-box;
  color: var(--navy);
  font-size: 0.84rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.24;
  overflow: hidden;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.fhl-cart-item-title:hover {
  color: var(--primary);
}

.fhl-cart-item-spec {
  margin: 0.02rem 0 0;
  font-size: 0.62rem;
  line-height: 1.45;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: -webkit-box;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.fhl-cart-item-controls {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  justify-content: flex-start;
  gap: 0.55rem;
  margin-top: 0.42rem;
}

.fhl-cart-stepper {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 0.2rem;
  padding: 0.18rem;
  border-radius: 999px;
  background: rgba(240, 244, 249, 0.88);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.fhl-cart-stepper button,
.fhl-cart-remove {
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
}

.fhl-cart-stepper button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 999px;
  color: var(--navy);
}

.fhl-cart-stepper button:hover {
  background: rgba(32, 116, 230, 0.1);
}

.fhl-cart-stepper button .material-symbols-outlined {
  font-size: 0.88rem;
}

.fhl-cart-qty {
  min-width: 1.45rem;
  text-align: center;
  font-size: 0.74rem;
  font-weight: 900;
  color: var(--navy);
}

.fhl-cart-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: end;
  min-height: 1.9rem;
  padding: 0 0.72rem;
  border: 1px solid rgba(220, 38, 38, 0.14);
  border-radius: 999px;
  background: rgba(220, 38, 38, 0.06);
  color: #dc2626;
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.fhl-cart-summary {
  display: grid;
  gap: 0.55rem;
  margin: 0.65rem;
  padding: 0.75rem 0.8rem;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 1rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(244, 248, 252, 0.92));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    0 10px 22px rgba(15, 23, 42, 0.045);
}

.fhl-cart-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.fhl-cart-summary-row strong {
  color: var(--navy);
  font-size: 0.84rem;
  letter-spacing: 0.02em;
}

.fhl-cart-note {
  margin: 0;
  font-size: 0.69rem;
  line-height: 1.5;
  color: var(--muted);
}

.fhl-cart-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 2.5rem;
  padding: 0.72rem 0.9rem;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  box-shadow: 0 18px 34px rgba(32, 116, 230, 0.18);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.fhl-cart-cta:hover {
  opacity: 0.94;
}

.fhl-cart-live {
  position: fixed;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

@keyframes fhl-cart-pulse {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.04);
  }

  100% {
    transform: scale(1);
  }
}

@media (max-width: 980px) {
  .product-intro-row {
    grid-template-columns: 1fr;
  }

  .detail-cart-actions {
    justify-items: start;
  }
}

@media (max-width: 720px) {
  .product-card .product-footer {
    grid-template-columns: 1fr;
  }

  .product-cart-button,
  .product-footer .product-link,
  .detail-add-to-cart {
    width: 100%;
  }

  .detail-cart-actions {
    width: 100%;
  }

  .fhl-floating-cart {
    right: 0.8rem;
    bottom: 0.8rem;
  }

  .fhl-cart-trigger {
    width: 3.4rem;
    height: 3.4rem;
    min-width: 3.4rem;
    min-height: 3.4rem;
    padding: 0;
  }

  .fhl-cart-trigger .material-symbols-outlined {
    font-size: 1.4rem;
  }

  .fhl-cart-count {
    top: -0.12rem;
    right: -0.06rem;
    min-width: 1.55rem;
    min-height: 1.55rem;
    font-size: 0.68rem;
  }

  .fhl-cart-panel {
    right: 0;
    bottom: calc(100% + 0.65rem);
    width: min(21.75rem, calc(100vw - 0.75rem));
    max-height: min(70vh, 33rem);
  }

  .fhl-cart-item {
    grid-template-columns: 3.25rem minmax(0, 1fr);
    gap: 0.55rem;
  }

  .fhl-cart-item-controls {
    grid-template-columns: 1fr;
    justify-items: start;
    gap: 0.42rem;
  }

  .fhl-cart-remove {
    justify-self: start;
  }
}
