/* HUBSPRO — assets/styles.css
   ==================================================================
   The storefront look the owner asked for: the shape of ruqab.online —
   contact details at the top, the logo in the middle, categories in a row
   beneath, a four-across product grid with the picture first, a dark
   "trending" strip and a plain footer — built from scratch here, with
   the faults that site has put right:

     - Pictures are never blank until scrolled to. Every image has its
       width and height, sits on a white square that is there before it
       loads, and only images below the first screen are lazy.
     - The footer does not slide up over the grid. It is an ordinary
       block at the end of the page, not a fixed "reveal" layer.
     - A long product name does not break its card. Titles stop at three
       lines, and every card in a row is the same height with its price
       and button on one line at the foot.
     - Nothing depends on a web font or a remote script to lay out.

   Every colour is a token on :root first.                             */

:root {
  --ink:      #0a0500;
  --body:     #504e4a;
  --muted:    #7a7670;
  --line:     #e6e3de;
  --line-soft:#f0ede8;
  --surface:  #f9fafb;
  --bg:       #ffffff;
  --dark:     #1b1b1b;
  --accent:   #ffcd05;
  --accent-2: #fcb424;
  --ok:       #157a45;
  --bad:      #b42318;
  --r:        4px;
  --wrap:     1290px;
  --shadow:   0 1px 3px rgb(10 5 0 / .06), 0 6px 18px -8px rgb(10 5 0 / .12);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Open Sans", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--body);
  font: 15px/1.65 var(--font);
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--ink); }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.25; margin: 0; }
[hidden] { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }

.wrap { width: min(var(--wrap), 92vw); margin: 0 auto; }

/* ══ header ════════════════════════════════════════════════════════
   Three columns on a desktop: how to reach us, the mark, the controls.
   The contact column is small type, as the reference has it, so the
   logo stays the thing the eye lands on.                              */

.site-head { background: var(--bg); box-shadow: 0 1px 0 var(--line); position: relative; z-index: 20; }
.head-main {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  gap: 20px; min-height: 108px;
}
.head-contact { font-size: 13px; line-height: 1.9; color: var(--body); }
.head-contact a { display: flex; align-items: center; gap: 8px; }
.head-contact svg { flex: none; color: var(--accent-2); }
.brand { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.brand img { width: 54px; height: 54px; }
.brand b { font-size: 17px; letter-spacing: .14em; color: var(--ink); }
.brand small { font-size: 10px; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }
.head-tools { display: flex; align-items: center; justify-content: flex-end; gap: 18px; }
.icon-btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 4px;
  background: none; border: 0; cursor: pointer; color: var(--ink); font-size: 13px; font-weight: 600;
}
.icon-btn:hover { color: var(--accent-2); }
.cart-link { position: relative; }
.cart-link .count {
  position: absolute; top: 0; right: -10px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--accent); color: var(--ink);
  font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
}

.search-panel { border-top: 1px solid var(--line); background: var(--surface); }
.search-panel form { display: flex; gap: 10px; padding: 14px 0; }
.search-panel input {
  flex: 1; height: 44px; padding: 0 14px; border: 1px solid var(--line);
  border-radius: var(--r); background: var(--bg);
}

.navrow { border-top: 1px solid var(--line-soft); }
.navrow ul {
  list-style: none; margin: 0; padding: 0; display: flex; justify-content: center;
  flex-wrap: wrap; gap: 4px 34px;
}
.navrow a {
  display: block; padding: 15px 0; font-size: 12px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; color: var(--ink);
  border-bottom: 2px solid transparent;
}
.navrow a:hover, .navrow a[aria-current="page"] { border-bottom-color: var(--accent); }

.menu-toggle { display: none; }

/* ══ buttons and fields ═══════════════════════════════════════════ */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 0 22px; border: 1px solid var(--ink); border-radius: var(--r);
  background: var(--ink); color: #fff; font-size: 13px; font-weight: 700;
  cursor: pointer; transition: background .15s, color .15s, border-color .15s;
}
.btn:hover { background: var(--accent); border-color: var(--accent); color: var(--ink); }
.btn-line { background: var(--bg); color: var(--ink); border-color: var(--line); }
.btn-line:hover { border-color: var(--ink); background: var(--bg); }
.btn-block { width: 100%; }
.btn-lg { min-height: 54px; font-size: 15px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn[disabled]:hover { background: var(--ink); color: #fff; border-color: var(--ink); }

.field { display: grid; gap: 6px; }
.field > span { font-size: 13px; font-weight: 600; color: var(--ink); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 46px; padding: 10px 14px; border: 1px solid var(--line);
  border-radius: var(--r); background: var(--bg);
}
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent-2); outline: none; }
select.sort, .opt-select {
  min-height: 42px; padding: 0 38px 0 14px; border: 1px solid var(--line); border-radius: var(--r);
  background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23504e4a' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 14px center;
  -webkit-appearance: none; appearance: none; cursor: pointer;
}

/* ══ shop ═════════════════════════════════════════════════════════ */

.page { padding: 44px 0 70px; }
.page-title { font-size: 30px; margin-bottom: 8px; }
.crumbs { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 22px; }
.crumbs a:hover { color: var(--ink); }

.toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  flex-wrap: wrap; margin-bottom: 30px;
}
.result-count { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }

.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px 26px; }
.card { display: flex; flex-direction: column; min-width: 0; }
.card-media {
  position: relative; display: block; aspect-ratio: 1 / 1; background: var(--bg);
  border: 1px solid var(--line-soft); border-radius: var(--r); overflow: hidden;
}
.card-media img { width: 100%; height: 100%; object-fit: contain; transition: transform .35s ease; }
.card:hover .card-media img { transform: scale(1.03); }
.badge {
  position: absolute; top: 10px; left: 10px; padding: 3px 9px; border-radius: 3px;
  background: var(--ink); color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .04em;
}
.badge-sale { background: var(--accent); color: var(--ink); }
.card-title {
  margin-top: 16px; font-size: 15px; font-weight: 600; line-height: 1.45; color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  min-height: calc(1.45em * 3);
}
.card-title a:hover { color: var(--accent-2); }
.price { color: var(--ink); font-weight: 600; }
.price del { color: var(--muted); font-weight: 400; margin-right: 6px; }
.card .price { margin-top: 8px; font-size: 15px; }
.card-cat {
  margin-top: 6px; font-size: 11px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted);
}
.card .btn { margin-top: 14px; align-self: flex-start; }

.pager { display: flex; justify-content: center; gap: 8px; margin-top: 56px; flex-wrap: wrap; }
.pager a, .pager span {
  min-width: 42px; height: 42px; padding: 0 12px; display: inline-flex; align-items: center;
  justify-content: center; border: 1px solid var(--line); border-radius: var(--r);
  font-size: 14px; font-weight: 600; color: var(--ink);
}
.pager a:hover { border-color: var(--ink); }
.pager .on { background: var(--ink); border-color: var(--ink); color: #fff; }

.empty { padding: 50px 0; text-align: center; }
.empty p { margin-bottom: 18px; }

/* ══ trending ═════════════════════════════════════════════════════ */

.trending { background: var(--dark); color: #d8d4ce; padding: 30px 0; }
.trending h2 { color: #fff; font-size: 15px; margin-bottom: 18px; }
.trend-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.trend { display: flex; align-items: center; gap: 14px; min-width: 0; }
.trend img { width: 60px; height: 60px; flex: none; object-fit: contain; background: #fff; border-radius: 3px; }
.trend b {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  font-size: 14px; font-weight: 500; color: #fff; line-height: 1.4;
}
.trend span { font-size: 13px; color: var(--accent); }
.trend:hover b { color: var(--accent); }

/* ══ product ══════════════════════════════════════════════════════ */

.product { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 60px; align-items: start; }
.gallery-main {
  aspect-ratio: 1 / 1; border: 1px solid var(--line-soft); border-radius: var(--r);
  background: var(--bg); overflow: hidden;
}
.gallery-main img { width: 100%; height: 100%; object-fit: contain; }
.thumbs { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.thumbs button {
  padding: 0; aspect-ratio: 1 / 1; border: 1px solid var(--line); border-radius: var(--r);
  background: var(--bg); cursor: pointer; overflow: hidden;
}
.thumbs button[aria-current="true"] { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.thumbs img { width: 100%; height: 100%; object-fit: contain; }

.summary h1 { font-size: 26px; font-weight: 600; }
.summary .price { display: block; margin-top: 18px; font-size: 22px; font-weight: 700; }
.summary .short { margin-top: 20px; }
.divider { height: 1px; background: var(--line); margin: 28px 0; }
.opts { display: grid; gap: 16px; }
.opts label { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink); }
.opt-select { width: 100%; }
.stock { margin-top: 14px; font-size: 14px; font-weight: 600; }
.stock.in { color: var(--ok); }
.stock.out { color: var(--bad); }
.buy { display: flex; gap: 12px; margin-top: 22px; }
.qty { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r); }
.qty button { width: 40px; background: none; border: 0; cursor: pointer; font-size: 18px; }
.qty input { width: 52px; border: 0; text-align: center; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.buy .btn { flex: 1; }
.meta { margin-top: 22px; font-size: 13px; color: var(--muted); }
.meta b { color: var(--ink); }

.tabs { margin-top: 70px; border-top: 1px solid var(--line); }
.tabs h2 {
  display: inline-block; padding: 18px 0 14px; margin-bottom: 20px; font-size: 12px;
  letter-spacing: .1em; text-transform: uppercase; border-top: 2px solid var(--ink); margin-top: -1px;
}
.specs { width: 100%; border-collapse: collapse; font-size: 14px; }
.specs th, .specs td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.specs th { width: 36%; color: var(--ink); font-weight: 600; background: var(--surface); }
.related { margin-top: 70px; }
.related h2 { font-size: 20px; margin-bottom: 26px; }

/* ══ cart and checkout ════════════════════════════════════════════ */

.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th {
  text-align: left; padding: 12px 10px; font-size: 11px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line);
}
.cart-table td { padding: 18px 10px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.cart-item { display: flex; align-items: center; gap: 16px; }
.cart-item img { width: 76px; height: 76px; object-fit: contain; border: 1px solid var(--line-soft); border-radius: var(--r); background: #fff; flex: none; }
.cart-item b { color: var(--ink); font-weight: 600; }
.cart-item small { display: block; color: var(--muted); }
.remove { background: none; border: 0; cursor: pointer; color: var(--muted); font-size: 22px; line-height: 1; }
.remove:hover { color: var(--bad); }
.cart-foot { display: grid; grid-template-columns: 1fr minmax(0, 380px); gap: 40px; margin-top: 40px; }
.totals { border: 1px solid var(--line); border-radius: var(--r); padding: 26px; }
.totals h2 { font-size: 18px; margin-bottom: 14px; }
.totals .row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.totals .row.total { border: 0; font-size: 18px; font-weight: 700; color: var(--ink); }
.checkout { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 50px; align-items: start; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
.note {
  padding: 14px 16px; border-radius: var(--r); background: var(--surface);
  border-left: 3px solid var(--accent-2); font-size: 14px;
}
.note-bad { border-left-color: var(--bad); }

/* ══ document pages ═══════════════════════════════════════════════ */

.doc { max-width: 780px; }
.doc h2 { font-size: 20px; margin: 34px 0 10px; }
.doc p, .doc li { margin: 0 0 12px; }

/* ══ footer ═══════════════════════════════════════════════════════
   An ordinary block at the end of the page. The reference's footer is
   a fixed "reveal" layer that slides over the last row of products. */

.site-foot { background: var(--dark); color: #a9a49d; margin-top: 0; }
.foot-main { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; padding: 26px 0; }
.foot-links { display: flex; gap: 26px; flex-wrap: wrap; }
.foot-links a { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #fff; }
.foot-links a:hover { color: var(--accent); }
.foot-copy { font-size: 13px; }

.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 20px); opacity: 0;
  background: var(--ink); color: #fff; padding: 12px 20px; border-radius: var(--r);
  font-size: 14px; box-shadow: var(--shadow); transition: opacity .2s, transform .2s; z-index: 90;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ══ smaller screens ══════════════════════════════════════════════ */

@media (max-width: 1100px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .trend-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .head-main { grid-template-columns: auto 1fr auto; min-height: 72px; }
  .head-contact { display: none; }
  .brand { flex-direction: row; gap: 10px; }
  .brand img { width: 40px; height: 40px; }
  .brand small { display: none; }
  .menu-toggle { display: inline-flex; }
  .navrow { display: none; }
  .navrow.open { display: block; }
  .navrow ul { flex-direction: column; gap: 0; padding: 6px 0 12px; }
  .navrow a { padding: 11px 0; }
  .product, .checkout, .cart-foot { grid-template-columns: 1fr; gap: 34px; }
}
@media (max-width: 760px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px 16px; }
  .card-title { font-size: 14px; }
  .card .btn { align-self: stretch; }
  .cart-table thead { display: none; }
  .cart-table tr { display: grid; grid-template-columns: 1fr auto; padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
  .cart-table td { border: 0; padding: 6px 0; }
  .form-grid { grid-template-columns: 1fr; }
}
@media (max-width: 460px) {
  .grid { grid-template-columns: 1fr; }
  .trend-row { grid-template-columns: 1fr; }
  .head-tools .label { display: none; }
}
