/*
Theme Name: Ruizhe Packaging
Description: Raiser plastic packaging catalog, company website and quote requests.
Version: 2.0.0
Requires at least: 6.4
Requires PHP: 7.4
Text Domain: ruizhe-packaging
*/
:root {
    --ink: #13253a;
    --navy: #102844;
    --blue: #164e85;
    --accent: #eb7233;
    --muted: #4c5c6f;
    --line: #dce4ec;
    --light: #f2f6fa;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: white; color: var(--ink); font: 16px/1.6 system-ui, sans-serif; }
a { color: inherit; }
img { max-width: 100%; height: auto; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
p, figure { margin: 0; }
h1, h2, h3 { margin: 0; line-height: 1.13; }
h1, h2 { letter-spacing: -.043em; }
h1 { font-size: clamp(2.3rem, 5vw, 4rem); }
h2 { font-size: clamp(1.9rem, 3.7vw, 3rem); }
h3 { font-size: 1.14rem; }
:focus-visible { outline: 2px solid #cf581a; outline-offset: 4px; }
.wrap { width: min(100% - 56px, 1240px); margin-inline: auto; }
.screen-reader-text, .skip:not(:focus) {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0, 0, 0, 0); clip-path: inset(50%); white-space: nowrap;
}
.skip:focus { position: fixed; z-index: 5; top: 10px; left: 10px; padding: 10px; background: white; }
.contact-strip { background: var(--navy); color: #fff; font-size: .8rem; }
.contact-strip .wrap { display: flex; gap: 20px; align-items: center; padding-block: 8px; }
.contact-strip span { margin-right: auto; }
.contact-strip a { text-decoration: none; }
.contact-strip a:hover { text-decoration: underline; }
.site-header { border-bottom: 1px solid var(--line); }
.header-row { display: flex; justify-content: space-between; align-items: center; gap: 20px; min-height: 86px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 1.23rem; letter-spacing: .1em; line-height: 1; }
.brand img { width: 51px; height: 51px; object-fit: contain; background: #fff; border-radius: 5px; }
.brand small { display: block; margin-top: 5px; font-size: .53rem; letter-spacing: .14em; }
.custom-logo { display: block; max-width: 170px; max-height: 62px; object-fit: contain; }
.header-row ul { display: flex; flex-wrap: wrap; gap: clamp(13px, 2.15vw, 30px); margin: 0; padding: 0; list-style: none; }
.header-row nav a { text-decoration: none; font-size: .92rem; font-weight: 650; }
.header-row nav a:hover { color: var(--blue); text-decoration: underline; }
.button { display: inline-block; padding: 12px 19px; border: 1px solid transparent; border-radius: 4px; background: var(--blue); color: #fff; text-decoration: none; font-weight: 700; }
.button:hover { background: #123c65; }
.button-small { font-size: .85rem; white-space: nowrap; }
.utility-row { display: flex; justify-content: flex-end; align-items: center; gap: 17px; padding-block: 8px; border-top: 1px solid var(--line); }
.product-search { display: flex; max-width: 100%; }
.product-search input { width: min(38vw, 260px); min-width: 0; border: 1px solid var(--line); border-right: 0; border-radius: 4px 0 0 4px; padding: 5px 9px; font-size: .85rem; }
.product-search button { border: 1px solid var(--line); border-radius: 0 4px 4px 0; background: var(--light); color: var(--navy); font-size: .8rem; font-weight: 700; padding: 5px 10px; }
.quote-link { font-size: .84rem; font-weight: 700; text-decoration: none; white-space: nowrap; }
.quote-link span { display: inline-grid; place-items: center; min-width: 20px; min-height: 20px; padding-inline: 4px; border-radius: 20px; background: var(--light); color: var(--blue); }
.banner { position: relative; background: var(--light); }
.banner img { display: block; width: 100%; aspect-ratio: 1920 / 649; object-fit: contain; }
.slide-controls { display: flex; justify-content: center; gap: 9px; position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); padding: 6px 10px; border-radius: 24px; background: #ffffffeb; }
.slide-controls button { width: 15px; height: 15px; padding: 0; border-radius: 50%; border: 2px solid var(--blue); background: white; }
.slide-controls button[aria-pressed="true"] { background: var(--blue); }
.section { padding-block: clamp(36px, 5.5vw, 76px); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 14px; margin-bottom: 26px; }
.eyebrow { margin-bottom: 9px; color: var(--blue); font-size: .73rem; font-weight: 800; letter-spacing: .17em; }
.text-link { color: var(--blue); font-size: .9rem; font-weight: 750; text-underline-offset: 4px; }
.category-grid, .product-grid { display: grid; gap: 16px; }
.category-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.category-grid a { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 5px; overflow: hidden; text-decoration: none; }
.category-grid a:hover { border-color: var(--blue); }
.category-grid img { width: 100%; aspect-ratio: 1.12; object-fit: cover; }
.category-grid span { display: flex; justify-content: space-between; gap: 8px; padding: 12px; font-weight: 750; font-size: .86rem; }
.category-grid b { color: var(--blue); }
.collection, .capabilities { background: var(--light); }
.product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card { padding: 12px; background: white; border: 1px solid var(--line); border-radius: 5px; }
.card-media { background: var(--light); aspect-ratio: 1.17; margin-bottom: 12px; overflow: hidden; }
.card-media img { display: block; width: 100%; height: 100%; object-fit: contain; background: white; }
.card p { color: var(--muted); font-size: .85rem; margin-top: 8px; }
.product-link { text-decoration: none; }
.product-link:hover h3 { text-decoration: underline; }
.inquiry-button { margin-top: 12px; padding: 6px 9px; border: 1px solid #bdcddd; border-radius: 4px; background: white; color: var(--blue); font-size: .81rem; font-weight: 750; }
.inquiry-button[aria-pressed="true"] { background: #e5eef8; }
.split { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: center; gap: clamp(22px, 5vw, 65px); }
.split img { display: block; width: 100%; border-radius: 5px; }
.split p:not(.eyebrow) { margin-block: 14px; }
.capability-grid, .footer-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.capability-grid article { border-top: 2px solid #b9cce1; padding-top: 12px; }
.capability-grid span { color: var(--blue); font-size: .78rem; font-weight: 800; }
.capability-grid h3 { margin-block: 8px; }
.capability-grid p, .article-teaser p { color: var(--muted); }
.article-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.article-teaser { padding-block: 12px; border-top: 1px solid var(--line); margin-top: 10px; }
.article-teaser a { font-weight: 700; }
.article-teaser h2 { font-size: 1.55rem; }
.article-teaser p { margin-top: 5px; }
.quote-band { background: var(--blue); color: white; padding-block: 28px; }
.quote-band .wrap { display: flex; justify-content: space-between; align-items: center; gap: 18px; }
.quote-band h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
.quote-band .button { background: #fff; color: var(--navy); }
.site-footer { background: var(--navy); color: white; }
.footer-grid { padding-block: 36px; }
.footer-grid h2 { font-size: 1.05rem; letter-spacing: 0; margin-bottom: 10px; }
.footer-grid p { margin-top: 10px; color: #d2deeb; }
.footer-grid a:not(.brand), .contact-details { display: block; font-size: .91rem; }
.contact-details { font-style: normal; }
.contact-details a { display: block; overflow-wrap: anywhere; }
.footer-bottom { display: flex; justify-content: space-between; gap: 14px; padding-block: 14px; border-top: 1px solid #47617c; font-size: .82rem; }
.inner { padding-block: 42px 58px; min-height: 52vh; }
.inner h1 { margin-bottom: 20px; }
.entry { max-width: 880px; margin-bottom: 20px; }
.entry p { margin-block: 1em; }
.factory { max-width: 800px; }
.factory figcaption { color: var(--muted); font-size: .85rem; }
.catalog-layout { display: grid; grid-template-columns: 218px minmax(0, 1fr); gap: 22px; }
.catalog-layout .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.category-links { display: grid; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.category-links h2 { background: var(--navy); color: white; font-size: 1rem; padding: 12px; letter-spacing: 0; }
.category-links a { border-top: 1px solid var(--line); padding: 9px 12px; font-size: .88rem; text-decoration: none; }
.category-links a:hover, .category-links [aria-current] { background: var(--light); color: var(--blue); text-decoration: underline; }
.detail-media { border: 1px solid var(--line); border-radius: 5px; }
.detail-media img { aspect-ratio: 1; object-fit: contain; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 14px; }
.actions .inquiry-button { margin-top: 0; padding: 12px; }
.pagination { margin-top: 20px; }
.page-numbers { padding: 5px; }
.quote-panel { max-width: 800px; }
.inquiry-items { padding: 16px; margin-bottom: 16px; border: 1px solid var(--line); background: var(--light); border-radius: 5px; }
.inquiry-items h2 { font-size: 1.25rem; margin-bottom: 8px; }
.inquiry-items ul { margin: 0; padding: 0; list-style: none; }
.inquiry-items li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 5px; }
.inquiry-items button { padding: 3px 7px; background: white; border: 1px solid var(--line); border-radius: 4px; }
.quote-form, .field-row { display: grid; gap: 13px; }
.field-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.quote-form label { display: grid; gap: 4px; font-size: .9rem; font-weight: 650; }
.quote-form input, .quote-form textarea { width: 100%; padding: 9px; border: 1px solid #b3c2d2; border-radius: 4px; }
.quote-form .button { justify-self: start; }
.form-status { margin-bottom: 12px; padding: 10px; border: 1px solid #b3c2d2; border-radius: 4px; }

@media (max-width: 940px) {
    .header-row { flex-wrap: wrap; gap: 10px; padding-block: 10px; }
    .header-row nav { order: 3; flex-basis: 100%; }
    .category-grid, .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .catalog-layout .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
    .wrap { width: calc(100% - 30px); }
    .contact-strip .wrap { flex-wrap: wrap; gap: 3px 14px; }
    .contact-strip span { flex-basis: 100%; }
    .header-row nav a { font-size: .82rem; }
    .banner .slide-controls { bottom: 0; }
    .section-head { align-items: start; flex-direction: column; gap: 8px; }
    .category-grid, .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
    .split, .catalog-layout, .capability-grid, .article-grid, .footer-grid { grid-template-columns: 1fr; }
    .category-links { display: flex; flex-wrap: wrap; }
    .category-links h2 { flex-basis: 100%; }
    .category-links a { border-right: 1px solid var(--line); }
    .quote-band .wrap, .footer-bottom { align-items: start; flex-direction: column; }
}
@media (max-width: 380px) {
    .field-row { grid-template-columns: 1fr; }
    .header-row .button-small { padding-inline: 8px; }
    .utility-row { gap: 8px; }
}
