/*
Theme Name: RQSTool Dynamic WooCommerce Theme
Theme URI: https://rqstool.com
Author: RQSTool
Description: Dynamic RQSTool construction calculator and WooCommerce catalogue theme. Every published product is generated from live WooCommerce data.
Version: 11.0.0
Requires at least: 5.8
Requires PHP: 7.4
License: GPLv2 or later
Text Domain: rqstool-dynamic-catalog
*/

:root {
    --rq-dark: #111827;
    --rq-muted: #6b7280;
    --rq-border: #e5e7eb;
    --rq-bg: #f6f7fb;
    --rq-yellow: #fbbf24;
    --rq-green: #22c55e;
}

html,
body {
    margin: 0;
    padding: 0;
    background: var(--rq-bg);
    color: var(--rq-dark);
    font-family: Arial, Helvetica, sans-serif;
}

html {
    scroll-behavior: smooth;
}

body.rq-modal-open {
    overflow: hidden;
}

[hidden] {
    display: none !important;
}

a,
button,
input,
select {
    -webkit-tap-highlight-color: transparent;
}

.screen-reader-text {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

#rqApp,
#rqApp * {
    box-sizing: border-box;
}

#rqApp {
    width: 100%;
    max-width: 1180px;
    min-height: 100vh;
    margin: 0 auto;
    padding: 14px 14px 112px;
}

.hero {
    padding: 22px 18px;
    color: #fff;
    background: linear-gradient(135deg, #111827, #1f2937);
    border-radius: 24px;
    box-shadow: 0 14px 30px rgba(17, 24, 39, .18);
}

.top {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo {
    display: flex;
    flex: 0 0 52px;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    color: var(--rq-dark);
    font-size: 20px;
    font-weight: 900;
    background: var(--rq-yellow);
    border-radius: 18px;
}

.title {
    font-size: 24px;
    font-weight: 900;
}

.tagline {
    margin-top: 3px;
    color: #d1d5db;
    font-size: 12px;
    line-height: 1.4;
}

.actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 18px;
}

.btn {
    display: block;
    padding: 13px 10px;
    color: var(--rq-dark);
    font-size: 14px;
    font-weight: 900;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    border: 0;
    border-radius: 15px;
}

.green {
    color: #052e16;
    background: var(--rq-green);
}

.white {
    color: var(--rq-dark);
    background: #fff;
}

.dark {
    color: #fff;
    background: var(--rq-dark);
}

.yellow {
    color: var(--rq-dark);
    background: var(--rq-yellow);
}

.section {
    margin-top: 26px;
    scroll-margin-top: 16px;
}

.head {
    display: flex;
    gap: 12px;
    align-items: end;
    justify-content: space-between;
    margin-bottom: 10px;
}

.head h2 {
    margin: 0;
    font-size: 19px;
    font-weight: 900;
}

.head span {
    color: var(--rq-muted);
    font-size: 12px;
}

.search {
    width: 100%;
    margin-bottom: 10px;
    padding: 14px;
    font-size: 16px;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 16px;
    outline: none;
    box-shadow: 0 6px 16px rgba(0, 0, 0, .04);
}

.search:focus {
    border-color: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, .18);
}

.help {
    min-height: 18px;
    margin-bottom: 10px;
    color: var(--rq-muted);
    font-size: 13px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 178px;
    padding: 13px;
    background: #fff;
    border: 1px solid var(--rq-border);
    border-radius: 20px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, .04);
}

.icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    margin-bottom: 10px;
    font-size: 22px;
    background: #f3f4f6;
    border-radius: 15px;
}

.ctitle {
    margin: 0;
    color: var(--rq-dark);
    font-size: 14px;
    font-weight: 900;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.ctitle a {
    color: inherit;
    text-decoration: none;
}

.meta {
    margin-top: 5px;
    color: var(--rq-muted);
    font-size: 12px;
    line-height: 1.35;
}

.desc {
    flex: 1;
    margin-top: 8px;
    color: #374151;
    font-size: 12px;
    line-height: 1.45;
}

.cardactions {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}

.mini {
    display: block;
    width: 100%;
    padding: 10px 8px;
    font-size: 12px;
    font-weight: 900;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    border: 0;
    border-radius: 13px;
}

.rq-product-image {
    display: block;
    height: 92px;
    margin: -4px -4px 10px;
    overflow: hidden;
    background: #f3f4f6;
    border-radius: 15px;
}

.rq-product-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rq-product-price {
    margin-top: 8px;
    color: #047857;
    font-size: 14px;
    font-weight: 900;
    line-height: 1.35;
}

.rq-product-price del {
    margin-right: 4px;
    color: #9ca3af;
    font-size: 11px;
    font-weight: 700;
}

.rq-product-price ins {
    text-decoration: none;
}

.rq-empty,
.rq-mini-empty {
    padding: 16px;
    color: var(--rq-muted);
    font-size: 13px;
    line-height: 1.5;
    background: #fff;
    border: 1px dashed #d1d5db;
    border-radius: 18px;
}

.rq-shop-link-wrap {
    display: flex;
    justify-content: center;
    margin-top: 14px;
}

.rq-shop-link {
    min-width: 210px;
}

.pack {
    margin-top: 24px;
    padding: 18px;
    color: #fff;
    background: var(--rq-dark);
    border-radius: 24px;
    box-shadow: 0 14px 30px rgba(17, 24, 39, .18);
}

.pack-title {
    font-size: 20px;
    font-weight: 900;
}

.pack-copy {
    margin-top: 7px;
    color: #d1d5db;
    font-size: 13px;
    line-height: 1.5;
}

.pack-price {
    margin: 14px 0 10px;
    color: var(--rq-yellow);
    font-size: 26px;
    font-weight: 900;
    text-align: center;
}

.pack-price del {
    color: #9ca3af;
    font-size: 13px;
}

.pack-price ins {
    text-decoration: none;
}

.nav {
    position: fixed;
    z-index: 99;
    bottom: 12px;
    left: 50%;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
    width: min(720px, calc(100% - 28px));
    padding: 8px;
    background: #fff;
    border: 1px solid var(--rq-border);
    border-radius: 22px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, .14);
    transform: translateX(-50%);
}

.nav a {
    padding: 7px 2px;
    color: var(--rq-dark);
    font-size: 10px;
    font-weight: 800;
    text-align: center;
    text-decoration: none;
    border-radius: 14px;
}

.nav a:focus,
.nav a:hover {
    background: #f3f4f6;
}

.modalbg {
    position: fixed;
    z-index: 999;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(17, 24, 39, .56);
}

.modal {
    width: min(520px, 100%);
    max-height: 88vh;
    padding: 18px;
    overflow: auto;
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
}

.mhead {
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin-bottom: 14px;
}

.mtitle {
    font-size: 18px;
    font-weight: 900;
}

.mmeta {
    margin-top: 3px;
    color: var(--rq-muted);
    font-size: 12px;
}

.close {
    padding: 8px 11px;
    font-weight: 900;
    cursor: pointer;
    background: #f3f4f6;
    border: 0;
    border-radius: 12px;
}

.field {
    display: grid;
    gap: 6px;
    margin-bottom: 10px;
    color: #374151;
    font-size: 13px;
    font-weight: 800;
}

.field input,
.field select {
    width: 100%;
    padding: 11px;
    font-size: 14px;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 13px;
}

.result {
    min-height: 22px;
    margin-top: 10px;
    padding: 12px;
    color: #166534;
    font-size: 14px;
    font-weight: 900;
    line-height: 1.6;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 14px;
}

.rq-steel-table {
    color: #374151;
    font-size: 13px;
    line-height: 1.8;
}

.rq-scroll-head {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
    margin: 28px 0 10px;
}

.rq-scroll-head h2 {
    margin: 0;
    font-size: 19px;
    font-weight: 900;
}

.rq-arrows {
    display: flex;
    gap: 8px;
}

.rq-arrow {
    width: 40px;
    height: 38px;
    color: #fff;
    font-weight: 900;
    cursor: pointer;
    background: var(--rq-dark);
    border: 0;
    border-radius: 12px;
}

.rq-content-row {
    display: flex;
    gap: 10px;
    padding: 2px 2px 12px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
}

.rq-content-row::-webkit-scrollbar {
    display: none;
}

.rq-content-card {
    flex: 0 0 calc((100% - 10px) / 2);
    overflow: hidden;
    color: var(--rq-dark);
    text-decoration: none;
    background: #fff;
    border: 1px solid var(--rq-border);
    border-radius: 18px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, .04);
}

.rq-content-img {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 90px;
    font-size: 30px;
    background: #f3f4f6 center / cover no-repeat;
}

.rq-content-title {
    min-height: 44px;
    padding: 10px 10px 5px;
    font-size: 13px;
    font-weight: 900;
    line-height: 1.25;
}

.rq-content-more {
    padding: 0 10px 10px;
    color: var(--rq-muted);
    font-size: 12px;
    font-weight: 800;
}

.rq-consultancy {
    margin-top: 24px;
    padding: 18px;
    background: linear-gradient(135deg, #ecfdf5, #f0f9ff);
    border: 1px solid #a7f3d0;
    border-radius: 24px;
    box-shadow: 0 10px 26px rgba(5, 150, 105, .10);
    scroll-margin-top: 16px;
}

.rq-consultancy * {
    box-sizing: border-box;
}

.rq-consult-head {
    display: flex;
    gap: 12px;
    align-items: end;
    justify-content: space-between;
    margin-bottom: 8px;
}

.rq-consult-head h2 {
    margin: 0;
    font-size: 19px;
    font-weight: 900;
}

.rq-consult-head span {
    color: #047857;
    font-size: 12px;
    font-weight: 800;
}

.rq-consult-intro {
    margin: 0 0 14px;
    color: #374151;
    font-size: 13px;
    line-height: 1.55;
}

.rq-consult-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.rq-consult-card {
    display: flex;
    flex-direction: column;
    padding: 15px;
    background: #fff;
    border: 1px solid var(--rq-border);
    border-radius: 18px;
}

.rq-consult-card h3 {
    margin: 0 0 6px;
    font-size: 16px;
}

.rq-consult-card p {
    flex: 1;
    margin: 0 0 12px;
    color: #4b5563;
    font-size: 12px;
    line-height: 1.5;
}

.rq-consult-links {
    display: grid;
    gap: 8px;
}

.rq-consult-link {
    display: block;
    padding: 10px 8px;
    font-size: 12px;
    font-weight: 900;
    text-align: center;
    text-decoration: none;
    border-radius: 13px;
}

.rq-consult-note {
    margin: 12px 0 0;
    color: #065f46;
    font-size: 11px;
    font-weight: 800;
}

.rq-product-search-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    width: min(620px, 100%);
    margin: 0 0 18px;
}

.rq-product-search-form input {
    min-width: 0;
    padding: 12px 13px;
    font-size: 15px;
    border: 1px solid #d1d5db;
    border-radius: 12px;
}

.rq-product-search-form button {
    padding: 12px 16px;
    color: #fff;
    font-weight: 900;
    cursor: pointer;
    background: var(--rq-dark);
    border: 0;
    border-radius: 12px;
}

.rq-page-wrap {
    max-width: 1180px;
    margin: 0 auto;
    padding: 24px 14px 80px;
}

.rq-header {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    margin-bottom: 18px;
    color: #fff;
    background: var(--rq-dark);
    border-radius: 22px;
}

.rq-brand {
    display: flex;
    gap: 12px;
    align-items: center;
    color: #fff;
    text-decoration: none;
}

.rq-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    color: var(--rq-dark);
    font-size: 19px;
    font-weight: 900;
    background: var(--rq-yellow);
    border-radius: 16px;
}

.rq-title {
    font-size: 22px;
    font-weight: 900;
}

.rq-header-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.rq-header-nav a {
    padding: 10px 13px;
    color: var(--rq-dark);
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    background: #fff;
    border-radius: 13px;
}

.rq-content {
    padding: 18px;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--rq-border);
    border-radius: 22px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .04);
}

.rq-content > h1:first-child,
.rq-content .page-title {
    margin-top: 0;
}

.rq-entry-title a,
.rq-search-title a {
    color: var(--rq-dark);
    text-decoration: none;
}

.rq-entry {
    padding: 16px 0;
    border-bottom: 1px solid var(--rq-border);
}

.rq-entry:last-child {
    border-bottom: 0;
}

.woocommerce ul.products {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.woocommerce ul.products::before,
.woocommerce ul.products::after {
    display: none;
}

.woocommerce ul.products li.product {
    float: none !important;
    width: auto !important;
    min-width: 0;
    margin: 0 !important;
    padding: 12px !important;
    border: 1px solid var(--rq-border);
    border-radius: 18px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, .04);
}

.woocommerce ul.products li.product img {
    border-radius: 13px;
}

.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit {
    color: #fff !important;
    font-weight: 900 !important;
    background: var(--rq-dark) !important;
    border-radius: 12px !important;
}

.woocommerce .checkout-button {
    color: #052e16 !important;
    background: var(--rq-green) !important;
}

.woocommerce nav.woocommerce-pagination ul,
.woocommerce nav.woocommerce-pagination ul li {
    border: 0;
}

.woocommerce nav.woocommerce-pagination ul li a,
.woocommerce nav.woocommerce-pagination ul li span {
    min-width: 38px;
    margin: 3px;
    border: 1px solid var(--rq-border);
    border-radius: 10px;
}

@media (min-width: 700px) {
    #rqApp {
        padding: 18px 18px 120px;
    }

    .hero {
        padding: 28px;
    }

    .title {
        font-size: 30px;
    }

    .tagline {
        font-size: 13px;
    }

    .grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 12px;
    }

    .pack {
        display: flex;
        gap: 20px;
        align-items: center;
        justify-content: space-between;
        padding: 24px;
    }

    .packAction {
        min-width: 220px;
    }

    .rq-content-row {
        gap: 12px;
    }

    .rq-content-card {
        flex-basis: calc((100% - 36px) / 4);
    }

    .rq-consultancy {
        padding: 22px;
    }

    .rq-consult-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .rq-consult-links {
        grid-template-columns: 1fr 1fr;
    }

    .nav a {
        font-size: 11px;
    }

    .woocommerce ul.products {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    #rqApp {
        padding: 24px 24px 128px;
    }

    .grid {
        gap: 14px;
    }

    .rq-content-row {
        gap: 14px;
    }

    .rq-content-card {
        flex-basis: calc((100% - 70px) / 6);
    }
}

@media (max-width: 420px) {
    .actions {
        grid-template-columns: 1fr;
    }

    .card {
        padding: 11px;
    }

    .ctitle {
        font-size: 13px;
    }
}
