/* ═══════════════════════════════════════════
   STEM NEXUS AFRICA — shop.css
   Shop Section (Updated: search, filters, product modal, checkout)
═══════════════════════════════════════════ */

/* ─── SEARCH & FILTER BAR ─────────────────── */
.shop-controls {
  display: flex; flex-direction: column; gap: 16px; margin-bottom: 40px;
}
.shop-search-wrap {
  position: relative; max-width: 480px;
}
.shop-search-wrap i {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: #aaa; font-size: 1rem; pointer-events: none;
}
.shop-search-input {
  width: 100%; padding: 12px 16px 12px 40px;
  font-family: var(--font-body); font-size: 0.9rem; color: #222233;
  background: var(--white); border: 1px solid #d0d0dc;
  outline: none; transition: border-color var(--transition);
}
.shop-search-input:focus { border-color: #0099FF; }
.shop-search-input::placeholder { color: #bbb; }

.shop-filter-row {
  display: flex; gap: 24px; flex-wrap: wrap; align-items: flex-start;
}
.filter-group { display: flex; flex-direction: column; gap: 6px; }
.filter-group-label {
  font-family: var(--font-head); font-size: 0.65rem; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase; color: #aaa;
}
.filter-chips { display: flex; gap: 4px; flex-wrap: wrap; }
.filter-btn {
  font-family: var(--font-head); font-weight: 700; font-size: 0.8rem;
  letter-spacing: 0.07em; text-transform: uppercase;
  background: var(--white-2); color: #555;
  border: 1px solid #d0d0dc; padding: 8px 16px;
  cursor: pointer; transition: all var(--transition);
  white-space: nowrap;
}
.filter-btn.active, .filter-btn:hover {
  background: #0099FF; color: #fff; border-color: #0099FF;
}

/* ─── PRODUCTS GRID ───────────────────────── */
.shop-section { background: var(--white); }
.products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px; background: #e0e0e8;
  margin-bottom: 40px;
}
.no-results {
  grid-column: 1 / -1;
  padding: 60px 20px; text-align: center;
  font-family: var(--font-head); font-size: 1.1rem;
  color: #aaa; text-transform: uppercase; letter-spacing: 0.1em;
  background: var(--white);
}

.product-card {
  background: var(--white); overflow: hidden;
  transition: background var(--transition), box-shadow var(--transition);
  display: flex; flex-direction: column; cursor: pointer;
}
.product-card:hover { background: var(--white-2); box-shadow: 0 4px 24px rgba(0,153,255,0.07); }

.product-card__img {
  height: 200px; background: #f4f4f8;
  overflow: hidden; position: relative;
  border-bottom: 2px solid #e0e0e8;
  transition: border-color var(--transition);
}
.product-card__img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.4s ease;
}
.product-card:hover .product-card__img { border-color: #0099FF; }
.product-card:hover .product-card__img img { transform: scale(1.04); }

.product-card__badge {
  position: absolute; top: 10px; left: 10px;
  background: #0099FF; color: #fff;
  font-family: var(--font-head); font-size: 0.6rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  padding: 3px 8px;
}

.product-card__body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.product-cat {
  font-family: var(--font-head); font-size: 0.65rem; font-weight: 700;
  letter-spacing: 0.2em; color: #0099FF; text-transform: uppercase; margin-bottom: 6px;
}
.product-name {
  font-family: var(--font-head); font-weight: 700; font-size: 1rem;
  text-transform: uppercase; margin-bottom: 8px; line-height: 1.2; color: #222233;
}
.product-desc { font-size: 0.82rem; color: #888; margin-bottom: 12px; flex: 1; }
.product-price {
  font-family: var(--font-head); font-weight: 900; font-size: 1.3rem;
  color: #222233; margin-bottom: 4px;
}
.product-price-note { font-size: 0.75rem; color: #aaa; margin-bottom: 16px; }
.product-meta-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.product-meta-tag {
  font-family: var(--font-head); font-size: 0.62rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 3px 8px; border: 1px solid #e0e0e8; color: #999;
}
.product-actions { display: flex; gap: 8px; }
.add-cart-btn {
  flex: 1; background: #0099FF; color: #fff; border: none;
  font-family: var(--font-head); font-weight: 700; font-size: 0.8rem;
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 10px 12px; cursor: pointer;
  transition: background var(--transition);
}
.add-cart-btn:hover { background: #007acc; }
.quote-btn {
  background: none; border: 1px solid #d0d0dc; color: #888;
  font-family: var(--font-head); font-weight: 700; font-size: 0.8rem;
  letter-spacing: 0.04em; text-transform: uppercase;
  padding: 10px 12px; cursor: pointer;
  transition: all var(--transition);
}
.quote-btn:hover { border-color: #0099FF; color: #0099FF; }

.shop-cta-bar {
  background: var(--white-2); border: 1px solid #d0d0dc;
  border-left: 4px solid #0099FF;
  padding: 20px 28px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-family: var(--font-head); font-weight: 600; color: #555;
}
.shop-cta-bar i { color: #0099FF; margin-right: 8px; }

/* ─── PRODUCT DETAIL MODAL ────────────────── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.55);
  z-index: 9000; display: flex; align-items: center; justify-content: center;
  padding: 20px; opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }

.product-modal {
  background: var(--white); max-width: 920px; width: 100%;
  max-height: 90vh; overflow-y: auto;
  transform: translateY(24px); transition: transform 0.3s ease;
  position: relative;
}
.modal-overlay.open .product-modal { transform: translateY(0); }

.product-modal__close {
  position: absolute; top: 16px; right: 16px; z-index: 10;
  background: none; border: 1px solid #d0d0dc; width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 1.1rem; color: #777;
  transition: all var(--transition);
}
.product-modal__close:hover { border-color: #0099FF; color: #0099FF; }

.product-modal__inner {
  display: grid; grid-template-columns: 1fr 1fr; min-height: 420px;
}
.product-modal__gallery {
  background: #f4f4f8; position: relative; overflow: hidden;
}
.product-modal__gallery img {
  width: 100%; height: 100%; object-fit: cover; min-height: 320px;
}
.product-modal__info { padding: 36px; display: flex; flex-direction: column; }
.product-modal__cat {
  font-family: var(--font-head); font-size: 0.65rem; font-weight: 700;
  letter-spacing: 0.2em; color: #0099FF; text-transform: uppercase; margin-bottom: 8px;
}
.product-modal__name {
  font-family: var(--font-head); font-weight: 800; font-size: 1.5rem;
  text-transform: uppercase; line-height: 1.15; color: #222233; margin-bottom: 12px;
}
.product-modal__desc { font-size: 0.9rem; color: #666; line-height: 1.7; margin-bottom: 20px; flex: 1; }

.product-modal__specs { margin-bottom: 20px; }
.product-modal__specs-title {
  font-family: var(--font-head); font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.15em; text-transform: uppercase; color: #aaa; margin-bottom: 10px;
}
.product-modal__spec-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 7px 0; border-bottom: 1px solid #f0f0f4; font-size: 0.84rem;
}
.product-modal__spec-row:last-child { border-bottom: none; }
.spec-key { color: #999; font-family: var(--font-head); font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.spec-val { color: #222233; font-weight: 500; text-align: right; }

.product-modal__price-row {
  display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px;
}
.product-modal__price {
  font-family: var(--font-head); font-weight: 900; font-size: 2rem; color: #222233;
}
.product-modal__price-note { font-size: 0.78rem; color: #aaa; }
.product-modal__actions { display: flex; gap: 10px; margin-top: 16px; }
.modal-buy-btn {
  flex: 1; background: #0099FF; color: #fff; border: none;
  font-family: var(--font-head); font-weight: 700; font-size: 0.9rem;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 14px 20px; cursor: pointer; transition: background var(--transition);
}
.modal-buy-btn:hover { background: #007acc; }
.modal-cancel-btn {
  background: none; border: 1px solid #d0d0dc; color: #888;
  font-family: var(--font-head); font-weight: 700; font-size: 0.9rem;
  letter-spacing: 0.04em; text-transform: uppercase;
  padding: 14px 20px; cursor: pointer; transition: all var(--transition);
}
.modal-cancel-btn:hover { border-color: #999; color: #555; }

/* ─── CHECKOUT MODAL ──────────────────────── */
.checkout-modal {
  background: var(--white); max-width: 560px; width: 100%;
  max-height: 92vh; overflow-y: auto;
  transform: translateY(24px); transition: transform 0.3s ease;
  position: relative;
}
.modal-overlay.open .checkout-modal { transform: translateY(0); }

.checkout-modal__header {
  background: #222233; color: #fff;
  padding: 24px 28px; display: flex; align-items: center; justify-content: space-between;
}
.checkout-modal__title {
  font-family: var(--font-head); font-weight: 800; font-size: 1.1rem;
  letter-spacing: 0.12em; text-transform: uppercase;
}
.checkout-modal__close {
  background: none; border: 1px solid rgba(255,255,255,0.3); width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 1rem; color: #fff; transition: all var(--transition);
}
.checkout-modal__close:hover { border-color: #fff; }

.checkout-modal__body { padding: 28px; }

.checkout-product-summary {
  display: flex; gap: 14px; align-items: center;
  background: var(--white-2); padding: 16px; margin-bottom: 24px;
  border-left: 3px solid #0099FF;
}
.checkout-product-summary img {
  width: 64px; height: 64px; object-fit: cover; flex-shrink: 0;
}
.checkout-product-summary__name {
  font-family: var(--font-head); font-weight: 700; font-size: 0.95rem;
  text-transform: uppercase; color: #222233; margin-bottom: 4px;
}
.checkout-product-summary__price {
  font-family: var(--font-head); font-weight: 900; font-size: 1.2rem; color: #0099FF;
}

.checkout-steps {
  display: flex; gap: 0; margin-bottom: 28px; border-bottom: 2px solid #e0e0e8;
}
.checkout-step-tab {
  flex: 1; padding: 10px 4px; text-align: center;
  font-family: var(--font-head); font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase; color: #bbb;
  border-bottom: 2px solid transparent; margin-bottom: -2px;
  transition: all var(--transition); cursor: default;
}
.checkout-step-tab.active { color: #0099FF; border-bottom-color: #0099FF; }
.checkout-step-tab.done { color: #22c55e; border-bottom-color: #22c55e; }

.form-section { display: none; }
.form-section.active { display: block; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.form-row.full { grid-template-columns: 1fr; }
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-label {
  font-family: var(--font-head); font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase; color: #999;
}
.form-control-sna {
  padding: 11px 14px; font-family: var(--font-body); font-size: 0.88rem; color: #222233;
  background: var(--white); border: 1px solid #d0d0dc;
  outline: none; transition: border-color var(--transition); width: 100%;
}
.form-control-sna:focus { border-color: #0099FF; }
.form-control-sna.error { border-color: #ef4444; }
.field-error { font-size: 0.72rem; color: #ef4444; margin-top: 3px; }

.payment-suspended-notice {
  background: #fff8e1; border: 1px solid #f5c518; border-left: 4px solid #f5c518;
  padding: 16px 18px; margin-bottom: 20px;
}
.payment-suspended-notice__title {
  font-family: var(--font-head); font-weight: 800; font-size: 0.85rem;
  letter-spacing: 0.08em; text-transform: uppercase; color: #92640a; margin-bottom: 6px;
  display: flex; align-items: center; gap: 8px;
}
.payment-suspended-notice p {
  font-size: 0.84rem; color: #7a5c1a; line-height: 1.55; margin: 0;
}

.order-summary-table { width: 100%; margin-bottom: 16px; }
.order-summary-table td { padding: 7px 0; font-size: 0.87rem; vertical-align: top; }
.order-summary-table td:last-child { text-align: right; font-weight: 600; }
.order-summary-table tr.total td {
  font-family: var(--font-head); font-weight: 800; font-size: 1.05rem;
  border-top: 2px solid #e0e0e8; padding-top: 12px;
}
.checkout-secure-note {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.78rem; color: #aaa; margin-bottom: 20px;
}
.checkout-secure-note i { color: #22c55e; font-size: 1rem; }

.checkout-btn-row { display: flex; gap: 10px; }
.checkout-next-btn {
  flex: 1; background: #0099FF; color: #fff; border: none;
  font-family: var(--font-head); font-weight: 700; font-size: 0.9rem;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 14px 20px; cursor: pointer; transition: background var(--transition);
}
.checkout-next-btn:hover { background: #007acc; }
.checkout-next-btn:disabled { background: #ccc; cursor: not-allowed; }
.checkout-back-btn {
  background: none; border: 1px solid #d0d0dc; color: #888;
  font-family: var(--font-head); font-weight: 700; font-size: 0.9rem;
  letter-spacing: 0.04em; text-transform: uppercase;
  padding: 14px 20px; cursor: pointer; transition: all var(--transition);
}
.checkout-back-btn:hover { border-color: #999; color: #555; }

/* Success state */
.checkout-success {
  text-align: center; padding: 40px 28px;
}
.checkout-success__icon {
  width: 64px; height: 64px; background: #dcfce7;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px; font-size: 1.8rem; color: #16a34a;
}
.checkout-success__title {
  font-family: var(--font-head); font-weight: 800; font-size: 1.3rem;
  text-transform: uppercase; color: #222233; margin-bottom: 10px;
}
.checkout-success p { color: #666; font-size: 0.88rem; line-height: 1.65; margin-bottom: 20px; }

/* ─── VALUE PROPS ────────────────────────── */
.shop-value-section { background: var(--white-2); }
.shop-value-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 2px; background: #e0e0e8;
}
.shop-value-card {
  background: var(--white); padding: 40px 28px;
  border-top: 3px solid transparent;
  transition: border-color var(--transition), background var(--transition);
}
.shop-value-card:hover { border-top-color: #0099FF; background: rgba(0,153,255,0.02); }
.shop-value-card i {
  font-size: 2rem; color: #0099FF; display: block; margin-bottom: 16px;
}
.shop-value-card h4 {
  font-family: var(--font-head); font-weight: 800;
  font-size: 1.05rem; text-transform: uppercase; margin-bottom: 10px; color: #222233;
}
.shop-value-card p { color: #666; font-size: 0.88rem; line-height: 1.65; }

/* ─── QUANTITY ────────────────────────────── */
.qty-control {
  display: flex; align-items: center; gap: 0; border: 1px solid #d0d0dc;
  width: fit-content; margin-bottom: 16px;
}
.qty-btn {
  background: none; border: none; width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 1rem; color: #555; transition: all var(--transition);
}
.qty-btn:hover { background: var(--white-2); color: #0099FF; }
.qty-input {
  width: 48px; height: 36px; border: none; border-left: 1px solid #d0d0dc; border-right: 1px solid #d0d0dc;
  text-align: center; font-family: var(--font-head); font-weight: 700; font-size: 0.95rem;
  color: #222233; outline: none; -moz-appearance: textfield;
}
.qty-input::-webkit-inner-spin-button, .qty-input::-webkit-outer-spin-button { -webkit-appearance: none; }

/* ─── RESPONSIVE ─────────────────────────── */
@media (max-width: 991px) {
  .products-grid { grid-template-columns: repeat(2, 1fr); }
  .shop-value-grid { grid-template-columns: repeat(2, 1fr); }
  .shop-cta-bar { flex-direction: column; text-align: center; }
  .product-modal__inner { grid-template-columns: 1fr; }
  .product-modal__gallery img { min-height: 240px; max-height: 280px; }
  .shop-filter-row { flex-direction: column; gap: 16px; }
}
@media (max-width: 575px) {
  .products-grid { grid-template-columns: 1fr; }
  .shop-value-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .checkout-btn-row { flex-direction: column; }
}

/* ─── LOADING SPINNER (append to shop.css) ── */
.shop-loading {
  grid-column: 1 / -1;
  padding: 80px 20px;
  display: flex; flex-direction: column; align-items: center; gap: 18px;
  background: var(--white);
}
.shop-spinner {
  width: 40px; height: 40px;
  border: 3px solid #e0e0e8;
  border-top-color: #0099FF;
  border-radius: 50%;
  animation: shop-spin 0.8s linear infinite;
}
.shop-loading__text {
  font-family: var(--font-head); font-size: 0.85rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase; color: #aaa;
}
@keyframes shop-spin {
  to { transform: rotate(360deg); }
}