/* ==================================================================
   TECH SILO — one stylesheet. Navy and teal, one plain font.
   Change the colours in :root and the whole site follows.
   ================================================================== */
:root {
  --brand: #0f2a44;      /* navy: menu bar, footer, dark slides */
  --brand-2: #1c3f63;    /* lighter navy for hovers and chosen items */
  --on-brand-soft: #b9c7d6; /* quieter text on navy */
  --accent: #0e7c86;     /* teal: buttons and highlights */
  --accent-dark: #0a5f67;
  --ink: #16202a;        /* main text */
  --ink-soft: #52606d;
  --line: #dde5ec;
  --panel: #eef3f7;      /* pale blue tiles and picture backgrounds */
  --page: #ffffff;
  --good: #1a7f37;       /* in stock */
  --bad: #b3261e;        /* out of stock */
  --radius: 6px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--page); color: var(--ink); font: 14px/1.5 Arial, Helvetica, sans-serif; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 16px; }
main { min-height: 50vh; padding-bottom: 48px; }

/* ---- Thin strip at the very top ---- */
.topstrip { background: var(--panel); font-size: 12px; color: var(--ink-soft); }
.topstrip .wrap { display: flex; justify-content: space-between; gap: 12px; padding-top: 6px; padding-bottom: 6px; }
.topstrip nav a { margin-left: 16px; text-decoration: none; }
.topstrip nav a:hover { text-decoration: underline; }

/* ---- Logo, search, basket ---- */
.masthead-row { display: flex; align-items: center; gap: 20px; padding-top: 14px; padding-bottom: 14px; }
.logo img { width: 190px; height: 40px; }
.search { margin-left: auto; display: flex; border: 1px solid #c3ced8; border-radius: var(--radius); overflow: hidden; width: 320px; }
.search input { flex: 1; border: 0; padding: 9px 12px; font: inherit; min-width: 0; }
.search button { border: 0; background: #fff; padding: 0 12px; cursor: pointer; color: var(--ink-soft); }
.search:focus-within { border-color: var(--accent); }
.basket-btn { display: flex; align-items: center; gap: 8px; background: var(--accent); color: #fff; text-decoration: none; font-weight: 700; padding: 9px 14px; border-radius: var(--radius); white-space: nowrap; }
.basket-btn:hover { background: var(--accent-dark); }
.basket-btn .count { background: #fff; color: var(--accent-dark); border-radius: 10px; padding: 0 7px; font-size: 12px; }

/* ---- Black category bar ---- */
.catbar { background: var(--brand); }
.catbar ul { list-style: none; display: flex; flex-wrap: wrap; margin: 0 auto; }
.catbar a { display: block; color: #fff; text-decoration: none; padding: 11px 12px; font-size: 13px; }
.catbar li:first-child a { padding-left: 0; }
.catbar a:hover, .catbar a.on { text-decoration: underline; text-decoration-color: #5fc4cc; text-decoration-thickness: 2px; text-underline-offset: 5px; }
.menu-toggle, .menu-label { display: none; }

/* ---- Buttons ---- */
.btn { display: inline-block; background: var(--accent); color: #fff; border: 0; border-radius: var(--radius); padding: 9px 14px; font: 700 13px Arial, Helvetica, sans-serif; cursor: pointer; text-decoration: none; text-align: center; }
.btn:hover { background: var(--accent-dark); }
.btn:disabled { background: #dde5ec; color: #52606d; cursor: not-allowed; }
.btn-block { width: 100%; }
.btn-big { padding: 13px 22px; font-size: 15px; }
.btn-small { padding: 6px 10px; }
.btn-light { background: #fff; color: var(--brand); }
.btn-light:hover { background: var(--panel); }
.link-btn { background: none; border: 0; color: var(--ink-soft); text-decoration: underline; cursor: pointer; font: inherit; }

/* ---- Home ---- */
.section-title { font-size: 20px; margin: 36px 0 16px; }

/* Home page slider */
.slider { padding-top: 20px; }
.slider-frame { position: relative; }
.slides { position: relative; height: 340px; border-radius: var(--radius); overflow: hidden; background: var(--panel); }
.slide { position: absolute; inset: 0; display: grid; grid-template-columns: 1fr 1fr; align-items: center; background: var(--panel); opacity: 0; visibility: hidden; transition: opacity .6s ease, visibility .6s; }
.slide.is-on { opacity: 1; visibility: visible; }
.slide-dark { background: var(--brand); color: #fff; }
.slide-text { padding: 28px 24px 28px 72px; }
.slide-kicker { margin: 0 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-soft); }
.slide-kicker { color: var(--accent-dark) !important; font-weight: 700; }
.slide-dark .slide-kicker { color: #5fc4cc !important; }
.slide-dark .slide-price { color: #fff; }
.slide-dark .slide-line, .slide-dark .slide-code, .slide-dark .slide-price small { color: var(--on-brand-soft); }
.slide-headline { font-size: 34px; margin-bottom: 10px; }
.slide-line { margin: 0 0 16px; color: var(--ink-soft); font-size: 15px; max-width: 440px; }
.slide-price { font-size: 30px; font-weight: 700; color: var(--brand); margin: 0 0 16px; }
.slide-price small { font-size: 12px; font-weight: 400; color: var(--ink-soft); }
.slide-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.slide-code { font-size: 13px; font-weight: 700; color: var(--ink-soft); }
.slide-dark .slide-btn { background: #fff; color: var(--brand); }
.slide-dark .slide-btn:hover { background: var(--panel); }
.slide-img { display: flex; align-items: center; justify-content: center; height: 100%; padding: 20px 64px 20px 12px; }
.slide-img img { max-height: 290px; width: auto; object-fit: contain; border-radius: 4px; }
.slide:not(.slide-dark) .slide-img img { mix-blend-mode: multiply; }
.slide-dark .slide-img img { background: #fff; padding: 12px; }
.slider-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 36px; height: 44px; border: 0; border-radius: 4px; background: rgba(255,255,255,.92); color: var(--brand); box-shadow: 0 1px 4px rgba(15,42,68,.25); font-size: 28px; line-height: 1; cursor: pointer; z-index: 2; }
.slider-arrow:hover { background: #fff; color: var(--accent); }
.slider-arrow.prev { left: 28px; }
.slider-arrow.next { right: 28px; }
.slider-dots { display: flex; justify-content: center; gap: 8px; margin-top: 12px; }
.slider-dots button { width: 10px; height: 10px; border-radius: 50%; border: 0; padding: 0; background: #c3ced8; cursor: pointer; }
.slider-dots button[aria-current="true"] { background: var(--accent); }
.slider button:focus-visible, .slider a:focus-visible { outline: 3px solid #5fc4cc; outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .slide { transition: none; } }

/* Picture tiles (home + parent categories) */
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.tile { position: relative; display: flex; align-items: flex-end; min-height: 210px; background: var(--panel); border-radius: var(--radius); overflow: hidden; text-decoration: none; box-shadow: 0 2px 0 #d3dde6; }
.tile:hover .tile-label { color: var(--accent); }
.tile img { position: absolute; right: 0; top: 50%; transform: translateY(-50%); width: 58%; height: 90%; object-fit: contain; mix-blend-mode: multiply; transition: transform .2s; }
.tile:hover img { transform: translateY(-50%) scale(1.04); }
.tile-label { position: relative; padding: 18px; font-size: 24px; font-weight: 700; max-width: 55%; }
.tile-label small { display: block; font-size: 13px; font-weight: 400; color: var(--ink-soft); margin-top: 2px; }
.tiles-small .tile { min-height: 170px; }
.tiles-small .tile-label { font-size: 19px; }

/* ---- Category page ---- */
.layout { display: grid; grid-template-columns: 220px 1fr; gap: 32px; padding-top: 20px; }
.sidebar h2 { font-size: 13px; font-weight: 400; margin-bottom: 10px; }
.side-btn { display: flex; justify-content: space-between; background: var(--brand); color: #fff; text-decoration: none; padding: 8px 10px; border-radius: 4px; margin-bottom: 6px; font-size: 13px; }
.side-btn span { color: var(--on-brand-soft); }
.side-btn:hover { background: var(--brand-2); }
.side-btn.on { background: var(--accent); }
.side-btn.on span { color: #fff; }
.crumbs { font-size: 12px; color: var(--ink-soft); margin: 20px 0 8px; }
.layout .crumbs { margin-top: 0; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.page-title { font-size: 26px; margin-bottom: 16px; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--ink-soft); margin: 0 0 12px; flex-wrap: wrap; }
.toolbar select { font: inherit; padding: 5px; margin-left: 6px; }
.pager { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; margin: 12px 0; }
.pager a { min-width: 32px; text-align: center; padding: 5px 8px; border: 1px solid var(--line); text-decoration: none; font-size: 13px; border-radius: 3px; }
.pager a.on { background: var(--accent); color: #fff; border-color: var(--accent); }

/* Product cards */
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.grid-wide { grid-template-columns: repeat(5, 1fr); }
.card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.05); }
.card:hover { box-shadow: 0 4px 14px rgba(0,0,0,.09); }
.card-img { display: block; background: var(--panel); border-radius: 4px; aspect-ratio: 1 / 1; margin-bottom: 10px; }
.card-img img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.card-title { font-size: 13px; font-weight: 700; text-align: center; margin-bottom: 8px; }
.card-title a { text-decoration: none; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-title a:hover { text-decoration: underline; color: var(--accent-dark); }
.card-meta { display: grid; grid-template-columns: auto 1fr; gap: 1px 8px; font-size: 12px; margin: 0 0 8px; border-top: 1px solid var(--line); padding-top: 8px; }
.card-meta dt { font-weight: 700; }
.card-meta dd { margin: 0; }
.card-price { margin-top: auto; font-size: 18px; font-weight: 700; color: var(--brand); text-align: center; margin-bottom: 8px; }
.card-price small, .big-price small { font-size: 11px; font-weight: 400; color: var(--ink-soft); }
.instock { color: var(--good); }
.nostock { color: var(--bad); }

/* ---- Product page ---- */
.product { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 8px; }
.product-img { background: var(--panel); border-radius: var(--radius); padding: 24px; }
.product-img img { width: 100%; mix-blend-mode: multiply; }
.product-buy h1 { font-size: 24px; }
.facts { display: grid; grid-template-columns: 130px 1fr; gap: 4px 12px; margin: 16px 0; font-size: 13px; }
.facts dt { color: var(--ink-soft); }
.facts dd { margin: 0; font-weight: 700; }
.big-price { font-size: 32px; font-weight: 700; color: var(--brand); margin: 8px 0 16px; }
.buy-row { display: flex; gap: 12px; align-items: center; }
.qty input { width: 64px; padding: 10px; font: inherit; margin-left: 6px; }
.why { margin-top: 24px; color: var(--ink-soft); border-top: 1px solid var(--line); padding-top: 16px; }
.product-info { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: 40px; border-top: 1px solid var(--line); padding-top: 24px; }
.product-info h2 { font-size: 16px; }
.product-info ul { padding-left: 18px; margin: 0; }
.product-info li { margin-bottom: 4px; }

/* ---- Basket ---- */
.flash { background: #eef7ee; border: 1px solid #cfe6cf; padding: 10px 14px; border-radius: var(--radius); }
.basket { width: 100%; border-collapse: collapse; }
.basket th { text-align: left; font-size: 12px; color: var(--ink-soft); border-bottom: 2px solid var(--brand); padding: 8px; }
.basket td { border-bottom: 1px solid var(--line); padding: 12px 8px; vertical-align: middle; }
.b-img { width: 80px; }
.b-img img { width: 64px; height: 64px; object-fit: contain; background: var(--panel); border-radius: 4px; }
.basket input[type=number] { width: 60px; padding: 6px; font: inherit; }
.inline { display: flex; gap: 6px; align-items: center; margin: 0; }
.totals { max-width: 360px; margin: 24px 0 0 auto; }
.totals p { display: flex; justify-content: space-between; margin: 0 0 8px; font-size: 16px; }
.totals .muted { font-size: 13px; color: var(--ink-soft); }
.continue { display: block; text-align: center; margin-top: 12px; font-size: 13px; }

/* ---- Info pages ---- */
.page { max-width: 760px; }

/* ---- Black footer ---- */
.sitefooter { background: var(--brand); color: #fff; padding: 36px 0 20px; }
.footcols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.sitefooter h3 { font-size: 15px; font-weight: 400; text-transform: uppercase; margin-bottom: 12px; }
.sitefooter a { display: block; font-size: 12px; text-decoration: none; margin-bottom: 7px; color: #fff; }
.sitefooter a:hover { text-decoration: underline; }
.footbase { border-top: 1px solid var(--brand-2); margin-top: 20px; padding-top: 16px; font-size: 12px; color: var(--on-brand-soft); }
.footbase a { display: inline; color: var(--on-brand-soft); }
.sitefooter h3 { color: #5fc4cc; }

/* ==================================================================
   Tablets and phones
   ================================================================== */
@media (max-width: 1000px) {
  .grid, .grid-wide { grid-template-columns: repeat(3, 1fr); }
  .layout { grid-template-columns: 180px 1fr; gap: 20px; }
  .product-info { grid-template-columns: 1fr; gap: 16px; }
}
@media (max-width: 760px) {
  .topstrip span { display: none; }
  .topstrip .wrap { justify-content: flex-end; }
  .masthead-row { flex-wrap: wrap; gap: 12px; }
  .logo img { width: 150px; height: 32px; }
  .basket-btn { margin-left: auto; }
  .search { order: 3; width: 100%; margin-left: 0; }
  .menu-label { display: block; color: #fff; padding: 11px 16px; cursor: pointer; font-weight: 700; }
  .catbar ul { display: none; flex-direction: column; padding-bottom: 8px; }
  .menu-toggle:checked ~ ul { display: flex; }
  .catbar li:first-child a { padding-left: 0; }
  .catbar a { padding: 9px 0; border-top: 1px solid var(--brand-2); }
  .slider { padding-top: 12px; }
  .slides { height: 460px; }
  .slide { grid-template-columns: 1fr; grid-template-rows: 190px 1fr; align-items: start; }
  .slide-img { order: -1; padding: 16px 16px 0; }
  .slide-img img { max-height: 170px; }
  .slide-text { padding: 14px 20px 20px; text-align: center; }
  .slide-line { margin-left: auto; margin-right: auto; font-size: 14px; }
  .slide-headline { font-size: 24px; }
  .slide-price { font-size: 24px; margin-bottom: 12px; }
  .slide-actions { justify-content: center; }
  .slider-arrow { top: 95px; width: 32px; height: 40px; }
  .slider-arrow.prev { left: 24px; }
  .slider-arrow.next { right: 24px; }
  .tiles { grid-template-columns: 1fr; gap: 14px; }
  .tile { min-height: 150px; }
  .tile-label { font-size: 20px; }
  .layout { grid-template-columns: 1fr; }
  .sidebar { display: flex; flex-wrap: wrap; gap: 6px; }
  .sidebar h2 { width: 100%; margin: 0; }
  .side-btn { margin: 0; gap: 8px; }
  .grid, .grid-wide { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .card { padding: 10px; }
  .card-price { font-size: 16px; }
  .product { grid-template-columns: 1fr; gap: 20px; }
  .buy-row { flex-wrap: wrap; }
  .footcols { grid-template-columns: repeat(2, 1fr); }
  .basket thead { display: none; }
  .basket, .basket tbody, .basket tr, .basket td { display: block; width: 100%; }
  .basket tr { border-bottom: 1px solid var(--line); padding: 10px 0; display: grid; grid-template-columns: 72px 1fr; column-gap: 10px; }
  .basket td { border: 0; padding: 3px 0; }
  .basket td.b-img { grid-row: span 5; }
  .basket td[data-label]::before { content: attr(data-label) ": "; color: var(--ink-soft); font-size: 12px; }
  .totals { max-width: none; }
}

/* ---- Cables drop-down in the black bar ---- */
.catbar li.has-sub { position: relative; }
.catbar .sub { display: none; position: absolute; left: 0; top: 100%; z-index: 40; min-width: 210px; background: var(--brand); padding: 4px 0; box-shadow: 0 6px 18px rgba(0,0,0,.25); }
.catbar li.has-sub:hover .sub, .catbar li.has-sub:focus-within .sub { display: block; }
.catbar .sub li a { padding: 9px 14px; }
.catbar .sub li:first-child a { padding-left: 14px; }
.catbar .sub a:hover { background: var(--brand-2); text-decoration: none; }
@media (max-width: 760px) {
  .catbar .sub { display: block; position: static; min-width: 0; padding: 0; box-shadow: none; }
  .catbar .sub li a { padding: 9px 0 9px 16px; font-size: 12px; }
  .catbar .sub li:first-child a { padding-left: 16px; }
}
