/**
 * ============================================================
 * ðŸ›’ FreshMarket Storefront â€” My Cart Page Styles
 * ------------------------------------------------------------
 * Dedicated layout styling for cart product rows
 * ============================================================
 */

/* ======================================================
   ðŸ§© Font Setup â€” Modern Sans Serif
====================================================== */
body,
.sf-cart-row,
.sf-cart-info,
.sf-cart-price,
.sf-cart-unit,
.sf-cart-availability,
.sf-cart-views,
.sf-cart-desc,
.sf-btn,
input,
button {
  font-family: "Segoe UI", "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}

/* === Layout Wrapper Adjustments === */
.sf-cart-body {
  margin-top: 0px; /* matches fixed header height */
}

/* === Fixed Header === */
.sf-cart-header-fixed {
  position: fixed;
  top: 106px; /* below mobile header */
  background: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  z-index: 200;
  display: flex;
  flex-direction: column;
  max-width: 1142px;      /* match storefront Main Grid max width */
  margin: 0 auto;         /* center it */
  width: 100%;
  box-sizing: border-box;
}

.sf-cart-subtotal-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 14px;
  border-bottom: 1px solid #e5e5e5;
  font-size: 0.9rem;
  color: var(--text-primary, #2d2d2d);
}

.sf-subtotal-label {
  font-weight: 500;
}

.sf-subtotal-amount {
  font-weight: 600;
}

.sf-cart-checkout-row {
  display: flex;
  justify-content: center;
  padding: 8px 0 10px;
}

.sf-btn-checkout-fixed {
  background: #ffd83b;
  color: #000;
  font-weight: 500;
  border: none;
  border-radius: 8px;
  padding: 10px 0;
  font-size: 0.95rem;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  width: auto !important;
  max-width: 90%;
}

.sf-btn-checkout-fixed:active {
  opacity: 0.85;
}

.sf-cart-wrapper {
    padding: 0px 0px;
    max-width: 1200px;
    margin-top: -60px;
}
/* ======================================================
   ðŸ›’ Cart Product Row â€” 2-Column Layout (Enhanced)
====================================================== */
.sf-cart-row {
  display: flex;
  align-items: stretch;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #eee;
}

/* Left & Right Columns */
.sf-cart-left,
.sf-cart-right {
  display: flex;
  flex-direction: column;
}

/* ----- LEFT COLUMN ----- */
.sf-cart-left {
  width: 100px;
  align-items: center;
  justify-content: space-between;
}

.sf-cart-photo-wrap {
  width: 100px;
  height: 120px;
  overflow: hidden;
  border-radius: 0px;
}

.sf-cart-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0px;
}

.sf-cart-qty-stepper {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
}

/* ----- RIGHT COLUMN ----- */
.sf-cart-right {
  flex: 1;
  justify-content: space-between;
  position: relative;
}

/* Info container */
.sf-cart-info {
  display: flex;
  flex-direction: column;
}

/* Product Name + Unit */
.sf-cart-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary, #222);
}

.sf-cart-unit {
  font-size: 0.8rem;
  color: var(--text-secondary, #666);
  margin-top: 0px;
}

/* Availability + Buys (now in one row) */
.sf-cart-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0px 0 0px;
}

.sf-cart-availability,
.sf-cart-views {
  font-size: 0.8rem;
  color: var(--text-secondary, #666);
}

.sf-cart-availability {
  font-weight: 500;
  text-transform: capitalize;
}

.sf-cart-views {
  color: #777;
}

/* ======================================================
   ðŸ’° Price Font â€” Tall Condensed Type
====================================================== */
.sf-cart-price {
  display: inline-flex;
  align-items: flex-start;
  font-family: "Roboto Condensed", "Inter Tight", "Helvetica Neue", Arial, sans-serif;
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--color-primary, #28a745);
  letter-spacing: -0.02em;
  gap: 2px;
  margin-top: 4px;
}

/* Sub-elements keep tall rhythm */
.sf-cur-symbol {
  font-size: 0.8em;
  line-height: 1;
  margin-top: 0.15em;
}

.sf-cur-whole {
  font-size: 1em;
  line-height: 1;
}

.sf-cur-cents {
  font-size: 0.7em;
  line-height: 1;
  vertical-align: super;
  margin-top: -0.15em;
}

/* Description / Typical Menus */
.sf-cart-desc {
  font-size: 0.8rem;
  line-height: 1.2;
  color: var(--text-secondary, #555);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  margin-top: 2px;
}

/* ======================================================
   ðŸ—‘ Remove Button (Bottom-Aligned)
====================================================== */
.sf-cart-bottom-row {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-top: 8px;
}

.sf-cart-remove-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  color: #d32f2f;
  border: 1px solid #f3c1c1;
  background: #fff0f0;
  border-radius: 10px;
  padding: 4px 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  height: 26px;
}

.sf-cart-remove-btn:hover {
  background: #ffe6e6;
}

.sf-cart-remove-btn svg {
  width: 20px;
  height: 20px;
}
/* ======================================================
   âœ… Forced Override â€” Borderless Unified Stepper
====================================================== */
.sf-cart-row .sf-cart-qty-box {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: 2px solid #ffd83b !important;
  border-radius: 10px !important;
  overflow: hidden !important;
  height: 26px !important;
  background: #fff !important;
}

.sf-cart-row .sf-cart-qty-box .sf-qty-btn {
  width: 32px !important;
  height: 36px !important;
  border: none !important;
  background: transparent !important;
  font-size: 18px !important;
  font-weight: 600 !important;
  color: #333 !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: background 0.2s ease !important;
}

.sf-cart-row .sf-cart-qty-box .sf-qty-btn:hover {
  background: #f2f2f2 !important;
}

.sf-cart-row .sf-cart-qty-box .sf-cart-qty-input,
.sf-cart-row .sf-cart-qty-box input.sf-cart-qty-input {
  width: 36px !important;
  height: 26px !important;
  border: none !important;
  outline: none !important;
  text-align: center !important;
  font-size: 15px !important;
  background: transparent !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}

.sf-cart-row .sf-cart-qty-box input.sf-cart-qty-input::-webkit-outer-spin-button,
.sf-cart-row .sf-cart-qty-box input.sf-cart-qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none !important;
  margin: 0 !important;
}

.sf-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.sf-card-header h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Generic icon styling — reusable for all cards */
.sf-card-header i,
.sf-header-icon {
  width: 18px;
  height: 18px;
  color: var(--color-primary);
  flex-shrink: 0;
}

/* ======================================================
   RECOMMENDED CAROUSEL — CART PAGE WIDTH FIX
====================================================== */

/* Each carousel item */
.sf-recommended-carousel .sf-bestseller-card {
  flex: 0 0 280px;        /* ✅ card width */
  max-width: 150px;
}

/* Ensure horizontal layout */
.sf-recommended-carousel .sf-categories-carousel {
  display: flex;
  flex-wrap: nowrap;
  gap: 14px;
  overflow-x: auto;
  scroll-behavior: smooth;
}

/* Prevent cards from stretching */
.sf-recommended-carousel .storefront-product-card {
  width: 100%;
}

/* Optional: hide scrollbar (same as home) */
.sf-recommended-carousel .sf-categories-carousel::-webkit-scrollbar {
  display: none;
}
.sf-recommended-carousel .sf-categories-carousel {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* ======================================================
   CART — RECOMMENDED PRODUCTS (DISPLAY ONLY)
====================================================== */

.sf-recommended-carousel .sf-row-main-home {
  display: none !important;
}

.sf-recommended-carousel .sf-pqty {
  display: none !important;
}

.sf-recommended-carousel .sf-add-btn {
  display: none !important;
}



/* === Availability Colors === */
.sf-availability-low { color: #e74c3c; }
.sf-availability-medium { color: #f39c12; }
.sf-availability-high { color: #27ae60; }

@media (min-width: 769px) {
  .sf-cart-wrapper { margin-top: 0px; }
}
