/* Wisermart Frontend — lightweight Pinterest-inspired cards */
.wm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin: 16px 0;
}
.wm-products-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.wm-business-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

.wm-card-product {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
  transition: transform .15s ease, box-shadow .15s ease;
  display: flex;
  flex-direction: column;
}
.wm-card-product:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,.12);
}
.wm-media {
  aspect-ratio: 1;
  background: #f0f0f0;
  overflow: hidden;
}
.wm-media img, .wm-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.wm-media-placeholder {
  aspect-ratio: 1;
  background: linear-gradient(135deg, #e8e8e8, #f5f5f5);
}
.wm-card-body { padding: 12px; flex: 1; display: flex; flex-direction: column; }
.wm-card-title {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 6px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.wm-card-price { font-size: 15px; font-weight: 700; color: #111; margin-bottom: 4px; }
.wm-card-desc { font-size: 12px; color: #666; margin: 0 0 8px; }
.wm-card-actions { margin-top: auto; }

.wm-card-business {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
  border-top: 4px solid var(--wm-accent, #1565c0);
}
.wm-biz-icon {
  width: 40px; height: 40px; border-radius: 10px; margin-bottom: 12px;
}
.wm-card-business h3 { margin: 0 0 6px; font-size: 16px; }
.wm-card-business p { margin: 0; font-size: 13px; color: #555; }

.wm-feed-section { margin: 32px 0; }
.wm-section-title { font-size: 20px; margin: 0 0 16px; }

.wm-btn {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid #ddd;
  background: #fff;
  font-size: 13px;
  cursor: pointer;
  transition: background .15s;
}
.wm-btn:hover { background: #f5f5f5; }
.wm-btn-primary {
  background: #111;
  color: #fff;
  border-color: #111;
}
.wm-btn-primary:hover { background: #333; }
.wm-btn-save { font-size: 12px; padding: 6px 10px; }

.wm-search { max-width: 640px; margin: 0 auto 24px; }
.wm-search-form { display: flex; gap: 8px; }
.wm-search-input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid #ddd;
  border-radius: 24px;
  font-size: 15px;
}
.wm-search-results { margin-top: 16px; }
.wm-request-cta {
  text-align: center;
  padding: 24px;
  background: #fafafa;
  border-radius: 12px;
  margin-top: 16px;
}
.wm-request-form {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 20px;
  margin-top: 16px;
}
.wm-request-form label { display: block; margin-bottom: 4px; font-weight: 500; }
.wm-request-form input, .wm-request-form select, .wm-request-form textarea {
  width: 100%;
  max-width: 100%;
  margin-bottom: 12px;
}

.wm-request-item, .wm-saved-item, .wm-notif {
  padding: 12px;
  border-bottom: 1px solid #eee;
}
.wm-notif.unread { background: #f0f7ff; }
.wm-empty { color: #888; font-size: 14px; }

.wm-profile section { margin: 24px 0; }
.wm-profile h3 { font-size: 16px; margin-bottom: 12px; }

@media (max-width: 600px) {
  .wm-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .wm-card-title { font-size: 13px; }
}

/* Product single */
.wm-single-product {
  max-width: 1100px;
  margin: 24px auto;
  padding: 0 16px;
}
.wm-single-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}
@media (max-width: 768px) {
  .wm-single-inner { grid-template-columns: 1fr; }
}
.wm-single-gallery .wm-single-media {
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 12px;
  background: #f0f0f0;
}
.wm-single-gallery img,
.wm-single-gallery video {
  width: 100%;
  display: block;
  max-height: 480px;
  object-fit: contain;
  background: #111;
}
.wm-single-business {
  display: inline-block;
  font-size: 13px;
  color: #666;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.wm-single-title {
  font-size: 26px;
  margin: 0 0 12px;
  line-height: 1.25;
}
.wm-single-price {
  margin-bottom: 12px;
}
.wm-price-current {
  font-size: 24px;
  font-weight: 700;
}
.wm-price-regular {
  font-size: 16px;
  color: #999;
  text-decoration: line-through;
  margin-left: 8px;
}
.wm-single-short {
  color: #555;
  margin-bottom: 16px;
}
.wm-single-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.wm-btn-lg {
  padding: 12px 24px;
  font-size: 15px;
}
.wm-single-description,
.wm-single-related {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid #eee;
}
.wm-card-link { display: block; text-decoration: none; color: inherit; }
.wm-card-title a { color: inherit; text-decoration: none; }
.wm-card-title a:hover { text-decoration: underline; }

/* Cart */
.wm-cart-items { list-style: none; margin: 0; padding: 0; }
.wm-cart-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #eee;
}
.wm-cart-title { flex: 1; font-weight: 600; }
.wm-cart-total { font-size: 18px; margin: 16px 0; }

.wm-single-product { max-width: 1100px; margin: 24px auto; padding: 0 16px; }
.wm-single-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-bottom: 32px; }
@media (max-width: 768px) { .wm-single-inner { grid-template-columns: 1fr; } }
.wm-single-gallery .wm-single-media { border-radius: 12px; overflow: hidden; margin-bottom: 12px; background: #f0f0f0; }
.wm-single-gallery img, .wm-single-gallery video { width: 100%; display: block; max-height: 480px; object-fit: contain; background: #111; }
.wm-single-business { display: inline-block; font-size: 13px; color: #666; margin-bottom: 8px; text-transform: uppercase; letter-spacing: .04em; }
.wm-single-title { font-size: 26px; margin: 0 0 12px; line-height: 1.25; }
.wm-single-price { margin-bottom: 12px; }
.wm-price-current { font-size: 24px; font-weight: 700; }
.wm-price-regular { font-size: 16px; color: #999; text-decoration: line-through; margin-left: 8px; }
.wm-single-short { color: #555; margin-bottom: 16px; }
.wm-single-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.wm-btn-lg { padding: 12px 24px; font-size: 15px; }
.wm-single-description, .wm-single-related { margin-top: 40px; padding-top: 24px; border-top: 1px solid #eee; }
.wm-card-link { display: block; text-decoration: none; color: inherit; }
.wm-card-title a { color: inherit; text-decoration: none; }
.wm-card-title a:hover { text-decoration: underline; }
.wm-cart-items { list-style: none; margin: 0; padding: 0; }
.wm-cart-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid #eee; }
.wm-cart-title { flex: 1; font-weight: 600; }
.wm-cart-total { font-size: 18px; margin: 16px 0; }

/* Checkout */
.wm-checkout-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
  margin-top: 16px;
}
@media (max-width: 800px) {
  .wm-checkout-layout { grid-template-columns: 1fr; }
}
.wm-gateways { display: flex; flex-direction: column; gap: 8px; }
.wm-gateway-option {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border: 1px solid #ddd; border-radius: 8px;
  cursor: pointer;
}
.wm-gateway-option:has(input:checked) {
  border-color: #111; background: #f8f8f8;
}
.wm-checkout .widefat, .wm-vendor-register .widefat, .wm-profile .widefat {
  width: 100%; padding: 8px 12px; border: 1px solid #ddd; border-radius: 6px;
  margin-top: 4px;
}
.wm-checkout label, .wm-vendor-register label { font-weight: 500; display: block; }

/* Dashboard / profile shared */
.wm-page-wrap { max-width: 1100px; margin: 24px auto; padding: 0 16px; }
.wm-dash-header { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.wm-dash-tabs, .wm-profile-tabs {
  display: flex; flex-wrap: wrap; gap: 6px; margin: 20px 0 16px;
  border-bottom: 1px solid #eee; padding-bottom: 8px;
}
.wm-tab {
  padding: 8px 14px; border: none; background: transparent;
  border-radius: 8px; cursor: pointer; font-size: 14px;
}
.wm-tab.active, .wm-tab:hover { background: #111; color: #fff; }
.wm-table { width: 100%; border-collapse: collapse; }
.wm-table th, .wm-table td { padding: 10px 8px; border-bottom: 1px solid #eee; text-align: left; font-size: 14px; }
.wm-view-as-banner {
  background: #fff3cd; border: 1px solid #ffc107; border-radius: 8px;
  padding: 12px 16px; margin-bottom: 16px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.wm-profile-header { display: flex; gap: 16px; align-items: center; margin-bottom: 20px; }
.wm-avatar img { border-radius: 50%; }
.wm-profile-meta { color: #666; margin: 4px 0 0; }
.wm-store-header { margin-bottom: 24px; }
.wm-store-location { color: #666; font-size: 14px; }

/* Pinterest-inspired pin cards */
.wm-pin { border-radius: 16px; overflow: hidden; }
.wm-masonry { align-items: start; }
.wm-badge-pill {
  position: absolute; top: 8px; left: 8px;
  background: rgba(0,0,0,.75); color: #fff;
  font-size: 11px; padding: 3px 8px; border-radius: 20px; z-index: 2;
}
.wm-badge-sale { left: auto; right: 8px; background: #e60023; }
.wm-badge-featured { background: #111; }
.wm-card-link { position: relative; display: block; }
.wm-stars { font-size: 12px; color: #f5a623; margin-bottom: 4px; }
.wm-star.empty { color: #ccc; }
.wm-rating-count { color: #888; font-size: 11px; }
.wm-btn-save.is-saved { background: #111; color: #fff; border-color: #111; }

/* Modal */
.wm-modal {
  position: fixed; inset: 0; z-index: 100000;
  display: none; align-items: center; justify-content: center;
  padding: 16px;
}
.wm-modal-backdrop {
  position: absolute; inset: 0; background: rgba(0,0,0,.45);
}
.wm-modal-dialog {
  position: relative; background: #fff; border-radius: 16px;
  max-width: 440px; width: 100%; padding: 24px;
  box-shadow: 0 20px 60px rgba(0,0,0,.25); z-index: 1;
  max-height: 90vh; overflow-y: auto;
}
.wm-modal-close {
  position: absolute; top: 12px; right: 12px;
  border: none; background: #f0f0f0; width: 32px; height: 32px;
  border-radius: 50%; font-size: 20px; cursor: pointer; line-height: 1;
}
.wm-modal-close:hover { background: #e0e0e0; }
.wm-modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 12px; }
body.wm-modal-open { overflow: hidden; }

.wm-no-results {
  text-align: center; padding: 32px 16px;
  background: #fafafa; border-radius: 16px; margin-top: 16px;
}
.wm-searching { color: #888; font-size: 14px; }


/* ========== Modern header ========== */
.wm-site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0,0,0,.06);
}
.wm-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 16px;
}
.wm-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #111;
  flex-shrink: 0;
}
.wm-logo-mark {
  width: 32px; height: 32px;
  border-radius: 10px;
  background: linear-gradient(135deg, #e60023, #ff4d6d);
  color: #fff;
  font-weight: 800;
  font-size: 16px;
  display: flex; align-items: center; justify-content: center;
}
.wm-logo-text { font-weight: 800; font-size: 18px; letter-spacing: -0.03em; }
.wm-header-search {
  flex: 1;
  max-width: 480px;
  display: flex;
  align-items: center;
  background: #f2f2f2;
  border-radius: 999px;
  padding: 0 4px 0 16px;
  border: 1px solid transparent;
  transition: border-color .15s, background .15s;
}
.wm-header-search:focus-within {
  background: #fff;
  border-color: #ddd;
  box-shadow: 0 0 0 3px rgba(230,0,35,.08);
}
.wm-header-search-input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 10px 8px;
  font-size: 14px;
  outline: none;
  min-width: 0;
}
.wm-header-search-btn {
  border: none;
  background: #111;
  color: #fff;
  width: 36px; height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.wm-nav-desktop { display: flex; gap: 18px; }
.wm-nav-desktop a {
  color: #333; text-decoration: none; font-size: 14px; font-weight: 600;
}
.wm-nav-desktop a:hover { color: #e60023; }
.wm-header-actions { display: flex; gap: 4px; align-items: center; margin-left: auto; }
.wm-icon-btn {
  position: relative;
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  color: #111;
  text-decoration: none;
}
.wm-icon-btn:hover { background: #f2f2f2; }
.wm-cart-count {
  position: absolute;
  top: 2px; right: 2px;
  background: #e60023; color: #fff;
  font-size: 10px; font-weight: 700;
  min-width: 16px; height: 16px; line-height: 16px;
  text-align: center; border-radius: 50%;
  font-style: normal;
}

/* ========== Desktop footer ========== */
.wm-site-footer {
  margin-top: 56px;
  background: #0f0f10;
  color: #ccc;
  padding: 48px 16px 24px;
}
.wm-footer-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
}
.wm-footer-brand .wm-logo-mark { margin-bottom: 10px; }
.wm-footer-brand strong { display: block; color: #fff; font-size: 18px; margin-bottom: 6px; }
.wm-footer-brand p { margin: 0; font-size: 14px; color: #888; }
.wm-footer-col h4 { color: #fff; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; margin: 0 0 12px; }
.wm-footer-col a { display: block; color: #aaa; text-decoration: none; font-size: 14px; margin-bottom: 8px; }
.wm-footer-col a:hover { color: #fff; }
.wm-footer-bottom {
  max-width: 1100px;
  margin: 32px auto 0;
  padding-top: 16px;
  border-top: 1px solid #2a2a2c;
  font-size: 12px;
  color: #666;
}

/* ========== Floating curved mobile dock ========== */
.wm-mobile-dock {
  display: none;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 1000;
  padding: 0 12px calc(10px + env(safe-area-inset-bottom));
  pointer-events: none;
}
.wm-dock-bar {
  pointer-events: auto;
  max-width: 420px;
  margin: 0 auto;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  background: #fff;
  border-radius: 28px 28px 22px 22px;
  padding: 8px 10px 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,.18), 0 1px 0 rgba(255,255,255,.8) inset;
  position: relative;
}
/* Soft curve cutout behind center FAB */
.wm-dock-bar::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -14px;
  transform: translateX(-50%);
  width: 72px;
  height: 36px;
  background: transparent;
  border-radius: 50%;
  box-shadow: 0 14px 0 0 #fff;
  z-index: 0;
}
.wm-dock-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-decoration: none;
  color: #666;
  font-size: 10px;
  position: relative;
  z-index: 1;
  padding: 4px 0;
}
.wm-dock-item small { font-size: 10px; font-weight: 600; }
.wm-dock-item:hover,
.wm-dock-item:focus { color: #111; }
.wm-dock-center {
  margin-top: -28px;
}
.wm-dock-fab {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(145deg, #1a1a1a, #000);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(0,0,0,.35);
  border: 4px solid #fff;
}
.wm-dock-center small { margin-top: 2px; color: #111; }
.wm-dock-cart .wm-cart-count {
  top: -2px;
  right: calc(50% - 22px);
}

@media (max-width: 900px) {
  .wm-nav-desktop { display: none; }
  .wm-header-search { max-width: none; }
}
@media (max-width: 768px) {
  .wm-header-search { display: none; }
  body:not(.elementor-editor-active):not(.elementor-editor-preview):not(.wm-elementor-editor):not(.wm-no-builtin-chrome) .wm-mobile-dock {
    display: block;
  }
  body:not(.elementor-editor-active):not(.elementor-editor-preview):not(.wm-elementor-editor):not(.wm-no-builtin-chrome) {
    padding-bottom: 92px;
  }
  body:not(.wm-no-builtin-chrome) .wm-site-footer { display: none; }
}
@media (min-width: 769px) {
  .wm-mobile-dock { display: none !important; }
}

body.wm-no-builtin-chrome .wm-site-header,
body.wm-no-builtin-chrome .wm-site-footer,
body.wm-no-builtin-chrome .wm-mobile-dock {
  display: none !important;
}
body.elementor-editor-active .wm-site-header,
body.elementor-editor-active .wm-site-footer,
body.elementor-editor-active .wm-mobile-dock,
body.elementor-editor-preview .wm-site-header,
body.elementor-editor-preview .wm-site-footer,
body.elementor-editor-preview .wm-mobile-dock {
  display: none !important;
}
body.elementor-editor-active,
body.elementor-editor-preview {
  padding-bottom: 0 !important;
}
