/* =========================
   Cart Page
========================= */

.cart-page {
  min-height: calc(100vh - 86px - 220px);
  padding-top: 80px;
  padding-bottom: 90px;
}

.cart-hero {
  text-align: center;
  padding: 20px 0 38px;
}

.cart-hero .eyebrow {
  margin-bottom: 18px;
}

.cart-hero h1 {
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.15;
  color: var(--brown-dark);
  margin-bottom: 16px;
}

.cart-hero h1 span {
  display: block;
  color: var(--gold);
  margin-top: 8px;
}

.cart-hero p {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.9;
  max-width: 760px;
  margin: auto;
}

.cart-layout {
  display: grid;
  grid-template-columns: 1fr 390px;
  gap: 28px;
  align-items: start;
}

.cart-items-card,
.cart-summary-card {
  position: relative;
  background:
    radial-gradient(circle at top right, rgba(199, 154, 69, 0.12), transparent 42%),
    rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(74, 43, 18, 0.08);
  border-radius: 34px;
  box-shadow: 0 22px 70px rgba(43, 23, 8, 0.08);
  overflow: hidden;
}

.cart-items-card {
  padding: 28px;
}

.cart-summary-card {
  padding: 28px;
  position: sticky;
  top: 110px;
}

.cart-card-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  margin-bottom: 24px;
}

.cart-card-head h2,
.cart-summary-card h2 {
  color: var(--brown-dark);
  font-size: 32px;
  margin: 12px 0 0;
}

.items-count {
  color: var(--gold);
  background: rgba(199, 154, 69, 0.1);
  border: 1px solid rgba(199, 154, 69, 0.18);
  border-radius: 999px;
  padding: 8px 13px;
  font-size: 13px;
  font-weight: 900;
}

.cart-item {
  display: grid;
  grid-template-columns: 110px 1fr 132px 115px 52px;
  gap: 20px;
  align-items: center;
  padding: 20px 0;
  border-top: 1px solid rgba(74, 43, 18, 0.08);
}

.cart-item:first-of-type {
  border-top: 0;
}

.cart-product-img {
  height: 110px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(241, 215, 155, 0.24), rgba(255, 250, 241, 0.75));
  display: grid;
  place-items: center;
  padding: 14px;
  text-decoration: none;
  overflow: hidden;
}

.cart-product-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: 0.3s ease;
}

.cart-product-img:hover img {
  transform: scale(1.06) rotate(-2deg);
}

.cart-product-info span {
  display: inline-flex;
  color: var(--gold);
  font-size: 13px;
  font-weight: 900;
  margin-bottom: 6px;
}

.cart-product-info h3 {
  font-size: 20px;
  margin: 0 0 8px;
  line-height: 1.4;
}

.cart-product-info h3 a {
  color: var(--brown-dark);
  text-decoration: none;
  transition: 0.25s ease;
}

.cart-product-info h3 a:hover {
  color: var(--gold);
}

.cart-product-info p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
  margin: 0;
}

.mobile-price {
  display: none;
}

.cart-qty {
  min-width: 125px;
  min-height: 48px;
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(74, 43, 18, 0.1);
  display: grid;
  grid-template-columns: 38px 1fr 38px;
  align-items: center;
  overflow: hidden;
}

.cart-qty button {
  height: 100%;
  border: 0;
  background: transparent;
  color: var(--brown-dark);
  font-size: 19px;
  font-weight: 900;
  cursor: pointer;
  transition: 0.25s ease;
}

.cart-qty button:hover {
  background: var(--gold-soft);
}

.cart-qty strong {
  color: var(--brown-dark);
  text-align: center;
}

.cart-price {
  color: var(--brown-dark);
  font-size: 19px;
  white-space: nowrap;
}

.remove-item {
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(74, 43, 18, 0.08);
  color: var(--muted);
  cursor: pointer;
  font-size: 19px;
  transition: 0.25s ease;
}

.remove-item:hover {
  transform: translateY(-3px);
  background: var(--brown-dark);
  color: var(--gold-soft);
}

.cart-actions-bottom {
  border-top: 1px solid rgba(74, 43, 18, 0.08);
  padding-top: 22px;
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.continue-shopping,
.clear-cart {
  min-height: 50px;
  border-radius: 18px;
  padding: 0 18px;
  text-decoration: none;
  font-family: inherit;
  font-weight: 900;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: 0.25s ease;
}

.continue-shopping {
  color: var(--brown-dark);
  background: var(--gold-soft);
}

.clear-cart {
  color: var(--brown-dark);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(74, 43, 18, 0.1);
}

.continue-shopping:hover,
.clear-cart:hover {
  transform: translateY(-3px);
}

.cart-summary-card .eyebrow {
  margin-bottom: 12px;
}

.coupon-box {
  margin: 24px 0;
}

.coupon-box label {
  display: block;
  color: var(--brown-dark);
  font-weight: 900;
  margin-bottom: 10px;
}

.coupon-box div {
  min-height: 56px;
  border-radius: 19px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(74, 43, 18, 0.1);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 92px;
}

.coupon-box input {
  border: 0;
  outline: 0;
  background: transparent;
  padding: 0 16px;
  color: var(--brown-dark);
  font-family: inherit;
}

.coupon-box input::placeholder {
  color: rgba(74, 43, 18, 0.42);
}

.coupon-box button {
  border: 0;
  background: linear-gradient(135deg, var(--brown-dark), var(--brown));
  color: var(--gold-soft);
  font-family: inherit;
  font-weight: 900;
  cursor: pointer;
}

.summary-list {
  display: grid;
  gap: 16px;
  margin-bottom: 24px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  color: var(--muted);
}

.summary-row strong {
  color: var(--brown-dark);
  white-space: nowrap;
}

.summary-row.total {
  margin-top: 6px;
  padding-top: 18px;
  border-top: 1px solid rgba(74, 43, 18, 0.1);
  color: var(--brown-dark);
  font-size: 20px;
  font-weight: 900;
}

.summary-row.total strong {
  color: var(--gold);
  font-size: 24px;
}

.checkout-btn,
.cart-whatsapp {
  min-height: 58px;
  border-radius: 20px;
  text-decoration: none;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: 0.25s ease;
}

.checkout-btn {
  background: linear-gradient(135deg, var(--brown-dark), var(--brown));
  color: var(--gold-soft);
  box-shadow: 0 16px 40px rgba(43, 23, 8, 0.16);
  margin-bottom: 12px;
}

.cart-whatsapp {
  background: rgba(255, 255, 255, 0.74);
  color: var(--brown-dark);
  border: 1px solid rgba(74, 43, 18, 0.1);
}

.cart-whatsapp i {
  color: var(--gold);
  font-size: 21px;
}

.checkout-btn:hover,
.cart-whatsapp:hover {
  transform: translateY(-4px);
}

.cart-whatsapp:hover {
  background: var(--gold-soft);
}

.summary-trust {
  margin-top: 22px;
  display: grid;
  gap: 12px;
}

.summary-trust div {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
}

.summary-trust i {
  width: 36px;
  height: 36px;
  border-radius: 13px;
  background: linear-gradient(135deg, rgba(241, 215, 155, 0.42), rgba(255, 250, 241, 0.88));
  color: var(--gold);
  display: grid;
  place-items: center;
}

.reveal {
  opacity: 0;
  transform: translateY(34px);
  transition: 0.75s ease;
}

.reveal.show {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */

@media (max-width: 1150px) {
  .cart-layout {
    grid-template-columns: 1fr;
  }

  .cart-summary-card {
    position: relative;
    top: auto;
  }
}

@media (max-width: 992px) {
  .cart-page {
    padding-top: 60px;
  }

  .cart-item {
    grid-template-columns: 95px 1fr 125px 44px;
  }

  .cart-price {
    display: none;
  }

  .mobile-price {
    display: block;
    color: var(--brown-dark);
    font-weight: 900;
    margin-top: 8px;
  }
}

@media (max-width: 620px) {
  .cart-page {
    padding-top: 42px;
    padding-bottom: 70px;
  }

  .cart-hero {
    padding: 10px 0 28px;
  }

  .cart-hero h1 {
    font-size: 34px;
  }

  .cart-hero p {
    font-size: 16px;
  }

  .cart-items-card,
  .cart-summary-card {
    padding: 22px;
    border-radius: 28px;
  }

  .cart-card-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .cart-card-head h2,
  .cart-summary-card h2 {
    font-size: 28px;
  }

  .cart-item {
    grid-template-columns: 88px 1fr;
    gap: 14px;
    align-items: start;
    position: relative;
  }

  .cart-product-img {
    height: 88px;
    border-radius: 20px;
  }

  .cart-product-info h3 {
    font-size: 17px;
  }

  .cart-product-info p {
    font-size: 13px;
  }

  .cart-qty {
    grid-column: 2;
    width: 125px;
    min-height: 44px;
  }

  .remove-item {
    position: absolute;
    top: 18px;
    left: 0;
    width: 42px;
    height: 42px;
  }

  .cart-actions-bottom {
    flex-direction: column;
    align-items: stretch;
  }

  .continue-shopping,
  .clear-cart {
    width: 100%;
  }

  .coupon-box div {
    grid-template-columns: 1fr;
  }

  .coupon-box button {
    min-height: 48px;
  }
}

@media (max-width: 620px) {
  .coupon-box div {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    background: transparent;
    border: 0;
    overflow: visible;
  }

  .coupon-box input {
    width: 100%;
    height: 52px;
    padding: 0 16px;
    text-align: right;
    direction: rtl;
    font-size: 15px;
    border-radius: 17px;
    background: rgba(255, 255, 255, 0.74);
    border: 1px solid rgba(74, 43, 18, 0.1);
  }

  .coupon-box button {
    width: 100%;
    height: 54px;
    border-radius: 17px;
    font-size: 15px;
  }
}

@media (min-width: 993px) {
  .sidebar-overlay,
  .mobile-sidebar {
    display: none !important;
  }
}

.cart-qty {
  width: 132px;
  height: 48px;
  min-width: 132px;
  min-height: 48px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid rgba(74, 43, 18, 0.12);
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  align-items: center;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(43, 23, 8, 0.04);
}

.cart-qty .qty-btn {
  width: 40px;
  height: 48px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--brown-dark);
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-qty .qty-btn:hover {
  background: rgba(199, 154, 69, 0.14);
}

.cart-qty .qty-number {
  height: 48px;
  color: var(--brown-dark);
  font-size: 17px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-qty.loading {
  opacity: 0.55;
  pointer-events: none;
}

.cart-item > form {
  margin: 0;
  display: flex;
  justify-content: center;
}

.remove-item {
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-btn span {
  position: absolute;
  top: -8px;
  left: -8px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 50%;
  background: #c79a45;
  color: #2a1b10;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.empty-cart {
  text-align: center;
  padding: 50px 20px;
}

.empty-cart i {
  font-size: 48px;
  margin-bottom: 15px;
  display: inline-block;
}

.empty-cart h3 {
  margin-bottom: 10px;
}

.empty-cart p {
  margin-bottom: 20px;
}

.sidebar-cart-link {
  position: relative;
}

.sidebar-cart-count {
  margin-right: auto;
  min-width: 25px;
  height: 25px;
  padding: 0 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brown-dark), var(--brown));
  color: var(--gold-soft);
  border: 1px solid rgba(199, 154, 69, 0.35);
  box-shadow: 0 10px 24px rgba(43, 23, 8, 0.14);
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sidebar-cart-link.active .sidebar-cart-count {
  background: linear-gradient(135deg, var(--gold), #f1d79b);
  color: var(--brown-dark);
  border-color: rgba(74, 43, 18, 0.12);
}

.cart-btn {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  background: var(--brown-dark);
  color: var(--gold-soft);
  display: grid;
  place-items: center;
  position: relative;
}

.cart-btn i {
  position: relative;
  z-index: 2;
}

.cart-btn .cart-count {
  position: absolute;
  top: -6px;
  left: -6px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--gold), var(--gold-soft));
  color: var(--brown-dark);
  border: 1px solid rgba(74, 43, 18, 0.12);
  box-shadow: 0 10px 22px rgba(43, 23, 8, 0.16);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sidebar-cart-link {
  position: relative;
}

.sidebar-cart-count {
  position: relative;
  z-index: 2;
  margin-right: auto;
  min-width: 25px;
  height: 25px;
  padding: 0 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--gold), var(--gold-soft));
  color: var(--brown-dark);
  border: 1px solid rgba(74, 43, 18, 0.12);
  box-shadow: 0 10px 24px rgba(43, 23, 8, 0.16);
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sidebar-cart-link:hover .sidebar-cart-count,
.sidebar-cart-link.active .sidebar-cart-count {
  background: var(--gold-soft);
  color: var(--brown-dark);
  border-color: rgba(241, 215, 155, 0.45);
}

.toast-message {
  position: fixed;
  top: 120px;
  right: 28px;
  left: auto;
  z-index: 99999;
  width: fit-content;
  min-width: 320px;
  max-width: 460px;
  padding: 16px 20px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  direction: rtl;
  text-align: right;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.7;
  box-shadow: 0 18px 55px rgba(43, 23, 8, 0.22);
  animation: toastIn 0.35s ease forwards;
}

.toast-message i {
  flex: 0 0 auto;
  font-size: 20px;
}

.toast-message span {
  display: block;
  white-space: normal;
}

.toast-success {
  background: linear-gradient(135deg, #176b42, #22a66a);
  color: #ffffff;
}

.toast-error {
  background: linear-gradient(135deg, #8e2522, #c0392b);
  color: #ffffff;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(-14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 620px) {
  .toast-message {
    top: 92px;
    left: 12px;
    right: 12px;
    width: auto;
    min-width: 0;
    max-width: none;
    padding: 14px 16px;
    border-radius: 16px;
    font-size: 14px;
  }
}

.cart-count.is-empty,
.sidebar-cart-count.is-empty {
  display: none;
}
