/*
Theme Name: BestHR Payroll Software
Theme URI: https://besthrpayrollsoftware.com
Author: Your Name
Author URI: https://yoursite.com
Description: A comprehensive G2-style review and comparison theme for HR Payroll Software
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: besthrpayroll
Tags: review, comparison, ratings, software, directory
*/

/* ========================================
   CSS Reset & Base Styles
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #ff492c;
    --secondary-color: #0d2366;
    --text-color: #2e3338;
    --light-gray: #f5f5f5;
    --border-color: #e6e6e6;
    --success-color: #00a878;
    --warning-color: #ffa500;
    --star-color: #ffc107;
    --font-main: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    --transition: all 0.3s ease;
}

body {
    font-family: var(--font-main);
    color: var(--text-color);
    line-height: 1.6;
    font-size: 16px;
    background-color: #fff;
}

/* ========================================
   Container & Layout
   ======================================== */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.wide-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========================================
   Header
   ======================================== */

.site-header {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.site-logo {
    font-size: 24px;
    font-weight: bold;
    color: var(--secondary-color);
    text-decoration: none;
}

.main-navigation ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

.main-navigation a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.main-navigation a:hover {
    color: var(--primary-color);
}

.header-search {
    position: relative;
    flex: 0 0 400px;
}

.header-search input {
    width: 100%;
    padding: 10px 40px 10px 15px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
}

.header-cta {
    display: flex;
    gap: 15px;
}

.btn {
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    display: inline-block;
}

.btn-primary {
    background: var(--primary-color);
    color: #fff;
}

.btn-primary:hover {
    background: #e63e21;
}

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

.btn-secondary:hover {
    background: var(--secondary-color);
    color: #fff;
}

/* ========================================
   Hero Section
   ======================================== */

.hero-section {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #1a3a8a 100%);
    color: #fff;
    padding: 60px 0;
    text-align: center;
}

.hero-section h1 {
    font-size: 42px;
    margin-bottom: 20px;
    font-weight: 700;
}

.hero-section p {
    font-size: 18px;
    margin-bottom: 30px;
    opacity: 0.9;
}

.hero-search {
    max-width: 700px;
    margin: 0 auto;
    position: relative;
}

.hero-search input {
    width: 100%;
    padding: 18px 150px 18px 20px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
}

.hero-search button {
    position: absolute;
    right: 5px;
    top: 5px;
    bottom: 5px;
    padding: 0 30px;
}

/* ========================================
   Product Grid
   ======================================== */

.products-section {
    padding: 60px 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.section-header h2 {
    font-size: 32px;
    color: var(--secondary-color);
}

.view-toggle {
    display: flex;
    gap: 10px;
}

.view-toggle button {
    padding: 8px 15px;
    border: 1px solid var(--border-color);
    background: #fff;
    cursor: pointer;
    border-radius: 4px;
}

.view-toggle button.active {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.filters-sidebar {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.filter-group {
    margin-bottom: 25px;
}

.filter-group h3 {
    font-size: 16px;
    margin-bottom: 12px;
    color: var(--secondary-color);
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.filter-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

.filter-option label {
    font-size: 14px;
    cursor: pointer;
}

.products-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.product-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    transition: var(--transition);
    position: relative;
}

.product-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    transform: translateY(-4px);
}

.product-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--primary-color);
    color: #fff;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.product-header {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 15px;
}

.product-logo {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid var(--border-color);
}

.product-info {
    flex: 1;
}

.product-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--secondary-color);
}

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

.product-title a:hover {
    color: var(--primary-color);
}

.product-tagline {
    font-size: 13px;
    color: #666;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
}

.star-rating {
    display: flex;
    gap: 2px;
}

.star {
    color: var(--star-color);
    font-size: 16px;
}

.star.empty {
    color: #ddd;
}

.rating-score {
    font-weight: 600;
    font-size: 18px;
}

.rating-count {
    color: #666;
    font-size: 14px;
}

.product-description {
    font-size: 14px;
    line-height: 1.6;
    color: #555;
    margin-bottom: 15px;
}

.product-features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.feature-tag {
    background: var(--light-gray);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    color: var(--text-color);
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.pricing-info {
    font-size: 14px;
}

.price-label {
    color: #666;
    font-size: 12px;
}

.price-value {
    font-weight: 600;
    font-size: 16px;
    color: var(--secondary-color);
}

.product-actions {
    display: flex;
    gap: 10px;
}

.btn-small {
    padding: 6px 12px;
    font-size: 13px;
}

.btn-compare {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-color);
}

.btn-compare:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* ========================================
   Single Product Page
   ======================================== */

.product-single-header {
    background: #fff;
    padding: 40px 0;
    border-bottom: 1px solid var(--border-color);
}

.product-single-top {
    display: grid;
    grid-template-columns: 100px 1fr auto;
    gap: 30px;
    align-items: start;
}

.product-logo-large {
    width: 100px;
    height: 100px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.product-main-info h1 {
    font-size: 36px;
    margin-bottom: 10px;
    color: var(--secondary-color);
}

.product-meta {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.product-cta-box {
    background: var(--light-gray);
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    min-width: 250px;
}

.cta-price {
    font-size: 28px;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.product-tabs {
    background: #fff;
    border-bottom: 2px solid var(--border-color);
    position: sticky;
    top: 70px;
    z-index: 999;
}

.tabs-nav {
    display: flex;
    gap: 40px;
    list-style: none;
}

.tabs-nav a {
    display: block;
    padding: 20px 0;
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    border-bottom: 3px solid transparent;
    transition: var(--transition);
}

.tabs-nav a:hover,
.tabs-nav a.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.product-content-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 40px;
    padding: 40px 0;
}

.content-main {
    background: #fff;
}

.content-section {
    margin-bottom: 40px;
}

.content-section h2 {
    font-size: 28px;
    margin-bottom: 20px;
    color: var(--secondary-color);
}

.sidebar-widget {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.sidebar-widget h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: var(--secondary-color);
}

/* ========================================
   Review System
   ======================================== */

.reviews-section {
    background: #fff;
}

.reviews-overview {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 40px;
    padding: 30px;
    background: var(--light-gray);
    border-radius: 8px;
    margin-bottom: 30px;
}

.overall-rating {
    text-align: center;
}

.rating-number {
    font-size: 64px;
    font-weight: 700;
    color: var(--secondary-color);
    line-height: 1;
}

.rating-breakdown {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rating-bar {
    display: flex;
    align-items: center;
    gap: 10px;
}

.bar-label {
    min-width: 60px;
    font-size: 14px;
}

.bar-fill-container {
    flex: 1;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: var(--star-color);
    transition: width 0.5s ease;
}

.bar-count {
    min-width: 40px;
    text-align: right;
    font-size: 14px;
    color: #666;
}

.review-card {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 20px;
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 15px;
}

.reviewer-info {
    display: flex;
    gap: 12px;
}

.reviewer-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary-color);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.reviewer-name {
    font-weight: 600;
    margin-bottom: 3px;
}

.reviewer-meta {
    font-size: 13px;
    color: #666;
}

.review-date {
    font-size: 13px;
    color: #999;
}

.review-content h4 {
    font-size: 16px;
    margin-bottom: 10px;
    color: var(--secondary-color);
}

.review-text {
    line-height: 1.7;
    margin-bottom: 15px;
}

.pros-cons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 20px 0;
}

.pros,
.cons {
    padding: 15px;
    border-radius: 6px;
}

.pros {
    background: #e8f5e9;
}

.cons {
    background: #ffebee;
}

.pros h5,
.cons h5 {
    font-size: 14px;
    margin-bottom: 8px;
}

.review-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.review-helpful {
    display: flex;
    gap: 15px;
    align-items: center;
}

.helpful-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: var(--transition);
}

.helpful-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* ========================================
   Comparison Page
   ======================================== */

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.comparison-table th,
.comparison-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.comparison-table th {
    background: var(--light-gray);
    font-weight: 600;
}

.comparison-header {
    text-align: center;
    padding: 20px;
}

.comparison-product-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 10px;
    border-radius: 8px;
}

.feature-check {
    color: var(--success-color);
    font-size: 20px;
}

.feature-cross {
    color: #ccc;
    font-size: 20px;
}

/* ========================================
   Category Pages
   ======================================== */

.category-header {
    background: var(--light-gray);
    padding: 40px 0;
    margin-bottom: 40px;
}

.category-header h1 {
    font-size: 38px;
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.category-stats {
    display: flex;
    gap: 30px;
    font-size: 14px;
    color: #666;
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 1024px) {
    .products-layout {
        grid-template-columns: 1fr;
    }

    .filters-sidebar {
        display: none;
    }

    .product-content-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .header-inner {
        flex-wrap: wrap;
    }

    .header-search {
        order: 3;
        flex: 0 0 100%;
        margin-top: 15px;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .hero-section h1 {
        font-size: 28px;
    }

    .product-single-top {
        grid-template-columns: 1fr;
    }

    .tabs-nav {
        overflow-x: auto;
        gap: 20px;
    }
}

/* ========================================
   Utility Classes
   ======================================== */

.text-center {
    text-align: center;
}

.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 30px; }

.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }
.mb-3 { margin-bottom: 30px; }

.hidden {
    display: none;
}

.loading {
    opacity: 0.6;
    pointer-events: none;
}
