/*
Theme Name: Queen Tetra
Theme URI: https://example.com/
Author: Queen Tetra Build
Description: Dark catalog theme for WooCommerce with a purple accent. Catalog mode (no checkout), category and subcategory pages, bulk pricing tables and per category or per product title and price colors.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: queen-tetra
*/

/* ==========================================================
   1. Design tokens
   ========================================================== */
:root {
  --bg: #171717;
  --card: #212121;
  --border: #333333;
  --text: #f4f4f5;
  --muted: #a1a1aa;
  --accent: #b794f6;
  --accent-hover: #9f7aea;
  --serif: Georgia, "Times New Roman", Times, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --radius: 12px;
  --wrap: 1200px;
}

/* ==========================================================
   2. Base
   ========================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; }
.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}
.qt-skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--accent); color: #171717; padding: 8px 14px; z-index: 999;
}
.qt-skip:focus { left: 8px; top: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.qt-wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.qt-main { min-height: 60vh; }

/* ==========================================================
   3. Announcement bar and header
   ========================================================== */
.qt-announce {
  background: var(--accent);
  color: #171717;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 16px;
}
.qt-header { background: var(--bg); border-bottom: 1px solid var(--border); }
.qt-header__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 16px;
  padding-bottom: 16px;
}
.qt-brand { display: inline-flex; align-items: center; gap: 12px; }
.qt-brand__icon { width: 34px; height: 34px; color: var(--accent); flex: none; }
.qt-brand__img { width: 44px; height: 44px; object-fit: contain; }
.qt-brand__name { font-family: var(--serif); font-size: 1.35rem; font-weight: 700; letter-spacing: .01em; }

.qt-search { position: relative; width: 320px; max-width: 100%; }
.qt-search input[type="search"] {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  font: inherit;
  font-size: 15px;
  padding: 10px 44px 10px 18px;
  -webkit-appearance: none;
}
.qt-search input[type="search"]::placeholder { color: var(--muted); }
.qt-search input[type="search"]:focus { border-color: var(--accent); outline: none; }
.qt-search button {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px; border: 0; background: transparent;
  color: var(--muted); cursor: pointer; display: grid; place-items: center;
}
.qt-search button:hover { color: var(--accent); }
.qt-search svg { width: 18px; height: 18px; }

.qt-burger {
  display: none;
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
  font-size: 14px;
  padding: 8px 14px;
  cursor: pointer;
}

.qt-nav { border-top: 1px solid var(--border); }
.qt-nav .qt-wrap { padding-top: 0; padding-bottom: 0; }
.qt-nav__list { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 6px; }
.qt-nav__list a {
  display: block;
  padding: 12px 14px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  transition: color .2s;
}
.qt-nav__list a:hover,
.qt-nav__list .current-menu-item > a { color: var(--accent); }

/* ==========================================================
   4. Buttons, labels, links
   ========================================================== */
.qt-btn {
  display: inline-block;
  background: var(--accent);
  color: #171717;
  font-weight: 700;
  font-size: 15px;
  padding: 13px 26px;
  border-radius: 999px;
  border: 1px solid var(--accent);
  transition: background .2s, border-color .2s, color .2s;
}
.qt-btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.qt-btn--ghost { background: transparent; color: var(--text); border-color: var(--border); }
.qt-btn--ghost:hover { background: transparent; border-color: var(--accent); color: var(--accent); }
.qt-label {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}
.qt-link { color: var(--accent); font-weight: 600; font-size: 15px; }
.qt-link:hover { color: var(--accent-hover); text-decoration: underline; }

/* ==========================================================
   5. Home hero and sections
   ========================================================== */
.qt-hero {
  padding: 90px 0 76px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  background: radial-gradient(ellipse at 50% 0%, rgba(183, 148, 246, .14), transparent 60%);
}
.qt-hero__title {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  margin: 0 0 18px;
}
.qt-hero__title span { color: var(--accent); }
.qt-hero__sub { max-width: 620px; margin: 0 auto 30px; color: var(--muted); font-size: 1.05rem; }
.qt-hero__cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

.qt-section { padding: 56px 0; }
.qt-section + .qt-section { padding-top: 0; }
.qt-section__head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; margin-bottom: 24px;
}
.qt-h2 { font-size: 1.6rem; margin: 0; }

.qt-band {
  margin: 20px 0 0;
  padding: 56px 20px;
  text-align: center;
  background: var(--card);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.qt-band h2 { font-size: 1.8rem; }
.qt-band p { color: var(--muted); max-width: 560px; margin: 0 auto 24px; }

/* ==========================================================
   6. Category cards
   ========================================================== */
.qt-cats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 16px;
  margin-bottom: 36px;
}
.qt-cat {
  display: flex; align-items: center; gap: 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  font-weight: 600;
  transition: border-color .2s, color .2s;
}
.qt-cat:hover { border-color: var(--accent); color: var(--accent); }
.qt-cat__img { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; flex: none; }
.qt-section .qt-cats:last-child { margin-bottom: 0; }

/* ==========================================================
   7. Page head (shop and category pages)
   ========================================================== */
.qt-pagehead { padding: 48px 0 8px; }
.qt-pagehead__row { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.qt-pagehead__title { font-size: clamp(2rem, 4.5vw, 3rem); margin: 0 0 8px; }
.qt-pagehead__sub { color: var(--muted); max-width: 640px; }
.qt-pagehead + .qt-section { padding-top: 28px; }
.qt-subhead { font-size: 1.1rem; font-weight: 600; margin: 0 0 14px; color: var(--muted); }

/* ==========================================================
   8. Product grid and cards
   ========================================================== */
.qt-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}
.qt-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .2s;
}
.qt-card:hover { border-color: var(--accent); }
.qt-card__link { display: block; height: 100%; }
.qt-card__media {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  background: #1b1b1b;
  overflow: hidden;
}
.qt-card__media img { width: 100%; height: 100%; object-fit: contain; }
.qt-badge {
  position: absolute; top: 10px; left: 10px;
  background: var(--accent); color: #171717;
  font-size: 11px; font-weight: 700; letter-spacing: .08em;
  padding: 3px 10px; border-radius: 999px;
}
.qt-card__body { display: block; padding: 14px 16px 18px; }
.qt-card__cat {
  display: block; font-size: 12px; color: var(--muted);
  text-transform: uppercase; letter-spacing: .08em;
}
.qt-card__title { display: block; font-weight: 700; margin: 4px 0 6px; transition: color .2s; }
.qt-card:hover .qt-card__title { color: var(--accent); }
.qt-card__price { display: block; color: var(--muted); font-size: 15px; }
.qt-card__price del { opacity: .6; margin-right: 6px; }
.qt-card__price ins { text-decoration: none; }

.qt-empty {
  text-align: center;
  background: var(--card);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 56px 20px;
  color: var(--muted);
}
.qt-empty p { margin: 0; }
.qt-empty a { color: var(--accent); font-weight: 600; }
.qt-empty a:hover { text-decoration: underline; }

.pagination { margin-top: 36px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.pagination .page-numbers {
  min-width: 42px; text-align: center;
  padding: 8px 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: border-color .2s, color .2s;
}
.pagination a.page-numbers:hover { border-color: var(--accent); color: var(--accent); }
.pagination .page-numbers.current { background: var(--accent); border-color: var(--accent); color: #171717; font-weight: 700; }

/* ==========================================================
   9. Single product
   ========================================================== */
.qt-single { padding: 48px 0 24px; }
.qt-single__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.qt-single__media {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.qt-single__img { width: 100%; aspect-ratio: 1 / 1; object-fit: contain; background: #1b1b1b; }
.qt-thumbs { display: flex; flex-wrap: wrap; gap: 10px; padding: 12px; border-top: 1px solid var(--border); }
.qt-thumb {
  width: 64px; height: 64px; padding: 0;
  border: 2px solid var(--border); border-radius: 8px;
  background: transparent; overflow: hidden; cursor: pointer;
}
.qt-thumb img { width: 100%; height: 100%; object-fit: cover; }
.qt-thumb.is-active, .qt-thumb:hover { border-color: var(--accent); }

.qt-single__title {
  font-size: clamp(1.8rem, 3.6vw, 2.6rem);
  color: var(--title-color, var(--text));
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 14px;
}
.qt-single__price { font-size: 1.3rem; font-weight: 700; color: var(--price-color, var(--text)); margin-bottom: 22px; }
.qt-single__short { color: var(--muted); margin-bottom: 24px; }
.qt-single__short p:last-child { margin-bottom: 0; }

.qt-bulk { margin: 0 0 22px; }
.qt-bulk__title { font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin: 0 0 12px; }
.qt-bulk__table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.qt-bulk__table th, .qt-bulk__table td { text-align: left; padding: 12px 18px; border-bottom: 1px solid var(--border); }
.qt-bulk__table th:first-child, .qt-bulk__table td:first-child { width: 58%; }
.qt-bulk__table th {
  font-size: 12px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text); font-weight: 700; background: #1b1b1b;
}
.qt-bulk__table tbody tr:last-child td { border-bottom: 0; }
.qt-bulk__table td:last-child { color: var(--accent); font-weight: 700; }

.qt-notice {
  background: rgba(183, 148, 246, .08);
  border: 1px solid rgba(183, 148, 246, .35);
  border-radius: var(--radius);
  padding: 14px 18px;
  color: var(--text);
  font-size: 15px;
  margin: 0;
}
.qt-desc { padding: 36px 0 0; max-width: 820px; }
.qt-desc h2 { font-size: 1.5rem; }
.qt-desc, .qt-content { color: #d4d4d8; }
.qt-related { padding: 24px 0 64px; }

/* ==========================================================
   10. Generic pages
   ========================================================== */
.qt-page { padding: 56px 20px; max-width: 860px; }
.qt-page__title { font-size: clamp(2rem, 4.5vw, 3rem); }
.qt-content a { color: var(--accent); text-decoration: underline; }
.qt-content img { border-radius: var(--radius); margin: 1em 0; }

/* ==========================================================
   11. Footer
   ========================================================== */
.qt-footer { margin-top: 60px; background: #121212; border-top: 1px solid var(--border); }
.qt-footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.3fr 1fr;
  gap: 40px;
  padding-top: 56px;
  padding-bottom: 40px;
}
.qt-foot p { color: var(--muted); font-size: 15px; }
.qt-foot__h {
  font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--text); margin-bottom: 16px;
}
.qt-foot__list { list-style: none; }
.qt-foot__list li { margin-bottom: 8px; }
.qt-foot__list a { color: var(--muted); font-size: 15px; transition: color .2s; }
.qt-foot__list a:hover { color: var(--accent); }
.qt-brand--foot { margin-bottom: 14px; }
.qt-footer__bar { border-top: 1px solid var(--border); padding-top: 20px; padding-bottom: 28px; }
.qt-footer__bar p { margin: 0; color: var(--muted); font-size: 14px; }

/* ==========================================================
   12. Responsive
   ========================================================== */
@media (max-width: 1024px) {
  .qt-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .qt-footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .qt-header__top { flex-wrap: wrap; }
  .qt-search { order: 3; width: 100%; }
  .qt-burger { display: inline-block; }
  .qt-nav { display: none; }
  .qt-nav.is-open { display: block; }
  .qt-nav__list { flex-direction: column; gap: 0; }
  .qt-nav__list a { padding: 14px 4px; border-bottom: 1px solid var(--border); }
  .qt-single__grid { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 720px) {
  .qt-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .qt-hero { padding: 64px 0 52px; }
  .qt-section { padding: 40px 0; }
  .qt-footer__grid { grid-template-columns: 1fr; gap: 28px; }
  .qt-card__body { padding: 12px 12px 14px; }
  .qt-pagehead__row { flex-direction: column; align-items: flex-start; gap: 4px; }
}

.qt-back { display: inline-block; margin-bottom: 18px; font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.qt-back:hover { color: var(--accent-hover); }
