/* ==========================================================================
   SHESTYLE — FINAL CART DESIGN
   Step 8.4
   ========================================================================== */

.cart-section {
  padding: 42px 0 80px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  align-items: start;
}

/* ==========================================================================
   CART ITEMS PANEL
   ========================================================================== */

.cart-items-panel {
  background: var(--she-surface, #fff);
  border: 1px solid var(--she-line, rgba(44, 26, 29, 0.1));
  border-radius: var(--she-radius, 12px);
  padding: 26px;
  box-shadow: var(--she-shadow-sm, 0 6px 20px rgba(44, 26, 29, 0.08));
}

.cart-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(44,26,29,0.1);
}

.cart-panel-heading h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: var(--ink, var(--she-ink, #2c1a1d));
}

.cart-count-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-soft, var(--she-ink-soft, #6e4d4f));
  background: var(--she-surface-2, #f6eee1);
  padding: 7px 11px;
  border-radius: var(--she-radius-full, 999px);
}

/* ==========================================================================
   CART ITEM
   ========================================================================== */

.cart-item-row {
  position: relative;
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 18px;
  padding: 20px 0;
  border-bottom: 1px solid #f7f1e8;
}

.cart-item-row:last-child {
  border-bottom: 0;
  padding-bottom: 4px;
}

.cart-item-image {
  width: 88px;
  height: 108px;
  object-fit: cover;
  border-radius: 14px;
  display: block;
  background: #f7f1e8;
}

.cart-item-info {
  min-width: 0;
}

.cart-item-info h4 {
  margin: 0 0 7px;
  font-size: 15px;
  line-height: 1.4;
  font-weight: 700;
  color: var(--ink, var(--she-ink, #2c1a1d));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-item-price {
  margin: 0;
  font-size: 13px;
  color: var(--ink-soft, var(--she-ink-soft, #6e4d4f));
}

.cart-item-stock {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--she-success, #3f7d5c);
}

.cart-item-stock i {
  font-size: 12px;
}

/* ==========================================================================
   QUANTITY CONTROL
   ========================================================================== */

.cart-item-qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(44,26,29,0.12);
  border-radius: 12px;
  overflow: hidden;
  background: var(--she-surface, #fff);
  flex-shrink: 0;
}

.cart-item-qty button {
  width: 34px;
  height: 36px;
  border: 0;
  background: #fdf9f5;
  color: var(--ink, var(--she-ink, #2c1a1d));
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s ease;
}

.cart-item-qty button:hover {
  background: var(--brand, var(--she-rose, #c25969));
  color: #fff;
}

.cart-item-qty button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.cart-item-qty input {
  width: 38px;
  height: 36px;
  padding: 0;
  border: 0;
  outline: 0;
  text-align: center;
  background: var(--she-surface, #fff);
  color: var(--ink, var(--she-ink, #2c1a1d));
  font-size: 13px;
  font-weight: 700;
}

/* ==========================================================================
   LINE TOTAL
   ========================================================================== */

.cart-item-total {
  min-width: 90px;
  text-align: right;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink, var(--she-ink, #2c1a1d));
  white-space: nowrap;
}

/* ==========================================================================
   REMOVE BUTTON
   ========================================================================== */

.cart-item-remove {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(44,26,29,0.1);
  border-radius: 50%;
  background: var(--she-surface, #fff);
  color: var(--she-muted, #a68a8c);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.cart-item-remove:hover {
  background: #f3dee1;
  border-color: #f6ecc9;
  color: var(--she-danger, #a83e42);
  transform: translateY(-1px);
}

/* ==========================================================================
   ORDER SUMMARY
   ========================================================================== */

.cart-summary-panel {
  position: sticky;
  top: 105px;
  max-width: none;

  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.98),
    rgba(255, 248, 250, 0.98)
  );

  border: 1px solid var(--she-line, rgba(44, 26, 29, 0.1));
  border-radius: var(--she-radius, 12px);
  padding: 26px;
  box-shadow: var(--she-shadow-sm, 0 6px 20px rgba(44, 26, 29, 0.08));
}

.cart-summary-panel h2 {
  margin: 0 0 22px;
  font-size: 19px;
  font-weight: 700;
  color: var(--ink, var(--she-ink, #2c1a1d));
}

.summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 13px;
  font-size: 13px;
  color: var(--ink-soft, var(--she-ink-soft, #6e4d4f));
}

.summary-row span:last-child {
  text-align: right;
  color: var(--ink, var(--she-ink, #2c1a1d));
  font-weight: 600;
}

.summary-row.delivery-row span:last-child {
  color: var(--she-warning, #a97327);
  font-weight: 500;
}

.summary-row.total {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(44,26,29,0.12);
  font-size: 18px;
  font-weight: 800;
  color: var(--ink, var(--she-ink, #2c1a1d));
}

.summary-row.total span:last-child {
  font-size: 20px;
  color: var(--brand-dark, var(--she-rose-dark, #9c4353));
}

/* ==========================================================================
   TRUST INDICATORS
   ========================================================================== */

.cart-trust {
  margin-top: 20px;
  padding: 15px;
  border-radius: var(--she-radius, 12px);
  background: var(--she-surface-2, #fdf9f5);
  border: 1px solid var(--she-rose-soft, #f3dee1);
}

.cart-trust-item {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 13px;
  color: var(--ink-soft, var(--she-ink-soft, #6e4d4f));
}

.cart-trust-item:last-child {
  margin-bottom: 0;
}

.cart-trust-item i {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--she-surface, #fff);
  color: var(--brand, var(--she-rose, #c25969));
  flex-shrink: 0;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */

.cart-checkout-btn {
  width: 100%;
  margin-top: 20px;
  min-height: 48px;
  border-radius: var(--she-radius, 12px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  /* সবচেয়ে গুরুত্বপূর্ণ CTA (checkout-এ যাওয়া) — champagne gold */
  background: var(--she-gold, #d4af37) !important;
  border-color: var(--she-gold, #d4af37) !important;
  color: var(--she-burgundy, #3d141b) !important;
}
.cart-checkout-btn:hover {
  background: var(--she-gold-dark, #b8952b) !important;
  border-color: var(--she-gold-dark, #b8952b) !important;
}

.cart-continue-btn {
  width: 100%;
  margin-top: 10px;
  min-height: 44px;
  border-radius: var(--she-radius, 12px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ==========================================================================
   EMPTY CART
   ========================================================================== */

.cart-empty {
  max-width: 650px;
  margin: 20px auto 80px;
  padding: 70px 25px;
  text-align: center;
  background: var(--she-surface, #fff);
  border: 1px solid var(--she-rose-soft, #f3dee1);
  border-radius: var(--she-radius-lg, 18px);
  box-shadow: var(--she-shadow-sm, 0 6px 20px rgba(44, 26, 29, 0.08));
}

.cart-empty-icon {
  width: 76px;
  height: 76px;
  margin: 0 auto 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f6eee1;
  color: var(--brand, var(--she-rose, #c25969));
  font-size: 28px;
}

.cart-empty h2 {
  margin-bottom: 8px;
  font-size: 23px;
}

.cart-empty p {
  margin-bottom: 24px;
  color: var(--ink-soft, var(--she-ink-soft, #6e4d4f));
  font-size: 14px;
}

/* ==========================================================================
   RESPONSIVE — TABLET
   ========================================================================== */

@media only screen and (max-width: 950px) {
  .cart-section {
    grid-template-columns: 1fr;
  }

  .cart-summary-panel {
    position: static;
    width: 100%;
  }
}

/* ==========================================================================
   RESPONSIVE — MOBILE
   ========================================================================== */

@media only screen and (max-width: 650px) {
  .cart-section {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 25px 0 55px;
  }

  .cart-items-panel,
  .cart-summary-panel {
    width: 100%;
    padding: 18px;
    border-radius: var(--she-radius, 12px);
  }

  .cart-panel-heading {
    padding-bottom: 15px;
  }

  .cart-panel-heading h2 {
    font-size: 17px;
  }

  .cart-item-row {
    grid-template-columns: 68px minmax(0, 1fr) auto;
    gap: 12px;
    padding: 16px 0;
  }

  .cart-item-image {
    width: 68px;
    height: 84px;
    border-radius: 11px;
  }

  .cart-item-info {
    align-self: start;
  }

  .cart-item-info h4 {
    font-size: 13px;
  }

  .cart-item-price {
    font-size: 14px;
  }

  .cart-item-stock {
    font-size: 13px;
  }

  .cart-item-qty {
    grid-column: 2;
    grid-row: 2;
    justify-self: start;
  }

  .cart-item-total {
    grid-column: 3;
    grid-row: 2;
    min-width: auto;
    font-size: 13px;
  }

  .cart-item-remove {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    width: 30px;
    height: 30px;
    font-size: 14px;
  }

  .cart-summary-panel h2 {
    font-size: 17px;
  }

  .cart-empty {
    margin: 15px 15px 55px;
    padding: 55px 20px;
    border-radius: var(--she-radius-lg, 18px);
  }
}

/* ==========================================================================
   VERY SMALL DEVICES
   ========================================================================== */

@media only screen and (max-width: 380px) {
  .cart-items-panel,
  .cart-summary-panel {
    padding: 15px;
  }

  .cart-item-row {
    grid-template-columns: 58px minmax(0, 1fr) auto;
    gap: 9px;
  }

  .cart-item-image {
    width: 58px;
    height: 74px;
  }

  .cart-item-qty button {
    width: 30px;
    height: 32px;
  }

  .cart-item-qty input {
    width: 32px;
    height: 32px;
  }

  .summary-row.total {
    font-size: 16px;
  }

  .summary-row.total span:last-child {
    font-size: 18px;
  }
}
