/* ==========================================================================
   Media Sphere Limited — Laravel storefront overrides for the Besa theme
   Matches the original cameratrader.ng design (Besa "Home 2" template):
   navy #16133d header, indigo #4f46e5 accents, Open Sans + Outfit fonts.
   ========================================================================== */

:root {
  --tb-theme-color: #4f46e5;
  --tb-theme-color-hover: #4338ca;
  --tb-theme-second-color: #4f46e5;
  --tb-bg-buy-now: #6366f1;
  --ms-navy: #1e1b4b;
  --ms-dark-navy: #16133d;
  --ms-accent: #6366f1;
  --ms-body-bg: #f5f5f5;
  --ms-border: #e8e8e8;
  --ms-text: #333;
  --ms-muted: #777;
}

html, body {
  background: var(--ms-body-bg);
  font-family: 'Open Sans', 'Segoe UI', Arial, sans-serif;
  color: var(--ms-text);
  font-size: 14px;
  line-height: 1.6;
}
h1, h2, h3, h4, h5, h6, .heading-tbay-title .title {
  font-family: 'Outfit', 'Open Sans', sans-serif;
  color: var(--ms-navy);
}
a { color: var(--tb-theme-color); }
a:hover { color: var(--tb-theme-color-hover); }

img { max-width: 100%; }

/* ===== Top utility bar (Amazon/Jumia style) ===== */
.ms-topbar {
  background: #0e0c28;
  color: #c7cee3;
  font-size: 12.5px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.ms-topbar-inner { display: flex; justify-content: space-between; align-items: center; min-height: 36px; gap: 16px; flex-wrap: wrap; padding: 4px 0; }
.ms-topbar-left, .ms-topbar-right { display: flex; align-items: center; gap: 18px; }
.ms-topbar-item { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.ms-topbar-item i { color: var(--ms-accent); font-size: 12px; }
.ms-topbar-right a { color: #c7cee3; display: inline-flex; align-items: center; gap: 6px; transition: color .2s; }
.ms-topbar-right a i { font-size: 12px; color: var(--ms-accent); }
.ms-topbar-right a:hover { color: #fff; }

/* ===== Header (solid navy, Amazon-style) ===== */
.ms-header {
  background: #16133d;
  border-bottom: 3px solid var(--tb-theme-color);
}
.ms-header .ms-header-main { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 14px 0; flex-wrap: wrap; }
.ms-header .ms-logo { display: inline-flex; align-items: center; }
.ms-header .ms-logo img { height: 46px; transition: opacity .2s; }
.ms-header .ms-logo:hover img { opacity: .85; }

/* Search bar — clean white bar, rounded */
.ms-header-search { flex: 1; min-width: 260px; max-width: 600px; margin: 0 auto; }
.ms-header-search form {
  display: flex; width: 100%; height: 44px;
  background: #fff; border-radius: 8px; overflow: hidden;
  border: 2px solid #fff; transition: border-color .2s;
}
.ms-header-search form:focus-within { border-color: var(--ms-accent); }
.ms-header-search .select-category { display: flex; align-items: center; background: #f1f3f9; border-right: 1px solid #e5e8f0; }
.ms-header-search .select-category select {
  border: none; background: transparent; padding: 0 10px 0 14px; font-size: 13px; height: 40px;
  max-width: 132px; color: #333; cursor: pointer; outline: none; font-weight: 600;
}
.ms-header-search input[type=text] {
  flex: 1; border: 0; padding: 0 16px; font-size: 14px; color: #333; min-width: 0; outline: none;
}
.ms-header-search button {
  border: none; background: var(--tb-theme-color); color: #fff;
  padding: 0 24px; font-size: 14px; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; gap: 7px; transition: background .2s;
}
.ms-header-search button:hover { background: var(--tb-theme-color-hover); }

/* Action icons */
.ms-header-actions { display: flex; align-items: center; gap: 4px; }
.ms-header-actions .ms-hact {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; color: #fff; position: relative; min-width: 60px; padding: 8px 12px;
  border-radius: 6px; transition: background .15s;
}
.ms-header-actions .ms-hact:hover { background: rgba(255,255,255,.10); }
.ms-header-actions .ms-hact i, .ms-header-actions .ms-hact svg { font-size: 20px; color: #fff; }
.ms-header-actions .ms-hact span.ms-hlabel { color: #dbe1f2; font-size: 11.5px; font-weight: 600; }
.ms-header-actions .ms-hact span.ms-hlabel-sm { font-size: 11px; }
.ms-header-actions .ms-hact .ms-count {
  position: absolute; top: 2px; left: 50%; transform: translateX(10px);
  background: #f43f5e; color: #fff; font-size: 11px; font-weight: 800; min-width: 19px; height: 19px;
  border-radius: 50%; display: flex; align-items: center; justify-content: center; padding: 0 5px;
  box-shadow: 0 2px 6px rgba(244,63,94,.5);
}
.ms-header-actions .ms-hact .ms-count-wish { background: #f59e0b; box-shadow: 0 2px 6px rgba(245,158,11,.5); }

/* Login / register buttons in the header */
.ms-header-actions .ms-hact-login {
  background: var(--tb-theme-color);
  border-radius: 6px; min-width: 0; padding: 9px 20px; flex-direction: row; gap: 8px;
}
.ms-header-actions .ms-hact-login:hover { background: var(--tb-theme-color-hover); }
.ms-header-actions .ms-hact-login i { font-size: 15px; }
.ms-header-actions .ms-hact-login span.ms-hlabel { color: #fff; font-size: 13px; }
.ms-header-actions .ms-hact-register { flex-direction: row; gap: 8px; min-width: 0; padding: 9px 16px; border: 1px solid rgba(255,255,255,.3); border-radius: 6px; }
.ms-header-actions .ms-hact-register:hover { border-color: #fff; background: rgba(255,255,255,.08); }

/* ===== User menu (logged in) ===== */
.ms-user-menu { position: relative; margin-right: 4px; }
.ms-user-btn {
  display: flex; align-items: center; gap: 10px; background: transparent;
  border: 1px solid rgba(255,255,255,.25); color: #fff; padding: 6px 14px 6px 6px;
  border-radius: 6px; cursor: pointer; transition: background .15s, border-color .15s; font-family: inherit;
}
.ms-user-btn:hover { background: rgba(255,255,255,.10); border-color: rgba(255,255,255,.4); }
.ms-user-avatar {
  width: 34px; height: 34px; border-radius: 50%; flex: 0 0 34px;
  background: var(--tb-theme-color); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 15px;
}
.ms-user-avatar-lg { width: 44px; height: 44px; flex-basis: 44px; font-size: 18px; }
.ms-user-meta { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.2; }
.ms-user-hello { font-size: 10.5px; color: #aab4d8; text-transform: uppercase; letter-spacing: .4px; }
.ms-user-name { font-size: 13.5px; font-weight: 700; max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ms-user-caret { font-size: 10px; color: #aab4d8; margin-left: 2px; transition: transform .2s; }
.ms-user-menu.open .ms-user-caret { transform: rotate(180deg); }

.ms-user-dropdown {
  position: absolute; top: calc(100% + 10px); right: 0; z-index: 60;
  background: #fff; border-radius: 10px; width: 250px; overflow: hidden;
  box-shadow: 0 20px 50px rgba(22,19,61,.25); border: 1px solid #eef0f6;
  opacity: 0; visibility: hidden; transform: translateY(8px); transition: all .22s ease;
}
.ms-user-menu.open .ms-user-dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.ms-user-drop-head {
  display: flex; align-items: center; gap: 12px; padding: 16px;
  background: #f5f6ff; border-bottom: 1px solid #e5e9f7;
}
.ms-user-drop-head strong { display: block; color: var(--ms-navy); font-size: 14px; }
.ms-user-drop-head span { color: var(--ms-muted); font-size: 12px; word-break: break-all; }
.ms-user-dropdown a, .ms-user-logout {
  display: flex; align-items: center; gap: 11px; padding: 11px 16px;
  color: var(--ms-text); font-size: 13.5px; font-weight: 500; text-decoration: none; transition: background .15s;
  width: 100%; text-align: left; border: 0; background: #fff; cursor: pointer; font-family: inherit;
}
.ms-user-dropdown a i, .ms-user-logout i { width: 18px; text-align: center; color: var(--tb-theme-color); font-size: 14px; }
.ms-user-dropdown a:hover { background: #f5f6ff; color: var(--tb-theme-color); }
.ms-user-drop-sep { height: 1px; background: #eef0f6; margin: 4px 0; }
.ms-user-logout { color: #dc2626; }
.ms-user-logout i { color: #dc2626; }
.ms-user-logout:hover { background: #fef2f2; color: #b91c1c; }
.ms-badge-inline {
  display: inline-block; font-size: 9.5px; font-weight: 800; text-transform: uppercase;
  padding: 2px 8px; border-radius: 999px; margin-left: 6px;
}
.ms-badge-inline.pending { background: #fef3c7; color: #92400e; }
.ms-badge-inline.approved { background: #ecfdf5; color: #047857; }
.ms-badge-inline.rejected { background: #fef2f2; color: #b91c1c; }

/* ===== Nav (white) — category strip with "All Categories" dropdown ===== */
.ms-nav { background: #fff; border-bottom: 1px solid #e8e8e8; box-shadow: 0 2px 8px rgba(22,19,61,.04); }
.ms-nav .container { display: flex; align-items: center; position: relative; }
.ms-nav-cats { position: relative; }
.ms-nav-cats-btn {
  display: flex; align-items: center; gap: 9px; height: 44px; padding: 0 18px;
  background: var(--tb-theme-color); color: #fff; border: none; cursor: pointer;
  font-family: inherit; font-size: 14px; font-weight: 700; border-radius: 6px 6px 0 0;
}
.ms-nav-cats-btn:hover { background: var(--tb-theme-color-hover); }
.ms-nav-cats-menu {
  position: absolute; top: 100%; left: 0; z-index: 55; width: 300px; max-height: 70vh; overflow: auto;
  background: #fff; border: 1px solid #e8e8e8; border-top: 2px solid var(--tb-theme-color);
  border-radius: 0 0 8px 8px; box-shadow: 0 16px 40px rgba(22,19,61,.15);
  opacity: 0; visibility: hidden; transform: translateY(6px); transition: all .2s ease;
}
.ms-nav-cats:hover .ms-nav-cats-menu, .ms-nav-cats:focus-within .ms-nav-cats-menu {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.ms-nav-cats-menu a {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px;
  color: var(--ms-text); font-size: 14px; font-weight: 500; border-bottom: 1px solid #f4f5f9;
  white-space: nowrap;
}
.ms-nav-cats-menu a i { width: 16px; text-align: center; color: var(--tb-theme-color); font-size: 13px; }
.ms-nav-cats-menu a:hover { background: #f5f6ff; color: var(--tb-theme-color); }
.ms-nav-links { display: flex; align-items: center; overflow-x: auto; margin-left: 18px; }
.ms-nav-links a { padding: 13px 16px; color: var(--ms-navy); font-weight: 600; font-size: 14px; white-space: nowrap; transition: color .15s; }
.ms-nav-links a:hover, .ms-nav-links a.active { color: var(--tb-theme-color); }

/* ===== Main content ===== */
.ms-main { padding: 28px 0 20px; min-height: 60vh; }

/* ===== Breadcrumbs ===== */
.ms-breadcrumbs, .breadcrumbs { font-size: 13px; color: var(--ms-muted); margin-bottom: 20px; }
.ms-breadcrumbs a, .breadcrumbs a { color: var(--ms-navy); }
.ms-breadcrumbs a:hover, .breadcrumbs a:hover { color: var(--tb-theme-color); }

/* ===== Narrow container ===== */
.container-narrow { max-width: 920px; margin: 0 auto; }

/* ===== Hero ===== */
.ms-hero { position: relative; border-radius: 8px; overflow: hidden; margin-bottom: 36px; }
.ms-hero img { width: 100%; display: block; object-fit: cover; max-height: 420px; }
.ms-hero .ms-hero-overlay {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center;
  padding: 40px 48px; background: linear-gradient(90deg, rgba(22,19,61,0.85) 0%, rgba(22,19,61,0.35) 55%, rgba(22,19,61,0) 100%);
}
.ms-hero .ms-hero-overlay h2 { color: #fff; font-size: clamp(24px, 4vw, 40px); font-weight: 700; margin-bottom: 8px; }
.ms-hero .ms-hero-overlay p { color: #e5e7ff; font-size: 16px; margin-bottom: 18px; max-width: 460px; }
.ms-hero .ms-hero-overlay .btn { background: var(--tb-theme-color); border-color: var(--tb-theme-color); color: #fff; border-radius: 4px; padding: 10px 24px; font-weight: 600; }
.ms-hero .ms-hero-overlay .btn:hover { background: var(--tb-theme-color-hover); border-color: var(--tb-theme-color-hover); }
.ms-hero-arrows { position: absolute; right: 18px; bottom: 18px; display: flex; gap: 8px; }
.ms-hero-arrows button { width: 38px; height: 38px; border: 1px solid rgba(255,255,255,0.5); background: rgba(255,255,255,0.15); color: #fff; border-radius: 50%; cursor: pointer; font-size: 16px; }
.ms-hero-arrows button:hover { background: var(--tb-theme-color); border-color: var(--tb-theme-color); }
.ms-hero-dots { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); display: flex; gap: 6px; }
.ms-hero-dots span { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,0.5); cursor: pointer; }
.ms-hero-dots span.active { background: var(--tb-theme-color); }

/* ===== Section headings (theme style) ===== */
.ms-section { margin-bottom: 44px; }
.ms-section-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.ms-section-head h2 { font-size: 22px; font-weight: 600; color: var(--ms-navy); line-height: 32px; }
.ms-section-head a { font-size: 14px; line-height: 32px; padding-left: 6px; color: var(--ms-accent); font-weight: 600; }
.ms-section-head a:hover { color: var(--tb-theme-color-hover); }

/* ===== Category tiles ===== */
.ms-category-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 18px; }
.ms-category-tile {
  background: #fff; border: 1px solid var(--ms-border); border-radius: 8px; padding: 22px 14px;
  text-align: center; transition: box-shadow .2s, transform .2s;
}
.ms-category-tile:hover { box-shadow: 0 8px 24px rgba(22,19,61,0.10); transform: translateY(-3px); }
.ms-category-tile img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; margin-bottom: 10px; }
.ms-category-tile .ms-ct-icon { font-size: 40px; line-height: 64px; margin-bottom: 6px; }
.ms-category-tile h4 { font-size: 14px; font-weight: 600; color: var(--ms-navy); }
.ms-category-tile p { font-size: 12px; color: var(--ms-muted); margin: 2px 0 0; }

/* ===== Brand strip ===== */
.ms-brand-strip { display: flex; flex-wrap: wrap; gap: 12px; }
.ms-brand-chip { background: #fff; border: 1px solid var(--ms-border); padding: 9px 18px; border-radius: 20px; font-size: 13px; font-weight: 600; color: var(--ms-navy); }
.ms-brand-chip:hover { border-color: var(--tb-theme-color); color: var(--tb-theme-color); }

/* ===== Product grid + cards (original Besa look) ===== */
.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(235px, 1fr)); gap: 22px; }
.product-card {
  background: #fff; border: 1px solid var(--ms-border); border-radius: 8px; overflow: hidden;
  display: flex; flex-direction: column; transition: box-shadow .25s;
}
.product-card:hover { box-shadow: 0 12px 32px rgba(22,19,61,0.12); }
.product-card .product-thumb { position: relative; background: #f7f8fa; text-align: center; }
.product-card .product-thumb a.ms-pimg { display: block; width: 100%; aspect-ratio: 1/1; }
.product-card .product-thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-card .product-thumb .badges { position: absolute; top: 10px; left: 10px; display: flex; gap: 6px; z-index: 2; }
.product-card .badge-sale, .product-card .badge-sold { font-size: 11px; padding: 4px 9px; border-radius: 4px; color: #fff; font-weight: 600; }
.product-card .badge-sale { background: #f97316; }
.product-card .badge-sold { background: #9f1239; }
.product-card .quick-actions {
  position: absolute; right: 10px; top: 10px; display: flex; flex-direction: column; gap: 6px; z-index: 2;
}
.product-card .quick-actions form { margin: 0; }
.product-card .quick-actions .qbtn {
  width: 34px; height: 34px; border: 1px solid var(--ms-border); background: #fff; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 15px; color: var(--ms-navy);
}
.product-card .quick-actions .qbtn:hover { background: var(--tb-theme-color); border-color: var(--tb-theme-color); color: #fff; }
.product-card .product-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 5px; flex: 1; }
.product-card .product-cats { font-size: 12px; color: var(--ms-muted); text-transform: uppercase; letter-spacing: .4px; }
.product-card .product-cats a { color: var(--ms-muted); }
.product-card .product-cats a:hover { color: var(--tb-theme-color); }
.product-card .product-title { font-size: 15px; font-weight: 600; color: var(--ms-navy); line-height: 1.35; font-family: 'Outfit', sans-serif; }
.product-card .product-title a { color: inherit; }
.product-card .product-title a:hover { color: var(--tb-theme-color); }
.product-card .product-rating { font-size: 13px; color: #f59e0b; }
.product-card .product-price { font-size: 16px; font-weight: 700; color: var(--tb-theme-color); margin-top: 2px; }
.product-card .product-price .old { font-size: 12px; color: var(--ms-muted); text-decoration: line-through; font-weight: 400; margin-right: 8px; }
.product-card .product-actions { margin-top: auto; display: flex; gap: 8px; padding-top: 8px; }
.product-card .product-actions .btn { flex: 1; }

/* ===== Buttons (override Bootstrap) ===== */
.btn { border-radius: 4px; padding: 9px 18px; font-size: 14px; font-weight: 600; line-height: 1.5; }
.btn-primary { background: var(--tb-theme-color); border-color: var(--tb-theme-color); color: #fff; }
.btn-primary:hover, .btn-primary:focus { background: var(--tb-theme-color-hover); border-color: var(--tb-theme-color-hover); color: #fff; }
.btn-outline-primary { color: var(--tb-theme-color); border-color: var(--tb-theme-color); }
.btn-outline-primary:hover { background: var(--tb-theme-color); color: #fff; }
.btn-accent { background: var(--ms-bg-buy-now); border-color: var(--ms-bg-buy-now); color: #fff; }
.btn-accent:hover { background: var(--tb-theme-color); border-color: var(--tb-theme-color); color: #fff; }
.btn-danger { background: #dc2626; border-color: #dc2626; }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-lg { padding: 12px 26px; font-size: 16px; }

/* ===== Shop layout ===== */
.shop-layout { display: grid; grid-template-columns: 270px 1fr; gap: 26px; align-items: start; }
@media (max-width: 860px) { .shop-layout { grid-template-columns: 1fr; } }
.sidebar { background: #fff; border: 1px solid var(--ms-border); border-radius: 8px; padding: 22px; }
.sidebar .widget { margin-bottom: 22px; }
.sidebar .widget:last-child { margin-bottom: 0; }
.sidebar .widget h4 {
  font-size: 15px; margin-bottom: 12px; color: var(--ms-navy); font-weight: 700; font-family: 'Outfit', sans-serif;
  border-bottom: 2px solid var(--tb-theme-color); padding-bottom: 8px;
}
.sidebar .widget ul { list-style: none; padding: 0; margin: 0; }
.sidebar .widget li { margin-bottom: 7px; }
.sidebar .widget label { font-weight: 400; font-size: 14px; display: flex; align-items: center; gap: 8px; cursor: pointer; }
.sidebar .widget input[type=checkbox], .sidebar .widget input[type=radio] { accent-color: var(--tb-theme-color); }
.sidebar .widget a { color: var(--ms-text); font-size: 14px; }
.sidebar .widget a:hover { color: var(--tb-theme-color); }
.sidebar .widget .count { color: var(--ms-muted); font-size: 12px; }
.price-filter { display: flex; gap: 8px; align-items: center; }
.price-filter input { width: 100%; padding: 8px 10px; border: 1px solid var(--ms-border); border-radius: 4px; }
.toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; gap: 12px; flex-wrap: wrap; }
.toolbar .result-count { color: var(--ms-muted); font-size: 14px; }
.toolbar select { padding: 8px 12px; border: 1px solid var(--ms-border); border-radius: 4px; font-size: 14px; }
.pagination { display: flex; gap: 6px; margin-top: 26px; flex-wrap: wrap; }
.pagination a, .pagination span.page-link { padding: 8px 13px; border: 1px solid var(--ms-border); border-radius: 4px; background: #fff; color: var(--ms-text); }
.pagination .active span.page-link, .pagination .active a { background: var(--tb-theme-color); color: #fff; border-color: var(--tb-theme-color); }
.pagination a:hover { border-color: var(--tb-theme-color); color: var(--tb-theme-color); }

/* ===== Star ratings (product cards + reviews) ===== */
.ms-stars { display: inline-flex; align-items: center; gap: 1px; line-height: 1; }
.ms-star { color: #d7dbe3; font-size: 13px; }
.ms-star.on, .ms-star.half { color: #f59e0b; }
.ms-star-num { margin-left: 6px; font-size: 12px; color: var(--ms-muted); }
.ms-star-num em { font-style: normal; font-weight: 600; color: var(--ms-text); }

/* ===== Shop: mobile filter toggle ===== */
.shop-filter-toggle { display: none; }
@media (max-width: 860px) {
  .shop-layout { grid-template-columns: 1fr; gap: 16px; }
  .shop-filter-toggle {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    width: 100%; padding: 11px 16px; background: var(--ms-navy, #16133d); color: #fff;
    border: none; border-radius: 8px; font-weight: 600; font-size: 14px; cursor: pointer;
  }
  .shop-filter-toggle:hover { background: var(--tb-theme-color, #4f46e5); }
  .sidebar { display: none; }
  .shop-layout.filter-open .sidebar { display: block; }
}

/* ===== Product detail ===== */
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
@media (max-width: 860px) { .product-detail { grid-template-columns: 1fr; } }
.product-gallery .main-image { background: #fff; border: 1px solid var(--ms-border); border-radius: 8px; aspect-ratio: 1/1; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.product-gallery .main-image img { width: 100%; height: 100%; object-fit: cover; }
.product-info h1 { font-size: 26px; color: var(--ms-navy); margin-bottom: 10px; font-weight: 700; }
.product-info .price { font-size: 26px; font-weight: 700; color: var(--tb-theme-color); margin-bottom: 12px; }
.product-info .price .old { color: var(--ms-muted); text-decoration: line-through; font-size: 18px; margin-right: 10px; font-weight: 400; }
.product-info .rating { color: #f59e0b; margin-bottom: 12px; }
.product-info .description { color: var(--ms-muted); margin-bottom: 20px; }
.product-info .meta { font-size: 13px; color: var(--ms-muted); margin-bottom: 6px; }
.stock-status { font-weight: 600; margin-bottom: 16px; }
.stock-status.in { color: #1a7f37; }
.stock-status.out { color: #b42323; }
.add-to-cart-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.qty { display: flex; align-items: center; border: 1px solid var(--ms-border); border-radius: 4px; overflow: hidden; background: #fff; }
.qty button { width: 40px; height: 46px; border: none; background: #f2f4f7; font-size: 18px; cursor: pointer; color: var(--ms-navy); }
.qty input { width: 52px; border: none; text-align: center; font-size: 15px; height: 46px; }
.variation-group { margin-bottom: 16px; }
.variation-group label { font-weight: 600; display: block; margin-bottom: 8px; color: var(--ms-navy); }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch { padding: 9px 14px; border: 1px solid var(--ms-border); border-radius: 6px; cursor: pointer; background: #fff; font-size: 13px; color: var(--ms-text); }
.swatch.selected { border-color: var(--tb-theme-color); background: #eef2ff; color: var(--tb-theme-color); font-weight: 600; }
.tabs { margin-top: 44px; }
.tabs .tab-list { display: flex; gap: 4px; border-bottom: 1px solid var(--ms-border); }
.tabs .tab-list button { padding: 12px 22px; border: none; background: none; font-size: 15px; font-weight: 700; color: var(--ms-muted); cursor: pointer; border-bottom: 2px solid transparent; font-family: 'Outfit', sans-serif; }
.tabs .tab-list button.active { color: var(--tb-theme-color); border-bottom-color: var(--tb-theme-color); }
.tabs .tab-panel { padding: 26px 0; line-height: 1.7; }
.review-item { border-bottom: 1px solid var(--ms-border); padding: 16px 0; }
.review-item .review-author { font-weight: 600; color: var(--ms-navy); }
.review-item .review-stars { color: #f59e0b; font-size: 14px; }
.review-item .review-meta { color: var(--ms-muted); font-size: 12px; }
.review-item p { margin-top: 6px; }

/* ===== Cards / page / empty ===== */
.ms-page, .page { background: #fff; border: 1px solid var(--ms-border); border-radius: 8px; padding: 28px; }
.ms-page-title, .page-title { font-size: 24px; color: var(--ms-navy); margin-bottom: 18px; font-weight: 700; }
.empty-state { text-align: center; padding: 56px 20px; color: var(--ms-muted); background: #fff; border: 1px solid var(--ms-border); border-radius: 8px; }

/* Admin-managed pages (rendered body) */
.ms-page-body { font-size: 15px; color: var(--ms-text); }
.ms-page-body h1, .ms-page-body h2, .ms-page-body h3, .ms-page-body h4, .ms-page-body h5 { color: var(--ms-navy); margin: 20px 0 10px; }
.ms-page-body h1 { font-size: 26px; } .ms-page-body h2 { font-size: 22px; } .ms-page-body h3 { font-size: 18px; } .ms-page-body h4 { font-size: 16px; }
.ms-page-body p { margin: 0 0 12px; }
.ms-page-body ul, .ms-page-body ol { margin: 0 0 12px 24px; }
.ms-page-body li { margin: 4px 0; }
.ms-page-body a { color: var(--tb-theme-color); text-decoration: underline; }
.ms-page-body img { max-width: 100%; height: auto; border-radius: 6px; margin: 8px 0; }
.ms-page-body blockquote { border-left: 3px solid var(--tb-theme-color); margin: 14px 0; padding: 6px 16px; background: #f7f7ff; color: var(--ms-text); }
.ms-page-body table { width: 100%; border-collapse: collapse; margin: 12px 0; }
.ms-page-body table th, .ms-page-body table td { border: 1px solid var(--ms-border); padding: 8px 10px; font-size: 14px; }
.ms-page-body table th { background: #f7f7ff; }
.empty-state .big { font-size: 48px; margin-bottom: 12px; }
.empty-state h3 { color: var(--ms-navy); margin-bottom: 6px; }

/* ===== Global badges (order status, sale labels) ===== */
.badge-sale { background: #f97316; color: #fff; font-size: 11px; padding: 4px 9px; border-radius: 4px; font-weight: 600; display: inline-block; }
.badge-sold { background: #9f1239; color: #fff; font-size: 11px; padding: 4px 9px; border-radius: 4px; font-weight: 600; display: inline-block; }
.status-badge { display: inline-block; padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.status-badge.status-pending { background: #fef3c7; color: #92400e; }
.status-badge.status-processing { background: #eef2ff; color: #4338ca; }
.status-badge.status-completed { background: #ecfdf5; color: #047857; }
.status-badge.status-cancelled, .status-badge.status-refunded { background: #fef2f2; color: #b91c1c; }

/* ===== Pagination (Bootstrap list markup) ===== */
.pagination li.page-item { margin: 0 3px; }
.pagination li.page-item a.page-link, .pagination li.page-item span.page-link {
  border: 1px solid var(--ms-border); border-radius: 4px !important; background: #fff;
  color: var(--ms-text); padding: 8px 13px;
}
.pagination li.page-item a.page-link:hover { border-color: var(--tb-theme-color); color: var(--tb-theme-color); }
.pagination li.active span.page-link { background: var(--tb-theme-color); border-color: var(--tb-theme-color); color: #fff; }
.pagination li.disabled span.page-link { color: #bbb; background: #f7f8fa; }

/* ===== Tables (override Bootstrap) ===== */
.table { background: #fff; }
.table th, .table td { padding: 12px 14px; border-bottom: 1px solid var(--ms-border); font-size: 14px; vertical-align: middle; }
.table thead th { background: #f7f8fa; font-weight: 700; color: var(--ms-navy); border-bottom: 1px solid var(--ms-border); }
.table img { width: 60px; height: 60px; object-fit: cover; border-radius: 6px; }
.table a { font-weight: 600; }

/* ===== Forms (Bootstrap-aware) ===== */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 14px; color: var(--ms-navy); }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 10px 14px; border: 1px solid var(--ms-border); border-radius: 4px;
  font-size: 14px; font-family: inherit; background: #fff; color: var(--ms-text);
}
.form-group textarea { min-height: 120px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }

/* ===== Alerts ===== */
.alert { border-radius: 6px; font-size: 14px; padding: 12px 16px; }
.alert-success { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.alert-error, .alert-danger { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.alert-info { background: #eef2ff; color: var(--tb-theme-color-hover); border-color: #c7d2fe; }

/* ===== Auth ===== */
.auth-box { max-width: 460px; margin: 30px auto; }
.auth-box .ms-page { padding: 32px; }
.auth-box h1, .auth-box .ms-page-title { font-size: 24px; }

/* ===== Cart / Checkout ===== */
.cart-layout { display: grid; grid-template-columns: 1fr 320px; gap: 26px; align-items: start; }
@media (max-width: 860px) { .cart-layout { grid-template-columns: 1fr; } }
.cart-totals { background: #fff; border: 1px solid var(--ms-border); border-radius: 8px; padding: 24px; position: sticky; top: 90px; }
.cart-totals h3 { margin-bottom: 16px; font-size: 18px; }
.cart-totals .line { display: flex; justify-content: space-between; padding: 8px 0; font-size: 14px; }
.cart-totals .line.total { border-top: 1px solid var(--ms-border); margin-top: 8px; padding-top: 14px; font-weight: 700; font-size: 17px; color: var(--ms-navy); }
.checkout-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 26px; align-items: start; }
@media (max-width: 860px) { .checkout-grid { grid-template-columns: 1fr; } }

/* ===== Redesigned Checkout ===== */
.ms-checkout-title { font-size: 26px; margin-bottom: 18px; }
.ms-checkout-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 26px; align-items: start; }
@media (max-width: 900px) { .ms-checkout-grid { grid-template-columns: 1fr; } }
.ms-checkout-fields { min-width: 0; }
.ms-checkout-card { background: #fff; border: 1px solid var(--ms-border); border-radius: 8px; padding: 24px; margin-bottom: 18px; }
.ms-checkout-card h2 { font-size: 18px; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--ms-border); }
.ms-checkout-hint { font-size: 13px; color: var(--ms-muted); margin-bottom: 12px; }
.ms-checkout-note { background: #e5f1fd; color: #155eab; border: 1px solid #bcd8f5; border-radius: 8px; padding: 12px 14px; font-size: 13px; }

/* Payment method options */
.ms-pay-option { display: flex; align-items: center; gap: 14px; border: 1.5px solid var(--ms-border); border-radius: 8px; padding: 14px 16px; margin-bottom: 10px; cursor: pointer; background: #fff; transition: border-color .2s, background .2s; }
.ms-pay-option:hover { border-color: #c7cdff; }
.ms-pay-option.active { border-color: var(--tb-theme-color); background: #f3f4ff; }
.ms-pay-option input[type="radio"] { width: 18px; height: 18px; accent-color: var(--tb-theme-color); flex: 0 0 auto; }
.ms-pay-badge { font-size: 24px; flex: 0 0 auto; }
.ms-pay-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ms-pay-text strong { font-size: 14.5px; color: var(--ms-navy); }
.ms-pay-text small { font-size: 12.5px; color: var(--ms-muted); }
.ms-pay-logos { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.ms-pay-logos span { font-size: 10.5px; font-weight: 700; letter-spacing: .3px; border: 1px solid var(--ms-border); border-radius: 4px; padding: 2px 7px; color: #555; background: #fff; }

/* Order summary card */
.ms-order-summary { background: #fff; border: 1px solid var(--ms-border); border-radius: 8px; padding: 22px; position: sticky; top: 90px; }
.ms-order-summary h2 { font-size: 18px; margin-bottom: 14px; }
.ms-order-items { max-height: 320px; overflow-y: auto; border-bottom: 1px solid var(--ms-border); margin-bottom: 4px; }
.ms-order-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid #f2f2f2; }
.ms-order-item:last-child { border-bottom: none; }
.ms-order-thumb { width: 56px; height: 56px; flex: 0 0 auto; border: 1px solid var(--ms-border); border-radius: 6px; overflow: hidden; background: #fafafa; display: flex; align-items: center; justify-content: center; }
.ms-order-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ms-order-info { flex: 1; min-width: 0; }
.ms-order-name { font-size: 13.5px; font-weight: 600; color: var(--ms-navy); line-height: 1.35; }
.ms-order-var { font-size: 12px; color: var(--ms-muted); }
.ms-order-meta { font-size: 12.5px; color: var(--ms-muted); margin-top: 2px; }
.ms-order-line-total { font-size: 13.5px; font-weight: 700; color: var(--ms-navy); white-space: nowrap; }
.ms-totals { padding: 6px 0 2px; }
.ms-total-line { display: flex; justify-content: space-between; padding: 7px 0; font-size: 14px; color: var(--ms-text); }
.ms-total-line--grand { border-top: 1px solid var(--ms-border); margin-top: 6px; padding-top: 14px; font-weight: 700; font-size: 18px; color: var(--ms-navy); }
.ms-place-order { margin-top: 16px; padding: 14px 16px; font-size: 15px; font-weight: 700; width: 100%; }
.ms-secure-note { font-size: 12px; color: var(--ms-muted); text-align: center; margin-top: 10px; }
.ms-field-error { display: none; color: #d92d20; font-size: 12.5px; margin-top: 6px; }
.ms-input-error { border-color: #d92d20 !important; }

/* Bank-transfer payment page */
.ms-bank-card { display: flex; align-items: center; gap: 18px; background: #fff; border: 1px solid var(--ms-border); border-radius: 10px; padding: 18px; }
.ms-bank-logo { flex: 0 0 auto; }
.ms-bank-logo img { height: 52px; border-radius: 8px; display: block; }
.ms-bank-details { flex: 1; min-width: 0; display: grid; gap: 8px; }
.ms-bank-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 14px; }
.ms-bank-label { color: var(--ms-muted); }
.ms-bank-value { display: inline-flex; align-items: center; gap: 8px; color: var(--ms-navy); }
.ms-bank-account { font-size: 22px; letter-spacing: 2px; color: var(--ms-navy); }
.ms-bank-copy { font-size: 12px; padding: 4px 10px; }
.ms-timer-wrap { text-align: center; background: #fff7ed; border: 1px solid #fed7aa; border-radius: 12px; padding: 20px; }
.ms-timer-label { font-size: 13px; color: var(--ms-muted); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 1px; }
.ms-timer { font-size: 48px; font-weight: 800; color: #c2410c; font-family: 'Outfit', 'Open Sans', sans-serif; line-height: 1; }
.ms-timer-note { font-size: 12.5px; color: var(--ms-muted); margin-top: 10px; }
@media (max-width: 640px) { .ms-bank-card { flex-direction: column; align-items: flex-start; } }
/* Narration box: the order number the customer must include in the transfer description */
.ms-narration { margin-top: 16px; background: #f5f7ff; border: 1.5px dashed #c7cdff; border-radius: 10px; padding: 16px; }
.ms-narration-label { font-size: 13.5px; color: var(--ms-navy); line-height: 1.5; }
.ms-narration-value { display: inline-flex; align-items: center; gap: 10px; margin-top: 10px; background: #fff; border: 1px solid var(--ms-border); border-radius: 8px; padding: 8px 12px; flex-wrap: wrap; }
.ms-narration-value strong { font-size: 20px; letter-spacing: 1px; color: var(--tb-theme-color); font-family: 'Outfit', 'Open Sans', sans-serif; }
.ms-narration-note { font-size: 12px; color: var(--ms-muted); margin-top: 10px; }

/* ===== Account sidebar ===== */
.ms-account-side { background: #fff; border: 1px solid var(--ms-border); border-radius: 8px; padding: 22px; }
.ms-account-user { display: flex; align-items: center; gap: 12px; padding: 6px 4px 16px; margin-bottom: 14px; border-bottom: 1px solid var(--ms-border); }
.ms-account-avatar {
  width: 46px; height: 46px; border-radius: 50%; flex: 0 0 46px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 20px;
  box-shadow: 0 3px 10px rgba(99,102,241,.35);
}
.ms-account-user strong { display: block; color: var(--ms-navy); font-size: 15px; }
.ms-account-user span { color: var(--ms-muted); font-size: 12px; word-break: break-all; }
.ms-account-side ul { list-style: none; padding: 0; margin: 0; }
.ms-account-side li { margin-bottom: 4px; }
.ms-account-side a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px; color: var(--ms-text); font-size: 14px; }
.ms-account-side a i { width: 18px; text-align: center; color: var(--tb-theme-color); font-size: 14px; }
.ms-account-side a:hover { background: #f0f1fe; color: var(--tb-theme-color); }
.ms-account-side a.ms-active { background: var(--tb-theme-color); color: #fff; font-weight: 600; }
.ms-account-side a.ms-active i { color: #fff; }
.ms-account-side .ms-side-badge {
  display: inline-block; font-size: 10px; font-weight: 700; text-transform: uppercase;
  padding: 2px 8px; border-radius: 999px; margin-left: auto; background: #fef3c7; color: #92400e;
}
.ms-account-side .ms-side-logout { border-top: 1px solid var(--ms-border); padding-top: 10px; margin-top: 8px; }
.ms-account-side .ms-side-logout form { margin: 0; }
.ms-account-side .ms-side-logout button {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border: 0;
  border-radius: 8px; background: #fef2f2; color: #dc2626; font-size: 14px; font-weight: 600; cursor: pointer;
  font-family: inherit;
}
.ms-account-side .ms-side-logout button i { width: 18px; text-align: center; font-size: 14px; }
.ms-account-side .ms-side-logout button:hover { background: #fde8e8; }

/* ===== Vendor cards ===== */
.vendor-card { background: #fff; border: 1px solid var(--ms-border); border-radius: 8px; padding: 26px; text-align: center; transition: box-shadow .2s; }
.vendor-card:hover { box-shadow: 0 10px 26px rgba(22,19,61,0.10); }
.vendor-card img { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; margin-bottom: 10px; }
.vendor-card h4 { color: var(--ms-navy); }

/* ===== Badges ===== */
.badge { font-weight: 600; }

/* Vendor switch banner on the customer dashboard */
.ms-vendor-switch { background: #eef2ff; border: 1px solid #d4dcff; border-radius: 12px; padding: 18px; margin-bottom: 22px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.ms-vendor-switch-icon { font-size: 34px; flex: 0 0 auto; }
.ms-vendor-switch-text { flex: 1; min-width: 220px; }
.ms-vendor-switch-title { font-weight: 700; color: var(--ms-navy); font-size: 16px; margin-bottom: 4px; }
.ms-vendor-switch-text p { margin: 0; font-size: 13px; color: var(--ms-text); }

/* ===== Footer (original: white, 3px indigo top border) ===== */
.ms-footer { background: #fff; border-top: 3px solid var(--tb-theme-color); margin-top: 50px; }
.ms-footer-newsletter { background: #fff; border-bottom: 1px solid #eef0f4; }
.ms-footer-newsletter .ms-fn-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 36px 0; flex-wrap: wrap; }
.ms-footer-newsletter h3 { font-size: 16px; font-weight: 700; color: var(--ms-navy); margin: 0 0 4px; }
.ms-footer-newsletter p { font-size: 14px; color: var(--ms-navy); margin: 0; }
.ms-footer-newsletter form { display: flex; min-width: 320px; }
.ms-footer-newsletter input { flex: 1; padding: 11px 14px; border: 1px solid var(--ms-border); border-radius: 4px 0 0 4px; font-size: 14px; }
.ms-footer-newsletter button { padding: 11px 20px; border: none; background: var(--tb-theme-color); color: #fff; border-radius: 0 4px 4px 0; cursor: pointer; font-weight: 600; }
.ms-footer-newsletter button:hover { background: var(--tb-theme-color-hover); }
.ms-footer-main { padding: 40px 0 30px; }
.ms-footer-main .ms-footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 30px; }
.ms-footer-main h3.heading-tbay-title, .ms-footer-main h4 { font-size: 15px; font-weight: 700; color: var(--ms-navy); margin-bottom: 14px; }
.ms-footer-main ul { list-style: none; padding: 0; margin: 0; }
.ms-footer-main ul li { margin-bottom: 8px; }
.ms-footer-main ul li a { color: var(--ms-text); font-size: 14px; }
.ms-footer-main ul li a:hover { color: var(--tb-theme-color); }
.ms-footer-main .ms-fcontact { font-size: 14px; color: var(--ms-text); margin-bottom: 10px; }
.ms-footer-main .ms-fcontact a { color: var(--tb-theme-color); font-weight: 600; }
.ms-footer-bottom { border-top: 1px solid #eef0f4; padding: 18px 0; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.ms-footer-bottom p { margin: 0; color: var(--ms-muted); font-size: 13px; }
.ms-footer-bottom img { max-height: 40px; }

/* ===== Misc utilities ===== */
.text-center { text-align: center; }
.mt-2 { margin-top: 12px; }
.mb-2 { margin-bottom: 12px; }
.mt-4 { margin-top: 32px; }
.meta { color: var(--ms-muted); font-size: 13px; }
.ms-soft { background: #f0f1fe; color: var(--tb-theme-color-hover); }

/* ===== Mobile header (fixed, simple) ===== */
.ms-mobile-header { display: none; }
.ms-mobile-drawer { display: none; }
.ms-mobile-overlay { display: none; }

/* ===== Header responsive ===== */
.ms-topbar-hide-sm { display: inline-flex; }
@media (max-width: 992px) {
  .ms-header .ms-header-main { justify-content: center; gap: 14px; }
  .ms-header-search { order: 3; max-width: 100%; flex-basis: 100%; }
  .ms-header-actions { gap: 2px; }
}
@media (max-width: 768px) {
  /* Show the simple FIXED mobile header; hide the desktop header. */
  .ms-mobile-header {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 90;
    background: #16133d;
    border-bottom: 3px solid var(--tb-theme-color, #4f46e5);
    box-shadow: 0 2px 10px rgba(22,19,61,.25);
  }
  /* Add body padding so the fixed header doesn't cover page content. */
  body { padding-top: 58px; }
  .ms-mh-top {
    display: grid;
    grid-template-columns: 44px 1fr 88px;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
  }
  .ms-mh-burger {
    width: 40px;
    height: 40px;
    border: 0;
    background: rgba(255,255,255,.10);
    color: #fff;
    border-radius: 8px;
    font-size: 18px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .ms-mh-burger:active { background: rgba(255,255,255,.22); }
  .ms-mh-logo { display: inline-flex; justify-content: center; }
  .ms-mh-logo img { height: 42px; }
  .ms-mh-icons { display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
  .ms-mh-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    color: #fff;
    background: rgba(255,255,255,.10);
  }
  .ms-mh-icon i { font-size: 18px; color: #fff; }
  .ms-mh-icon .ms-count {
    position: absolute; top: 0; right: 0;
    background: #f43f5e; color: #fff; font-size: 10px; font-weight: 800;
    min-width: 17px; height: 17px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center; padding: 0 4px;
    transform: translate(4px, -2px);
  }
  .ms-mh-icon .ms-count-wish { background: #f59e0b; }
  .ms-header .ms-topbar,
  .ms-header .ms-header-main,
  .ms-header .ms-nav { display: none !important; }

  /* ---- Mobile drawer (nav/account/search) ---- */
  .ms-mobile-drawer {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 300px;
    max-width: 85vw;
    z-index: 120;
    background: #fff;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transform: translateX(-100%);
    transition: transform .25s ease;
    box-shadow: 0 0 40px rgba(0,0,0,.3);
  }
  .ms-mobile-drawer.open { transform: translateX(0); }
  .ms-md-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: #16133d;
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 2;
  }
  .ms-md-title { font-weight: 700; font-size: 16px; }
  .ms-md-close {
    width: 34px; height: 34px; border: 0; border-radius: 8px;
    background: rgba(255,255,255,.12); color: #fff; font-size: 16px; cursor: pointer;
  }
  .ms-md-search {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 14px 16px;
    padding: 0 12px;
    height: 42px;
    background: #f2f4f9;
    border: 1px solid #e5e8f0;
    border-radius: 8px;
  }
  .ms-md-search i { color: #8a90a8; font-size: 14px; }
  .ms-md-search input { flex: 1; border: 0; outline: 0; font-size: 14px; color: #333; min-width: 0; background: transparent; }
  .ms-md-search button {
    border: 0; background: var(--tb-theme-color, #4f46e5); color: #fff;
    font-size: 12px; font-weight: 700; padding: 6px 14px; border-radius: 6px; cursor: pointer;
  }
  .ms-md-section { padding: 6px 16px 14px; border-bottom: 1px solid #f0f2f7; }
  .ms-md-label {
    font-size: 11px; text-transform: uppercase; letter-spacing: .08em;
    color: #8a90a8; font-weight: 700; padding: 8px 0 4px;
  }
  .ms-md-section a, .ms-md-logout button {
    display: flex; align-items: center; gap: 12px;
    padding: 11px 8px; color: #26303f; font-size: 14px; font-weight: 500;
    text-decoration: none; border-radius: 8px; width: 100%; text-align: left;
    border: 0; background: #fff; cursor: pointer; font-family: inherit;
  }
  .ms-md-section a i, .ms-md-logout button i { width: 18px; text-align: center; color: var(--tb-theme-color, #4f46e5); font-size: 15px; }
  .ms-md-section a:active { background: #f5f6ff; }
  .ms-md-logout { margin: 0; }
  .ms-md-logout button { color: #dc2626; }
  .ms-md-logout button i { color: #dc2626; }
  .ms-mobile-overlay {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 110;
    background: rgba(15,18,38,.55);
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s ease;
  }
  .ms-mobile-overlay.show { opacity: 1; visibility: visible; }
  body.ms-drawer-open { overflow: hidden; }
}
@media (max-width: 640px) {
  .ms-topbar-hide-sm { display: none; }
  .ms-topbar-left { gap: 10px; }
  .ms-header-actions .ms-hact { min-width: 46px; padding: 6px 8px; }
  .ms-header-actions .ms-hact span.ms-hlabel { display: none; }
  .ms-header-actions .ms-hact-login span.ms-hlabel, .ms-header-actions .ms-hact-register span.ms-hlabel { display: inline; }
  .ms-user-name { max-width: 80px; }
  .ms-user-dropdown { position: fixed; top: auto; right: 12px; left: 12px; bottom: 12px; width: auto; border-radius: 14px; }
}

/* ===== Customer dashboard responsive ===== */
@media (max-width: 860px) {
  .ms-account-layout { flex-direction: column !important; }
  .ms-account-layout > .col {
    flex: 0 0 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }
  /* Stack two-column inline grids used on the account pages (addresses, totals). */
  .ms-account-layout [style*="grid-template-columns:1fr 1fr"] { grid-template-columns: 1fr !important; }
  .ms-account-layout .cart-totals { max-width: 100% !important; }
  .ms-account-layout .panel[style*="display:flex;gap:8px"] { flex-wrap: wrap; }
  .ms-account-layout .ms-account-side {
    margin-bottom: 16px;
    padding: 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .ms-account-layout .ms-account-side .ms-account-user { display: none; }
  .ms-account-layout .ms-account-side ul { display: flex; gap: 6px; min-width: max-content; }
  .ms-account-layout .ms-account-side li { margin: 0; }
  .ms-account-layout .ms-account-side a {
    display: inline-flex; padding: 8px 12px; white-space: nowrap; font-size: 13px;
  }
  .ms-account-layout .ms-account-side .ms-side-logout {
    border-top: 0; padding-top: 0; margin-top: 0;
  }
  .ms-account-layout .ms-account-side .ms-side-logout button {
    width: auto; padding: 8px 12px;
  }
  /* Account tables stay full-width so every column (incl. Total/Status) is visible. */
  .ms-account-layout .table,
  .ms-account-layout .table-wrap { width: 100%; }
  .ms-account-layout .table td,
  .ms-account-layout .table th { font-size: 12px; padding: 7px 8px; }
  .ms-account-layout .table img { width: 40px; height: 40px; }
}

/* ==========================================================================
   Mobile polish — smaller type + scrollable tables everywhere
   ========================================================================== */
@media (max-width: 767px) {
  /* Stop anything stray from causing a horizontal page scroll. */
  .ms-main { overflow-x: hidden; }

  /* ===== Tables: keep them FULL-WIDTH so every column (Qty, Subtotal, Total)
         is visible on screen — no off-screen columns, no horizontal scroll.
         Compact fonts + tight padding make them readable. ===== */
  .ms-main table.table,
  .ms-main .table,
  .ms-main table {
    width: 100%;
    table-layout: auto;
  }
  .ms-main table.table th, .ms-main table.table td,
  .ms-main .table th, .ms-main .table td,
  .ms-main table th, .ms-main table td {
    font-size: 12px;
    padding: 7px 8px;
    word-break: normal;
  }
  .ms-main table.table img, .ms-main .table img { width: 44px; height: 44px; }
  .ms-page-body table { width: 100%; table-layout: auto; }
  .ms-page-body table th, .ms-page-body table td { font-size: 12px; padding: 6px 8px; }

  /* ===== Cart page: stack each line item into a card on phones so the product,
         price, quantity, subtotal and total are ALL visible — no off-screen
         columns and no horizontal scroll. ===== */
  .cart-layout { min-width: 0; }
  .cart-layout > * { min-width: 0; }
  .cart-layout .cart-totals { max-width: 100%; padding: 16px; }
  .cart-layout .cart-totals .line { flex-wrap: wrap; gap: 4px 10px; }
  .cart-layout .cart-totals form > div { flex-wrap: wrap; }
  .cart-layout .cart-totals input[type="text"] { flex: 1; min-width: 0; }

  .cart-layout table.table,
  .cart-layout table.table tbody,
  .cart-layout table.table tr,
  .cart-layout table.table td { display: block; width: 100%; }
  .cart-layout table.table thead { display: none; }
  .cart-layout table.table tbody tr {
    border: 1px solid var(--ms-border);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px;
    background: #fff;
  }
  .cart-layout table.table td { border: none; padding: 5px 0; }
  .cart-layout table.table td:first-child { font-size: 14px; font-weight: 600; color: var(--ms-navy); }
  .cart-layout table.table td:first-child a { display: block; overflow: hidden; }
  .cart-layout table.table td:first-child img {
    float: left; width: 56px; height: 56px; margin: 0 12px 6px 0; border-radius: 6px;
  }
  .cart-layout table.table td:first-child strong { vertical-align: middle; }
  .cart-layout table.table td:nth-child(2)::before { content: 'Price: '; font-weight: 700; }
  .cart-layout table.table td:nth-child(3)::before { content: 'Quantity: '; font-weight: 700; }
  .cart-layout table.table td:nth-child(4)::before { content: 'Subtotal: '; font-weight: 700; }
  .cart-layout table.table td:nth-child(3) form { display: inline; }
  .cart-layout table.table td:nth-child(5) { text-align: right; }
  .cart-layout .qty button { width: 32px; }
  .cart-layout .qty input { width: 38px !important; }

  /* ===== Smaller headings ===== */
  .ms-checkout-title { font-size: 21px; }
  .page-title, .ms-page-title { font-size: 21px; }
  .ms-section-head h2 { font-size: 19px; }
  .product-info h1 { font-size: 22px; }
  .product-info .price { font-size: 22px; }
  .ms-checkout-card h2, .ms-order-summary h2 { font-size: 16px; }
  .ms-bank-account { font-size: 19px; letter-spacing: 1.5px; }
  .ms-narration-value strong { font-size: 17px; }
  .ms-bank-card { padding: 14px; gap: 12px; }
  .ms-checkout-card { padding: 16px; }
  .ms-order-summary { padding: 16px; position: static; }
  .ms-total-line { font-size: 13px; }
  .ms-total-line--grand { font-size: 16px; }
  .ms-order-name { font-size: 12.5px; }
  .ms-order-var, .ms-order-meta { font-size: 11.5px; }
  .ms-order-thumb { width: 46px; height: 46px; }

  /* ===== Smaller controls ===== */
  .form-group label { font-size: 13px; }
  .form-group input, .form-group select, .form-group textarea { font-size: 13px; padding: 9px 11px; }
  .btn { font-size: 13px; padding: 8px 15px; }
  .btn-sm { font-size: 11.5px; padding: 5px 9px; }
  .btn-lg { font-size: 14px; padding: 10px 20px; }
  .alert { font-size: 13px; padding: 10px 12px; }
  .ms-checkout-hint, .ms-checkout-note { font-size: 12.5px; }
  .ms-pay-text strong { font-size: 13.5px; }
  .ms-pay-text small { font-size: 12px; }
  .ms-breadcrumbs, .breadcrumbs { font-size: 12px; }
  .meta { font-size: 12px; }
  .ms-account-side a { font-size: 13px; }
  .ms-page-body { font-size: 14px; }
  .ms-page-body h1 { font-size: 22px; }
  .ms-page-body h2 { font-size: 19px; }
  .ms-page-body h3 { font-size: 16px; }
  .ms-page-body h4 { font-size: 14px; }
  .ms-narration-note { font-size: 11.5px; }
  .ms-narration-label { font-size: 12.5px; }

  /* ===== Product grid: denser on phones ===== */
  .products-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
  .product-card .product-title { font-size: 13px; }
  .product-card .product-price { font-size: 14px; }
  .product-card .product-body { padding: 10px 12px; }
  .product-card .product-actions .btn { font-size: 12px; padding: 7px 10px; }
}

@media (max-width: 480px) {
  .ms-main { padding: 14px 0 12px; }
  .ms-checkout-title, .page-title, .ms-page-title { font-size: 19px; }
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .product-card .product-title { font-size: 12px; }
  .product-card .product-price { font-size: 13px; }
  .ms-pay-option { gap: 10px; padding: 12px; }
  .ms-bank-account { font-size: 17px; }
  .ms-hero .ms-hero-overlay { padding: 20px; }
  .ms-hero .ms-hero-overlay p { font-size: 14px; }
  .ms-footer-newsletter form { min-width: 0; width: 100%; }
  .ms-footer-main { padding: 26px 0 18px; }
  .ms-footer-main .ms-footer-grid { grid-template-columns: 1fr; gap: 20px; }
  .ms-footer-bottom { flex-direction: column; align-items: flex-start; gap: 8px; }
}
