/* =========================================
   TRANG CART - APP-LIKE CHECKOUT LUXURY
========================================= */

.cart-page {
  position: relative;
  padding: 4.8rem 0 11rem;
  background:
    radial-gradient(
      circle at 12% 5%,
      rgba(244, 194, 194, 0.22),
      transparent 32%
    ),
    radial-gradient(circle at 88% 75%, rgba(18, 17, 17, 0.16), transparent 52%),
    linear-gradient(
      180deg,
      #f4e5e7 0%,
      #e5c0c5 18%,
      #c48892 42%,
      #a76974 68%,
      #794a55 100%
    );
  min-height: 100vh;
}

/* Watermark ch�m */
.bg-watermark {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-heading, "Playfair Display", serif);
  font-size: 24vw;
  font-weight: bold;
  font-style: italic;
  pointer-events: none;
  z-index: 0;
  user-select: none;
  background: linear-gradient(
    180deg,
    rgba(43, 20, 25, 0.08) 0%,
    rgba(255, 255, 255, 0.05) 100%
  );
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* =========================================
   HEADER GI? H�NG (CAN GI?A TUY?T �?I)
========================================= */

.page-header {
  position: relative;
  display: flex;
  flex-direction: column; /* X?p d?c t? tr�n xu?ng */
  align-items: center; /* �p t?t c? v�o ch�nh gi?a */
  text-align: center;
  padding: 5rem 0 3rem;
  width: 100%;
}

/* --- Breadcrumb --- */
.breadcrumb {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.8rem;
  font-size: 1.3rem;
  color: #8c6870;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.15rem;
}

.breadcrumb a {
  color: #5a3840;
  text-decoration: none !important;
  transition: all 0.3s ease;
}

.breadcrumb a:hover {
  color: #b84357;
}

.breadcrumb .current {
  color: #b84357;
  font-weight: bold;
}

/* --- Ti�u d? & �u?ng chia v?ch --- */
.page-title {
  font-family: var(--font-heading, "Playfair Display", serif);
  font-size: 5rem;
  color: #2b1419;
  margin-bottom: 1.5rem;
}

.ornate-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
}

.ornate-divider .line {
  width: 80px;
  height: 1px;
  background: linear-gradient(90deg, transparent, #8c6870, transparent);
}

.ornate-divider .diamond {
  color: #b84357;
  font-size: 1.6rem;
  animation: pulse 2s infinite;
}

/* --- Ng�i sao l?p l�nh --- */
.sparkle {
  position: absolute;
  color: #f4c2c2;
  opacity: 0.8;
  pointer-events: none;
  animation: twinkle 3s infinite alternate;
}

/* Can v? tr� sao cho d?p, kh�ng b? d�nh c?c v�o g�c tr�i n?a */
.sp-1 {
  top: 15%;
  left: 32%;
  font-size: 2.2rem;
}
.sp-2 {
  top: 45%;
  right: 30%;
  font-size: 1.6rem;
}

@keyframes twinkle {
  0% {
    opacity: 0.3;
    transform: scale(0.8);
  }
  100% {
    opacity: 1;
    transform: scale(1.2);
  }
}
@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.3);
    opacity: 1;
    text-shadow: 0 0 8px rgba(184, 67, 87, 0.6);
  }
}

/* Ti�u d? */
.page-title {
  font-family: var(--font-heading, "Playfair Display", serif);
  font-size: 5rem;
  color: #2b1419;
  text-align: center;
  margin-top: 1rem;
}

/* =========================================
   CART LAYOUT - EDITORIAL / WOOCOMMERCE STYLE
========================================= */

/* =========================================
   CART LAYOUT - COQUETTE GLASSMORPHISM
========================================= */

/* --- 1. KHUNG B?C B�N NGO�I (K�NH M? TRONG SU?T) --- */
/* =========================================
   CART LAYOUT - �� KH�A C?NG GIAO DI?N (CH?NG V? B?NG)
========================================= */

.cart-wrapper {
  margin-top: 5rem;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 4.5rem;
  border-radius: 3rem;
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.05);
}

/* �p b?ng hi?n th? chu?n, c?m c�c CSS b�n ngo�i can thi?p */
.cart_table {
  width: 100%;
  border-collapse: collapse;
  table-layout: auto;
}

.cart_table th,
.cart_table td {
  display: table-cell !important; /* L?nh "Thu?ng Phuong B?o Ki?m" ch?ng l?i r?t d�ng */
  padding: 3rem 1.5rem;
  border-bottom: 1px solid rgba(184, 67, 87, 0.15);
  vertical-align: middle;
  text-align: center;
}

/* Can tr�i ri�ng cho c?t S?n ph?m */
.cart_table th.col-product,
.cart_table td.col-product {
  text-align: left;
}

/* Ti�u d? b?ng */
.cart_table th {
  font-family: var(--font-heading, "Playfair Display", serif);
  font-size: 1.4rem;
  color: #5a3840;
  text-transform: uppercase;
  letter-spacing: 0.15rem;
  border-bottom: 2px solid rgba(184, 67, 87, 0.3);
  white-space: nowrap; /* C?m ti�u d? b? r?t xu?ng d�ng */
}

/* Ph�n chia k�ch thu?c c?t c?ng */
.col-remove {
  width: 5%;
}
.col-img {
  width: 12%;
}
.col-product {
  width: 45%;
}
.col-price {
  width: 13%;
}
.col-qty {
  width: 12%;
}
.col-subtotal {
  width: 13%;
}

/* N�t x�a & ?nh */
.remove-btn {
  font-size: 2.5rem;
  color: #8c6870;
  text-decoration: none;
  font-weight: bold;
}
.remove-btn:hover {
  color: #b84357;
}
.col-img img {
  width: 90px;
  height: 120px;
  object-fit: cover;
  border-radius: 40% 40% 10px 10px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

/* T�n S?n ph?m */
.product-title {
  font-family: var(--font-heading, "Playfair Display", serif);
  font-size: 2.2rem;
  color: #2b1419;
  text-decoration: none;
  display: block;
  margin-bottom: 1.2rem;
}

/* --- FIX L?I ADD-ONS B? V? CH? --- */
.variation {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}
.var-row {
  display: flex;
  align-items: flex-start;
  font-size: 1.4rem;
  line-height: 1.4;
}
.var-label {
  color: #8c6870;
  font-style: italic;
  width: 170px; /* Kh�a c?ng chi?u ngang nh�n, gi�p ph?n gi� tr? b�n c?nh th?ng t?p */
  flex-shrink: 0;
}
.var-val {
  color: #2b1419;
  font-weight: 500;
}

/* C�c c?t gi� ti?n & s? lu?ng */
.amount {
  color: #b84357;
  font-size: 1.8rem;
}
.fw-bold {
  font-weight: bold;
  font-size: 2rem;
}
.qty-input {
  width: 60px;
  padding: 0.8rem;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 1rem;
  text-align: center;
  font-size: 1.5rem;
  font-weight: bold;
  outline: none;
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.qty-input[type="number"] {
  -moz-appearance: textfield; /* D�nh cho Firefox */
  appearance: textfield;
}

.quantity-control {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 3rem;
  padding: 0.3rem;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.03);
}

/* 3. N�t Tr? & C?ng */
.qty-btn {
  background: transparent;
  border: none;
  font-size: 2rem;
  color: #8c6870;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
  line-height: 1;
}
.qty-btn:hover {
  background: rgba(184, 67, 87, 0.15); /* S�ng l�n m�u m?n nh? khi r� chu?t */
  color: #b84357;
}

/* 4. � hi?n th? s? ? gi?a */
.quantity-control .qty-input {
  width: 40px;
  background: transparent;
  border: none;
  text-align: center;
  font-size: 1.6rem;
  color: #2b1419;
  font-weight: bold;
  outline: none;
  padding: 0;
}

/* N�t Update */
.actions {
  text-align: right;
  padding-top: 3rem;
}
.update-cart-btn {
  padding: 1.2rem 3rem;
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid #8c6870;
  border-radius: 3rem;
  color: #2b1419;
  font-size: 1.2rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s;
}
.update-cart-btn:hover {
  background: #2b1419;
  color: #fff;
}

/* --- CART TOTALS --- */
.cart-collaterals {
  display: flex;
  justify-content: flex-end;
  margin-top: 4rem;
}
.cart_totals {
  width: 100%;
  max-width: 450px;
  background: rgba(255, 255, 255, 0.35);
  padding: 3.5rem;
  border-radius: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}
.totals-title {
  font-family: var(--font-heading, "Playfair Display", serif);
  font-size: 2.8rem;
  color: #2b1419;
  margin-bottom: 2rem;
  border-bottom: 1px solid rgba(184, 67, 87, 0.2);
  padding-bottom: 1rem;
}
.totals_table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 3rem;
}
.totals_table th,
.totals_table td {
  padding: 1.5rem 0;
  border-bottom: 1px solid rgba(184, 67, 87, 0.1);
}
.totals_table th {
  text-align: left;
  font-size: 1.5rem;
  color: #5a3840;
  font-weight: normal;
}
.totals_table td {
  text-align: right;
}
.shipping-methods {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem 0;
}
.shipping-methods li {
  font-size: 1.4rem;
  margin-bottom: 0.8rem;
  color: #2b1419;
}
.total-amount {
  font-size: 2.8rem;
  color: #b84357;
  font-weight: bold;
}

.checkout-button {
  width: 100%;
  background: #f4c2c2;
  color: #2b1419;
  border: none;
  padding: 1.8rem;
  border-radius: 3rem;
  font-size: 1.4rem;
  font-weight: bold;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.4s;
  box-shadow: 0 5px 15px rgba(244, 194, 194, 0.4);
  text-decoration: none;
}
.checkout-button:hover {
  background: #2b1419;
  color: #fff;
  transform: translateY(-3px);
}

/* =========================================
   MOBILE RESPONSIVE
========================================= */
@media (max-width: 991px) {
  .cart-wrapper {
    padding: 2.5rem;
  }
  .cart_table thead {
    display: none;
  }
  .cart_table,
  .cart_table tbody,
  .cart_table tr,
  .cart_table td {
    display: block !important;
    width: 100%;
  }

  .cart_item {
    position: relative;
    padding-bottom: 2rem;
    margin-bottom: 3rem;
    border-bottom: 2px dashed rgba(184, 67, 87, 0.2);
  }
  .cart_table td {
    padding: 1.2rem 0;
    border: none;
    text-align: left !important;
  }

  .col-remove {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 2;
    padding: 0 !important;
  }
  .col-img {
    text-align: center !important;
  }
  .col-img img {
    width: 140px;
    height: 180px;
  }

  /* T?o Label ri�ng cho Mobile */
  .col-price::before {
    content: "Price: ";
    color: #8c6870;
    font-weight: bold;
    font-family: var(--font-heading, "Playfair Display", serif);
    margin-right: 1rem;
  }
  .col-qty::before {
    content: "Quantity: ";
    color: #8c6870;
    font-weight: bold;
    font-family: var(--font-heading, "Playfair Display", serif);
    margin-right: 1rem;
  }
  .col-subtotal::before {
    content: "Subtotal: ";
    color: #8c6870;
    font-weight: bold;
    font-family: var(--font-heading, "Playfair Display", serif);
    margin-right: 1rem;
  }

  .var-label {
    width: 140px;
  }
  .cart_totals {
    max-width: 100%;
  }
}

/* =========================================================
   EMPTY CART
   ---------------------------------------------------------
   Hi?n th? khi gi? h�ng kh�ng c� s?n ph?m
   ========================================================= */

.empty-cart td {
  padding: 8rem 2rem;
  text-align: center;
}

/* Ti�u d? */
.empty-cart h2 {
  margin: 0 0 1rem;

  font-family: "Playfair Display", serif;
  font-size: 3.2rem;
  font-weight: 600;
  line-height: 1.2;

  color: var(--primary-black);
}

/* N?i dung m� t? */
.empty-cart p {
  margin: 0 0 1.2rem;

  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 1.6rem;
  line-height: 1.6;

  color: var(--soft-black);
}

/* =========================================================
   EMPTY CART BUTTON
   ---------------------------------------------------------
   Soft Pink Glass / Luxury Pill Button
   ========================================================= */

.empty-cart-btn {
  position: relative;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;

  min-width: 29rem;
  height: 6.2rem;
  padding: 0 2.8rem;

  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;

  color: #ffffff;
  text-decoration: none;

  /* -------------------------------------------------------
     GLASS
     ------------------------------------------------------- */

  background: rgba(224, 139, 151, 0.28);

  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);

  /* -------------------------------------------------------
     ROUNDED PILL
     ------------------------------------------------------- */

  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 999px;

  /* -------------------------------------------------------
     SOFT GLASS GLOW
     ------------------------------------------------------- */

  box-shadow:
    0 8px 25px rgba(190, 95, 110, 0.22),
    0 0 12px rgba(255, 255, 255, 0.35),
    inset 0 1px 2px rgba(255, 255, 255, 0.8),
    inset 0 -1px 2px rgba(190, 95, 110, 0.12);

  transition:
    transform 0.35s ease,
    background 0.35s ease,
    box-shadow 0.35s ease;
}

/* =========================================================
   ARROW CIRCLE
   --------------------------------------------------------- */

.empty-cart-btn::before {
  content: "?";

  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 3rem;
  height: 3rem;

  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1;

  color: #ffffff;

  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 50%;

  background: rgba(255, 255, 255, 0.08);

  box-shadow:
    inset 0 1px 2px rgba(255, 255, 255, 0.5),
    0 2px 8px rgba(190, 95, 110, 0.12);

  flex-shrink: 0;
}

/* =========================================================
   HOVER
   ========================================================= */

.empty-cart-btn:hover {
  color: #ffffff;

  background: rgba(216, 112, 124, 0.42);

  transform: translateY(-2px);

  box-shadow:
    0 12px 30px rgba(190, 95, 110, 0.28),
    0 0 18px rgba(255, 255, 255, 0.4),
    inset 0 1px 3px rgba(255, 255, 255, 0.9);
}

/* =========================================================
   ARROW HOVER
   ========================================================= */

.empty-cart-btn:hover::before {
  background: rgba(255, 255, 255, 0.15);

  transform: translateX(2px);
}

/* =========================================================
   UPDATE ITEM
   N�t UPDATE c?a t?ng s?n ph?m trong Cart
   ========================================================= */

/* =========================================================
   UPDATE ITEM - GLASSMORPHISM STYLE
   ========================================================= */

/* =========================================================
   UPDATE ITEM - SOLID CORAL STYLE
   ========================================================= */

.update-item-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  /* B? l�n: tang padding v� k�ch thu?c ch? */
  padding: 0.8rem 2.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;

  /* X�ch xu?ng du?i: tang margin-top */
  margin-top: 1.8rem;

  /* �?i m�u: N?n cam g?ch, ch? tr?ng */
  color: #ffffff;
  background-color: #dd7f6c; /* Thay b?ng var(--ten-mau-cua-ban) n?u c� */

  /* Vi?n tr?ng d�y hon m?t ch�t v� bo tr�n */
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 50px;

  /* B�ng d? nh? t?o chi?u s�u */
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);

  transition: all 0.3s ease;
  cursor: pointer;
}

.update-item-btn:hover {
  /* Hover: n?n s�ng l�n m?t ch�t, b�ng d? d?m hon v� n?y nh? */
  background-color: #e3745d;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

.update-item-btn:active {
  /* Active: l�n xu?ng khi click */
  transform: translateY(0);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}
