/*
Theme Name: CSSBUY Spreadsheet
Theme URI: https://sheetfinds.com/
Author: CSSBUY Spreadsheet Team
Author URI: https://sheetfinds.com/
Description: A clean, light, SEO-optimized WordPress theme dedicated to CSSBUY spreadsheet, CSSBUY shipping, CSSBUY haul, and QC finder content. Designed with a fresh, Western-friendly aesthetic.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: cssbuy-spreadsheet
Tags: light, clean, blog, seo, one-column, two-columns, custom-menu, featured-images, e-commerce
*/

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    color: #2b2f38;
    background: #fafbff;
    line-height: 1.65;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; display: block; }

a {
    color: #2e7df6;
    text-decoration: none;
    transition: color .2s ease;
}
a:hover { color: #1456c8; }

h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.25;
    color: #1a1f2c;
    margin: 0 0 .6em;
}
h1 { font-size: 2.25rem; }
h2 { font-size: 1.7rem; }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1em; }

.container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 22px;
}

/* ---------- Header ---------- */
.site-header {
    background: #ffffff;
    border-bottom: 1px solid #eef1f7;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 4px rgba(20, 40, 90, .04);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    gap: 24px;
    flex-wrap: wrap;
}

.site-branding a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 1.35rem;
    font-weight: 800;
    color: #1a1f2c;
    letter-spacing: -.01em;
}

.logo-dot {
    width: 28px; height: 28px;
    background: linear-gradient(135deg, #5aa8ff, #2e7df6);
    border-radius: 8px;
    display: inline-block;
}

/* ---------- Nav ---------- */
.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}

.main-navigation li { position: relative; }

.main-navigation a {
    color: #424857;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: 8px;
    display: inline-block;
}
.main-navigation a:hover,
.main-navigation .current-menu-item > a {
    background: #eef4ff;
    color: #1456c8;
}

/* dropdown */
.main-navigation li ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    border: 1px solid #eef1f7;
    border-radius: 10px;
    box-shadow: 0 12px 32px rgba(20, 40, 90, .08);
    min-width: 220px;
    padding: 8px;
    flex-direction: column;
    gap: 2px;
    z-index: 50;
}
.main-navigation li:hover > ul { display: flex; }
.main-navigation li ul a { display: block; padding: 8px 12px; }

.header-cta {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, #2e7df6, #1456c8);
    color: #fff !important;
    padding: 10px 18px;
    border-radius: 999px;
    font-weight: 600;
    box-shadow: 0 6px 14px rgba(46, 125, 246, .25);
}
.header-cta:hover { color: #fff !important; transform: translateY(-1px); }

/* ---------- Hero ---------- */
.hero {
    background: radial-gradient(1200px 500px at 10% -10%, #e9f1ff 0%, transparent 60%),
                radial-gradient(900px 500px at 100% 0%, #fff1f0 0%, transparent 55%),
                #fafbff;
    padding: 80px 0 60px;
    text-align: center;
}

.hero h1 {
    font-size: clamp(2rem, 4.5vw, 3.2rem);
    margin-bottom: .35em;
    background: linear-gradient(135deg, #1a1f2c 0%, #2e7df6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero p.lead {
    font-size: 1.15rem;
    color: #4b5163;
    max-width: 760px;
    margin: 0 auto 32px;
}

.hero-cta {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 26px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, #2e7df6, #1456c8);
    color: #fff;
    box-shadow: 0 8px 20px rgba(46, 125, 246, .28);
}
.btn-primary:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(46, 125, 246, .35);
}

.btn-secondary {
    background: #fff;
    color: #1456c8;
    border: 2px solid #cfdeff;
}
.btn-secondary:hover {
    background: #eef4ff;
    color: #1456c8;
    transform: translateY(-2px);
}

.btn-accent {
    background: linear-gradient(135deg, #ff8a5b, #ff5a7a);
    color: #fff;
    box-shadow: 0 8px 20px rgba(255, 90, 122, .28);
}
.btn-accent:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(255, 90, 122, .35);
}

/* ---------- Sections ---------- */
section { padding: 70px 0; }

.section-title {
    text-align: center;
    margin-bottom: 16px;
}
.section-subtitle {
    text-align: center;
    color: #5b6275;
    max-width: 680px;
    margin: 0 auto 44px;
}

/* ---------- Category Buttons Grid ---------- */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}

.category-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 22px;
    background: #fff;
    border: 1px solid #eef1f7;
    border-radius: 16px;
    color: #1a1f2c;
    font-weight: 600;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
    position: relative;
    overflow: hidden;
}
.category-btn::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(46,125,246,.06), rgba(255,138,91,.04));
    opacity: 0;
    transition: opacity .25s ease;
}
.category-btn:hover {
    transform: translateY(-4px);
    border-color: #cfdeff;
    box-shadow: 0 14px 30px rgba(20, 40, 90, .08);
    color: #1456c8;
}
.category-btn:hover::before { opacity: 1; }
.category-btn span.cat-name { position: relative; z-index: 1; }
.category-btn span.cat-icon {
    font-size: 1.4rem;
    position: relative;
    z-index: 1;
}

/* ---------- Article Cards Grid ---------- */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 26px;
}

.article-card {
    background: #fff;
    border: 1px solid #eef1f7;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform .25s ease, box-shadow .25s ease;
}
.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 36px rgba(20, 40, 90, .08);
}

.article-thumb {
    height: 170px;
    background: linear-gradient(135deg, #e9f1ff, #fff1f0);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.4rem;
    color: #2e7df6;
    font-weight: 800;
    letter-spacing: -.02em;
}

.article-body {
    padding: 22px 22px 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.article-tag {
    display: inline-block;
    background: #eef4ff;
    color: #1456c8;
    font-size: .75rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 999px;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: .05em;
    width: fit-content;
}

.article-card h3 {
    font-size: 1.15rem;
    margin-bottom: 8px;
}
.article-card h3 a { color: #1a1f2c; }
.article-card h3 a:hover { color: #1456c8; }

.article-card p.excerpt {
    color: #5b6275;
    font-size: .95rem;
    margin-bottom: 16px;
    flex: 1;
}

.read-more {
    color: #2e7df6;
    font-weight: 600;
    font-size: .95rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.read-more:hover { gap: 8px; }

/* ---------- Features Strip ---------- */
.features {
    background: #fff;
    border-top: 1px solid #eef1f7;
    border-bottom: 1px solid #eef1f7;
}
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 28px;
    text-align: center;
}
.feature-icon {
    width: 56px; height: 56px;
    margin: 0 auto 12px;
    background: linear-gradient(135deg, #e9f1ff, #fff1f0);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}
.feature h4 { font-size: 1.05rem; margin-bottom: 6px; }
.feature p { color: #5b6275; font-size: .95rem; margin: 0; }

/* ---------- CTA Band ---------- */
.cta-band {
    background: linear-gradient(135deg, #2e7df6 0%, #1456c8 100%);
    color: #fff;
    text-align: center;
    border-radius: 24px;
    padding: 60px 30px;
    margin: 0 auto;
    max-width: 1100px;
    box-shadow: 0 24px 60px rgba(46, 125, 246, .18);
}
.cta-band h2 { color: #fff; font-size: 2rem; margin-bottom: 12px; }
.cta-band p { color: #d9e6ff; margin-bottom: 26px; }
.cta-band .btn-primary {
    background: #fff;
    color: #1456c8;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .15);
}
.cta-band .btn-primary:hover { background: #f3f7ff; color: #1456c8; }
.cta-band .btn-accent { background: linear-gradient(135deg, #ff8a5b, #ff5a7a); }

/* ---------- Single Post / Page ---------- */
.entry {
    max-width: 820px;
    margin: 0 auto;
    padding: 50px 0 80px;
}
.entry header.entry-header { text-align: center; margin-bottom: 40px; }
.entry h1.entry-title {
    font-size: clamp(1.9rem, 3.5vw, 2.6rem);
    margin-bottom: 12px;
}
.entry .entry-meta {
    color: #8b91a3;
    font-size: .95rem;
}
.entry-content {
    background: #fff;
    border: 1px solid #eef1f7;
    border-radius: 18px;
    padding: 40px;
    box-shadow: 0 8px 24px rgba(20, 40, 90, .04);
}
.entry-content h2 {
    margin-top: 1.6em;
    padding-bottom: .35em;
    border-bottom: 2px solid #eef4ff;
}
.entry-content h3 { margin-top: 1.4em; }
.entry-content ul, .entry-content ol { padding-left: 1.4em; }
.entry-content li { margin-bottom: .4em; }
.entry-content blockquote {
    border-left: 4px solid #2e7df6;
    background: #f3f7ff;
    padding: 14px 20px;
    border-radius: 0 12px 12px 0;
    margin: 1.4em 0;
    color: #424857;
    font-style: italic;
}
.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.4em 0;
}
.entry-content th, .entry-content td {
    padding: 12px 14px;
    border: 1px solid #eef1f7;
    text-align: left;
}
.entry-content th { background: #f3f7ff; }

.post-cta {
    margin-top: 40px;
    padding: 30px;
    background: linear-gradient(135deg, #eef4ff, #fff1f0);
    border-radius: 16px;
    text-align: center;
}
.post-cta h3 { margin-bottom: 10px; }
.post-cta .btn { margin: 6px; }

.related-posts {
    margin-top: 60px;
}
.related-posts h2 { text-align: center; margin-bottom: 28px; }

/* ---------- Footer ---------- */
.site-footer {
    background: #1a1f2c;
    color: #c4cad9;
    padding: 60px 0 24px;
    margin-top: 60px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 36px;
    margin-bottom: 36px;
}
.footer-col h4 {
    color: #fff;
    font-size: 1rem;
    margin-bottom: 14px;
    text-transform: uppercase;
    letter-spacing: .06em;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { color: #a8b0c2; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
    border-top: 1px solid #2b3145;
    padding-top: 18px;
    text-align: center;
    color: #7a8197;
    font-size: .9rem;
}

/* ---------- Mobile ---------- */
@media (max-width: 860px) {
    .header-inner { flex-wrap: wrap; }
    .main-navigation { order: 3; width: 100%; }
    .main-navigation ul { justify-content: center; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .entry-content { padding: 24px; }
    section { padding: 50px 0; }
    .hero { padding: 60px 0 40px; }
}
@media (max-width: 520px) {
    .footer-grid { grid-template-columns: 1fr; }
    .hero-cta { flex-direction: column; align-items: stretch; }
    .btn { width: 100%; }
}
