/* ==========================================================
   Storefront compact tweaks: product grids/cards + toast alerts
   Loaded last (after style.css / shopvista.css)
   ========================================================== */

/* ---------- Product grids ---------- */
html body .store-product-grid,
html body .store-products-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)) !important;
  gap: 14px !important;
  overflow: visible;
}
@media (max-width: 768px) {
  html body .store-product-grid,
  html body .store-products-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px !important; }
  /* home "hot deals" horizontal scroller keeps its own layout */
  html body .sv-hot-deals .store-product-grid { display: flex !important; gap: 10px !important; }
  html body .sv-hot-deals .product-item-card { flex: 0 0 150px !important; }
}
@media (min-width: 1100px) {
  html body .store-product-grid,
  html body .store-products-grid { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; }
}

/* ---------- Cards ---------- */
html body .product-item-card,
html body .store-product-card {
  position: relative; display: flex !important; flex-direction: column !important; height: auto !important; min-width: 0;
  border-radius: 14px !important; background: #fff !important; border: 1px solid var(--sv-line, #e8eef8) !important;
  box-shadow: 0 3px 12px rgba(15, 40, 100, .05) !important; overflow: hidden !important;
}
html body .product-item-card .product-img-link,
html body .store-product-card .product-card-thumb-link { display: block !important; width: auto !important; aspect-ratio: 1 / 1 !important; height: auto !important; overflow: hidden !important; background: var(--sv-bg, #f6f9ff) !important; border-radius: 12px !important; margin: 6px 6px 0 !important; }
html body .product-item-card .product-img-link img,
html body .store-product-card .product-card-thumb { width: 100% !important; height: 100% !important; object-fit: cover !important; display: block; }

html body .product-item-card .product-card-body,
html body .store-product-card .product-card-info { padding: 7px 9px 9px !important; gap: 3px !important; display: flex !important; flex-direction: column !important; flex: 1; }
html body .product-category-tag, html body .product-card-cat { font-size: 10px !important; color: #94a3b8 !important; margin: 0 !important; }
html body .product-card-title, html body .product-card-title a { font-size: 12.5px !important; line-height: 1.35 !important; font-weight: 700 !important; margin: 0 !important; min-height: 0 !important; display: -webkit-box !important; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: #0f172a; }
html body .product-title-link { text-decoration: none; }

html body .product-price-row { display: flex !important; align-items: baseline; flex-wrap: wrap; gap: 0 6px !important; margin: 1px 0 4px !important; min-height: 0 !important; }
html body .product-price-row .sale-price { font-size: 14px !important; font-weight: 800 !important; color: var(--sv-blue, #0b69f0) !important; line-height: 1.2; }
html body .product-price-row .current-price { font-size: 14px !important; font-weight: 800 !important; color: var(--sv-blue, #0b69f0) !important; line-height: 1.2; }
html body .product-price-row .old-price, html body .product-price-row .regular-price { font-size: 10.5px !important; color: #94a3b8 !important; text-decoration: line-through; }

html body .product-badge-discount, html body .store-product-card .badge-discount { top: 10px !important; left: 10px !important; right: auto !important; font-size: 10px !important; font-weight: 800; padding: 2px 7px !important; border-radius: 999px !important; line-height: 1.3; }

/* actions: one slim row (specific + !important to beat shopvista.css) */
html body .product-card-actions,
html body .product-card-body .product-card-actions,
html body .product-card-info .product-card-actions,
html body .store-product-card .product-card-info > div:last-child { display: flex !important; flex-wrap: nowrap !important; align-items: center !important; gap: 5px !important; margin-top: auto !important; }
html body .product-card-actions .btn-card-order,
html body .product-card-actions .product-card-btn-order {
  order: 1 !important; flex: 1 1 auto !important; width: auto !important; min-width: 0 !important; height: 28px !important; min-height: 0 !important; max-height: 28px !important; box-sizing: border-box !important; padding: 0 6px !important;
  font-size: 11.5px !important; font-weight: 700 !important; border-radius: 8px !important; box-shadow: none !important;
  display: inline-flex !important; align-items: center; justify-content: center; gap: 4px; white-space: nowrap; line-height: 1;
}
html body .product-card-actions .btn-card-order svg { width: 11px !important; height: 11px !important; }
html body .product-card-actions .btn-card-add-cart,
html body .product-card-actions .btn-card-cart-icon {
  order: 0 !important; flex: 0 0 28px !important; width: 28px !important; min-width: 28px !important; height: 28px !important; min-height: 0 !important; max-height: 28px !important; box-sizing: border-box !important; padding: 0 !important; font-size: 0 !important;
  border-radius: 8px !important; box-shadow: none !important; gap: 0 !important;
  display: inline-flex !important; align-items: center; justify-content: center;
}
html body .product-card-actions .btn-card-add-cart svg,
html body .product-card-actions .btn-card-cart-icon svg { width: 14px !important; height: 14px !important; }
html body .product-card-actions .btn-card-cart-icon i { font-size: 13px !important; }
html body .product-card-actions .btn-card-add-cart::after,
html body .product-card-actions .btn-card-cart-icon::after { display: none !important; content: none !important; }

/* section headers a bit smaller */
html body .section-main-title { font-size: 19px !important; }
html body .section-sub-title { font-size: 12.5px !important; }
@media (max-width: 768px) {
  html body .section-main-title { font-size: 17px !important; }
  html body .product-card-title { font-size: 12.5px !important; }
  html body .product-price-row .sale-price { font-size: 14px !important; }
}

/* ---------- Toast alerts (SweetAlert2) ---------- */
.swal2-container.swal2-top, .swal2-container.swal2-top-end { padding: 10px 12px !important; }
.swal2-popup.swal2-toast.sv-toast {
  width: auto !important; max-width: min(92vw, 340px) !important; min-width: 0 !important;
  padding: 9px 14px 9px 10px !important; border-radius: 12px !important; background: #fff !important;
  border: 1px solid var(--sv-line, #e8eef8); box-shadow: 0 10px 30px rgba(15, 40, 100, .18) !important;
  display: flex !important; align-items: center !important; grid-template-columns: none !important;
}
.sv-toast .swal2-icon { flex: 0 0 auto; width: 24px !important; height: 24px !important; min-width: 24px !important; margin: 0 9px 0 0 !important; border-width: 2px !important; font-size: 10px !important; }
.sv-toast .swal2-icon .swal2-icon-content { font-size: 15px !important; }
.sv-toast .swal2-icon.swal2-warning { border-color: #f59e0b !important; color: #f59e0b !important; }
.sv-toast .swal2-icon.swal2-success [class^='swal2-success-line'] { height: 3px !important; }
.sv-toast .swal2-html-container, .sv-toast .swal2-title { text-align: left !important; }
.sv-toast .swal2-title { margin: 0 !important; padding: 0 !important; font-size: 13.5px !important; font-weight: 700 !important; line-height: 1.3 !important; color: #0f172a !important; }
.sv-toast .swal2-html-container { margin: 2px 0 0 !important; padding: 0 !important; font-size: 12px !important; line-height: 1.4 !important; color: #64748b !important; }
.sv-toast .swal2-timer-progress-bar { height: 2px !important; background: rgba(var(--sv-rgb, 11, 105, 240), .35) !important; }
.sv-toast .swal2-close { width: 20px; height: 20px; font-size: 18px; }

/* ---------- Track Your Order ---------- */
html body .store-tracking-main .tracking-container { max-width: 760px; }
html body .store-tracking-main .track-title { font-size: 19px !important; }
html body .store-tracking-main .track-subtitle { font-size: 12.5px !important; }
html body .store-tracking-main .track-card { border-radius: 16px !important; padding: 16px !important; }
html body .store-tracking-main .co-input { height: 42px !important; font-size: 14px !important; border-radius: 11px !important; }
html body .store-tracking-main .btn-track-submit { height: 42px !important; font-size: 14px !important; border-radius: 11px !important; }
.track-phone-orders { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 12px; padding-top: 12px; border-top: 1px dashed #dbe5f5; }
.track-phone-orders .tpo-label { width: 100%; font-size: 12px; font-weight: 700; color: #64748b; }
.track-phone-orders a { font-size: 12px; font-weight: 700; padding: 5px 11px; border-radius: 999px; background: #eef4ff; color: var(--sv-blue, #0b69f0); text-decoration: none; border: 1px solid var(--sv-line, #dbe8fb); }
.track-phone-orders a.active { background: var(--sv-blue, #0b69f0); color: #fff; border-color: var(--sv-blue, #0b69f0); }


/* ==========================================================
   Slim, sticky (scrolling) header
   ========================================================== */
/* overflow-x:hidden on html+body breaks position:sticky -> use clip */
html, html body { overflow-x: clip !important; }

html body .store-top-bar { padding: 0 !important; height: auto !important; min-height: 0 !important; }
html body .store-top-bar .container { padding-top: 0 !important; padding-bottom: 0 !important; }
html body .store-top-bar .marquee-track { height: 26px !important; display: flex; align-items: center; overflow: hidden; }
html body .store-top-bar .marquee-content, html body .store-top-bar .marquee-content span { font-size: 11px !important; line-height: 26px !important; }

html body .store-main-header {
  position: sticky !important; top: 0 !important; z-index: 990 !important;
  border-radius: 0 0 16px 16px !important; background: rgba(255, 255, 255, .94) !important;
  -webkit-backdrop-filter: saturate(180%) blur(10px); backdrop-filter: saturate(180%) blur(10px);
  box-shadow: 0 2px 12px rgba(15, 40, 100, .07) !important;
  transition: transform .28s ease, box-shadow .2s ease;
  will-change: transform;
}
html body .store-main-header.hdr-scrolled { box-shadow: 0 6px 20px rgba(15, 40, 100, .12) !important; }
html body .store-main-header.hdr-hidden { transform: translateY(-110%); }
html body .store-header-inner { min-height: 50px !important; padding: 5px 0 !important; gap: 8px !important; }
html body .header-menu-btn { width: 34px !important; height: 34px !important; min-width: 34px !important; padding: 6px !important; border-radius: 10px !important; }
html body .header-menu-btn svg { width: 20px !important; height: 20px !important; }
html body .store-logo-icon { width: 30px !important; height: 30px !important; border-radius: 10px !important; font-size: 14px !important; box-shadow: 0 3px 8px rgba(var(--sv-rgb, 11, 105, 240), .22) !important; }
html body .store-brand-link { gap: 7px !important; }
html body .store-brand-text { font-size: 16px !important; letter-spacing: -.2px !important; }
html body .store-brand-logo-img, html body .store-brand-link img { max-height: 32px !important; width: auto; }
html body .header-icon-cart, html body .header-action-btn { width: 36px !important; height: 36px !important; min-width: 36px !important; border-radius: 11px !important; }
html body .header-icon-cart svg, html body .header-action-btn svg { width: 18px !important; height: 18px !important; }
html body .store-cart-badge { min-width: 17px !important; height: 17px !important; font-size: 10px !important; line-height: 17px !important; top: -5px !important; right: -5px !important; padding: 0 4px !important; }

/* mobile search row */
html body .sv-mobile-search { padding: 8px 0 2px !important; }
html body .sv-mobile-search .sv-msearch-btn { height: 38px !important; font-size: 13px !important; border-radius: 12px !important; }
html body .sv-mobile-search .sv-msearch-filter, html body .sv-mobile-search .sv-msearch > button:last-child { width: 38px !important; height: 38px !important; min-width: 38px !important; border-radius: 12px !important; }
html body .sv-mobile-search i { font-size: 14px !important; }

/* desktop header */
@media (min-width: 992px) {
  html body .store-header-inner { min-height: 58px !important; }
  html body .store-header-nav-list a { font-size: 13.5px !important; padding: 7px 11px !important; }
  html body .store-main-header { border-radius: 0 !important; }
}
