/*
Theme Name: Tally Theme
Theme URI: https://wordpress.tallyquoter.com
Author: Tally Team
Author URI: https://tallyquoter.com
Description: Custom theme for TallyQuoter WordPress site - replicating the Shopify design
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: tally-theme
*/

/* ===== CSS VARIABLES - TALLY BRAND COLORS ===== */
:root {
  /* Primary Brand Colors */
  --tally-purple: #702670;
  --tally-purple-hover: #5A1F5A;
  --tally-purple-light: rgba(112, 38, 112, 0.1);
  --tally-cyan: #89CFF0;
  --tally-cyan-light: rgba(137, 207, 240, 0.2);

  /* Accent Colors */
  --tally-magenta: #C792EA;
  --tally-blush: #E8B4F8;

  /* Neutrals */
  --tally-white: #ffffff;
  --tally-light: #f8f9fa;
  --tally-dark: #333333;
  --tally-gray: #666666;
  --tally-border: #e9ecef;

  /* Shadows */
  --shadow-sm: 0 4px 20px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.12);
  --shadow-xl: 0 30px 80px rgba(0, 0, 0, 0.15);

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* Transitions */
  --transition: 0.3s ease;
}

/* ===== RESET & BASE STYLES ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--tally-dark);
  background-color: var(--tally-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  margin: 0;
}

p {
  margin: 0;
}

a {
  color: var(--tally-purple);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--tally-purple-hover);
}

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

ul, ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* ===== TYPOGRAPHY ===== */
.h1, h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
.h2, h2 { font-size: clamp(2rem, 4vw, 3rem); }
.h3, h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
.h4, h4 { font-size: clamp(1.25rem, 2vw, 1.5rem); }

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

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

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 32px;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 600;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
}

.btn-primary {
  background: var(--tally-purple);
  color: white;
}

.btn-primary:hover {
  background: var(--tally-purple-hover);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(112, 38, 112, 0.3);
}

.btn-secondary {
  background: transparent;
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
  border-color: white;
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

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

.btn-outline:hover {
  background: var(--tally-purple);
  color: white;
}

.btn-cyan {
  background: var(--tally-cyan);
  color: var(--tally-purple-hover);
}

.btn-cyan:hover {
  background: white;
  color: var(--tally-purple);
  transform: translateY(-2px);
}

.btn-lg {
  padding: 18px 40px;
  font-size: 18px;
}

.btn-sm {
  padding: 10px 20px;
  font-size: 14px;
}

/* ===== SECTION STYLES ===== */
.section {
  padding: 100px 0;
}

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

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 60px;
}

.section-header h2 {
  color: var(--tally-purple);
  margin-bottom: 16px;
}

.section-header p {
  font-size: 1.1rem;
  color: var(--tally-gray);
}

/* ===== UTILITY CLASSES ===== */
.text-center { text-align: center; }
.text-white { color: white; }
.text-purple { color: var(--tally-purple); }
.bg-purple { background-color: var(--tally-purple); }
.bg-light { background-color: var(--tally-light); }
.bg-white { background-color: var(--tally-white); }

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.2); }
  100% { opacity: 1; transform: scale(1); }
}

.animate-fade-in {
  animation: fadeInUp 0.6s ease forwards;
}

/* ===== WORDPRESS ADMIN BAR FIX ===== */
body.admin-bar .tally-header {
  top: 32px;
}

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

/* Tally Product Page Styles */
.tally-product-features {
    padding: 20px 0;
}

.tally-product-features h2 {
    color: var(--tally-purple);
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.tally-product-features h3 {
    color: var(--tally-purple);
    font-size: 1.2rem;
    margin: 25px 0 15px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.feature-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 24px;
    border: 1px solid var(--tally-border);
    transition: transform 0.3s, box-shadow 0.3s;
}

.feature-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(112, 38, 112, 0.15);
}

.feature-card h3 {
    font-size: 1.1rem;
    margin: 0 0 10px 0;
    color: var(--tally-purple);
}

.feature-card p {
    margin: 0;
    color: var(--tally-gray);
    font-size: 14px;
    line-height: 1.6;
}

.volume-discounts {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    border-radius: 8px;
    overflow: hidden;
}

.volume-discounts th,
.volume-discounts td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--tally-border);
}

.volume-discounts th {
    background: var(--tally-purple);
    color: white;
    font-weight: 600;
}

.volume-discounts tr:nth-child(even) {
    background: #f8f9fa;
}

.volume-discounts tr:hover {
    background: rgba(112, 38, 112, 0.05);
}

.tally-product-features ul {
    list-style: none;
    padding: 0;
}

.tally-product-features ul li {
    padding: 8px 0;
    padding-left: 24px;
    position: relative;
    color: var(--tally-gray);
}

.tally-product-features ul li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--tally-purple);
    font-weight: bold;
}

/* ===== PRODUCT PAGE HERO ===== */
.product-hero {
    background: linear-gradient(135deg, var(--tally-purple-hover) 0%, var(--tally-purple) 50%, #8B2E8B 100%);
    color: white;
    padding: 60px 30px;
    border-radius: var(--radius-lg);
    margin-bottom: 40px;
    text-align: center;
}

.product-hero h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 16px;
    color: white;
}

.product-hero p {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 700px;
    margin: 0 auto;
}

/* ===== PRODUCT PAGE SECTION TITLES ===== */
.tally-product-features h2 {
    color: var(--tally-purple);
    font-size: 1.8rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--tally-purple-light);
}

.tally-product-features h3 {
    color: var(--tally-purple);
    font-size: 1.3rem;
    margin: 30px 0 20px;
}

/* ===== STEP CARDS (How It Works) ===== */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
    margin: 30px 0;
}

.step-card {
    background: linear-gradient(135deg, #f8f9fa 0%, var(--tally-white) 100%);
    border: 1px solid var(--tally-border);
    border-radius: var(--radius-md);
    padding: 28px 24px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
}

.step-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--tally-purple);
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--tally-purple), var(--tally-purple-hover));
    color: white;
    font-size: 1.2rem;
    font-weight: 700;
    border-radius: 50%;
    margin-bottom: 16px;
}

.step-card h4 {
    color: var(--tally-dark);
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.step-card p {
    color: var(--tally-gray);
    font-size: 14px;
    line-height: 1.6;
}

/* ===== CONFIG GRID (Specifications) ===== */
.config-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.config-item {
    background: var(--tally-light);
    border: 1px solid var(--tally-border);
    border-radius: var(--radius-sm);
    padding: 20px;
    transition: all 0.3s ease;
}

.config-item:hover {
    border-color: var(--tally-purple);
    box-shadow: var(--shadow-sm);
}

.config-item strong {
    display: block;
    color: var(--tally-purple);
    font-size: 14px;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.config-item span {
    color: var(--tally-dark);
    font-size: 15px;
}

/* ===== USE CASES GRID ===== */
.use-cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin: 30px 0;
}

.use-case-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--tally-white);
    border: 1px solid var(--tally-border);
    border-radius: var(--radius-sm);
    padding: 16px 20px;
    transition: all 0.3s ease;
}

.use-case-item:hover {
    border-color: var(--tally-purple);
    background: var(--tally-purple-light);
}

.use-case-item span:first-child {
    font-size: 1.5rem;
}

/* ===== PRODUCT CTA BOX ===== */
.product-cta-box {
    background: linear-gradient(135deg, var(--tally-purple-light) 0%, rgba(137, 207, 240, 0.1) 100%);
    border: 2px solid var(--tally-purple);
    border-radius: var(--radius-lg);
    padding: 40px;
    text-align: center;
    margin: 40px 0;
}

.product-cta-box h3 {
    color: var(--tally-purple);
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.product-cta-box p {
    color: var(--tally-gray);
    margin-bottom: 24px;
}

.product-cta-box .btn {
    display: inline-flex;
}

/* ===== RESPONSIVE ADJUSTMENTS ===== */
@media (max-width: 768px) {
    .product-hero {
        padding: 40px 20px;
    }

    .steps-grid,
    .config-grid,
    .use-cases-grid {
        grid-template-columns: 1fr;
    }

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

    .product-cta-box {
        padding: 30px 20px;
    }
}

/* ===== PRODUCT DESCRIPTION SECTIONS ===== */
.tally-section {
    margin: 40px 0;
    padding: 0;
}

.tally-section h2 {
    color: var(--tally-purple);
    font-size: 1.8rem;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--tally-purple-light);
}

.tally-section h3 {
    color: var(--tally-purple);
    font-size: 1.1rem;
    margin-bottom: 10px;
}

/* Product Hero in Description */
.tally-product-hero {
    background: linear-gradient(135deg, var(--tally-purple-hover) 0%, var(--tally-purple) 50%, #8B2E8B 100%);
    color: white;
    padding: 50px 30px;
    border-radius: var(--radius-lg);
    margin-bottom: 40px;
    text-align: center;
}

.tally-product-hero h1 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    margin-bottom: 12px;
    color: white;
}

.tally-product-hero p,
.tally-product-hero .hero-tagline {
    font-size: 1.1rem;
    opacity: 0.9;
    margin: 0;
}

/* Steps Grid (How It Works) */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    margin: 30px 0;
}

.step {
    background: linear-gradient(135deg, #f8f9fa 0%, var(--tally-white) 100%);
    border: 1px solid var(--tally-border);
    border-radius: var(--radius-md);
    padding: 28px 24px;
    text-align: center;
    transition: all 0.3s ease;
}

.step:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--tally-purple);
}

.step .step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--tally-purple), var(--tally-purple-hover));
    color: white;
    font-size: 1.4rem;
    font-weight: 700;
    border-radius: 50%;
    margin-bottom: 16px;
}

.step h3 {
    color: var(--tally-dark);
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.step p {
    color: var(--tally-gray);
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
}

/* Config Cards Grid */
.config-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin: 30px 0;
}

.config-card {
    background: var(--tally-light);
    border: 1px solid var(--tally-border);
    border-radius: var(--radius-md);
    padding: 24px;
    transition: all 0.3s ease;
}

.config-card:hover {
    border-color: var(--tally-purple);
    box-shadow: var(--shadow-sm);
}

.config-card h3 {
    color: var(--tally-purple);
    font-size: 1.1rem;
    margin-bottom: 16px;
}

.config-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.config-card ul li {
    padding: 8px 0;
    padding-left: 24px;
    position: relative;
    color: var(--tally-gray);
    font-size: 14px;
}

.config-card ul li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--tally-purple);
    font-weight: bold;
}

/* Feature Icons */
.feature-icon {
    font-size: 2rem;
    margin-bottom: 12px;
}

/* Volume Discount Table in Product */
.discount-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.discount-table th,
.discount-table td {
    padding: 14px 18px;
    text-align: left;
    border-bottom: 1px solid var(--tally-border);
}

.discount-table th {
    background: var(--tally-purple);
    color: white;
    font-weight: 600;
}

.discount-table tr:nth-child(even) {
    background: #f8f9fa;
}

.discount-table tr:hover {
    background: rgba(112, 38, 112, 0.05);
}

/* Use Cases */
.use-cases-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin: 20px 0;
}

.use-case {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--tally-white);
    border: 1px solid var(--tally-border);
    border-radius: var(--radius-sm);
    padding: 16px 20px;
    transition: all 0.3s ease;
}

.use-case:hover {
    border-color: var(--tally-purple);
    background: var(--tally-purple-light);
}

.use-case-icon {
    font-size: 1.5rem;
}

/* CTA Box in Product */
.cta-box {
    background: linear-gradient(135deg, var(--tally-purple-light) 0%, rgba(137, 207, 240, 0.1) 100%);
    border: 2px solid var(--tally-purple);
    border-radius: var(--radius-lg);
    padding: 40px;
    text-align: center;
    margin: 40px 0;
}

.cta-box h3 {
    color: var(--tally-purple);
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.cta-box p {
    color: var(--tally-gray);
    margin-bottom: 20px;
}

/* WooCommerce Product Page Overrides */
.woocommerce div.product {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.woocommerce div.product div.images {
    max-width: 400px;
    float: left;
    margin-right: 40px;
}

.woocommerce div.product div.images img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-md);
}

.woocommerce div.product div.summary {
    overflow: hidden;
}

.woocommerce div.product .woocommerce-product-details__short-description {
    margin-bottom: 30px;
    max-width: 1000px;
}

.woocommerce div.product .woocommerce-tabs {
    clear: both;
    max-width: 1000px;
    margin: 40px auto 0;
}

.woocommerce div.product .product_title {
    color: var(--tally-purple);
    font-size: 2rem;
    margin-bottom: 16px;
}

.woocommerce div.product .price {
    color: var(--tally-purple);
    font-size: 1.5rem;
}

/* Product description container */
.woocommerce-product-details__short-description,
.woocommerce-Tabs-panel--description {
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

/* Hide empty paragraphs from WordPress editor */
.woocommerce-product-details__short-description > p:empty,
.woocommerce-Tabs-panel > p:empty {
    display: none;
}

/* Hide sidebar/widget areas on product pages */
.woocommerce aside,
.woocommerce .sidebar,
.woocommerce .widget-area,
.woocommerce #secondary,
aside.widget-area,
.widget_search,
.widget_pages,
.widget_archives,
.widget_categories,
.widget_recent_entries,
.widget_meta {
    display: none !important;
}

/* Responsive for product sections */
@media (max-width: 768px) {
    .tally-product-hero {
        padding: 30px 20px;
    }

    .steps-grid,
    .config-grid {
        grid-template-columns: 1fr;
    }

    .step, .config-card {
        padding: 20px;
    }

    .woocommerce div.product div.images {
        float: none;
        max-width: 100%;
        margin-right: 0;
        margin-bottom: 30px;
    }

    .woocommerce div.product div.images img {
        max-width: 300px;
        margin: 0 auto;
        display: block;
    }
}
