/*
Theme Name: PriceBulb
Theme URI: https://pricebulb.com
Author: RT7 Media
Author URI: https://rt7.media
Description: The go-to resource for lighting solutions. Every bulb, explained.
Version: 2.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: pricebulb-theme
*/

/* CSS Variables - Lighting Theme */
:root {
    --pb-bg: #FAFAFA;
    --pb-surface: #ffffff;
    --pb-surface-hover: #f5f5f5;
    --pb-text: #1a1a2e;
    --pb-text-muted: #64748b;
    --pb-text-desc: #475569;
    --pb-accent: #FFB800;
    --pb-accent-hover: #E5A600;
    --pb-accent-light: #FFF8E6;
    --pb-success: #22C55E;
    --pb-success-hover: #16A34A;
    --pb-border: #e2e8f0;
    --pb-shadow: rgba(0,0,0,0.04);
    --pb-shadow-hover: rgba(0,0,0,0.08);
    --pb-specs-bg: #f8fafc;
}

[data-theme="dark"] {
    --pb-bg: #0f172a;
    --pb-surface: #1e293b;
    --pb-surface-hover: #334155;
    --pb-text: #f1f5f9;
    --pb-text-muted: #94a3b8;
    --pb-text-desc: #cbd5e1;
    --pb-accent: #FFB800;
    --pb-accent-hover: #FFCC33;
    --pb-accent-light: rgba(255, 184, 0, 0.15);
    --pb-success: #22C55E;
    --pb-success-hover: #4ADE80;
    --pb-border: #334155;
    --pb-shadow: rgba(0,0,0,0.2);
    --pb-shadow-hover: rgba(0,0,0,0.3);
    --pb-specs-bg: #1e293b;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--pb-bg);
    color: var(--pb-text);
    line-height: 1.6;
    transition: background 0.3s ease, color 0.3s ease;
    min-height: 100vh;
}

a {
    color: var(--pb-accent);
    text-decoration: none;
    transition: color 0.2s, opacity 0.2s;
}

a:hover {
    opacity: 0.8;
}

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Space Grotesk', -apple-system, sans-serif;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--pb-text);
}

.story-text, .pb-story {
    font-family: 'Literata', Georgia, 'Times New Roman', serif;
    font-style: italic;
    line-height: 1.7;
    color: var(--pb-text-desc);
}

.pb-description {
    font-family: 'DM Sans', -apple-system, sans-serif;
    font-style: normal;
    line-height: 1.6;
    color: var(--pb-text-desc);
}

/* Product Specs */
.pb-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0.75rem 0;
}

.pb-spec {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    background: var(--pb-specs-bg);
    border-radius: 4px;
    font-size: 0.75rem;
    color: var(--pb-text-muted);
}

.pb-spec-label {
    font-weight: 600;
    color: var(--pb-text);
}

/* Best For Badge */
.pb-best-for {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    background: var(--pb-accent-light);
    color: var(--pb-accent);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* Buy Button (green) */
.pb-btn-buy {
    background: var(--pb-success);
    color: white;
}

.pb-btn-buy:hover {
    background: var(--pb-success-hover);
    color: white;
}

/* Layout */
.pb-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Header */
.pb-header {
    background: var(--pb-surface);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px var(--pb-shadow);
    transition: background 0.3s, box-shadow 0.3s;
}

[data-theme="dark"] .pb-header {
    box-shadow: none;
    border-bottom: 1px solid var(--pb-border);
}

.pb-header-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pb-logo {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--pb-accent);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pb-logo:hover {
    opacity: 1;
    color: var(--pb-accent);
}

.pb-logo-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.pb-header-tagline {
    font-family: 'Literata', Georgia, serif;
    font-size: 0.75rem;
    font-style: italic;
    color: var(--pb-accent);
    opacity: 0.85;
    max-width: 200px;
    line-height: 1.3;
}

/* Logo Icon - handled in separate section */

.pb-header-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* Social Icons */
.pb-social-icons {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.pb-social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--pb-accent);
    transition: color 0.2s, transform 0.2s;
}

.pb-social-link:hover {
    color: var(--pb-accent-hover);
    opacity: 1;
    transform: scale(1.1);
}

.pb-social-link svg {
    display: block;
}

.pb-nav {
    display: flex;
    gap: 2rem;
}

.pb-nav a {
    font-size: 0.9rem;
    color: var(--pb-text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.pb-nav a:hover,
.pb-nav a.active {
    color: var(--pb-text);
    opacity: 1;
}

/* Theme Toggle */
.pb-theme-toggle {
    background: var(--pb-bg);
    border: 1px solid var(--pb-border);
    border-radius: 50px;
    padding: 0.4rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    transition: background 0.3s, border-color 0.3s;
}

.pb-theme-toggle span {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.pb-theme-toggle .light-icon {
    background: var(--pb-surface);
}

[data-theme="dark"] .pb-theme-toggle .light-icon {
    background: transparent;
}

[data-theme="dark"] .pb-theme-toggle .dark-icon {
    background: var(--pb-surface);
}

/* Hero */
.pb-hero {
    max-width: 900px;
    margin: 0 auto;
    padding: 3rem 2rem 2rem;
    text-align: center;
}

.pb-tagline {
    font-family: 'Literata', Georgia, serif;
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--pb-text-muted);
    font-style: italic;
    margin: 0 auto;
}

/* Main Content */
.pb-main {
    padding: 2rem 0 4rem;
}

/* Footer */
.pb-footer {
    background: var(--pb-surface);
    border-top: 1px solid var(--pb-border);
    padding: 2rem;
    text-align: center;
    color: var(--pb-text-muted);
    font-size: 0.85rem;
}

.pb-footer a {
    color: var(--pb-accent);
}

.pb-footer-social {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.pb-footer-social .pb-social-link {
    color: var(--pb-accent);
}

.pb-footer-social .pb-social-link:hover {
    color: var(--pb-accent-hover);
}

/* Buttons */
.pb-btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--pb-accent);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    text-decoration: none;
}

.pb-btn:hover {
    background: var(--pb-accent-hover);
    color: white;
    opacity: 1;
    transform: translateY(-1px);
}

.pb-btn-outline {
    background: transparent;
    border: 2px solid var(--pb-border);
    color: var(--pb-text);
}

.pb-btn-outline:hover {
    border-color: var(--pb-text);
    background: transparent;
    color: var(--pb-text);
}

/* Admin Bar Fix */
body.admin-bar .pb-header {
    top: 32px;
}

@media screen and (max-width: 782px) {
    body.admin-bar .pb-header {
        top: 46px;
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .pb-hero h1 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .pb-header {
        padding: 1rem;
    }

    .pb-nav {
        display: none;
    }

    .pb-header-tagline {
        display: none;
    }

    .pb-hero {
        padding: 2rem 1rem 1.5rem;
    }

    .pb-tagline {
        font-size: 1rem;
        line-height: 1.7;
    }

    .pb-container {
        padding: 0 1rem;
    }

    .pb-about-story {
        font-size: 1rem;
    }

    .pb-about-story p:first-child {
        font-size: 1.15rem;
    }

    /* Modal mobile */
    .pb-modal-content {
        width: 95%;
        padding: 1.5rem;
        max-height: 85vh;
    }

    .pb-modal-product {
        flex-direction: column;
        text-align: center;
    }

    .pb-modal-image {
        width: 60px;
        height: 60px;
    }

    .pb-modal-story {
        font-size: 1.2rem;
        line-height: 1.7;
    }

    .pb-modal-link {
        width: 100%;
        text-align: center;
    }

}

/* Logo Icon */
.pb-logo-icon {
    width: 32px;
    height: 32px;
}


/* Modal */
.pb-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.pb-modal.active {
    opacity: 1;
    visibility: visible;
}

.pb-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
}

.pb-modal-content {
    position: relative;
    background: var(--pb-surface);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 20px;
    padding: 2rem;
    transform: scale(0.9);
    transition: transform 0.3s;
}

.pb-modal.active .pb-modal-content {
    transform: scale(1);
}

.pb-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    background: var(--pb-bg);
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--pb-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
}

.pb-modal-close:hover {
    background: var(--pb-accent);
    color: white;
}

.pb-modal-product {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    padding-right: 3rem;
    border-bottom: 1px solid var(--pb-border);
}

.pb-modal-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 12px;
    flex-shrink: 0;
}

.pb-modal-product-info {
    flex: 1;
    min-width: 0;
}

.pb-modal-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--pb-text);
    margin: 0 0 0.25rem;
    line-height: 1.3;
}

.pb-modal-price {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--pb-accent);
}

.pb-modal-story {
    font-family: 'Literata', Georgia, serif;
    font-size: 1.4rem;
    line-height: 1.8;
    font-style: italic;
    color: var(--pb-text);
    margin: 0 0 2rem;
}

.pb-modal-link {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--pb-accent);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: background 0.2s;
}

.pb-modal-link:hover {
    background: var(--pb-accent-hover);
    color: white;
    opacity: 1;
}

/* About Page */
.pb-about {
    max-width: 700px;
    margin: 0 auto;
    padding: 3rem 0;
}

.pb-about-story {
    font-family: 'Literata', Georgia, serif;
    font-size: 1.1rem;
    line-height: 2;
    color: var(--pb-text-story);
}

.pb-about-story p {
    margin-bottom: 1.75rem;
}

.pb-about-story p:first-child {
    font-size: 1.3rem;
    font-style: italic;
    color: var(--pb-text);
}

.pb-about-sign {
    font-style: italic;
    color: var(--pb-accent);
    margin-top: 2rem;
}

/* Utility Classes */
.text-center { text-align: center; }
.text-muted { color: var(--pb-text-muted); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

/* Hero Title */
.pb-hero-title {
    font-family: 'Space Grotesk', -apple-system, sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--pb-text);
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
}

@media (max-width: 768px) {
    .pb-hero-title {
        font-size: 1.75rem;
    }
}
