/* ==========================================================
   ALPAFEL INDONESIA CART
   Scoped styling: hanya memengaruhi shortcode [alpafel_cart]
========================================================== */

.alpafel-cart {
  --cart-blue: #78cfd0;
  --cart-blue-dark: #2f7f86;
  --cart-blue-soft: #eaf8f8;
  --cart-navy: #14343d;
  --cart-white: #ffffff;
  --cart-muted: #60777d;
  --cart-border: rgba(47, 127, 134, 0.18);
  --cart-border-strong: rgba(47, 127, 134, 0.34);
  --cart-shadow: 0 18px 48px rgba(20, 52, 61, 0.11);
  --cart-shadow-hover: 0 26px 68px rgba(47, 127, 134, 0.22);

  width: min(1180px, calc(100% - 28px));
  margin: clamp(28px, 5vw, 72px) auto;
  color: var(--cart-navy);
  font-family: inherit;
  animation: acart-section-enter 0.72s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.alpafel-cart,
.alpafel-cart * {
  box-sizing: border-box;
}

.alpafel-cart a {
  color: inherit;
}

.alpafel-cart__hero,
.alpafel-cart__stat-card,
.alpafel-cart__benefits div,
.alpafel-cart__woocommerce,
.alpafel-cart__notice {
  border: 1px solid var(--cart-border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--cart-shadow);
}

.alpafel-cart__hero {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(24px, 5vw, 48px);
  background:
    linear-gradient(135deg, rgba(234, 248, 248, 0.98), rgba(255, 255, 255, 0.94) 58%, rgba(234, 248, 248, 0.78)),
    repeating-linear-gradient(135deg, rgba(47, 127, 134, 0.08) 0 1px, transparent 1px 18px);
  isolation: isolate;
}

.alpafel-cart__hero::before {
  content: "";
  position: absolute;
  right: -8%;
  top: -28%;
  width: 42%;
  height: 78%;
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(120, 207, 208, 0.26), rgba(255, 255, 255, 0.18)),
    linear-gradient(90deg, transparent 45%, rgba(47, 127, 134, 0.13) 45% 55%, transparent 55%),
    linear-gradient(0deg, transparent 45%, rgba(47, 127, 134, 0.13) 45% 55%, transparent 55%);
  transform: rotate(10deg);
  z-index: -1;
  animation: acart-float 6s ease-in-out infinite;
}

.alpafel-cart__hero-content {
  flex: 1 1 420px;
  min-width: 0;
}

.alpafel-cart__eyebrow,
.alpafel-cart__stat-card > span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  min-height: 32px;
  padding: 7px 13px;
  border: 1px solid rgba(47, 127, 134, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--cart-blue-dark);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
  box-shadow: 0 8px 20px rgba(47, 127, 134, 0.08);
}

.alpafel-cart__eyebrow::before,
.alpafel-cart__stat-card > span::before {
  content: "\2726";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--cart-blue-dark), var(--cart-blue));
  color: #ffffff;
  font-size: 0.68rem;
  line-height: 1;
}

.alpafel-cart__hero h1 {
  max-width: 760px;
  margin: 16px 0 12px;
  background: linear-gradient(135deg, var(--cart-navy), var(--cart-blue-dark));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: clamp(2.1rem, 5vw, 4rem);
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: 0;
}

.alpafel-cart__hero p {
  max-width: 690px;
  margin: 0;
  color: rgba(20, 52, 61, 0.72);
  font-size: clamp(1rem, 2vw, 1.12rem);
  line-height: 1.72;
}

.alpafel-cart__hero-actions {
  display: flex;
  flex: 1 1 260px;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.alpafel-cart__hero-actions a,
.alpafel-cart .woocommerce .button,
.alpafel-cart .woocommerce button.button,
.alpafel-cart .woocommerce input.button,
.alpafel-cart .woocommerce a.button,
.alpafel-cart .woocommerce .checkout-button {
  position: relative !important;
  overflow: hidden !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 46px !important;
  padding: 12px 18px !important;
  border: 1px solid rgba(47, 127, 134, 0.72) !important;
  border-radius: 10px !important;
  background: linear-gradient(135deg, var(--cart-blue-dark), var(--cart-blue)) !important;
  color: #ffffff !important;
  font-size: 0.92rem !important;
  font-weight: 900 !important;
  line-height: 1.2 !important;
  text-align: center !important;
  text-decoration: none !important;
  cursor: pointer !important;
  box-shadow: 0 14px 30px rgba(47, 127, 134, 0.24) !important;
  transition: transform 0.24s ease, box-shadow 0.24s ease, filter 0.24s ease !important;
}

.alpafel-cart__hero-actions a:first-child {
  background: #ffffff !important;
  color: var(--cart-blue-dark) !important;
  border-color: rgba(47, 127, 134, 0.22) !important;
  box-shadow: 0 10px 24px rgba(20, 52, 61, 0.08) !important;
}

.alpafel-cart__hero-actions a::before,
.alpafel-cart .woocommerce .button::before,
.alpafel-cart .woocommerce button.button::before,
.alpafel-cart .woocommerce input.button::before,
.alpafel-cart .woocommerce a.button::before,
.alpafel-cart .woocommerce .checkout-button::before {
  content: "\2726";
  margin-right: 8px;
  font-size: 0.82rem;
  line-height: 1;
}

.alpafel-cart__hero-actions a:hover,
.alpafel-cart .woocommerce .button:hover,
.alpafel-cart .woocommerce button.button:hover,
.alpafel-cart .woocommerce input.button:hover,
.alpafel-cart .woocommerce a.button:hover,
.alpafel-cart .woocommerce .checkout-button:hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 20px 42px rgba(47, 127, 134, 0.32) !important;
  filter: saturate(1.08) !important;
}

.alpafel-cart__stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
  gap: 14px;
  margin: 18px 0;
}

.alpafel-cart__stat-card {
  position: relative;
  min-height: 150px;
  overflow: hidden;
  padding: 20px 92px 20px 20px;
  animation: acart-card-enter 0.68s cubic-bezier(0.22, 1, 0.36, 1) both;
  transition: transform 0.26s ease, box-shadow 0.26s ease, border-color 0.26s ease, background 0.26s ease;
}

.alpafel-cart__stat-card:nth-child(2) {
  animation-delay: 0.06s;
}

.alpafel-cart__stat-card:nth-child(3) {
  animation-delay: 0.12s;
}

.alpafel-cart__stat-card::after {
  content: "\25A3";
  position: absolute;
  right: 20px;
  top: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 10px;
  background: linear-gradient(135deg, var(--cart-blue-dark), var(--cart-blue));
  color: #ffffff;
  font-size: 1.25rem;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 18px 34px rgba(47, 127, 134, 0.24);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.alpafel-cart__stat-card:nth-child(2)::after {
  content: "Rp";
  font-size: 1rem;
}

.alpafel-cart__stat-card:nth-child(3)::after {
  content: "Rp";
}

.alpafel-cart.is-updating .alpafel-cart__stat-card[data-alpafel-cart-stat] {
  pointer-events: none;
}

.alpafel-cart.is-updating .alpafel-cart__stat-card[data-alpafel-cart-stat]::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(120deg, transparent 0%, rgba(120, 207, 208, 0.18) 48%, transparent 100%);
  transform: translateX(-100%);
  animation: acart-stat-sync 1.1s ease-in-out infinite;
  pointer-events: none;
}

.alpafel-cart__stat-card.is-updated {
  animation: acart-stat-updated 0.46s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.alpafel-cart__stat-card strong[data-alpafel-cart-subtotal],
.alpafel-cart__stat-card strong[data-alpafel-cart-total] {
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  line-height: 1.18;
}

.alpafel-cart__stat-card strong .woocommerce-Price-amount,
.alpafel-cart__stat-card strong .woocommerce-Price-currencySymbol {
  display: inline !important;
  width: auto !important;
  min-width: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: inherit !important;
  font: inherit !important;
  line-height: inherit !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  box-shadow: none !important;
}

.alpafel-cart__stat-card strong .woocommerce-Price-amount::before,
.alpafel-cart__stat-card strong .woocommerce-Price-currencySymbol::before {
  content: none !important;
}

.alpafel-cart__stat-card strong .woocommerce-Price-amount {
  white-space: nowrap !important;
}

.alpafel-cart__stat-card:hover {
  transform: translateY(-5px);
  border-color: var(--cart-border-strong);
  background: linear-gradient(135deg, #ffffff, rgba(234, 248, 248, 0.86));
  box-shadow: var(--cart-shadow-hover);
}

.alpafel-cart__stat-card:hover::after {
  transform: translateY(-4px) rotate(4deg);
  box-shadow: 0 22px 42px rgba(47, 127, 134, 0.32);
}

.alpafel-cart__stat-card strong {
  display: block;
  margin: 18px 0 6px;
  color: var(--cart-navy);
  font-size: clamp(1.8rem, 4vw, 2.35rem);
  font-weight: 900;
  line-height: 1.05;
}

.alpafel-cart__stat-card small {
  display: block;
  color: rgba(20, 52, 61, 0.62);
  font-size: 0.92rem;
  line-height: 1.45;
}

.alpafel-cart__benefits {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.alpafel-cart__benefits div {
  position: relative;
  min-height: 110px;
  overflow: hidden;
  padding: 18px 18px 18px 66px;
  background: linear-gradient(135deg, #ffffff, rgba(234, 248, 248, 0.74));
  transition: transform 0.26s ease, box-shadow 0.26s ease, border-color 0.26s ease;
}

.alpafel-cart__benefits div::before {
  content: "\2726";
  position: absolute;
  left: 18px;
  top: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--cart-blue-dark), var(--cart-blue));
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(47, 127, 134, 0.18);
}

.alpafel-cart__benefits div:hover {
  transform: translateY(-4px);
  border-color: var(--cart-border-strong);
  box-shadow: var(--cart-shadow-hover);
}

.alpafel-cart__benefits strong,
.alpafel-cart__benefits span {
  display: block;
}

.alpafel-cart__benefits strong {
  color: var(--cart-navy);
  font-size: 0.98rem;
  font-weight: 900;
  line-height: 1.25;
}

.alpafel-cart__benefits span {
  margin-top: 7px;
  color: rgba(20, 52, 61, 0.64);
  font-size: 0.9rem;
  line-height: 1.45;
}

.alpafel-cart__woocommerce {
  padding: clamp(16px, 3vw, 26px);
}

.alpafel-cart__woocommerce > .woocommerce {
  margin: 0 !important;
  padding: 0 !important;
}

.alpafel-cart .woocommerce-notices-wrapper,
.alpafel-cart .woocommerce-message,
.alpafel-cart .woocommerce-info,
.alpafel-cart .woocommerce-error {
  border-top-color: var(--cart-blue-dark) !important;
  border-radius: 10px !important;
  background: linear-gradient(135deg, #ffffff, rgba(234, 248, 248, 0.78)) !important;
  color: var(--cart-navy) !important;
  box-shadow: 0 12px 30px rgba(20, 52, 61, 0.08) !important;
}

.alpafel-cart .woocommerce-cart-form {
  overflow: hidden;
  border: 1px solid rgba(47, 127, 134, 0.14);
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(20, 52, 61, 0.07);
}

.alpafel-cart .woocommerce table.shop_table,
.alpafel-cart .woocommerce table.cart {
  width: 100% !important;
  margin: 0 !important;
  border: 0 !important;
  border-collapse: collapse !important;
  background: #ffffff !important;
}

.alpafel-cart .woocommerce table.shop_table th,
.alpafel-cart .woocommerce table.shop_table td {
  border-color: rgba(47, 127, 134, 0.12) !important;
  color: var(--cart-navy) !important;
  vertical-align: middle !important;
}

.alpafel-cart .woocommerce table.shop_table th {
  padding: 16px 14px !important;
  background: var(--cart-blue-soft) !important;
  color: var(--cart-navy) !important;
  font-size: 0.85rem !important;
  font-weight: 900 !important;
  text-transform: uppercase !important;
  letter-spacing: 0 !important;
}

.alpafel-cart .woocommerce table.shop_table td {
  padding: 16px 14px !important;
  font-size: 0.95rem !important;
  font-weight: 700 !important;
}

.alpafel-cart .woocommerce-cart-form__cart-item {
  transition: background 0.24s ease;
}

.alpafel-cart .woocommerce-cart-form__cart-item.is-removing {
  opacity: 0.48;
  pointer-events: none;
  filter: grayscale(0.18);
}

.alpafel-cart .woocommerce-cart-form__cart-item.is-removing td {
  position: relative;
}

.alpafel-cart .woocommerce-cart-form__cart-item.is-removing td::after {
  content: "Memperbarui...";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.64);
  color: var(--cart-blue-dark);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.2px;
}

.alpafel-cart .woocommerce-cart-form__cart-item:hover {
  background: rgba(234, 248, 248, 0.42) !important;
}

.alpafel-cart .product-thumbnail img {
  width: 76px !important;
  height: 76px !important;
  object-fit: contain !important;
  border: 1px solid rgba(47, 127, 134, 0.12) !important;
  border-radius: 10px !important;
  background: var(--cart-blue-soft) !important;
  padding: 6px !important;
}

.alpafel-cart .product-name a {
  color: var(--cart-navy) !important;
  font-weight: 900 !important;
  text-decoration: none !important;
}

.alpafel-cart .product-name a:hover {
  color: var(--cart-blue-dark) !important;
}

.alpafel-cart .product-remove a.remove {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 32px !important;
  height: 32px !important;
  border: 1px solid rgba(180, 35, 24, 0.18) !important;
  border-radius: 9px !important;
  background: rgba(180, 35, 24, 0.08) !important;
  color: #b42318 !important;
  font-size: 20px !important;
  line-height: 1 !important;
  text-decoration: none !important;
  transition: transform 0.24s ease, background 0.24s ease, color 0.24s ease !important;
}

.alpafel-cart .product-remove a.remove:hover {
  transform: translateY(-2px) !important;
  background: #b42318 !important;
  color: #ffffff !important;
}

.alpafel-cart .quantity .qty,
.alpafel-cart .woocommerce input.input-text,
.alpafel-cart .woocommerce input[type="text"] {
  min-height: 44px !important;
  border: 1px solid var(--cart-border) !important;
  border-radius: 10px !important;
  background: var(--cart-blue-soft) !important;
  color: var(--cart-navy) !important;
  font-weight: 800 !important;
  outline: none !important;
  transition: border-color 0.24s ease, box-shadow 0.24s ease, background 0.24s ease !important;
}

.alpafel-cart .quantity .qty:focus,
.alpafel-cart .woocommerce input.input-text:focus,
.alpafel-cart .woocommerce input[type="text"]:focus {
  border-color: var(--cart-blue-dark) !important;
  background: #ffffff !important;
  box-shadow: 0 0 0 4px rgba(120, 207, 208, 0.18) !important;
}

.alpafel-cart .woocommerce table.cart td.actions {
  padding: 18px !important;
  background: linear-gradient(135deg, #ffffff, rgba(234, 248, 248, 0.66)) !important;
}

.alpafel-cart .woocommerce table.cart td.actions .coupon {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 10px !important;
  align-items: center !important;
}

.alpafel-cart .woocommerce table.cart td.actions .coupon .input-text {
  width: min(260px, 100%) !important;
  padding: 12px 14px !important;
}

.alpafel-cart .woocommerce table.cart td.actions > .button {
  float: none !important;
  margin-left: 10px !important;
}

.alpafel-cart .cart-collaterals {
  display: flex !important;
  justify-content: flex-end !important;
  gap: 18px !important;
  margin-top: 18px !important;
}

.alpafel-cart .cart-collaterals .cart_totals {
  float: none !important;
  width: min(460px, 100%) !important;
  overflow: hidden !important;
  border: 1px solid rgba(47, 127, 134, 0.14) !important;
  border-radius: 10px !important;
  background: #ffffff !important;
  box-shadow: 0 12px 30px rgba(20, 52, 61, 0.07) !important;
}

.alpafel-cart .cart_totals h2 {
  margin: 0 !important;
  padding: 18px !important;
  background: var(--cart-blue-soft) !important;
  color: var(--cart-navy) !important;
  font-size: 1.2rem !important;
  font-weight: 900 !important;
  letter-spacing: 0 !important;
}

.alpafel-cart .cart_totals table.shop_table th,
.alpafel-cart .cart_totals table.shop_table td {
  background: #ffffff !important;
  font-size: 0.95rem !important;
}

.alpafel-cart .cart_totals .order-total th,
.alpafel-cart .cart_totals .order-total td {
  color: var(--cart-blue-dark) !important;
  font-size: 1.08rem !important;
  font-weight: 900 !important;
}

.alpafel-cart .wc-proceed-to-checkout {
  padding: 18px !important;
}

.alpafel-cart .wc-proceed-to-checkout .checkout-button {
  width: 100% !important;
  min-height: 52px !important;
  margin: 0 !important;
  font-size: 1rem !important;
}

.alpafel-cart .cart-empty,
.alpafel-cart .return-to-shop {
  text-align: center;
}

.alpafel-cart__notice {
  padding: 18px;
  color: rgba(20, 52, 61, 0.74);
  line-height: 1.6;
}

@keyframes acart-section-enter {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes acart-card-enter {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes acart-float {
  0%,
  100% {
    transform: rotate(10deg) translateY(0);
  }

  50% {
    transform: rotate(10deg) translateY(-10px);
  }
}

@keyframes acart-stat-sync {
  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(100%);
  }
}

@keyframes acart-stat-updated {
  0% {
    transform: translateY(0) scale(1);
  }

  45% {
    transform: translateY(-3px) scale(1.015);
  }

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

@media (max-width: 980px) {
  .alpafel-cart__hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .alpafel-cart__hero-actions {
    justify-content: flex-start;
    width: 100%;
  }

  .alpafel-cart__stats,
  .alpafel-cart__benefits {
    grid-template-columns: 1fr;
  }

  .alpafel-cart .cart-collaterals {
    justify-content: stretch !important;
  }

  .alpafel-cart .cart-collaterals .cart_totals {
    width: 100% !important;
  }
}

@media (max-width: 720px) {
  .alpafel-cart {
    width: min(100% - 20px, 1180px);
    margin: 24px auto;
  }

  .alpafel-cart__hero,
  .alpafel-cart__woocommerce {
    padding: 18px;
  }

  .alpafel-cart__hero-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .alpafel-cart__hero-actions a,
  .alpafel-cart .woocommerce .button,
  .alpafel-cart .woocommerce button.button,
  .alpafel-cart .woocommerce input.button,
  .alpafel-cart .woocommerce a.button,
  .alpafel-cart .woocommerce .checkout-button {
    width: 100% !important;
  }

  .alpafel-cart__stat-card {
    padding-right: 86px;
  }

  .alpafel-cart__stat-card::after {
    width: 48px;
    height: 48px;
  }

  .alpafel-cart .woocommerce-cart-form {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .alpafel-cart .woocommerce table.shop_table th,
  .alpafel-cart .woocommerce table.shop_table td {
    padding: 12px 10px !important;
  }

  .alpafel-cart .woocommerce table.cart td.actions .coupon {
    display: grid !important;
    grid-template-columns: 1fr !important;
  }

  .alpafel-cart .woocommerce table.cart td.actions .coupon .input-text,
  .alpafel-cart .woocommerce table.cart td.actions > .button {
    width: 100% !important;
    margin-left: 0 !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .alpafel-cart,
  .alpafel-cart *,
  .alpafel-cart *::before,
  .alpafel-cart *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

.alpafel-cart .alpafel-cart-form table.shop_table {
  table-layout: auto !important;
}

.alpafel-cart .alpafel-cart-panel .cart-empty,
.alpafel-cart .alpafel-cart-panel .return-to-shop {
  margin: 0 0 14px !important;
}

.alpafel-cart .woocommerce-remove-coupon {
  margin-left: 6px;
  color: #b42318 !important;
  font-size: 0.82rem;
  font-weight: 900;
  text-decoration: none !important;
}

.alpafel-cart .woocommerce-remove-coupon:hover {
  text-decoration: underline !important;
}