/* ─── Brand Modules Frontend CSS ─── */
@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;500;600;700;800&display=swap');

.bm-wrapper * { box-sizing: border-box; }

.bm-wrapper {
  display: flex;
  flex-direction: row-reverse;
  gap: 20px;
  padding: 24px 0;
  direction: rtl;
  font-family: 'Vazirmatn', Tahoma, Arial, sans-serif;
}

/* ── Single Module ── */
.bm-module {
  flex: 1 1 0;
  min-width: 0;
  background: #fff;
  border-radius: 12px;
}

/* ── Header ── */
.bm-module-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2px 14px;
}
.bm-module-title {
  display: flex;
  align-items: center;
  gap: 8px;
}
.bm-module-title h2 {
  font-size: 16px;
  font-weight: 800;
  color: #1a1a1a;
  margin: 0;
  white-space: nowrap;
}
.bm-badge {
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  letter-spacing: .5px;
  white-space: nowrap;
  flex-shrink: 0;
}
.bm-see-all {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #2d9e5f;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.bm-see-all svg { width: 14px; height: 14px; flex-shrink: 0; }
.bm-see-all:hover { text-decoration: underline; }

/* ── Body: Grid + Banner ── */
.bm-module-body {
  display: grid;
  grid-template-columns: 1fr 180px;
  gap: 10px;
  direction: rtl;
}

/* ── Category Grid ── */
.bm-cat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.bm-cat-card {
  background: #f8f8f8;
  border-radius: 10px;
  padding: 10px 10px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: background .2s, box-shadow .2s;
  text-decoration: none;
}
.bm-cat-card:hover {
  background: #f0f0f0;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
}

.bm-cat-icon {
  width: 100%;
  aspect-ratio: 1 / .75;
  border-radius: 8px;
  background: #e8e8e8;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.bm-cat-icon svg {
  width: 44px;
  height: 44px;
  opacity: .55;
  color: #555;
}
.bm-cat-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

.bm-cat-label {
  font-size: 12px;
  font-weight: 600;
  color: #333;
  text-align: center;
  font-family: 'Vazirmatn', Tahoma, Arial, sans-serif;
}

/* ── Banner ── */
.bm-banner {
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  background: #1a1a1a;
  min-height: 260px;
  display: block;
  text-decoration: none;
}
.bm-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0; left: 0;
}
.bm-banner-placeholder {
  width: 100%;
  height: 100%;
  min-height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #2a2a2a 0%, #111 100%);
}
.bm-banner-placeholder svg {
  width: 64px;
  height: 64px;
  opacity: .25;
  color: #fff;
}

.bm-banner-overlay {
  position: absolute;
  bottom: 20px;
  right: 0; left: 0;
  text-align: center;
  z-index: 2;
  padding: 0 12px;
}
.bm-brand-name {
  display: block;
  font-size: 20px;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0,0,0,.6);
  letter-spacing: 1px;
  font-family: 'Vazirmatn', Tahoma, Arial, sans-serif;
}
.bm-overlay-text {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,.85);
  margin-top: 4px;
  font-family: 'Vazirmatn', Tahoma, Arial, sans-serif;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .bm-wrapper { flex-direction: column; gap: 24px; }
  .bm-module-body { grid-template-columns: 1fr 150px; }
  .bm-banner, .bm-banner-placeholder { min-height: 220px; }
}

@media (max-width: 560px) {
  .bm-module-body { grid-template-columns: 1fr 120px; gap: 8px; }
  .bm-cat-grid { gap: 6px; }
  .bm-banner, .bm-banner-placeholder { min-height: 190px; }
  .bm-cat-icon svg { width: 32px; height: 32px; }
  .bm-cat-label { font-size: 11px; }
  .bm-module-title h2 { font-size: 13px; }
  .bm-brand-name { font-size: 16px; }
}

@media (max-width: 420px) {
  .bm-module-body { grid-template-columns: 1fr 100px; }
  .bm-module-title h2 { font-size: 12px; }
}
