/* Dreams Sell â€” mobile UX polish (cards / cart / checkout) */
:root {
  --ds-bg: #F7F9FC;
  --ds-primary: #0B4F6C;
  --ds-accent: #00A8C5;
  --ds-green: #088736;
  --ds-radius: 14px;
  --ds-pad: 16px;
}

body.storefront-body,
body {
  background-color: var(--ds-bg);
}

.ds-product-card {
  background: #fff;
  border-radius: var(--ds-radius);
  border: 1px solid #e6eef5;
  box-shadow: 0 6px 18px rgba(11, 79, 108, 0.06);
}

.ds-product-card .product-img-container {
  aspect-ratio: 1 / 1;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  background: linear-gradient(180deg, #fff 0%, #f3f8fb 100%);
}

.ds-product-card .product-img-container img {
  width: 100%;
  height: 100%;
  max-width: 92%;
  max-height: 92%;
  object-fit: contain;
}

/* Desktop / PC ? taller cards + less side waste (mobile untouched) */
@media (min-width: 992px) {
  /* Widen storefront content: shrink green side margins */
  .main-header > .container,
  main.container,
  .main-footer > .container,
  .main-footer .container {
    max-width: min(1360px, 96vw) !important;
    padding-left: 14px !important;
    padding-right: 14px !important;
  }

  .ds-product-card.product-card,
  .product-card.ds-product-card {
    padding: 12px 12px 12px !important;
    border-radius: 18px !important;
    border: 1px solid #e2eaf2 !important;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06) !important;
    transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease !important;
  }

  .ds-product-card.product-card:hover,
  .product-card.ds-product-card:hover {
    transform: translateY(-5px) !important;
    border-color: rgba(8, 135, 54, 0.28) !important;
    box-shadow: 0 16px 36px rgba(8, 76, 61, 0.14) !important;
  }

  .ds-product-card .product-img-container {
    aspect-ratio: auto !important;
    height: 248px !important;
    min-height: 248px !important;
    max-height: 248px !important;
    border-radius: 14px !important;
    margin-bottom: 6px;
    background: linear-gradient(165deg, #ffffff 0%, #f4f8f6 55%, #eaf2ee 100%) !important;
  }

  .ds-product-card .product-img-container img {
    max-width: 88% !important;
    max-height: 88% !important;
  }

  .ds-product-card .product-details {
    padding: 10px 2px 2px !important;
    display: flex !important;
    flex-direction: column !important;
    flex-grow: 1 !important;
  }

  .ds-product-card .product-category {
    font-size: 11px !important;
    letter-spacing: 0.06em !important;
    color: #64748b !important;
    margin-bottom: 4px !important;
    font-weight: 700 !important;
  }

  .ds-product-card .product-name {
    font-size: 15px !important;
    line-height: 1.35 !important;
    min-height: 40px !important;
    height: auto !important;
    margin-bottom: 8px !important;
    color: #0f172a !important;
    font-weight: 750 !important;
    -webkit-line-clamp: 2;
  }

  .ds-product-card .product-price-container {
    margin: 0 0 12px !important;
    gap: 8px !important;
    align-items: baseline !important;
  }

  .ds-product-card .product-price-sale {
    font-size: 18px !important;
    font-weight: 800 !important;
    color: #088736 !important;
    letter-spacing: -0.02em;
  }

  .ds-product-card .product-price-regular {
    font-size: 12px !important;
    color: #94a3b8 !important;
  }

  .ds-product-card .discount-badge-abs {
    top: 12px !important;
    left: 12px !important;
    padding: 4px 10px !important;
    font-size: 11px !important;
    border-radius: 999px !important;
    box-shadow: 0 4px 12px rgba(225, 29, 72, 0.25);
  }

  .ds-product-card .wishlist-btn-abs {
    top: 12px !important;
    right: 12px !important;
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
  }

  .ds-product-card .ds-card-actions,
  .ds-product-card .card-actions.ds-card-actions {
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
    margin-top: auto !important;
  }

  .ds-product-card .btn-card-cart,
  .ds-product-card .btn-card-buy {
    height: 42px !important;
    min-height: 42px !important;
    border-radius: 12px !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    gap: 6px !important;
  }

  .ds-product-card .btn-card-cart i,
  .ds-product-card .btn-card-buy i {
    font-size: 15px !important;
  }

  .home-products-grid,
  #featuredProductsRow,
  #forYouProductsRow,
  #newArrivalsRow {
    --bs-gutter-x: 0.9rem;
    --bs-gutter-y: 1.1rem;
  }

  /* Category row also fills the wider rail */
  .category-slider-row,
  .categories-row,
  .home-category-grid {
    --bs-gutter-x: 0.9rem;
  }
}

.discount-badge-abs {
  border-radius: 999px !important;
  min-width: auto !important;
  width: auto !important;
  height: auto !important;
  padding: 4px 8px !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  background: linear-gradient(135deg, #e11d48, #f97316) !important;
}

.ds-stock-line,
.stock-badge-abs {
  display: none !important;
}

.ds-card-actions {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 8px !important;
  margin-top: 4px !important;
}

.ds-card-actions .btn-card-cart,
.ds-card-actions .btn-card-buy {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 40px !important;
  height: 40px !important;
  border-radius: 10px !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  padding: 0 6px !important;
  gap: 4px !important;
  white-space: nowrap !important;
}

.ds-card-actions .btn-card-cart span,
.ds-card-actions .btn-card-buy span {
  display: inline !important;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ds-card-actions .btn-card-cart {
  background: #fff !important;
  color: #088736 !important;
  border: 1.5px solid #088736 !important;
  box-shadow: none !important;
}

.ds-card-actions .btn-card-buy {
  background: linear-gradient(135deg, #088736, #056e2a) !important;
  color: #fff !important;
  box-shadow: 0 4px 10px rgba(8, 135, 54, 0.22) !important;
}

.ds-card-actions .btn-card-cart:disabled,
.ds-card-actions .btn-card-buy:disabled {
  opacity: 0.45;
  pointer-events: none;
}

/* Kill cramped home.php mobile rules on new cards */
@media (max-width: 768px) {
  .ds-product-card.product-card,
  .product-card.ds-product-card {
    padding: 10px !important;
    border-radius: 16px !important;
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
  }

  .ds-product-card .product-img-container {
    aspect-ratio: 1 / 1 !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    border-radius: 12px !important;
    margin-bottom: 2px;
  }

  .ds-product-card .product-details {
    padding: 8px 2px 2px !important;
    flex-grow: 1 !important;
    display: flex !important;
    flex-direction: column !important;
  }

  .ds-product-card .product-category {
    font-size: 10px !important;
    margin-bottom: 2px !important;
  }

  .ds-product-card .product-name {
    font-size: 13px !important;
    line-height: 1.35 !important;
    height: auto !important;
    min-height: 36px !important;
    margin-bottom: 6px !important;
    -webkit-line-clamp: 2;
  }

  .ds-product-card .product-price-container {
    margin: 0 0 10px !important;
    justify-content: center !important;
    gap: 6px !important;
    width: 100% !important;
  }

  .ds-product-card .product-price-sale {
    font-size: 16px !important;
    font-weight: 800 !important;
    color: #088736 !important;
  }

  .ds-product-card .product-price-regular {
    font-size: 11px !important;
  }

  .ds-product-card .discount-badge-abs {
    width: auto !important;
    height: auto !important;
    min-width: 0 !important;
    min-height: 0 !important;
    border-radius: 999px !important;
    padding: 3px 8px !important;
    font-size: 10px !important;
    top: 8px !important;
    left: 8px !important;
  }

  .ds-product-card .ds-card-actions,
  .ds-product-card .card-actions.ds-card-actions {
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
  }

  .ds-product-card .btn-card-cart,
  .ds-product-card .btn-card-buy {
    width: 100% !important;
    min-width: 0 !important;
    height: 40px !important;
    min-height: 40px !important;
    border-radius: 10px !important;
    padding: 0 6px !important;
  }

  .ds-product-card .btn-card-cart span,
  .ds-product-card .btn-card-buy span {
    display: inline !important;
  }

  /* Slightly roomier gutters between cards */
  #featuredProductsRow,
  #newArrivalsRow,
  #forYouProductsRow,
  .row.g-3 {
    --bs-gutter-x: 0.75rem;
    --bs-gutter-y: 0.75rem;
  }
}

@media (max-width: 420px) {
  .ds-product-card .ds-card-actions,
  .ds-product-card .card-actions.ds-card-actions {
    grid-template-columns: 1fr 1fr !important;
  }
  .ds-product-card .btn-card-cart {
    width: 100% !important;
    min-width: 0 !important;
    border-radius: 10px !important;
  }
  .ds-product-card .btn-card-cart span {
    display: inline !important;
  }
  .ds-product-card .btn-card-cart span,
  .ds-product-card .btn-card-buy span {
    font-size: 11px;
  }
  /* Shorter labels so they fit */
  .ds-product-card .btn-card-cart span { font-size: 10px; }
}

.ds-trust-strip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 8px 0 28px;
}
.ds-trust-item {
  background: #fff;
  border: 1px solid #e6eef5;
  border-radius: 14px;
  padding: 14px 12px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.ds-trust-item i {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 168, 197, 0.12);
  color: var(--ds-accent);
  font-size: 16px;
  flex-shrink: 0;
}
.ds-trust-item strong {
  display: block;
  font-size: 13px;
  color: #0f172a;
  margin-bottom: 2px;
}
.ds-trust-item span {
  font-size: 11px;
  color: #64748b;
  line-height: 1.35;
}

/* Cart drawer */
#cartDrawer .offcanvas-header {
  background: linear-gradient(135deg, #0B4F6C, #088736) !important;
}
#cartDrawer .cart-item-row.ds-cart-row {
  background: #fff;
  border: 1px solid #e8eef5;
  border-radius: 14px;
  padding: 12px !important;
  margin-bottom: 10px !important;
  border-bottom: none !important;
}
#cartDrawer .ds-qty-wrap {
  display: inline-flex;
  align-items: center;
  border: 1px solid #dbe5ef;
  border-radius: 999px;
  overflow: hidden;
  background: #f8fafc;
}
#cartDrawer .ds-qty-wrap button {
  width: 30px;
  height: 30px;
  border: 0;
  background: transparent;
  font-weight: 800;
}
#cartDrawer .ds-qty-wrap span {
  min-width: 28px;
  text-align: center;
  font-weight: 800;
  font-size: 13px;
}
#cartDrawer .ds-cart-empty {
  text-align: center;
  padding: 48px 20px;
}
#cartDrawer .ds-cart-empty .ds-empty-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: #eef6fb;
  color: var(--ds-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
}
#cartDrawer .cart-footer {
  position: sticky;
  bottom: 0;
  z-index: 5;
  background: #fff !important;
  box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.08);
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)) !important;
}
#cartDrawer #checkoutBtn {
  min-height: 50px;
  border-radius: 14px;
  background: linear-gradient(135deg, #0B4F6C, #00A8C5) !important;
  border: 0 !important;
  font-size: 15px;
}

/* Checkout modal ? centered (was margin:0.5rem ? stuck left) */
#checkoutModal .modal-dialog {
  margin-left: auto !important;
  margin-right: auto !important;
  margin-top: 1.75rem;
  margin-bottom: 1.75rem;
  max-width: 520px;
  width: calc(100% - 2rem);
}
#checkoutModal .modal-dialog-centered {
  min-height: calc(100% - 3.5rem);
  display: flex;
  align-items: center;
}
#checkoutModal .modal-content {
  border-radius: 18px;
  overflow: hidden;
  width: 100%;
}
#checkoutModal .modal-header.ds-checkout-header {
  background: #f4faf6 !important;
  border-bottom: 1px solid #e3efe8;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 18px 14px;
}
#checkoutModal .ds-checkout-head-main {
  flex: 1;
  min-width: 0;
}
#checkoutModal .ds-checkout-header .btn-close {
  margin-top: 2px;
  opacity: 0.55;
}
#checkoutModal .ds-checkout-header .modal-title {
  margin: 14px 0 0;
  font-size: 18px;
  font-weight: 800;
  color: #0f2f24;
  letter-spacing: -0.02em;
}
#checkoutModal .ds-step-label {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ds-accent);
  margin-bottom: 8px;
}
#checkoutModal .form-label {
  font-size: 13px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 6px;
}
#checkoutModal .form-control,
#checkoutModal .form-select {
  min-height: 46px;
  border-radius: 12px;
  border-color: #d7e3ee;
  font-size: 15px;
  background: #fff;
}
#checkoutModal .form-control:focus {
  border-color: #1f8a6e;
  box-shadow: 0 0 0 3px rgba(31, 138, 110, 0.12);
}
#checkoutModal .input-group-text {
  border-radius: 12px 0 0 12px;
  background: #f1f5f9;
  border-color: #d7e3ee;
  font-weight: 700;
  color: #475569;
}
#checkoutModal textarea.form-control {
  min-height: 78px;
}
#checkoutModal .is-invalid {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}
#checkoutModal .ds-field-error {
  color: #dc2626;
  font-size: 12px;
  font-weight: 600;
  margin-top: 4px;
  display: none;
}
#checkoutModal .is-invalid + .ds-field-error,
#checkoutModal .is-invalid ~ .ds-field-error {
  display: block;
}
#checkoutModal .ds-pay-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
#checkoutModal .ds-pay-opt {
  border: 1.5px solid #dbe5ef;
  border-radius: 12px;
  padding: 10px 8px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: #334155;
  background: #fff;
  cursor: pointer;
}
#checkoutModal .ds-pay-opt input {
  display: none;
}
#checkoutModal .ds-pay-opt.active,
#checkoutModal .ds-pay-opt:has(input:checked) {
  border-color: #1f8a6e;
  background: rgba(31, 138, 110, 0.08);
  color: #0f2f24;
}
#checkoutModal #submitOrderBtn,
#checkoutModal .ds-primary-btn {
  min-height: 50px;
  border-radius: 14px;
  background: linear-gradient(135deg, #187a61, #1f8a6e) !important;
  border: 0 !important;
  font-size: 15px;
}
#checkoutModal #submitOrderBtn {
  position: sticky;
  bottom: 0;
}
#checkoutModal .ds-order-lines {
  max-height: 140px;
  overflow: auto;
  margin-bottom: 8px;
}
#checkoutModal .ds-order-line {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px dashed #e8eef5;
  font-size: 12px;
}
#checkoutModal .ds-order-line img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid #e2e8f0;
}

@media (min-width: 768px) {
  .ds-card-actions {
    grid-template-columns: 1fr 1fr !important;
  }
  .ds-trust-strip {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 575.98px) {
  main.container,
  .container {
    padding-left: var(--ds-pad) !important;
    padding-right: var(--ds-pad) !important;
  }
  .section-title {
    font-size: 18px !important;
  }
  .ds-product-card .product-name {
    font-size: 13px;
    min-height: 36px;
    height: auto;
  }
  .ds-product-card .product-price-sale {
    font-size: 16px;
    font-weight: 800;
    color: var(--ds-primary);
  }
}

/* —— Mockup checkout / cart / success —— */
.ds-primary-btn {
  background: linear-gradient(135deg, #187a61, #1f8a6e) !important;
  border: 0 !important;
  color: #fff !important;
  min-height: 50px;
  border-radius: 14px;
}
.ds-primary-btn:hover { color: #fff !important; filter: brightness(1.05); }

.ds-checkout-steps {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0;
  width: 100%;
}
.ds-cstep {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 56px;
  flex: 0 0 auto;
}
.ds-cstep-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #c9ddd4;
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.ds-cstep-dot .num { line-height: 1; }
.ds-cstep-dot i {
  display: none;
  font-size: 15px;
  line-height: 1;
}
.ds-cstep-label {
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.ds-cstep.active .ds-cstep-dot {
  background: #1f8a6e;
  border-color: #1f8a6e;
  color: #fff;
  box-shadow: 0 6px 14px rgba(31, 138, 110, 0.28);
}
.ds-cstep.active .ds-cstep-label {
  color: #0f2f24;
}
.ds-cstep.done .ds-cstep-dot {
  background: #1f8a6e;
  border-color: #1f8a6e;
  color: #fff;
}
.ds-cstep.done .ds-cstep-dot .num { display: none; }
.ds-cstep.done .ds-cstep-dot i { display: inline-block; }
.ds-cstep.done .ds-cstep-label { color: #1f8a6e; }
.ds-cstep-line {
  flex: 1 1 auto;
  height: 2px;
  margin: 15px 8px 0;
  background: #d7e5de;
  border-radius: 99px;
  align-self: flex-start;
  transition: background 0.2s ease;
}
.ds-cstep-line.done {
  background: #1f8a6e;
}

.ds-addr-type { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ds-addr-chip {
  border: 1.5px solid #dbe5ef; border-radius: 12px; padding: 11px 10px;
  text-align: center; font-size: 13px; font-weight: 700; cursor: pointer; background: #fff;
  color: #475569;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.ds-addr-chip input { display: none; }
.ds-addr-chip:has(input:checked) {
  border-color: #1f8a6e; background: rgba(31,138,110,0.08); color: #0f2f24;
}

.ds-pay-list { display: flex; flex-direction: column; gap: 10px; }
.ds-pay-row {
  display: flex; align-items: center; gap: 12px;
  border: 1.5px solid #dbe5ef; border-radius: 14px; padding: 12px;
  background: #fff; cursor: pointer;
}
.ds-pay-row input { display: none; }
.ds-pay-row:has(input:checked) {
  border-color: #1f8a6e; background: rgba(31,138,110,0.06);
}
.ds-pay-row .ds-pay-check { opacity: 0; color: #1f8a6e; }
.ds-pay-row:has(input:checked) .ds-pay-check { opacity: 1; }
.ds-pay-row.is-soon { opacity: 0.55; cursor: not-allowed; }
.ds-pay-icon {
  width: 40px; height: 40px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  background: #eef7f3; color: #1f8a6e; font-size: 18px;
}
.ds-pay-icon.bkash { background: #ffe4ef; color: #e2136e; }
.ds-pay-icon.nagad { background: #fff3e0; color: #f59e0b; }
.ds-secure-note {
  background: #ecfdf5; color: #047857; border-radius: 12px;
  padding: 10px 12px; font-size: 13px; font-weight: 700;
  display: flex; align-items: center; gap: 8px;
}
.ds-review-card {
  background: #f8fafc; border: 1px solid #e6eef5; border-radius: 14px; padding: 12px;
}
.ds-success-sheet { border-radius: 20px !important; }
.ds-success-icon {
  width: 72px; height: 72px; margin: 8px auto 14px; border-radius: 50%;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff; display: flex; align-items: center; justify-content: center; font-size: 36px;
  box-shadow: 0 12px 28px rgba(16,185,129,0.35);
}
.ds-order-id-box {
  display: inline-block; background: #eef6fb; color: #0B4F6C;
  border-radius: 999px; padding: 8px 16px; font-size: 14px;
}
.ds-next-steps div {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 13px; color: #475569; margin-bottom: 8px;
}
.ds-next-steps span {
  width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0;
  background: #0B4F6C; color: #fff; font-size: 11px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
}

.ds-trust-mini {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  margin: 12px 0 20px;
}
.ds-trust-mini .item {
  background: #fff; border: 1px solid #e6eef5; border-radius: 12px;
  padding: 10px 8px; text-align: center; font-size: 11px; font-weight: 700; color: #0f172a;
}
.ds-trust-mini .item i { display: block; font-size: 18px; color: #00A8C5; margin-bottom: 4px; }

.ds-profile-menu {
  display: flex; flex-direction: column; gap: 10px; margin-top: 12px;
}
.ds-profile-menu a {
  display: flex; align-items: center; gap: 12px;
  background: #fff; border: 1px solid #e6eef5; border-radius: 14px;
  padding: 14px 16px; color: #0f172a; font-weight: 700; font-size: 14px;
  text-decoration: none;
}
.ds-profile-menu a i.lead {
  width: 40px; height: 40px; border-radius: 12px;
  background: #eef6fb; color: #0B4F6C;
  display: inline-flex; align-items: center; justify-content: center;
}
.ds-profile-menu a .chev { margin-left: auto; color: #94a3b8; }
.ds-profile-menu a.logout { color: #dc2626; }
.ds-profile-menu a.logout i.lead { background: #fee2e2; color: #dc2626; }

@media (max-width: 575.98px) {
  #checkoutModal .modal-dialog {
    margin: 0 !important;
    max-width: 100%;
    width: 100%;
    height: 100%;
    min-height: 100%;
  }
  #checkoutModal .modal-content { height: 100%; border-radius: 0 !important; }
  #checkoutModal .modal-body { overflow-y: auto; }
}
