/* Electronics Home Variant */
:root {
  --elec-navy: #0a1628;
  
  --elec-light: #f0f4ff;
  --elec-text: #1e293b;
  --elec-muted: #64748b;
  --elec-border: #e2e8f0;
}

/* ── Hero ── */
.elec-hero {
  position: relative;
  height: 520px;
  overflow: hidden;
  background: var(--elec-navy);
}
.elec-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity .7s ease;
}
.elec-slide.active { opacity: 1; }
.elec-slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(10,22,40,.75) 0%, rgba(10,22,40,.2) 60%, transparent 100%);
}
.elec-slide-inner {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 520px;
  color: #fff;
}
.elec-slide-label {
  display: inline-block;
  background: var(--molla-accent);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 4px 12px;
  border-radius: 3px;
  margin-bottom: 16px;
}
.elec-slide-title {
  font-size: 42px;
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 24px;
}
.elec-slide-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--molla-accent);
  color: #fff;
  padding: 12px 28px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  width: fit-content;
  transition: background .2s;
}
.elec-slide-btn:hover { background: #1d4ed8; color: #fff; }

/* Arrows */
.elec-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  background: rgba(255,255,255,.15);
  border: none;
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .2s;
}
.elec-arrow:hover { background: rgba(255,255,255,.3); }
.elec-prev { left: 20px; }
.elec-next { right: 20px; }

/* Dots */
.elec-dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  gap: 8px;
}
.elec-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,.4);
  cursor: pointer;
  padding: 0;
  transition: background .2s, transform .2s;
}
.elec-dot.active { background: #fff; transform: scale(1.3); }

/* ── Categories ── */
.elec-cats {
  background: #fff;
  padding: 40px 0;
  border-bottom: 1px solid var(--elec-border);
}
.elec-cats-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}
.elec-cat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--elec-text);
  transition: color .2s;
}
.elec-cat-item:hover { color: var(--molla-accent); }
.elec-cat-img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--elec-border);
  transition: border-color .2s;
}
.elec-cat-item:hover .elec-cat-img { border-color: var(--molla-accent); }
.elec-cat-img img { width: 100%; height: 100%; object-fit: cover; }
.elec-cat-img--empty {
  background: var(--elec-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: var(--molla-accent);
}
.elec-cat-name {
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}

/* ── Section common ── */
.elec-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}
.elec-section-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--elec-navy);
  position: relative;
  padding-left: 14px;
}
.elec-section-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 22px;
  background: var(--molla-accent);
  border-radius: 2px;
}
.elec-view-all {
  font-size: 13px;
  font-weight: 600;
  color: var(--molla-accent);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: gap .2s;
}
.elec-view-all:hover { gap: 8px; color: var(--molla-accent); }

/* ── Products sections ── */
.elec-products-section {
  padding: 48px 0;
  background: #fff;
}
.elec-new-section {
  background: var(--elec-light);
}
.elec-products-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 20px;
}
.elec-new-section .molla-product-card {
  background: #fff;
}

/* ── Product card: thêm padding để ảnh không sát viền ── */
.elec-products-grid .molla-product-card {
  min-width: 0;
  overflow: hidden;
  padding: 12px;
  border: 1px solid #e8e8e8;
  border-radius: 6px;
  background: #fff;
  transition: box-shadow .2s, border-color .2s;
}
.elec-products-grid .molla-product-card:hover {
  border-color: var(--elec-accent, #0c6cf2);
  box-shadow: 0 4px 18px rgba(12, 108, 242, 0.08);
}
.elec-products-grid .molla-product-card .molla-product-img {
  margin-bottom: 10px;
  position: relative;
}
.elec-products-grid .molla-product-card .molla-product-img a {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #f5f7fa;
}
.elec-products-grid .molla-product-card .molla-product-img img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  display: block;
  transition: transform .3s ease;
}
.elec-products-grid .molla-product-card:hover .molla-product-img img {
  transform: scale(1.05);
}

/* ── Promo banner ── */
.elec-promo {
  padding: 32px 0;
  background: #fff;
}
.elec-promo-inner {
  display: block;
  position: relative;
  height: 240px;
  border-radius: 8px;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  text-decoration: none;
}
.elec-promo-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(10,22,40,.8) 0%, rgba(10,22,40,.3) 60%, transparent 100%);
}
.elec-promo-content {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 48px;
  color: #fff;
}
.elec-promo-label {
  display: inline-block;
  align-self: flex-start;
  background: var(--molla-accent);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  padding: 3px 10px;
  border-radius: 3px;
  margin-bottom: 12px;
}
.elec-promo-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 20px;
}
.elec-promo-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  color: var(--elec-navy);
  padding: 9px 22px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 13px;
  width: fit-content;
}

/* ── Blog ── */
.elec-blog {
  padding: 48px 0;
  background: #fff;
}
.elec-blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.elec-blog-card {
  display: block;
  text-decoration: none;
  color: var(--elec-text);
  border: 1px solid var(--elec-border);
  border-radius: 6px;
  overflow: hidden;
  transition: box-shadow .2s;
}
.elec-blog-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.08); color: var(--elec-text); }
.elec-blog-img { height: 200px; overflow: hidden; }
.elec-blog-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.elec-blog-card:hover .elec-blog-img img { transform: scale(1.04); }
.elec-blog-body { padding: 20px; }
.elec-blog-date { font-size: 12px; color: var(--elec-muted); margin-bottom: 8px; display: block; }
.elec-blog-title { font-size: 16px; font-weight: 600; margin-bottom: 8px; line-height: 1.4; }
.elec-blog-excerpt { font-size: 13px; color: var(--elec-muted); margin: 0; line-height: 1.6; }

/* ── Newsletter bar ── */
.elec-newsletter {
  padding: 48px 0;
  background: var(--molla-accent);
}
.elec-nl-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}
.elec-nl-title {
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  margin: 0;
}
.elec-nl-desc { color: rgba(255,255,255,.6); margin: 6px 0 0; font-size: 14px; }
.elec-nl-form { flex: 0 0 420px; }
.elec-nl-group { display: flex; }
.elec-nl-input {
  flex: 1;
  padding: 12px 18px;
  border: none;
  border-radius: 4px 0 0 4px;
  font-size: 14px;
  outline: none;
}
.elec-nl-btn {
  padding: 12px 24px;
  background: var(--elec-navy);
  color: #fff;
  border: none;
  border-radius: 0 4px 4px 0;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background .2s, color .2s;
}
.elec-nl-btn:hover { background: var(--elec-navy); color: #fff; }

/* Category section alternating bg */
.elec-cat-section--alt { background: var(--elec-light); }
.elec-cat-section--alt .molla-product-card { background: #fff; }

/* ── Responsive ── */
@media (max-width: 1199px) {
  .elec-products-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 992px) {
  .elec-hero { height: 380px; }
  .elec-slide-title { font-size: 30px; }
  .elec-cats-grid { grid-template-columns: repeat(3, 1fr); }
  .elec-products-grid { grid-template-columns: repeat(3, 1fr); }
  .elec-blog-grid { grid-template-columns: repeat(2, 1fr); }
  .elec-nl-inner { flex-direction: column; text-align: center; }
  .elec-nl-form { flex: unset; width: 100%; max-width: 440px; }
}
@media (max-width: 576px) {
  .elec-hero { height: 280px; }
  .elec-slide-title { font-size: 22px; }
  .elec-cats-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .elec-products-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .elec-blog-grid { grid-template-columns: 1fr; }
}
