/* Generic site template — each site sets its own palette via :root overrides before this loads-in visually */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--font-body, 'Inter', 'Segoe UI', sans-serif);
    background: var(--bg, #fff);
    color: var(--text, #1a1a1a);
    line-height: 1.65;
}

h1, h2, h3, h4 { font-family: var(--font-heading, var(--font-body)); line-height: 1.2; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

.container { max-width: 1140px; margin: 0 auto; padding: 0 1.5rem; }

/* ===== Nav ===== */
.t-nav {
    position: sticky; top: 0; z-index: 50;
    background: var(--nav-bg, var(--bg));
    border-bottom: 1px solid var(--border, rgba(0,0,0,0.08));
}
.t-nav .container { display: flex; align-items: center; justify-content: space-between; padding: 1.1rem 1.5rem; }
.t-logo { font-weight: 800; font-size: 1.25rem; color: var(--brand, #000); }
.t-nav-links { display: flex; gap: 2rem; }
.t-nav-links a { font-weight: 500; font-size: 0.92rem; color: var(--text-muted, #555); transition: color .2s; }
.t-nav-links a:hover { color: var(--brand, #000); }
.t-nav-cta { background: var(--brand, #000); color: var(--brand-contrast, #fff); padding: 0.6rem 1.3rem; border-radius: var(--radius-btn, 8px); font-weight: 600; font-size: 0.88rem; }

/* ===== Hero ===== */
.t-hero { padding: 5rem 0; background: var(--hero-bg, var(--bg)); }
.t-hero .container { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 3rem; align-items: center; }
.t-hero.centered .container { grid-template-columns: 1fr; text-align: center; max-width: 780px; }
.t-eyebrow { display: inline-block; color: var(--brand, #000); font-weight: 700; font-size: 0.82rem; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 0.9rem; }
.t-hero h1 { font-size: 2.9rem; font-weight: 800; margin-bottom: 1rem; color: var(--heading, var(--text)); }
.t-hero p.t-lead { font-size: 1.1rem; color: var(--text-muted, #555); max-width: 520px; margin-bottom: 2rem; }
.t-hero.centered p.t-lead { margin-left: auto; margin-right: auto; }
.t-hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.t-hero.centered .t-hero-actions { justify-content: center; }
.t-hero-img { border-radius: var(--radius, 16px); overflow: hidden; }
.t-hero-img img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4/3; }

/* ===== Buttons ===== */
.t-btn { display: inline-block; padding: 0.9rem 1.9rem; border-radius: var(--radius-btn, 8px); font-weight: 700; font-size: 0.95rem; border: 2px solid transparent; cursor: pointer; font-family: inherit; }
.t-btn-primary { background: var(--brand, #000); color: var(--brand-contrast, #fff); }
.t-btn-primary:hover { opacity: 0.88; }
.t-btn-outline { border-color: var(--brand, #000); color: var(--brand, #000); background: transparent; }
.t-btn-outline:hover { background: var(--brand, #000); color: var(--brand-contrast, #fff); }

/* ===== Sections ===== */
.t-section { padding: 4.5rem 0; }
.t-section-alt { background: var(--section-alt-bg, #f7f7f9); }
.t-section-dark { background: var(--section-dark-bg, #111); color: #fff; }
.t-section-title { font-size: 2.1rem; font-weight: 800; text-align: center; margin-bottom: 0.6rem; color: var(--heading, var(--text)); }
.t-section-title.left { text-align: left; }
.t-section-sub { text-align: center; color: var(--text-muted, #555); max-width: 560px; margin: 0 auto 3rem; }
.t-section-title.left + .t-section-sub { text-align: left; margin-left: 0; }

/* ===== Grids / Cards ===== */
.t-grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.75rem; }
.t-grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; }
.t-card { background: var(--card-bg, #fff); border: 1px solid var(--border, rgba(0,0,0,0.08)); border-radius: var(--radius, 16px); padding: 2rem; transition: transform .2s, box-shadow .2s; }
.t-card:hover { transform: translateY(-5px); box-shadow: 0 16px 32px rgba(0,0,0,0.08); }
.t-icon-badge { width: 52px; height: 52px; border-radius: 14px; background: var(--brand, #000); color: var(--brand-contrast, #fff); display: flex; align-items: center; justify-content: center; font-weight: 800; margin-bottom: 1.1rem; }
.t-card h3 { margin-bottom: 0.6rem; font-size: 1.1rem; }
.t-card p { color: var(--text-muted, #555); font-size: 0.94rem; }

/* ===== Testimonials ===== */
.t-testimonial { background: var(--card-bg, #fff); border: 1px solid var(--border, rgba(0,0,0,0.08)); border-radius: var(--radius, 16px); padding: 1.8rem; }
.t-testimonial p { font-style: italic; color: var(--text-muted, #555); margin-bottom: 1rem; }
.t-testimonial .who { font-weight: 700; font-size: 0.9rem; }
.t-testimonial .role { color: var(--text-muted, #555); font-size: 0.82rem; }

/* ===== Pricing ===== */
.t-pricing-card { background: var(--card-bg, #fff); border: 2px solid var(--border, rgba(0,0,0,0.08)); border-radius: var(--radius, 16px); padding: 2.2rem; text-align: center; }
.t-pricing-card.featured { border-color: var(--brand, #000); position: relative; }
.t-pricing-card .badge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--brand, #000); color: var(--brand-contrast, #fff); font-size: 0.72rem; font-weight: 700; padding: 0.3rem 0.9rem; border-radius: 20px; }
.t-price { font-size: 2.4rem; font-weight: 800; margin: 1rem 0; color: var(--heading, var(--text)); }
.t-price span { font-size: 0.95rem; font-weight: 500; color: var(--text-muted, #555); }
.t-pricing-card ul { text-align: left; margin: 1.5rem 0; display: flex; flex-direction: column; gap: 0.6rem; font-size: 0.9rem; }

/* ===== Forms ===== */
.t-form-group { margin-bottom: 1.1rem; }
.t-form-group label { display: block; font-weight: 600; margin-bottom: 0.4rem; font-size: 0.88rem; }
.t-form-group input, .t-form-group textarea, .t-form-group select {
    width: 100%; padding: 0.75rem 0.95rem; border-radius: 8px;
    border: 1px solid var(--border, #ddd); background: var(--input-bg, #fff);
    color: var(--text, #111); font-family: inherit; font-size: 0.94rem;
}
.t-form-group input:focus, .t-form-group textarea:focus { outline: none; border-color: var(--brand, #000); }
.t-alert { padding: 0.9rem 1.2rem; border-radius: 10px; margin-bottom: 1.3rem; font-size: 0.9rem; }
.t-alert-success { background: #ecfdf5; color: #065f46; border: 1px solid #34d39955; }
.t-alert-error { background: #fef2f2; color: #991b1b; border: 1px solid #f8717155; }

/* ===== Product grid (e-commerce) ===== */
.t-product-card { background: var(--card-bg, #fff); border: 1px solid var(--border, rgba(0,0,0,0.08)); border-radius: var(--radius, 16px); overflow: hidden; transition: transform .2s, box-shadow .2s; }
.t-product-card:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(0,0,0,0.1); }
.t-product-img { aspect-ratio: 1/1; overflow: hidden; background: var(--section-alt-bg, #f2f2f4); }
.t-product-img img { width: 100%; height: 100%; object-fit: cover; }
.t-product-info { padding: 1.2rem; }
.t-product-info h3 { font-size: 0.98rem; margin-bottom: 0.3rem; }
.t-product-price { font-weight: 800; font-size: 1.1rem; color: var(--brand, #000); margin: 0.4rem 0 0.8rem; }
.t-cart-badge { background: var(--brand, #000); color: var(--brand-contrast, #fff); font-size: 0.72rem; font-weight: 700; padding: 0.1rem 0.5rem; border-radius: 20px; margin-left: 0.4rem; }

/* ===== Cart / Checkout ===== */
.t-cart-table { width: 100%; border-collapse: collapse; }
.t-cart-table th, .t-cart-table td { padding: 1rem 0.8rem; text-align: left; border-bottom: 1px solid var(--border, #eee); font-size: 0.92rem; }
.t-cart-table th { color: var(--text-muted, #666); font-size: 0.76rem; text-transform: uppercase; }
.t-cart-row-product { display: flex; align-items: center; gap: 0.9rem; }
.t-cart-thumb { width: 56px; height: 56px; border-radius: 8px; flex-shrink: 0; }
.t-qty-input { width: 60px; padding: 0.4rem; border-radius: 6px; border: 1px solid var(--border, #ddd); text-align: center; }
.t-cart-summary { background: var(--card-bg, #fff); border: 1px solid var(--border, rgba(0,0,0,0.08)); border-radius: var(--radius, 16px); padding: 1.6rem; }
.t-cart-summary-row { display: flex; justify-content: space-between; margin-bottom: 0.7rem; font-size: 0.92rem; color: var(--text-muted, #555); }
.t-cart-summary-row.total { font-weight: 800; font-size: 1.15rem; color: var(--heading, #111); border-top: 1px solid var(--border, #eee); padding-top: 0.9rem; margin-top: 0.9rem; }
.t-remove-link { color: #c0392b; font-size: 0.82rem; }
.t-empty-cart { text-align: center; padding: 3rem 1rem; color: var(--text-muted, #666); }

/* ===== Footer ===== */
.t-footer { background: var(--footer-bg, #111); color: var(--footer-text, #cfcfcf); padding: 3rem 0 1.5rem; }
.t-footer h4 { color: #fff; margin-bottom: 1rem; font-size: 0.95rem; }
.t-footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 2rem; margin-bottom: 2rem; }
.t-footer a { color: var(--footer-text, #cfcfcf); font-size: 0.88rem; }
.t-footer a:hover { color: #fff; }
.t-footer-links { display: flex; flex-direction: column; gap: 0.55rem; }
.t-footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 1.3rem; text-align: center; font-size: 0.82rem; color: #9a9a9a; }
.t-demo-badge { text-align: center; padding: 0.7rem; background: rgba(255,255,255,0.06); border-radius: 8px; font-size: 0.78rem; margin-top: 1.5rem; }
.t-demo-badge a { text-decoration: underline; }

@media (max-width: 850px) {
    .t-hero .container { grid-template-columns: 1fr; text-align: center; }
    .t-hero-actions { justify-content: center; }
    .t-hero-img { order: -1; }
    .t-footer-grid { grid-template-columns: 1fr 1fr; }
}
