/* ==========================================================================
   النبالي — Page-specific styles
   ========================================================================== */

/* ---------- HERO (Home) ---------- */
.hero { position: relative; min-height: 88vh; display: grid; align-items: center; overflow: hidden; background: var(--c-navy); }
.hero__slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1.1s ease; }
.hero__slide.active { opacity: 1; }
.hero__slide::before { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, rgba(7,26,53,.94) 0%, rgba(7,26,53,.78) 45%, rgba(7,26,53,.35) 100%); z-index: 1; }
.hero__slide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero__inner { position: relative; z-index: 3; max-width: 680px; padding-block: 4rem; }
.hero__eyebrow { display: inline-flex; align-items: center; gap: .5rem; color: var(--c-primary); font-family: var(--f-display); font-weight: 700; letter-spacing: .03em; margin-bottom: 1.1rem; font-size: .95rem; }
.hero__eyebrow::before { content: ""; width: 34px; height: 2px; background-image: repeating-linear-gradient(90deg,var(--c-primary) 0 6px,transparent 6px 11px); }
.hero h1 { color: #fff; font-size: var(--step-4); margin-bottom: 1.1rem; }
.hero h1 b { color: var(--c-primary); }
.hero__lead { color: #cdd6e4; font-size: var(--step-1); margin-bottom: 1.8rem; max-width: 55ch; }
.hero__actions { display: flex; gap: .9rem; flex-wrap: wrap; }
.hero__dots { position: absolute; bottom: 28px; right: 50%; transform: translateX(50%); z-index: 4; display: flex; gap: .5rem; }
.hero__dots button { width: 32px; height: 5px; border-radius: 100px; background: rgba(255,255,255,.3); transition: background .2s; }
.hero__dots button.active { background: var(--c-primary); }

/* ---------- Section grids ---------- */
.products-grid { grid-template-columns: repeat(4,1fr); }
.features-grid { grid-template-columns: repeat(5,1fr); }
.head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; margin-bottom: 2.5rem; flex-wrap: wrap; }

/* ---------- Offers / Countdown ---------- */
.offer-banner { background: linear-gradient(120deg, var(--c-navy), var(--c-steel)); color: #fff; border-radius: var(--r-lg); overflow: hidden; position: relative; display: grid; grid-template-columns: 1.2fr 1fr; }
.offer-banner::after { content: ""; position: absolute; inset: 0; background-image: repeating-linear-gradient(135deg, rgba(216,30,44,.07) 0 2px, transparent 2px 22px); pointer-events: none; }
.offer-banner__body { padding: clamp(2rem,4vw,3.5rem); position: relative; z-index: 2; }
.offer-banner__badge { display: inline-block; background: var(--c-primary); color: #fff; font-family: var(--f-display); font-weight: 800; padding: .4rem 1rem; border-radius: 100px; font-size: .85rem; margin-bottom: 1rem; }
.offer-banner h2 { color: #fff; font-size: var(--step-3); margin-bottom: .7rem; }
.offer-banner p { color: #c6d0e0; margin-bottom: 1.6rem; }
.offer-banner__media { position: relative; }
.offer-banner__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.countdown { display: flex; gap: .7rem; margin-bottom: 1.7rem; }
.countdown__box { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); border-radius: var(--r-sm); padding: .8rem 1rem; text-align: center; min-width: 72px; }
.countdown__n { font-family: var(--f-display); font-weight: 800; font-size: 1.9rem; color: var(--c-primary); line-height: 1; }
.countdown__l { font-size: .72rem; color: #9fb0c8; margin-top: .35rem; }

/* ---------- Filters (machines / spare parts) ---------- */
.shop { display: grid; grid-template-columns: 280px 1fr; gap: 2.5rem; align-items: start; }
.filters { position: sticky; top: calc(var(--header-h) + 1.2rem); background: #fff; border: 1px solid var(--c-line); border-radius: var(--r-md); padding: 1.4rem; }
.filters__group { padding-bottom: 1.2rem; margin-bottom: 1.2rem; border-bottom: 1px solid var(--c-line); }
.filters__group:last-child { border: 0; margin: 0; padding: 0; }
.filters__title { font-family: var(--f-display); font-weight: 700; font-size: 1rem; color: var(--c-navy); margin-bottom: .9rem; display: flex; align-items: center; gap: .5rem; }
.filters__title svg { width: 18px; height: 18px; flex: 0 0 18px; color: var(--c-primary); }
.filter-opt { display: flex; align-items: center; gap: .6rem; padding: .4rem 0; cursor: pointer; font-size: .92rem; color: var(--c-muted); transition: color .15s; }
.filter-opt:hover { color: var(--c-navy); }
.filter-opt input { accent-color: var(--c-primary); width: 17px; height: 17px; }
.filter-opt .count { margin-inline-start: auto; font-size: .78rem; color: var(--c-line-2); }
.searchbar { position: relative; margin-bottom: 1.8rem; }
.searchbar input { width: 100%; padding: .9rem 3rem .9rem 1.1rem; border-radius: var(--r-sm); border: 1px solid var(--c-line-2); font-family: var(--f-body); font-size: 1rem; background: #fff; }
.searchbar input:focus { outline: none; border-color: var(--c-primary); box-shadow: 0 0 0 3px var(--c-primary-soft); }
.searchbar svg { position: absolute; top: 50%; transform: translateY(-50%); inset-inline-start: 1rem; right: 1rem; width: 20px; height: 20px; color: var(--c-muted); }
.shop__bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.4rem; gap: 1rem; flex-wrap: wrap; }
.shop__count { color: var(--c-muted); font-size: .92rem; }
.shop__count b { color: var(--c-navy); }
.chips { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1.6rem; }
.chip { padding: .5rem 1rem; border-radius: 100px; border: 1px solid var(--c-line-2); font-family: var(--f-display); font-weight: 600; font-size: .85rem; color: var(--c-muted); transition: all .15s; cursor: pointer; }
.chip:hover, .chip.active { background: var(--c-navy); border-color: var(--c-navy); color: #fff; }
.chip.active { background: var(--c-primary); border-color: var(--c-primary); }
.shop__grid { grid-template-columns: repeat(3,1fr); }

/* ---------- Product detail ---------- */
.pd { display: grid; grid-template-columns: 1.1fr 1fr; gap: 3rem; align-items: start; }
.pd__gallery .pd__main { aspect-ratio: 4/3; border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--c-line); background: #fff; }
.pd__main img { width: 100%; height: 100%; object-fit: cover; }
.pd__thumbs { display: flex; gap: .7rem; margin-top: .8rem; }
.pd__thumbs button { width: 84px; aspect-ratio: 1; border-radius: var(--r-sm); overflow: hidden; border: 2px solid var(--c-line); transition: border-color .15s; }
.pd__thumbs button.active { border-color: var(--c-primary); }
.pd__thumbs img { width: 100%; height: 100%; object-fit: cover; }
.pd__brand { color: var(--c-primary); font-family: var(--f-display); font-weight: 700; }
.pd__title { font-size: var(--step-3); margin: .4rem 0 .8rem; }
.pd__price { display: flex; align-items: baseline; gap: .8rem; margin-bottom: 1.2rem; }
.pd__price .now { font-family: var(--f-display); font-weight: 800; font-size: 2rem; color: var(--c-navy); }
.pd__price .was { color: var(--c-muted); text-decoration: line-through; font-size: 1.1rem; }
.pd__desc { color: var(--c-muted); margin-bottom: 1.5rem; }
.pd__highlights { display: grid; gap: .7rem; margin-bottom: 1.7rem; }
.pd__highlights li { display: flex; gap: .6rem; align-items: flex-start; font-size: .95rem; }
.pd__highlights svg { width: 20px; height: 20px; color: var(--c-primary); flex-shrink: 0; margin-top: 3px; }
.pd__actions { display: flex; gap: .8rem; flex-wrap: wrap; }
.spec-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--c-line); }
.spec-table th, .spec-table td { padding: 1rem 1.3rem; text-align: right; border-bottom: 1px solid var(--c-line); }
.spec-table th { background: var(--c-bg); font-family: var(--f-display); font-weight: 700; color: var(--c-navy); width: 38%; }
.spec-table tr:last-child th, .spec-table tr:last-child td { border-bottom: 0; }
.tabs { display: flex; gap: .4rem; border-bottom: 1px solid var(--c-line); margin-bottom: 1.8rem; }
.tabs button { padding: .8rem 1.3rem; font-family: var(--f-display); font-weight: 700; color: var(--c-muted); border-bottom: 3px solid transparent; transition: all .15s; }
.tabs button.active { color: var(--c-primary); border-color: var(--c-primary); }

/* ---------- About ---------- */
.about-hero { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.about-hero__media { border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 5/4; box-shadow: var(--shadow-lg); position: relative; }
.about-hero__media img { width: 100%; height: 100%; object-fit: cover; }
.about-badge { position: absolute; bottom: 22px; right: 22px; background: var(--c-primary); color: #fff; border-radius: var(--r-md); padding: 1.1rem 1.4rem; box-shadow: var(--shadow-md); }
.about-badge b { font-family: var(--f-display); font-size: 2.2rem; display: block; line-height: 1; }
.about-badge span { font-size: .82rem; }
.vm-grid { grid-template-columns: 1fr 1fr; }
.vm-card { background: #fff; border: 1px solid var(--c-line); border-radius: var(--r-md); padding: 2rem; border-top: 4px solid var(--c-primary); }
.vm-card__ic { width: 56px; height: 56px; border-radius: 14px; background: var(--c-primary-soft); color: var(--c-primary); display: grid; place-items: center; margin-bottom: 1.1rem; }
.vm-card__ic svg { width: 30px; height: 30px; }
.vm-card h3 { font-size: 1.3rem; margin-bottom: .6rem; }
.vm-card p { color: var(--c-muted); }
.goals-list { display: grid; gap: 1rem; }
.goal-item { display: flex; gap: 1rem; background: #fff; border: 1px solid var(--c-line); border-radius: var(--r-md); padding: 1.2rem 1.4rem; align-items: flex-start; transition: transform .18s, box-shadow .18s; }
.goal-item:hover { transform: translateX(-5px); box-shadow: var(--shadow-sm); }
.goal-item__n { font-family: var(--f-display); font-weight: 800; font-size: 1.4rem; color: var(--c-primary); flex-shrink: 0; }
.goal-item h4 { margin-bottom: .25rem; }
.goal-item p { color: var(--c-muted); font-size: .92rem; }

/* ---------- Maintenance ---------- */
.svc-grid { grid-template-columns: repeat(3,1fr); }
.svc-card { background: #fff; border: 1px solid var(--c-line); border-radius: var(--r-md); padding: 2rem 1.7rem; transition: transform .2s, box-shadow .2s, border-color .2s; }
.svc-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: transparent; }
.svc-card__ic { width: 60px; height: 60px; border-radius: 16px; background: var(--c-navy); color: var(--c-primary); display: grid; place-items: center; margin-bottom: 1.2rem; }
.svc-card__ic svg { width: 32px; height: 32px; }
.svc-card h3 { font-size: 1.2rem; margin-bottom: .6rem; }
.svc-card p { color: var(--c-muted); font-size: .92rem; margin-bottom: 1rem; }
.svc-card ul { display: grid; gap: .5rem; }
.svc-card li { display: flex; gap: .5rem; font-size: .9rem; align-items: flex-start; }
.svc-card li svg { width: 18px; height: 18px; color: var(--c-primary); flex-shrink: 0; margin-top: 3px; }
.steps { display: grid; grid-template-columns: repeat(4,1fr); gap: 1.5rem; counter-reset: step; }
.step { text-align: center; position: relative; }
.step__n { width: 70px; height: 70px; margin: 0 auto 1rem; border-radius: 50%; background: var(--c-primary-soft); color: var(--c-primary); display: grid; place-items: center; font-family: var(--f-display); font-weight: 800; font-size: 1.6rem; border: 2px dashed var(--c-primary); }
.step h4 { margin-bottom: .4rem; }
.step p { color: var(--c-muted); font-size: .88rem; }

/* Plans / contracts */
.plans { grid-template-columns: repeat(3,1fr); }
.plan { background: #fff; border: 1px solid var(--c-line); border-radius: var(--r-md); padding: 2rem; display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s; }
.plan:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.plan--featured { border: 2px solid var(--c-primary); position: relative; }
.plan--featured::before { content: "الأكثر طلباً"; position: absolute; top: -13px; right: 50%; transform: translateX(50%); background: var(--c-primary); color: #fff; font-family: var(--f-display); font-weight: 700; font-size: .78rem; padding: .35rem 1rem; border-radius: 100px; }
.plan__name { font-family: var(--f-display); font-weight: 700; font-size: 1.2rem; color: var(--c-navy); }
.plan__price { font-family: var(--f-display); font-weight: 800; font-size: 2.4rem; color: var(--c-primary); margin: .6rem 0; }
.plan__price span { font-size: .9rem; color: var(--c-muted); font-weight: 600; }
.plan ul { display: grid; gap: .7rem; margin: 1.3rem 0; flex: 1; }
.plan li { display: flex; gap: .6rem; font-size: .92rem; align-items: flex-start; }
.plan li svg { width: 19px; height: 19px; color: var(--c-primary); flex-shrink: 0; margin-top: 3px; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 3rem; align-items: start; }
.contact-cards { display: grid; gap: 1rem; margin-bottom: 1.8rem; }
.contact-card { display: flex; gap: 1rem; background: #fff; border: 1px solid var(--c-line); border-radius: var(--r-md); padding: 1.3rem 1.5rem; align-items: center; transition: transform .18s, box-shadow .18s; }
.contact-card:hover { transform: translateX(-5px); box-shadow: var(--shadow-sm); }
.contact-card__ic { width: 52px; height: 52px; border-radius: 14px; background: var(--c-primary-soft); color: var(--c-primary); display: grid; place-items: center; flex-shrink: 0; }
.contact-card__ic svg { width: 26px; height: 26px; }
.contact-card h4 { margin-bottom: .2rem; }
.contact-card p, .contact-card a { color: var(--c-muted); font-size: .92rem; }
.contact-card a:hover { color: var(--c-primary); }
.form { background: #fff; border: 1px solid var(--c-line); border-radius: var(--r-md); padding: clamp(1.6rem,3vw,2.4rem); }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-family: var(--f-display); font-weight: 600; font-size: .9rem; color: var(--c-navy); margin-bottom: .45rem; }
.field input, .field textarea, .field select { width: 100%; padding: .85rem 1rem; border-radius: var(--r-sm); border: 1px solid var(--c-line-2); font-family: var(--f-body); font-size: 1rem; background: var(--c-bg); transition: border-color .15s, box-shadow .15s; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--c-primary); box-shadow: 0 0 0 3px var(--c-primary-soft); background: #fff; }
.field textarea { resize: vertical; min-height: 130px; }
.map-embed { border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--c-line); height: 320px; margin-top: 1.8rem; }
.map-embed iframe { width: 100%; height: 100%; border: 0; filter: grayscale(.2); }

/* ---------- Misc ---------- */
.empty { text-align: center; padding: 4rem 1rem; color: var(--c-muted); }
.pagination { display: flex; gap: .4rem; justify-content: center; margin-top: 2.5rem; }
.pagination a { width: 44px; height: 44px; display: grid; place-items: center; border-radius: var(--r-sm); border: 1px solid var(--c-line-2); font-family: var(--f-display); font-weight: 700; color: var(--c-navy); transition: all .15s; }
.pagination a:hover, .pagination a.active { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }

@media (max-width: 1024px) {
  .products-grid { grid-template-columns: repeat(3,1fr); }
}
@media (max-width: 980px) {
  .products-grid { grid-template-columns: repeat(2,1fr); }
  .features-grid { grid-template-columns: repeat(3,1fr); }
  .shop { grid-template-columns: 1fr; }
  .filters { position: static; }
  .shop__grid { grid-template-columns: repeat(2,1fr); }
  .pd { grid-template-columns: 1fr; }
  .offer-banner { grid-template-columns: 1fr; }
  .offer-banner__media { min-height: 220px; }
  .about-hero { grid-template-columns: 1fr; }
  .svc-grid, .plans { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .vm-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .features-grid, .shop__grid { grid-template-columns: 1fr; }
  .products-grid { grid-template-columns: repeat(2,1fr); gap: .9rem; }
  .steps { grid-template-columns: 1fr; }
  .form__row { grid-template-columns: 1fr; }
  .countdown { flex-wrap: wrap; }
}

/* ============================================================
   WordPress / WooCommerce additions (match existing design)
   ============================================================ */
.pd__model { color: var(--c-muted); margin: .25rem 0 .75rem; }
.pd__meta { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1rem 0; }
.pd__chip { display: inline-flex; align-items: center; gap: .4rem; background: var(--c-primary-soft); color: var(--c-primary-dark); font-weight: 700; font-size: .85rem; padding: .4rem .8rem; border-radius: 999px; }
.pd__chip svg { width: 16px; height: 16px; }
.pd__catalog { margin-top: 1rem; display: inline-flex; }
.pd__catalog svg { width: 18px; height: 18px; }

/* Tabs */
.pd__tabs { margin-top: 3rem; }
.pd__tabnav { display: flex; gap: .5rem; border-bottom: 2px solid var(--c-line); flex-wrap: wrap; }
.pd__tabnav button { background: none; border: none; padding: .9rem 1.3rem; font-family: var(--f-display); font-weight: 700; font-size: 1rem; color: var(--c-muted); cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -2px; transition: color .2s, border-color .2s; }
.pd__tabnav button.active { color: var(--c-primary); border-bottom-color: var(--c-primary); }
.pd__panel { display: none; padding: 1.6rem 0; }
.pd__panel.active { display: block; }

.video-embed { position: relative; padding-top: 56.25%; border-radius: var(--r-md); overflow: hidden; background: #000; }
.video-embed iframe, .video-embed video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Inquiry form */
.pd__inquiry { margin-top: 3rem; background: #fff; border: 1px solid var(--c-line); border-radius: var(--r-lg); padding: 2rem; }
.inquiry-form .form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin: 1.2rem 0; }
.inquiry-form label { display: flex; flex-direction: column; gap: .35rem; font-weight: 600; font-size: .9rem; }
.inquiry-form label.full { grid-column: 1 / -1; }
.inquiry-form input, .inquiry-form textarea { padding: .7rem .9rem; border: 1px solid var(--c-line-2); border-radius: var(--r-sm); font-family: var(--f-body); font-size: 1rem; }
.inquiry-form input:focus, .inquiry-form textarea:focus { outline: none; border-color: var(--c-primary); }
.inquiry-actions { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 1rem; }
.inquiry-note { margin-top: 1rem; padding: .8rem 1rem; border-radius: var(--r-sm); background: var(--c-primary-soft); color: var(--c-primary-dark); font-weight: 600; }

/* Shop additions */
.shop__count-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin: 1.2rem 0; }
.card__brand { display: block; color: var(--c-primary); font-weight: 700; font-size: .8rem; margin-bottom: .2rem; }
.filters--cta { background: var(--c-navy); color: #fff; }
.filters--cta .filters__title { color: #fff; }
.filters--cta p { color: rgba(255,255,255,.8); font-size: .9rem; margin: .5rem 0 1rem; }
.wc-breadcrumb .sep { color: var(--c-muted); margin: 0 .3rem; }

/* WooCommerce price */
.pd__price .now, .pd__price ins { color: var(--c-primary); font-size: 1.8rem; font-weight: 800; text-decoration: none; }
.pd__price del { color: var(--c-muted); font-size: 1.1rem; margin-inline-start: .6rem; }
.price del { color: var(--c-muted); }
.price ins { text-decoration: none; color: var(--c-primary); font-weight: 800; }

/* ===== WooCommerce native product grid (category & shop default loop) ===== */
/* Force a clean responsive grid regardless of WC's column classes */
ul.products,
.woocommerce ul.products {
  list-style: none; margin: 1.5rem 0 0; padding: 0;
  display: grid !important;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.4rem;
}
ul.products li.product,
.woocommerce ul.products li.product {
  width: auto !important; margin: 0 !important; float: none !important;
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--c-line); border-radius: var(--r-lg);
  overflow: hidden; transition: box-shadow .2s, transform .2s; position: relative;
}
ul.products li.product:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }

/* Product image */
ul.products li.product a img {
  width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover;
  margin: 0; display: block; border-radius: 0;
}
/* Title */
ul.products li.product .woocommerce-loop-product__title {
  font-family: var(--f-display); font-weight: 700; font-size: 1rem;
  color: var(--c-navy); padding: .9rem 1rem .3rem; line-height: 1.5; margin: 0;
}
/* Brand chip we add via hook */
ul.products li.product .card__brand {
  display: block; color: var(--c-primary); font-weight: 700; font-size: .78rem;
  padding: .9rem 1rem 0; margin: 0;
}
ul.products li.product .card__brand + .woocommerce-loop-product__title { padding-top: .15rem; }
/* Price */
ul.products li.product .price {
  display: block; padding: 0 1rem .6rem; color: var(--c-primary);
  font-weight: 800; font-size: 1.05rem; margin: 0;
}
ul.products li.product .price del { color: var(--c-muted); font-weight: 500; font-size: .9rem; }
ul.products li.product .price ins { text-decoration: none; }
/* On-sale flash */
ul.products li.product .onsale {
  position: absolute; inset-inline-start: .7rem; inset-block-start: .7rem; z-index: 2;
  background: var(--c-primary); color: #fff; border: none; border-radius: 999px;
  min-height: auto; min-width: auto; line-height: 1; padding: .35rem .7rem;
  font-size: .75rem; font-weight: 700; margin: 0;
}
/* Button pinned to bottom */
ul.products li.product > a.button,
ul.products li.product .button {
  margin: auto 1rem 1rem; text-align: center; border-radius: var(--r-md);
  background: var(--c-primary); color: #fff; font-weight: 700; padding: .6rem 1rem;
  transition: background .15s;
}
ul.products li.product .button:hover { background: var(--c-primary-dark); color: #fff; }
ul.products li.product .added_to_cart { margin: 0 1rem 1rem; text-align: center; }

/* Result count + ordering row */
.woocommerce-result-count { color: var(--c-muted); margin: 0; }
.woocommerce-ordering select { padding: .5rem .7rem; border: 1px solid var(--c-line-2); border-radius: var(--r-sm); }

/* "Load more" / view-all button */
.nabali-loadmore-wrap { text-align: center; margin-top: 2.2rem; }

/* Responsive: 3 on tablet, 2 on mobile */
@media (max-width: 1024px) {
  ul.products, .woocommerce ul.products { grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
}
@media (max-width: 768px) {
  ul.products, .woocommerce ul.products { grid-template-columns: repeat(2, 1fr); gap: .9rem; }
  ul.products li.product .woocommerce-loop-product__title { font-size: .92rem; padding: .7rem .7rem .25rem; }
  ul.products li.product .price { padding: 0 .7rem .5rem; font-size: .98rem; }
  ul.products li.product .button { margin: auto .7rem .7rem; padding: .55rem .8rem; font-size: .9rem; }
  ul.products li.product .card__brand { padding: .7rem .7rem 0; }
}
@media (max-width: 380px) {
  ul.products, .woocommerce ul.products { gap: .7rem; }
}

/* Contact page */
.contact-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; }
.contact-card { background: #fff; border: 1px solid var(--c-line); border-radius: var(--r-lg); padding: 1.6rem; text-align: center; }
.contact-card__ic { width: 54px; height: 54px; margin: 0 auto 1rem; border-radius: 14px; background: var(--c-primary-soft); color: var(--c-primary); display: grid; place-items: center; }
.contact-card__ic svg { width: 26px; height: 26px; }
.contact-card h3 { font-size: 1rem; margin-bottom: .4rem; }
.contact-card a { color: var(--c-primary); font-weight: 700; }
@media (max-width: 880px){ .contact-cards { grid-template-columns: repeat(2,1fr); } .inquiry-form .form-grid { grid-template-columns: 1fr; } }
@media (max-width: 520px){ .contact-cards { grid-template-columns: 1fr; } }


/* ============================================================
   Product Filter (server-rendered, theme-controlled)
   ============================================================ */
/* ===== Product Filter ===== */
.nfilter * { box-sizing: border-box; }
/* Constrain ALL icons inside the filter so none render huge */
.nfilter svg { width: 18px !important; height: 18px !important; flex-shrink: 0; }
/* CSS-drawn toggle icon (3 lines) — no SVG to blow up */
.nfilter__toggle-ic { position: relative; width: 18px; height: 12px; display: inline-block; }
.nfilter__toggle-ic::before,
.nfilter__toggle-ic::after,
.nfilter__toggle-ic { background: currentColor; height: 2px; border-radius: 2px; }
.nfilter__toggle-ic::before, .nfilter__toggle-ic::after { content: ""; position: absolute; left: 0; right: 0; }
.nfilter__toggle-ic::before { top: 4px; }
.nfilter__toggle-ic::after { top: 9px; }

.nfilter-layout--sidebar { display: flex; gap: 1.8rem; align-items: flex-start; }
.nfilter-layout--sidebar .nfilter { flex: 0 0 270px; width: 270px; }
.nfilter-layout--sidebar .nfilter-results { flex: 1 1 auto; min-width: 0; }
/* Guarantee the grid renders even when nested in the flex results column */
.nfilter-results .products-grid,
.nfilter-results .grid { display: grid; }
.nfilter-results .products-grid { grid-template-columns: repeat(3, 1fr); }

.nfilter-layout--top { display: block; }
.nfilter-layout--top .nfilter { width: 100%; margin-bottom: 1.5rem; }
.nfilter-layout--top .nfilter__form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 1rem; }
.nfilter-layout--top .nfilter__field { flex: 1 1 180px; margin: 0; }
.nfilter-layout--top .nfilter__head { width: 100%; }

/* Desktop: never show the mobile toggle button or close button */
.nfilter__toggle { display: none !important; }
.nfilter__close { display: none !important; background: none; border: none; font-size: 1.2rem; cursor: pointer; color: var(--c-muted); padding: 0; }
.nfilter__form {
  background: #fff; border: 1px solid var(--c-line); border-radius: var(--r-lg);
  padding: 1.3rem; display: block;
}
.nfilter-layout--sidebar .nfilter__form { position: sticky; top: 90px; }
.nfilter__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.1rem; gap: .5rem; }
.nfilter__head h3 {
  font-family: var(--f-display); font-size: 1.05rem; color: var(--c-navy); margin: 0;
  display: flex; align-items: center; gap: .5rem;
}
.nfilter__head h3::before {
  content: ""; width: 4px; height: 18px; background: var(--c-primary); border-radius: 2px; display: inline-block;
}
.nfilter__field { display: block; margin-bottom: 1rem; }
.nfilter__field > span { display: block; font-weight: 700; font-size: .85rem; color: var(--c-navy); margin-bottom: .4rem; }
.nfilter__field input, .nfilter__field select {
  width: 100%; padding: .6rem .75rem; border: 1px solid var(--c-line-2);
  border-radius: var(--r-sm); font-family: var(--f-body); font-size: .92rem; background: #fff; color: var(--c-navy);
}
.nfilter__field input:focus, .nfilter__field select:focus { outline: none; border-color: var(--c-primary); }
.nfilter__range { display: flex; gap: .5rem; }
.nfilter__range input { width: 50%; }
.nfilter__actions { display: flex; align-items: center; gap: .9rem; margin-top: .8rem; }
.nfilter__reset { font-size: .85rem; color: var(--c-muted); text-decoration: underline; white-space: nowrap; }
.nfilter__reset:hover { color: var(--c-primary); }

/* Mobile: filter collapses into a button + slide-down panel */
@media (max-width: 980px) {
  .nfilter-layout--sidebar, .nfilter-layout--top { display: block; }
  .nfilter-layout--sidebar .nfilter { width: 100%; flex: none; }
  .nfilter { position: relative; margin-bottom: 1.2rem; }
  .nfilter__toggle {
    display: inline-flex !important; align-items: center; gap: .5rem;
    background: var(--c-navy); color: #fff; border: none; cursor: pointer;
    padding: .75rem 1.2rem; border-radius: var(--r-md); font-family: var(--f-display); font-weight: 700; font-size: .95rem;
  }
  .nfilter__form { display: none; margin-top: .8rem; position: static; }
  .nfilter.is-open .nfilter__form { display: block; animation: nfilterDown .2s ease; }
  .nfilter__close { display: block !important; }
  .nfilter-layout--top .nfilter__form,
  .nfilter__form { flex-direction: column; align-items: stretch; }
  .nfilter-results .products-grid { grid-template-columns: repeat(2, 1fr); gap: .9rem; }
  @keyframes nfilterDown { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
}
@media (max-width: 420px) {
  .nfilter-results .products-grid { gap: .7rem; }
}

/* Filter disabled: products take full width */
.nfilter-layout--none { display: block; }
.nfilter-layout--none .nfilter-results { width: 100%; }
