/* ===========================================================
   RAT shop styles - ported from the React Automation Technology
   website (rat-website/frontend/src). Every rule is scoped under
   .shop so the IoT / maps / admin pages keep style.css untouched.
   =========================================================== */

/* ---------- from RAT index.css ---------- */
.shop {
  --bg: #101720;
  --bg-alt: #0B1119;
  --surface: #1A2431;
  --surface-2: #202D3D;
  --border: #2C3A49;
  --accent: #4FC3F7;
  --accent-2: #1E88E5;
  --on-accent: #0B1119;   /* text on accent-coloured buttons */
  --warning: #E0A15F;
  --accent-dim: #2A5A73;
  --text: #EAF3FA;
  --text-muted: #93A7B8;
  --text-faint: #8196A9;   /* was #5E7183; raised for readable contrast */
  --danger: #EF6B6B;
  --success: #52C793;
  --radius: 2px;
  --max-width: 1200px;
  --font-display: 'Sora', 'Segoe UI', sans-serif;
  --font-body: 'Inter', 'Segoe UI', sans-serif;
}
.shop h1,
.shop h2,
.shop h3,
.shop h4 {
  font-family: var(--font-display);
  margin: 0;
  color: var(--text);
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.shop p { margin: 0; }
.shop .panel {
  background: var(--surface);
  border: 1px solid var(--border);
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
  position: relative;
}
.shop .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.shop .btn:active { transform: translateY(1px); }
.shop .btn-primary {
  background: var(--accent);
  color: var(--on-accent);
}
.shop .btn-primary:hover { background: color-mix(in srgb, var(--accent) 80%, #fff); }
.shop .btn-outline {
  /* clip-path cuts the border off the two chamfered corners; redraw those
     diagonal edges so the outline is continuous. */
  --edge: var(--border);
  --diag: linear-gradient(to bottom left, transparent calc(50% - 0.7px), var(--edge) calc(50% - 0.7px), var(--edge) calc(50% + 0.7px), transparent calc(50% + 0.7px));
  background: var(--diag) top right / 10px 10px no-repeat, var(--diag) bottom left / 10px 10px no-repeat;
  border-color: var(--edge);
  color: var(--text);
}
.shop .btn-outline:hover { --edge: var(--accent); color: var(--accent); }
.shop .btn-block { width: 100%; }
.shop .field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}
.shop .field label {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
}
.shop .field input,
.shop .field textarea,
.shop .field select {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 11px 13px;
  font-size: 0.95rem;
  font-family: var(--font-body);
  border-radius: var(--radius);
}
.shop .field input:focus,
.shop .field textarea:focus,
.shop .field select:focus {
  outline: none;
  border-color: var(--accent);
}
.shop .field textarea { resize: vertical; min-height: 100px; }
.shop .tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  border: 1px solid var(--accent-dim);
  padding: 4px 10px;
}
.shop .error-text {
  color: var(--danger);
  font-size: 0.85rem;
}
.shop .success-text {
  color: var(--success);
  font-size: 0.85rem;
}
.shop ::selection {
  background: var(--accent);
  color: var(--on-accent);
}

/* ---------- from RAT pages/Home.css ---------- */
.shop .hero {
  padding: 72px 0 88px;
  background:
    radial-gradient(circle at 82% 20%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 55%),
    var(--bg);
  border-bottom: 1px solid var(--border);
}
.shop .hero-inner {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 48px;
  align-items: center;
}
.shop .hero-copy h1 {
  font-size: clamp(2rem, 4vw, 3.1rem);
  margin: 18px 0 22px;
}
.shop .hero-copy p {
  color: var(--text-muted);
  font-size: 1.02rem;
  max-width: 56ch;
  margin-bottom: 32px;
}
.shop .hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.shop .hero-graphic {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.shop .hero-graphic::before {
  content: '';
  position: absolute;
  inset: -20px;
  border: 1px solid var(--border);
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}
.shop .hero-graphic img {
  width: 60%;
  filter: drop-shadow(0 12px 30px color-mix(in srgb, var(--accent) 25%, transparent));
}
.shop .section-head {
  margin-bottom: 36px;
}
.shop .section-head h2 {
  font-size: 1.7rem;
  margin-bottom: 8px;
}
.shop .section-head p {
  color: var(--text-muted);
}
.shop .categories { padding: 88px 0; }
.shop .category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.shop .category-card {
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.shop .category-card:hover {
  border-color: var(--accent-dim);
  transform: translateY(-3px);
}
.shop .category-card h3 {
  font-size: 1.1rem;
}
.shop .category-card p {
  font-size: 0.87rem;
  color: var(--text-muted);
  flex: 1;
}
.shop .category-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
}
.shop .iiot-preview {
  padding: 0 0 88px;
}
.shop .iiot-preview .section-head h2 { margin: 14px 0 8px; }
.shop .iiot-preview .section-head p { max-width: 62ch; }
.shop .iiot-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 26px;
}
.shop .iiot-preview-card {
  padding: 26px 24px;
}
.shop .iiot-preview-index {
  display: block;
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 18px;
}
.shop .iiot-preview-card h3 { font-size: 1.05rem; margin-bottom: 10px; }
.shop .iiot-preview-card p { color: var(--text-muted); font-size: 0.88rem; }
.shop .iiot-preview-link { font-size: 0.88rem; padding: 11px 18px; }
.shop .featured { padding-bottom: 88px; }
.shop .product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.shop .cta-band {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 56px 0;
}
.shop .cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.shop .cta-inner h2 { font-size: 1.4rem; margin-bottom: 8px; }
.shop .cta-inner p { color: var(--text-muted); }
@media (max-width: 980px) {
.shop .hero-inner { grid-template-columns: 1fr; }
.shop .hero-graphic { order: -1; max-width: 260px; margin: 0 auto; }
.shop .category-grid { grid-template-columns: repeat(2, 1fr); }
.shop .iiot-preview-grid { grid-template-columns: 1fr; }
.shop .product-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
.shop .category-grid { grid-template-columns: 1fr; }
.shop .product-grid { grid-template-columns: 1fr; }
}

/* ---------- from RAT components/ProductCard.css ---------- */
.shop .product-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.shop .product-card:hover {
  border-color: var(--accent-dim);
  transform: translateY(-3px);
}
.shop .product-card-media {
  height: 120px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 14%, transparent), color-mix(in srgb, var(--accent-2) 5%, transparent)),
    repeating-linear-gradient(45deg, transparent, transparent 18px, color-mix(in srgb, var(--text) 3%, transparent) 18px, color-mix(in srgb, var(--text) 3%, transparent) 19px);
  display: flex;
  align-items: flex-start;
  padding: 14px;
}
.shop .product-card-body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.shop .product-card-body h3 {
  font-size: 1.02rem;
  font-weight: 700;
}
.shop .product-card-body p {
  font-size: 0.85rem;
  color: var(--text-muted);
  flex: 1;
}
.shop .product-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
}
.shop .product-price {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--accent);
}
.shop .stock {
  font-size: 0.75rem;
  font-weight: 600;
}
.shop .stock.in { color: var(--success); }
.shop .stock.out { color: var(--danger); }

/* ---------- from RAT pages/Products.css ---------- */
.shop.products-page {
  padding: 56px 0 96px;
}
.shop .products-head {
  margin-bottom: 28px;
}
.shop .products-head h1 {
  font-size: 2rem;
  margin-bottom: 10px;
}
.shop .products-head p {
  color: var(--text-muted);
  max-width: 60ch;
}
.shop .products-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 36px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 20px;
}
.shop .products-tab {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 9px 16px;
  border: 1px solid var(--border);
}
.shop .products-tab:hover { color: var(--text); border-color: var(--accent-dim); }
.shop .products-tab.active {
  color: var(--on-accent);
  background: var(--accent);
  border-color: var(--accent);
}
.shop .products-loading {
  color: var(--text-muted);
  padding: 40px 0;
}

/* ---------- from RAT pages/ProductDetail.css ---------- */
.shop .product-detail-loading {
  padding: 100px 0;
  color: var(--text-muted);
}
.shop.product-detail {
  padding: 40px 0 96px;
}
.shop .back-link {
  display: inline-block;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 28px;
}
.shop .back-link:hover { color: var(--accent); }
.shop .product-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
.shop .product-detail-media {
  aspect-ratio: 4 / 3;
  padding: 20px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 14%, transparent), color-mix(in srgb, var(--accent-2) 5%, transparent)),
    repeating-linear-gradient(45deg, transparent, transparent 22px, color-mix(in srgb, var(--text) 3%, transparent) 22px, color-mix(in srgb, var(--text) 3%, transparent) 23px);
}
.shop .product-detail-info h1 {
  font-size: 1.8rem;
  margin-bottom: 16px;
}
.shop .product-detail-desc {
  color: var(--text-muted);
  margin-bottom: 24px;
}
.shop .spec-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 28px;
  font-size: 0.87rem;
}
.shop .spec-table td {
  padding: 10px 4px;
  border-bottom: 1px solid var(--border);
}
.shop .spec-table td:first-child {
  color: var(--text-faint);
  width: 40%;
}
.shop .product-detail-buy {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.shop .buy-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.shop .buy-row label {
  font-size: 0.85rem;
  color: var(--text-muted);
}
.shop .buy-row input {
  width: 80px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 10px;
  border-radius: var(--radius);
}
.shop .buy-actions {
  display: flex;
  gap: 12px;
}
.shop .detail-enquire-link {
  font-size: 0.83rem;
  color: var(--accent);
  text-align: center;
}
@media (max-width: 800px) {
.shop .product-detail-grid { grid-template-columns: 1fr; }
.shop .buy-actions { flex-direction: column; }
}

/* ---------- from RAT pages/Cart.css ---------- */
.shop.cart-page {
  padding: 56px 0 100px;
}
.shop.cart-page h1 {
  font-size: 1.8rem;
  margin-bottom: 32px;
}
.shop .cart-empty {
  text-align: center;
  padding: 100px 0;
}
.shop .cart-empty h1 { margin-bottom: 10px; }
.shop .cart-empty p { color: var(--text-muted); margin-bottom: 24px; }
.shop .cart-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 32px;
  align-items: start;
}
.shop .cart-items {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.shop .cart-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  gap: 16px;
  flex-wrap: wrap;
}
.shop .cart-item h3 { font-size: 1rem; margin-bottom: 4px; }
.shop .cart-item p { font-size: 0.85rem; color: var(--text-muted); }
.shop .cart-item-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}
.shop .cart-item-actions input {
  width: 60px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 7px 9px;
  border-radius: var(--radius);
}
.shop .cart-item-total {
  font-weight: 700;
  color: var(--accent);
  min-width: 90px;
  text-align: right;
}
.shop .cart-remove {
  background: none;
  border: none;
  color: var(--danger);
  font-size: 0.8rem;
}
.shop .cart-summary {
  padding: 26px;
}
.shop .cart-summary h2 {
  font-size: 1.2rem;
  margin-bottom: 20px;
}
.shop .cart-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
}
.shop .cart-login-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.shop .cart-login-hint a { color: var(--accent); font-weight: 600; }
@media (max-width: 860px) {
.shop .cart-grid { grid-template-columns: 1fr; }
}

/* ---------- from RAT pages/FormPage.css ---------- */
.shop.form-page {
  padding: 72px 0 100px;
  display: flex;
  justify-content: center;
}
.shop .form-card {
  width: 100%;
  max-width: 440px;
  padding: 36px;
}
.shop .form-card h1 {
  font-size: 1.5rem;
  margin-bottom: 8px;
}
.shop .form-card .form-subtitle {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-bottom: 28px;
}
.shop .form-card .form-footer {
  margin-top: 20px;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
}
.shop .form-card .form-footer a {
  color: var(--accent);
  font-weight: 600;
}
.shop .form-alert {
  background: color-mix(in srgb, var(--danger) 10%, transparent);
  border: 1px solid var(--danger);
  color: var(--danger);
  font-size: 0.85rem;
  padding: 10px 14px;
  margin-bottom: 18px;
  border-radius: var(--radius);
}
.shop .form-success {
  background: color-mix(in srgb, var(--success) 10%, transparent);
  border: 1px solid var(--success);
  color: var(--success);
  font-size: 0.9rem;
  padding: 14px 16px;
  margin-bottom: 18px;
  border-radius: var(--radius);
}
.shop .form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.shop .form-row .field { min-width: 0; }
.shop .form-card .field input,
.shop .form-card .field textarea {
  width: 100%;
  min-width: 0;
}
@media (max-width: 520px) {
.shop .form-row { grid-template-columns: 1fr; }
}

/* ---------- from RAT pages/Account.css ---------- */
.shop .account-loading { padding: 100px 0; color: var(--text-muted); }
.shop.account-page {
  padding: 56px 0 100px;
}
.shop .account-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding-bottom: 28px;
  margin-bottom: 40px;
  border-bottom: 1px solid var(--border);
}
.shop .account-head h1 { font-size: 1.6rem; margin-bottom: 6px; }
.shop .account-head p { color: var(--text-muted); font-size: 0.88rem; }
.shop .account-section { margin-bottom: 48px; }
.shop .account-section h2 { font-size: 1.15rem; margin-bottom: 18px; }
.shop .account-empty { color: var(--text-faint); font-size: 0.9rem; }
.shop .account-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.shop .account-card {
  padding: 18px 22px;
}
.shop .account-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.shop .account-card ul {
  margin: 0 0 12px;
  padding-left: 18px;
  font-size: 0.87rem;
  color: var(--text-muted);
}
.shop .enquiry-message {
  font-size: 0.87rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.shop .account-card-foot {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-faint);
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.shop .order-status {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: capitalize;
  padding: 4px 10px;
}
.shop .status-pending,
.shop .status-new { color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.shop .status-confirmed,
.shop .status-contacted { color: #F5C563; background: color-mix(in srgb, var(--warning) 10%, transparent); }
.shop .status-delivered,
.shop .status-closed { color: var(--success); background: color-mix(in srgb, var(--success) 10%, transparent); }
.shop .status-cancelled { color: var(--danger); background: color-mix(in srgb, var(--danger) 10%, transparent); }

/* ---------- from RAT pages/About.css ---------- */
.shop.about-page {
  padding: 64px 0 100px;
}
.shop .about-head {
  max-width: 70ch;
  margin-bottom: 56px;
}
.shop .about-head h1 {
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  margin: 16px 0;
}
.shop .about-head p {
  color: var(--text-muted);
}
.shop .about-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 56px;
}
.shop .about-card {
  padding: 26px 22px;
}
.shop .about-card h3 { font-size: 1rem; margin-bottom: 10px; }
.shop .about-card p { font-size: 0.86rem; color: var(--text-muted); }
.shop .about-contact {
  padding: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}
.shop .about-contact h2 { font-size: 1.2rem; margin-bottom: 10px; }
.shop .about-contact p { font-size: 0.87rem; color: var(--text-muted); }
@media (max-width: 900px) {
.shop .about-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
.shop .about-grid { grid-template-columns: 1fr; }
}

/* ---------- from RAT pages/IIoTPrototypes.css ---------- */
.shop.iiot-page .section-pad { padding: 80px 0; }
.shop .iiot-hero {
  padding: 76px 0 84px;
  border-bottom: 1px solid var(--border);
  background: radial-gradient(circle at 82% 18%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 42%), var(--bg);
}
.shop .iiot-hero-inner {
  display: grid;
  grid-template-columns: 1fr 0.92fr;
  gap: 60px;
  align-items: center;
}
.shop .iiot-hero-copy h1 { font-size: clamp(2.2rem, 4vw, 3.5rem); margin: 20px 0; max-width: 16ch; }
.shop .iiot-hero-copy p { color: var(--text-muted); max-width: 58ch; font-size: 1.02rem; }
.shop .iiot-hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.shop .iiot-signal {
  padding: 28px;
  background: linear-gradient(145deg, color-mix(in srgb, var(--surface-2) 96%, transparent), color-mix(in srgb, var(--bg-alt) 96%, transparent));
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
}
.shop .iiot-signal-label,
.shop .iiot-build-eyebrow {
  color: var(--text-faint);
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}
.shop .iiot-signal-flow {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin: 28px 0;
  color: var(--accent);
  font: 700 0.68rem var(--font-display);
  letter-spacing: 0.04em;
}
.shop .iiot-signal-flow i { color: var(--text-faint); font-style: normal; font-size: 1rem; }
.shop .iiot-signal-readings { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.shop .iiot-signal-readings div { background: color-mix(in srgb, var(--bg-alt) 70%, transparent); border: 1px solid var(--border); padding: 14px 12px; }
.shop .iiot-signal-readings small,
.shop .iiot-signal-readings strong { display: block; }
.shop .iiot-signal-readings small { color: var(--text-faint); font-size: 0.59rem; letter-spacing: 0.07em; margin-bottom: 8px; }
.shop .iiot-signal-readings strong { font-size: 0.76rem; line-height: 1.35; }
.shop .iiot-signal-foot { display: flex; align-items: center; gap: 8px; color: var(--text-faint); font-size: 0.7rem; margin-top: 20px; }
.shop .iiot-signal-foot span { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 12px var(--success); }
.shop .iiot-prototypes { background: var(--bg-alt); }
.shop.iiot-page .section-head h2 { font-size: 1.8rem; margin: 14px 0 8px; }
.shop.iiot-page .section-head p { color: var(--text-muted); max-width: 65ch; }
.shop .iiot-prototype-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.shop .iiot-prototype-card { padding: 26px 24px; min-height: 300px; display: flex; flex-direction: column; }
.shop .iiot-card-topline { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 26px; }
.shop .iiot-card-number { color: var(--accent); font: 700 1.2rem var(--font-display); }
.shop .iiot-card-label { color: var(--text-faint); font-size: 0.62rem; letter-spacing: 0.08em; text-align: right; }
.shop .iiot-prototype-card h3 { font-size: 1.12rem; margin-bottom: 12px; }
.shop .iiot-card-summary { color: var(--text-muted); font-size: 0.86rem; }
.shop .iiot-chip-list { display: flex; flex-wrap: wrap; gap: 7px; margin: 20px 0; }
.shop .iiot-chip { color: var(--accent); border: 1px solid var(--accent-dim); background: color-mix(in srgb, var(--accent) 6%, transparent); padding: 5px 9px; font-size: 0.7rem; }
.shop .iiot-card-use { border-top: 1px solid var(--border); padding-top: 14px; margin-top: auto; display: flex; flex-direction: column; gap: 3px; }
.shop .iiot-card-use span { color: var(--text-faint); font-size: 0.68rem; }
.shop .iiot-card-use strong { font-size: 0.8rem; font-weight: 600; }
.shop .iiot-diy { background: var(--bg-alt); }
.shop .iiot-diy-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.shop .iiot-diy-card { padding: 24px 22px; min-height: 290px; display: flex; flex-direction: column; }
.shop .iiot-diy-card .iiot-card-topline { margin-bottom: 20px; }
.shop .iiot-diy-card h3 { font-size: 1rem; margin-bottom: 10px; }
.shop .iiot-diy-card .iiot-card-summary { font-size: 0.82rem; }
.shop .iiot-diy-card .iiot-chip-list { margin: 16px 0; }
.shop .iiot-diy-cta { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--border); }
.shop .iiot-diy-cta p { color: var(--text-muted); font-size: 0.88rem; }
.shop .iiot-diy-cta .btn { padding: 10px 16px; font-size: 0.82rem; }
.shop .iiot-pipeline { list-style: none; padding: 0; margin: 38px 0 20px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.shop .iiot-pipeline-step { position: relative; padding: 20px 16px; border: 1px solid var(--border); background: var(--surface); min-height: 150px; }
.shop .iiot-pipeline-step:not(:last-child)::after { content: '→'; position: absolute; z-index: 1; right: -14px; top: 22px; color: var(--accent); font-size: 1.1rem; }
.shop .iiot-pipeline-index { color: var(--accent); font-size: 0.66rem; font-weight: 700; letter-spacing: 0.1em; }
.shop .iiot-pipeline-step h3 { font-size: 0.96rem; margin: 16px 0 8px; }
.shop .iiot-pipeline-step p { color: var(--text-muted); font-size: 0.75rem; line-height: 1.45; }
.shop .iiot-architecture-note { color: var(--text-faint); font-size: 0.78rem; max-width: 90ch; }
.shop .iiot-build { background: var(--bg-alt); }
.shop .iiot-build-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 72px; align-items: center; }
.shop .iiot-build-grid h2 { font-size: 1.8rem; max-width: 19ch; margin: 16px 0; }
.shop .iiot-build-copy { color: var(--text-muted); max-width: 62ch; font-size: 0.9rem; }
.shop .iiot-build-list { list-style: none; padding: 0; margin: 24px 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px 22px; }
.shop .iiot-build-list li { position: relative; padding-left: 18px; color: var(--text); font-size: 0.82rem; }
.shop .iiot-build-list li::before { content: '＋'; position: absolute; left: 0; color: var(--accent); }
.shop .iiot-safety-note { color: var(--text-faint); font-size: 0.75rem; max-width: 70ch; }
.shop .iiot-build-card { padding: 28px; }
.shop .iiot-build-card .btn { margin-top: 24px; }
.shop .iiot-build-device { min-height: 200px; margin: 22px 0; border: 1px solid #385267; background: linear-gradient(145deg, #182535, #101923); display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative; overflow: hidden; }
.shop .iiot-build-device::before,
.shop .iiot-build-device::after { content: ''; position: absolute; width: 220px; height: 1px; background: color-mix(in srgb, var(--accent) 15%, transparent); transform: rotate(-35deg); }
.shop .iiot-build-device::before { top: 42px; left: -34px; }
.shop .iiot-build-device::after { bottom: 42px; right: -34px; }
.shop .iiot-device-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--success); box-shadow: 0 0 16px var(--success); position: absolute; top: 18px; right: 18px; }
.shop .iiot-device-title { color: var(--accent); font: 700 0.85rem var(--font-display); letter-spacing: 0.08em; }
.shop .iiot-device-line { width: 62%; height: 1px; background: var(--border); margin: 18px 0; }
.shop .iiot-device-markers { display: flex; gap: 12px; }
.shop .iiot-device-markers i { display: block; width: 28px; height: 28px; border: 1px solid var(--accent-dim); border-radius: 50%; background: color-mix(in srgb, var(--accent) 8%, transparent); }
.shop .iiot-device-caption { color: var(--text-faint); font-size: 0.6rem; letter-spacing: 0.1em; margin-top: 18px; }
.shop .iiot-build-caption { display: flex; flex-direction: column; gap: 4px; }
.shop .iiot-build-caption strong { font-size: 0.9rem; }
.shop .iiot-build-caption span { color: var(--text-muted); font-size: 0.78rem; }
.shop .iiot-final-cta { padding: 54px 0; border-top: 1px solid var(--border); background: radial-gradient(circle at 85% 50%, color-mix(in srgb, var(--accent) 9%, transparent), transparent 38%), var(--bg); }
.shop .iiot-final-cta-inner { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.shop .iiot-final-cta h2 { font-size: 1.45rem; margin: 12px 0 8px; }
.shop .iiot-final-cta p { color: var(--text-muted); font-size: 0.88rem; }
@media (max-width: 980px) {
.shop .iiot-hero-inner { grid-template-columns: 1fr; gap: 42px; }
.shop .iiot-signal { max-width: 650px; }
.shop .iiot-prototype-grid { grid-template-columns: 1fr 1fr; }
.shop .iiot-prototype-card:last-child { grid-column: 1 / -1; }
.shop .iiot-diy-grid { grid-template-columns: 1fr 1fr; }
.shop .iiot-pipeline { grid-template-columns: repeat(3, 1fr); }
.shop .iiot-pipeline-step:nth-child(3)::after { display: none; }
.shop .iiot-build-grid { grid-template-columns: 1fr 0.8fr; gap: 36px; }
}
@media (max-width: 680px) {
.shop.iiot-page .section-pad { padding: 58px 0; }
.shop .iiot-hero { padding: 56px 0 62px; }
.shop .iiot-hero-copy h1 { font-size: clamp(2rem, 10vw, 2.7rem); }
.shop .iiot-signal { padding: 20px; }
.shop .iiot-signal-flow { gap: 5px; font-size: 0.55rem; }
.shop .iiot-signal-flow i { font-size: 0.8rem; }
.shop .iiot-signal-readings { grid-template-columns: 1fr; }
.shop .iiot-signal-readings div { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.shop .iiot-signal-readings small { margin: 0; }
.shop .iiot-prototype-grid { grid-template-columns: 1fr; }
.shop .iiot-prototype-card:last-child { grid-column: auto; }
.shop .iiot-diy-grid { grid-template-columns: 1fr; }
.shop .iiot-diy-card { min-height: 0; }
.shop .iiot-diy-cta { align-items: flex-start; flex-direction: column; }
.shop .iiot-pipeline { grid-template-columns: 1fr; gap: 10px; }
.shop .iiot-pipeline-step { min-height: unset; padding: 16px; }
.shop .iiot-pipeline-step:not(:last-child)::after { content: '↓'; top: auto; bottom: -16px; right: 16px; }
.shop .iiot-pipeline-step:nth-child(3)::after { display: block; }
.shop .iiot-pipeline-step h3 { margin: 8px 0 4px; }
.shop .iiot-build-grid { grid-template-columns: 1fr; gap: 32px; }
.shop .iiot-build-list { grid-template-columns: 1fr; }
.shop .iiot-final-cta-inner { align-items: flex-start; flex-direction: column; }
}

/* ---------- from RAT components/Footer.css ---------- */
.shop .site-footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  margin-top: 100px;
  padding-top: 56px;
}
.shop .footer-inner {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
  gap: 40px;
  padding-bottom: 40px;
}
.shop .footer-brand {
  display: flex;
  gap: 14px;
}
.shop .footer-brand img { height: 44px; width: auto; }
.shop .footer-brand h4 {
  font-size: 1rem;
  margin-bottom: 8px;
}
.shop .footer-brand p {
  color: var(--text-muted);
  font-size: 0.88rem;
  max-width: 32ch;
}
.shop .footer-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.shop .footer-col h5 {
  font-family: var(--font-display);
  font-size: 0.78rem;
  color: var(--text-faint);
  font-weight: 600;
  margin-bottom: 4px;
}
.shop .footer-col a,
.shop .footer-col p {
  font-size: 0.86rem;
  color: var(--text-muted);
}
.shop .footer-col a:hover { color: var(--accent); }
.shop .footer-bottom {
  border-top: 1px solid var(--border);
  padding: 20px 0;
  font-size: 0.8rem;
  color: var(--text-faint);
}
@media (max-width: 800px) {
.shop .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 500px) {
.shop .footer-inner { grid-template-columns: 1fr; }
}


/* ---------- Django port additions ---------- */
.shop {
  font-family: var(--font-body);
  color: var(--text);
}
.shop .btn { border-radius: 0; cursor: pointer; }
.shop .btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.shop .btn-sm { padding: 9px 16px; font-size: 0.85rem; }
.shop .field ul.errorlist { list-style: none; margin: 0; padding: 0; color: var(--danger); font-size: 0.8rem; }
.shop .form-card.wide { max-width: 620px; }
.shop .products-search { display: flex; gap: 10px; margin-bottom: 18px; max-width: 460px; }
.shop .products-search input {
  flex: 1; min-width: 0; background: var(--bg-alt); border: 1px solid var(--border);
  color: var(--text); padding: 10px 12px; font-size: 0.9rem; border-radius: var(--radius);
}
.shop .product-card-body .btn { margin-top: 8px; }
.shop .product-card .product-card-link { display: flex; flex-direction: column; flex: 1; }
.shop .cart-item-actions form { display: inline-flex; align-items: center; gap: 8px; }
.shop .cart-summary .btn + .btn { margin-top: 10px; }
.shop .checkout-lines { list-style: none; padding: 0; margin: 0 0 18px; font-size: 0.87rem; }
.shop .checkout-lines li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border); color: var(--text-muted); }
.shop .order-meta { color: var(--text-muted); font-size: 0.88rem; margin-bottom: 24px; }
.shop .order-meta strong { color: var(--text); }
.shop .hero-graphic img { max-width: 220px; }

/* Site footer (<footer class="footer shop site-footer-wrap"> in base.html;
   keeps .footer so mobile.css still pads it above the tab bar) */
.shop.site-footer-wrap { text-align: left; padding-top: 0; border-top: 0; margin-top: auto; }
.shop.site-footer-wrap .site-footer { margin-top: 60px; }
.shop .footer-brand img { height: 44px; width: auto; }
.shop .footer-col a[href]:hover { color: var(--accent); }
@media (max-width: 800px) {
  .shop .product-detail-media { aspect-ratio: auto; height: 140px; }
}
@media (max-width: 720px) {
  .shop .hero { padding: 32px 0 48px; }
  .shop .categories, .shop .featured { padding: 48px 0; }
  .shop .iiot-preview { padding-bottom: 48px; }
}

/* Full-bleed bands: the hero and CTA backgrounds run edge to edge while
   their content stays aligned with the page container. */
.shop .hero, .shop .iiot-hero, .shop .cta-band {
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding-left: calc(50vw - 50%);
  padding-right: calc(50vw - 50%);
}
.shop .hero-copy { text-align: left; }
.shop .hero-copy h1 { max-width: 20ch; }
.shop .hero-graphic img { max-width: 260px; }
@media (max-width: 720px) {
  .shop .hero-graphic { max-width: 150px; }
  .shop .hero-graphic img { max-width: 120px; }
}

/* Product media: photo when set, otherwise a category line icon */
.shop .product-card-media, .shop .product-detail-media { position: relative; overflow: hidden; }
.shop .product-card-media { height: 150px; }
.shop .product-card-media .tag, .shop .product-detail-media .tag { position: relative; z-index: 1; }
.shop .product-icon {
  position: absolute; inset: 0; margin: auto;
  width: 64px; height: 64px;
  color: var(--accent);
  opacity: 0.85;
  filter: drop-shadow(0 6px 18px color-mix(in srgb, var(--accent) 25%, transparent));
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.shop .product-detail-media .product-icon { width: 38%; height: 38%; max-width: 160px; max-height: 160px; }
.shop .product-card:hover .product-icon { transform: scale(1.08); opacity: 1; }
.shop .product-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.shop .product-detail-media { aspect-ratio: 5 / 4; }
/* With a real photo: show the whole product (no cropping) below the category
   tag instead of under it, and give the photo enough height on phones. */
.shop .has-photo .product-photo {
  inset: 50px 14px 14px; width: calc(100% - 28px); height: calc(100% - 64px);
  object-fit: contain; border-radius: 4px;
}
.shop .product-card-media.has-photo { height: 210px; }
.shop .product-detail-media.has-photo .product-photo { inset: 58px 20px 20px; width: calc(100% - 40px); height: calc(100% - 78px); }
@media (max-width: 800px) {
  .shop .product-detail-media.has-photo { aspect-ratio: 4 / 3; height: auto; max-height: 70vh; }
}

/* Home hero: RAT hub wired to what we build (replaces the duplicate logo) */
.shop .hero-wiring::before { display: none; }
.shop .hero-wiring svg { width: 100%; max-width: 460px; height: auto; overflow: visible; }
.shop .wire-lines path { stroke: var(--border); stroke-width: 2; }
.shop .wire-pulses path {
  stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round;
  stroke-dasharray: 10 150; animation: wire-pulse 2.8s linear infinite;
  filter: drop-shadow(0 0 4px color-mix(in srgb, var(--accent) 80%, transparent));
}
.shop .wire-pulses path:nth-child(2) { animation-delay: -0.7s; }
.shop .wire-pulses path:nth-child(3) { animation-delay: -1.4s; }
.shop .wire-pulses path:nth-child(4) { animation-delay: -2.1s; }
@keyframes wire-pulse { from { stroke-dashoffset: 160; } to { stroke-dashoffset: 0; } }
.shop .hub { fill: var(--surface); stroke: var(--accent-dim); stroke-width: 1.5; }
.shop .hub-ring { stroke: color-mix(in srgb, var(--accent) 25%, transparent); stroke-width: 1; stroke-dasharray: 4 6; transform-origin: 210px 170px; animation: hub-spin 30s linear infinite; }
@keyframes hub-spin { to { transform: rotate(360deg); } }
.shop .wire-node rect { fill: var(--surface); stroke: var(--border); }
.shop .wire-node .ic { stroke: var(--accent); stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.shop .wire-node text { fill: var(--text); font: 600 13px var(--font-display); }
@media (prefers-reduced-motion: reduce) {
  .shop .wire-pulses path, .shop .hub-ring { animation: none; }
}
.shop .trust-strip {
  list-style: none; padding: 0; margin: 28px 0 0;
  display: flex; flex-wrap: wrap; gap: 8px 22px;
  font-size: 0.85rem; color: var(--text-muted);
}
.shop .trust-strip li { display: inline-flex; align-items: center; gap: 8px; }
.shop .trust-strip li::before { content: ''; width: 6px; height: 6px; background: var(--accent); transform: rotate(45deg); }
.shop .trust-strip a:hover { color: var(--accent); }
@media (max-width: 980px) {
  .shop .hero-wiring { order: 0; max-width: 420px; margin: 8px auto 0; }
}
@media (max-width: 720px) {
  .shop .hero-wiring { max-width: 320px; }
  .shop .hero-wiring .product-icon, .shop .hero-graphic img { max-width: none; }
}

/* Empty states (cart, orders, enquiries, search) */
.shop .empty-state {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 12px; padding: 48px 24px; margin-top: 12px;
}
.shop .empty-state svg { width: 56px; height: 56px; color: var(--accent); opacity: 0.85; margin-bottom: 6px; }
.shop .empty-state h3 { font-size: 1.15rem; }
.shop .empty-state p { color: var(--text-muted); font-size: 0.92rem; max-width: 46ch; margin-bottom: 8px; }
.shop .product-grid > .empty-state { grid-column: 1 / -1; }


/* ---- UPI payment page (marketplace/order_pay.html) ---- */
.pay-box { text-align: center; }
.pay-amount { font-family: var(--font-display); font-size: 34px; font-weight: 700; color: var(--text); margin: 4px 0; }
.pay-to { color: var(--text-muted); margin: 0 0 14px; }
.pay-page .mono { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 13px; }
.pay-qr { display: block; margin: 0 auto 10px; width: 260px; max-width: 100%; height: auto; border-radius: 10px; background: #fff; padding: 6px; }
.pay-timer { margin: 6px 0 14px; color: var(--text-muted); }
.pay-timer strong { color: var(--accent); font-variant-numeric: tabular-nums; font-size: 18px; }
.pay-claim { margin-top: 12px; }
.pay-box form + form { margin-top: 10px; }
.order-status.pay-awaiting, .order-status.pay-claimed { color: var(--warning); }
.order-status.pay-paid { color: var(--success); }
.order-status.pay-expired, .order-status.pay-not_received { color: var(--danger); }
/* "Pay with UPI app" only makes sense on a phone */
@media (min-width: 900px) { .shop .pay-box .pay-app { display: none; } }

/* ---- Demo / test payments (marketplace/_pay_banner.html, demo_gateway.html) ---- */
.pay-banner { border: 1px dashed var(--warning); color: var(--warning); border-radius: 10px; padding: 8px 12px; margin: 0 0 14px; font-size: 14px; }
.order-status.pay-failed, .order-status.pay-refunded { color: var(--danger); }
.demo-gw { max-width: 440px; margin: 10px auto; text-align: center; }
.demo-gw-brand { font-family: var(--font-display); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text-muted); margin: 0 0 10px; }
.demo-gw-actions { display: flex; flex-direction: column; gap: 10px; margin: 16px 0 10px; }

/* ---- Policy pages (marketplace/policy.html) ---- */
.policy-body { max-width: 820px; line-height: 1.7; }
.policy-body p { margin: 0 0 14px; color: var(--text-muted); }

/* Home hero hub: the shop's initial when no logo is uploaded (Website -> Look) */
.shop .hub-initial { fill: var(--accent); font: 700 46px var(--font-display); }
