/*
Theme Name: PrintPress
Theme URI: https://example.com/printpress
Author: Trae Assistant
Author URI: https://example.com
Description: A specialized WordPress theme for online printing businesses, designed for full Elementor compatibility and featuring a setup wizard for quick styling.
Version: 1.3.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: printpress
Tags: e-commerce, elementor-friendly, custom-background, custom-colors, woocommerce
*/

/* ==========================================================================
   1. VARIABLES & RESET
   ========================================================================== */
:root {
    /* Brand Colors */
    --primary-color: #0056b3; /* Corporate Blue */
    --secondary-color: #ff6600; /* Action Orange */
    --accent-color: #00b67a; /* Trust Green */
    --dark-bg: #1a1a1a;
    --light-bg: #f4f6f8;
    
    /* Typography */
    --font-heading: 'Roboto', sans-serif;
    --font-body: 'Open Sans', sans-serif;
    
    /* Effects */
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --shadow-card: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-hover: 0 12px 24px rgba(0,0,0,0.12);
    --radius-sm: 4px;
    --radius-md: 8px;
}

*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--font-body);
    line-height: 1.6;
    color: #444;
    background-color: #fff;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: #222;
    font-weight: 700;
    margin-top: 0;
}

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

a:hover {
    color: #222;
}

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

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

/* ==========================================================================
   2. UTILITIES & BUTTONS
   ========================================================================== */
.printpress-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    font-weight: 600;
    text-align: center;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 1rem;
    line-height: 1.5;
}

.btn-primary {
    background-color: var(--primary-color);
    color: #fff;
    border: 2px solid var(--primary-color);
}

.btn-primary:hover {
    background-color: #004494;
    border-color: #004494;
    color: #fff;
}

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

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

.btn-large {
    padding: 16px 32px;
    font-size: 1.1rem;
}

.full-width {
    width: 100%;
    display: block;
}

/* ==========================================================================
   3. HEADER STYLING
   ========================================================================== */
.site-header {
    background: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    position: relative;
    z-index: 1000;
}

/* Top Strip */
.top-bar {
    background-color: #f8f9fa;
    color: #666;
    font-size: 0.85rem;
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
}

.top-bar .printpress-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.trust-badge {
    color: var(--accent-color);
    font-weight: 700;
}

.sep {
    margin: 0 10px;
    color: #ccc;
}

/* Header Main */
.header-main {
    padding: 20px 0;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.site-title {
    font-size: 2rem;
    margin: 0;
    line-height: 1;
}

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

/* Search Bar */
.header-search {
    flex-grow: 1;
    max-width: 600px;
}

.search-form {
    display: flex;
}

.search-field {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e4e8;
    border-right: none;
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    font-size: 1rem;
}

.search-field:focus {
    border-color: var(--primary-color);
    outline: none;
}

.search-submit {
    background-color: var(--primary-color);
    color: #fff;
    border: 2px solid var(--primary-color);
    padding: 0 24px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    cursor: pointer;
    font-weight: 600;
}

/* Header Actions */
.header-actions {
    display: flex;
    gap: 20px;
    align-items: center;
}

.header-actions a {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #444;
    font-size: 0.8rem;
    position: relative;
}

.header-actions .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
    margin-bottom: 4px;
}

.cart-count {
    position: absolute;
    top: -5px;
    right: 5px;
    background-color: var(--secondary-color);
    color: #fff;
    font-size: 10px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* Navigation Bar */
.header-nav-bar {
    border-top: 1px solid #eee;
}

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

.main-navigation ul li a {
    display: block;
    padding: 15px 0;
    color: #333;
    font-weight: 600;
    font-size: 0.95rem;
}

.main-navigation ul li a:hover {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
}

/* Desktop Dropdowns / Mega Menu */
@media (min-width: 992px) {
    .main-navigation ul li {
        position: relative;
    }

    .main-navigation ul li ul {
        display: block;
        visibility: hidden;
        opacity: 0;
        position: absolute;
        top: 100%;
        left: 0;
        background: #fff;
        box-shadow: 0 10px 30px rgba(0,0,0,0.1);
        min-width: 240px;
        z-index: 999;
        flex-direction: column;
        gap: 0;
        padding: 10px 0;
        border-radius: 0 0 4px 4px;
        transform: translateY(10px);
        transition: all 0.2s ease;
        border-top: 2px solid var(--primary-color);
    }

    .main-navigation ul li:hover > ul {
        visibility: visible;
        opacity: 1;
        transform: translateY(0);
    }

    .main-navigation ul li ul li a {
        padding: 10px 20px;
        font-size: 0.9rem;
        font-weight: 400;
        border-bottom: 1px solid #f5f5f5;
    }

    .main-navigation ul li ul li:last-child a {
        border-bottom: none;
    }

    .main-navigation ul li ul li a:hover {
        background: #f9f9f9;
        color: var(--primary-color);
        padding-left: 25px; /* Slide effect */
    }
}

.menu-toggle {
    display: none;
}

/* ==========================================================================
   4. HOMEPAGE TEMPLATE STYLES
   ========================================================================== */
   
/* Hero Section */
.hero-section {
    background-color: #f4f6f8;
    padding: 60px 0;
}

.hero-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-content h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 20px;
    color: #1a1a1a;
}

.hero-content p {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 30px;
    max-width: 480px;
}

.hero-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.hero-trust {
    font-weight: 600;
    color: #444;
}

/* USP Bar */
.usp-bar {
    background: #fff;
    border-bottom: 1px solid #eee;
    padding: 20px 0;
}

.usp-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.usp-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.usp-item .dashicons {
    font-size: 32px;
    width: 32px;
    height: 32px;
    color: var(--primary-color);
}

.usp-text {
    display: flex;
    flex-direction: column;
    font-size: 0.9rem;
}

/* Categories Grid */
.section-categories {
    padding: 80px 0;
}

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

.section-header h2 {
    font-size: 2rem;
    margin: 0;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
}

.cat-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition);
    position: relative;
    padding-bottom: 20px;
    text-align: center;
}

.cat-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-5px);
    border-color: transparent;
}

.cat-img {
    width: 100%;
    margin-bottom: 15px;
    background-size: cover;
    background-position: center;
}

.cat-card h3 {
    margin: 10px 0 5px;
    font-size: 1.2rem;
}

.cat-card p {
    color: #888;
    margin: 0;
    font-size: 0.9rem;
}

.stretched-link::after {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1;
    content: "";
}

/* Features Section */
.section-features {
    background: #f0f4f8;
    padding: 80px 0;
}

.features-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.feature-list {
    margin: 30px 0;
}

.feature-list li {
    margin-bottom: 15px;
    padding-left: 25px;
    position: relative;
}

.feature-list li::before {
    content: "✔";
    color: var(--accent-color);
    position: absolute;
    left: 0;
    top: 0;
}

/* CTA Section */
.section-cta {
    background: var(--dark-bg);
    color: #fff;
    padding: 60px 0;
    text-align: center;
}

.cta-box h2 {
    color: #fff;
    margin-bottom: 10px;
}

.cta-box p {
    color: #aaa;
    margin-bottom: 30px;
}

.cta-form {
    display: flex;
    justify-content: center;
    gap: 10px;
    max-width: 500px;
    margin: 0 auto;
}

.cta-form input {
    flex-grow: 1;
    padding: 12px;
    border-radius: var(--radius-sm);
    border: none;
}

.btn-dark {
    background: var(--secondary-color);
    color: #fff;
    border: none;
}

/* ==========================================================================
   5. FOOTER STYLING
   ========================================================================== */
.site-footer {
    background-color: #f9f9f9;
    border-top: 1px solid #eee;
    padding-top: 60px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 60px;
}

.widget-title {
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.widget ul li {
    margin-bottom: 10px;
}

.widget ul li a {
    color: #666;
}

/* ==========================================================================
   9. CHECKOUT & CART (Secure Process)
   ========================================================================== */

/* Cart Table */
.woocommerce-cart-form__contents {
    border: 1px solid #e1e4e8;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.woocommerce-cart-form__contents thead {
    background: #f8f9fa;
}

.woocommerce-cart-form__contents th {
    padding: 15px;
    font-weight: 600;
    color: #444;
}

.woocommerce-cart-form__contents td {
    padding: 20px 15px;
    border-top: 1px solid #eee;
}

/* Cart Totals */
.cart_totals {
    background: #f9f9f9;
    padding: 30px;
    border-radius: var(--radius-md);
    border: 1px solid #e1e4e8;
    margin-top: 40px;
}

.cart_totals h2 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    border-bottom: 2px solid #ddd;
    padding-bottom: 10px;
}

.wc-proceed-to-checkout .checkout-button {
    width: 100%;
    padding: 18px;
    font-size: 1.2rem;
    background-color: var(--accent-color); /* Trust Green for checkout */
}

.wc-proceed-to-checkout .checkout-button:hover {
    background-color: #009e6a;
}

/* Checkout Page */
.woocommerce-checkout {
    background: #fff;
}

.col2-set {
    width: 100%;
    margin-right: 0;
}

.col-1, .col-2 {
    max-width: none;
    flex: 0 0 100%;
    padding: 0;
}

#customer_details {
    background: #fff;
    padding: 30px;
    border: 1px solid #e1e4e8;
    border-radius: var(--radius-md);
    margin-bottom: 30px;
    box-shadow: var(--shadow-sm);
}

#order_review_heading {
    margin-top: 40px;
    font-size: 1.8rem;
}

#order_review {
    background: #f8fbfc;
    padding: 30px;
    border: 1px solid #dceefc;
    border-radius: var(--radius-md);
}

/* Payment Methods */
#payment {
    background: #fff;
    border-radius: var(--radius-sm);
    padding: 20px;
}

#payment ul.payment_methods {
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
    margin-bottom: 20px;
}

/* Secure Badge Concept (Pseudo-element) */
.woocommerce-checkout #payment::after {
    content: "🔒 Secure SSL Encryption";
    display: block;
    text-align: center;
    font-size: 0.85rem;
    color: #00b67a;
    margin-top: 15px;
    font-weight: 600;
}

/* ==========================================================================
   10. MY ACCOUNT (Dashboard)
   ========================================================================== */

.woocommerce-account .woocommerce {
    display: flex;
    gap: 40px;
}

@media (max-width: 768px) {
    .woocommerce-account .woocommerce {
        flex-direction: column;
    }
}

.woocommerce-MyAccount-navigation {
    flex: 0 0 250px;
    background: #f8f9fa;
    padding: 20px;
    border-radius: var(--radius-md);
    height: fit-content;
}

.woocommerce-MyAccount-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.woocommerce-MyAccount-navigation ul li {
    margin-bottom: 5px;
}

.woocommerce-MyAccount-navigation ul li a {
    display: block;
    padding: 12px 15px;
    color: #555;
    font-weight: 600;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.woocommerce-MyAccount-navigation ul li a:hover,
.woocommerce-MyAccount-navigation ul li.is-active a {
    background: var(--primary-color);
    color: #fff;
}

.woocommerce-MyAccount-content {
    flex: 1;
    background: #fff;
    padding: 30px;
    border: 1px solid #e1e4e8;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.woocommerce-MyAccount-content p {
    font-size: 1rem;
    line-height: 1.6;
}

.widget ul li a:hover {
    color: var(--primary-color);
}

.social-icons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-icon {
    width: 36px;
    height: 36px;
    background: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #444;
}

.site-info-bar {
    background: #fff;
    border-top: 1px solid #eee;
    padding: 20px 0;
    font-size: 0.85rem;
    color: #888;
}

/* ==========================================================================
   6. CONTACT PAGE STYLING
   ========================================================================== */
.page-header-bg {
    background: var(--primary-color);
    color: #fff;
    padding: 60px 0;
    margin-bottom: 60px;
    text-align: center;
}

.page-header-bg h1 {
    color: #fff;
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.page-header-bg p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.contact-grid {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 60px;
}

.info-card {
    background: #fff;
    padding: 30px;
    border: 1px solid #eee;
    border-radius: var(--radius-md);
    margin-bottom: 30px;
}

.contact-details li {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 20px;
}

.contact-details .dashicons {
    color: var(--primary-color);
    font-size: 20px;
    margin-top: 3px;
}

.faq-accordion details {
    margin-bottom: 15px;
    border: 1px solid #eee;
    border-radius: var(--radius-sm);
    background: #fff;
}

.faq-accordion summary {
    padding: 20px;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    position: relative;
}

.faq-accordion summary::-webkit-details-marker {
    display: none;
}

.faq-accordion summary::after {
    content: "+";
    position: absolute;
    right: 20px;
    font-size: 1.5rem;
    font-weight: 300;
    line-height: 1;
}

.faq-accordion details[open] summary::after {
    content: "-";
}

.faq-content {
    padding: 0 20px 20px;
    color: #666;
    border-top: 1px solid #eee;
}

/* ==========================================================================
   7. RESPONSIVE
   ========================================================================== */
@media (max-width: 991px) {
    .header-inner {
        flex-direction: column;
        gap: 15px;
    }
    
    .header-search {
        order: 2;
        width: 100%;
        max-width: 100%;
    }
    
    .site-branding {
        order: 1;
    }
    
    .header-actions {
        order: 3;
        width: 100%;
        justify-content: center;
    }
    
    .hero-inner {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .usp-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .features-wrapper {
        grid-template-columns: 1fr;
    }
    
    .feature-visual {
        order: -1;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }

    /* Mobile Menu Toggle */
    .menu-toggle {
        display: block;
        background: none;
        border: none;
        font-size: 1.1rem;
        font-weight: 700;
        cursor: pointer;
        padding: 10px 0;
        width: 100%;
        text-align: left;
        color: var(--primary-color);
        z-index: 2001; /* Above overlay */
        position: relative;
    }
    
    /* Off-Canvas Menu Drawer */
    .main-navigation ul {
        display: block;
        position: fixed;
        top: 0;
        left: -300px; /* Hide off-screen */
        width: 300px;
        height: 100vh;
        background: #fff;
        margin: 0;
        padding-top: 60px; /* Space for close button/header */
        flex-direction: column;
        gap: 0;
        box-shadow: 2px 0 10px rgba(0,0,0,0.1);
        transition: left 0.3s ease-in-out;
        z-index: 2000;
        overflow-y: auto;
    }
    
    .main-navigation.toggled ul {
        left: 0; /* Slide in */
    }
    
    .main-navigation ul li a {
        padding: 15px 25px;
        border-bottom: 1px solid #eee;
        font-size: 1.1rem;
    }

    /* Mobile Submenus */
    .main-navigation ul li ul {
        display: none;
        position: static;
        width: 100%;
        height: auto;
        background: #f9f9f9;
        padding-top: 0;
        box-shadow: none;
        border-top: 1px solid #eee;
    }

    .main-navigation ul li.focus > ul,
    .main-navigation ul li:hover > ul {
        display: block;
        left: 0;
    }

    .main-navigation ul li ul li a {
        padding-left: 40px;
        font-size: 1rem;
    }

    /* Mobile Menu Overlay */
    body.mobile-menu-open::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 1999;
        backdrop-filter: blur(2px);
    }
    
    body.mobile-menu-open {
        overflow: hidden; /* Prevent scrolling when menu is open */
    }
}

/* ==========================================================================
   8. WOOCOMMERCE CUSTOMIZATIONS (Print Calculator Style)
   ========================================================================== */

/* Product Page Layout */
.single-product div.product {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    margin-bottom: 60px;
}

@media (max-width: 768px) {
    .single-product div.product {
        grid-template-columns: 1fr;
    }
}

/* Product Images */
.woocommerce-product-gallery {
    box-shadow: var(--shadow-card);
    border-radius: var(--radius-md);
    overflow: hidden;
}

/* Product Summary (Calculator Box) */
.summary.entry-summary {
    background: #fff;
    padding: 30px;
    border: 1px solid #e1e4e8;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    align-self: start;
}

.summary .product_title {
    font-size: 2rem;
    margin-bottom: 10px;
}

.summary .price {
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 20px;
    display: block;
}

/* Add to Cart Form ("Calculator") */
form.cart {
    background: #f8f9fa;
    padding: 20px;
    border-radius: var(--radius-sm);
    border: 1px solid #eee;
    margin-bottom: 20px;
}

.single_variation_wrap {
    margin-top: 20px;
}

button.single_add_to_cart_button {
    width: 100%;
    background-color: var(--secondary-color);
    color: #fff;
    font-size: 1.2rem;
    padding: 15px;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}

button.single_add_to_cart_button:hover {
    background-color: #e65c00;
}

/* Product Meta */
.product_meta {
    font-size: 0.85rem;
    color: #777;
    border-top: 1px solid #eee;
    padding-top: 15px;
    margin-top: 20px;
}

.product_meta > span {
    display: block;
    margin-bottom: 5px;
}

/* WooCommerce Tabs */
.woocommerce-tabs {
    clear: both;
    margin-top: 40px;
}

.woocommerce-tabs ul.tabs {
    display: flex;
    border-bottom: 2px solid #eee;
    margin-bottom: 30px;
}

.woocommerce-tabs ul.tabs li {
    margin-right: 5px;
}

.woocommerce-tabs ul.tabs li a {
    display: block;
    padding: 15px 25px;
    background: #f4f4f4;
    color: #666;
    font-weight: 600;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.woocommerce-tabs ul.tabs li.active a {
    background: var(--primary-color);
    color: #fff;
}

.woocommerce-tabs .panel {
    background: #fff;
    padding: 30px;
    border: 1px solid #eee;
    border-radius: var(--radius-md);
}

/* Shop Archive Improvements */
.woocommerce-ordering {
    margin-bottom: 20px;
}

.woocommerce-ordering select {
    padding: 10px;
    border-radius: var(--radius-sm);
    border: 1px solid #ddd;
}

.woocommerce-result-count {
    margin-bottom: 20px;
    color: #666;
}
