/*
Theme Name: Woocom QuillGPL Digital Seller
Theme URI: https://wpcodequill.com/themes/woocom-quill-gpl-digital-seller/
Author: WPCodeQuill
Author URI: https://wpcodequill.com
Description: A lightweight, full-site editing theme optimized for selling digital products, plugins, and scripts via WooCommerce.
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 8.0
Version: 1.2.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: woocom-quill-gpl-digital-seller
Tags: e-commerce, two-columns, custom-menu, translation-ready, wide-blocks
*/

:root{
  --quill-accent: #0ea5a4; /* Teal Brand Color */
  --quill-dark: #0b1220;
  --quill-muted: #6b7280;
  --quill-bg-light: #f8fafc;
  --content-max: 1200px;
  --font-stack: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

html, body {
  font-family: var(--font-stack);
  color: var(--quill-dark);
  margin:0;
  padding:0;
  background:#fff;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--quill-accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: #006666; }
img { max-width: 100%; height: auto; display: block; }

/* =========================================
   1. GLOBAL LAYOUT
   ========================================= */
.container {
    max-width: var(--content-max);
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
}

/* =========================================
   2. HEADER STYLES
   ========================================= */
.quill-site-header {
    background: #fff;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
}

.quill-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

.custom-logo { max-height: 50px; width: auto; }

/* Navigation */
.quill-primary-nav ul.quill-menu {
    display: flex;
    gap: 30px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.quill-primary-nav ul.quill-menu > li { position: relative; }

.quill-primary-nav ul.quill-menu > li > a {
    color: #333;
    font-weight: 600;
    font-size: 15px;
    padding: 28px 0;
    display: block;
}
.quill-primary-nav ul.quill-menu > li:hover > a { color: var(--quill-accent); }

/* Dropdown */
.quill-primary-nav ul.sub-menu {
    display: none;
    position: absolute;
    top: 100%; left: 0;
    background: #fff;
    min-width: 220px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border-radius: 0 0 8px 8px;
    z-index: 1000;
    padding: 10px 0;
    border-top: 3px solid var(--quill-accent);
    list-style: none;
}
.quill-primary-nav li:hover > ul.sub-menu { display: block; animation: fadeIn 0.2s ease; }
.quill-primary-nav ul.sub-menu li a {
    padding: 10px 20px; color: #555; font-size: 14px; border-bottom: 1px solid #f5f5f5;
}
.quill-primary-nav ul.sub-menu li a:hover {
    background: var(--quill-bg-light); color: var(--quill-accent); padding-left: 25px;
}

/* Header Tools */
.quill-header-tools { display: flex; align-items: center; gap: 15px; }
.tool-btn { background: none; border: none; cursor: pointer; color: #333; display: flex; align-items: center; padding: 5px; }
.quill-cart-count {
    background: var(--quill-accent); color: #fff; border-radius: 50%;
    width: 20px; height: 20px; display: flex; align-items: center; justify-content: center;
    font-size: 11px; margin-left: 5px; font-weight: bold;
}

/* Search Overlay */
.header-search-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(255,255,255,0.98);
    z-index: 2000;
    display: flex; justify-content: center; align-items: center;
    opacity: 0; visibility: hidden; transition: all 0.3s;
}
.header-search-overlay.active { opacity: 1; visibility: visible; }
.header-search-overlay .search-field {
    font-size: 24px; border: none; border-bottom: 2px solid #eee; 
    width: 90%; max-width: 700px; padding: 15px; outline: none; background: transparent;
}
.close-search {
    position: absolute; top: 20px; right: 20px; font-size: 40px; background: none; border: none; cursor: pointer; color: #333;
}

/* =========================================
   3. HERO & LANDING (Home Page)
   ========================================= */
.quill-hero {
    position: relative;
    padding: 80px 0;
    background-color: #f0fdfc;
    overflow: hidden;
    margin-bottom: 50px;
}
.quill-hero-bg {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover; background-position: center; opacity: 0.1;
}
.quill-hero-inner {
    position: relative; z-index: 2;
    display: flex; align-items: center; justify-content: space-between;
}
.hero-left { max-width: 600px; }
.hero-title {
    font-size: 56px; line-height: 1.1; margin-bottom: 20px;
    color: #0f172a; font-family: Georgia, serif;
}
.hero-sub { font-size: 18px; color: #475569; margin-bottom: 30px; line-height: 1.6; }

/* Buttons */
.btn {
    display: inline-block; padding: 14px 30px; border-radius: 6px;
    font-weight: 700; text-decoration: none; transition: all 0.2s; cursor: pointer;
}
.btn-primary { background-color: var(--quill-accent); color: #fff !important; border: 2px solid var(--quill-accent); }
.btn-primary:hover { background-color: #006666; border-color: #006666; transform: translateY(-2px); }
.btn-outline { background: transparent; border: 2px solid var(--quill-accent); color: var(--quill-accent) !important; margin-left: 10px; }
.btn-outline:hover { background: var(--quill-accent); color: #fff !important; }

/* Landing Sections */
.quill-section-head { text-align: center; margin-bottom: 40px; }
.quill-section-head h2 { font-size: 36px; font-family: Georgia, serif; margin-bottom: 10px; }

/* Category Grid (Fixes Browse by Type) */
.quill-cats-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; margin-bottom: 80px;
}
.cat-card {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 30px 20px; background: #fff; border: 1px solid #eee; border-radius: 12px;
    text-decoration: none; transition: all 0.3s;
}
.cat-card:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.05); }
.cat-media img { width: 60px; height: 60px; object-fit: contain; margin-bottom: 15px; }
.cat-body h3 { font-size: 18px; color: #333; margin: 0; font-weight: 700; }

/* Tabs */
.quill-browse { text-align: center; margin-bottom: 40px; }
.tabs-row { border-bottom: 2px solid #f1f5f9; display: inline-block; }
.tabs { display: flex; gap: 0; }
.tab {
    padding: 15px 30px; text-decoration: none; font-weight: 700; color: #94a3b8;
    border-bottom: 2px solid transparent; margin-bottom: -2px; text-transform: uppercase;
    font-size: 13px; cursor: pointer;
}
.tab.active, .tab:hover { color: var(--quill-accent); border-bottom-color: var(--quill-accent); }

/* =========================================
   1. FIX "EMPTY FIRST PRODUCT" (Grid Reset)
   ========================================= */
.woocommerce ul.products {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)) !important;
    gap: 25px !important;
    margin: 0 !important;
    padding: 0 !important;
    
    /* Disable old float/clear behavior from plugin CSS */
    float: none !important;
}

.woocommerce ul.products::before,
.woocommerce ul.products::after {
    display: none !important; /* Removes the "clear" pseudo-elements causing gaps */
}

.woocommerce ul.products li.product {
    float: none !important;
    width: auto !important; /* Let Grid handle width */
    margin: 0 !important;
    clear: none !important;
}

/* =========================================
   2. BEAUTIFUL CARD DESIGN
   ========================================= */
.woocommerce ul.products li.product {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 15px;
    position: relative;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Hover Effect: Lift up + Shadow */
.woocommerce ul.products li.product:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    border-color: #0ea5a4; /* Teal accent on hover */
}

/* =========================================
   PRODUCT CARD CUSTOMIZATIONS
   ========================================= */

/* 1. Product Category */
.quill-product-category {
    display: block;
    font-size: 12px;
    color: #64748b; /* Muted gray-blue */
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

/* Adjust Title Spacing */
.woocommerce-loop-product__title {
    margin-top: 0 !important;
    margin-bottom: 10px !important;
}

/* 2. Action Buttons Container */
.quill-card-actions {
    display: flex;
    gap: 10px; /* Space between buttons */
    margin-top: auto; /* Pushes buttons to the bottom of the card */
    padding-top: 15px;
}

/* Shared Button Styles */
.quill-card-actions .button {
    flex: 1; /* Makes both buttons equal width */
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 10px 5px;
    font-size: 14px;
    font-weight: 700;
    border-radius: 6px;
    transition: all 0.2s ease-in-out;
    text-decoration: none;
    line-height: 1.2;
}

/* "Add to Cart" Button (Teal) */
.add_to_cart_button {
    background-color: var(--quill-accent, #0ea5a4) !important;
    color: #fff !important;
    border: 1px solid var(--quill-accent, #0ea5a4) !important;
}

.add_to_cart_button:hover {
    background-color: #0b8c8b !important;
    border-color: #0b8c8b !important;
    transform: translateY(-2px);
}

/* "Buy Now" Button (Green - Distinct & Urgent) */
.buy-now-button {
    background-color: #22c55e !important; /* Vibrant Green */
    color: #fff !important;
    border: 1px solid #22c55e !important;
}

.buy-now-button:hover {
    background-color: #16a34a !important; /* Darker Green */
    border-color: #16a34a !important;
    transform: translateY(-2px);
    color: #fff !important;
}

/* Add loading spinner support to Buy Now if needed */
.buy-now-button.loading {
    opacity: 0.7;
    cursor: not-allowed;
}

/* =========================================
   3. IMAGE STYLING
   ========================================= */
.woocommerce ul.products li.product img {
    width: 100%;
    height: 180px; /* Fixed height for uniformity */
    object-fit: contain; /* Ensures full logo/image is visible without cropping */
    margin-bottom: 15px;
    background-color: #f8fafc; /* Light gray background for transparent images */
    border-radius: 8px;
}

/* =========================================
   4. TEXT & TYPOGRAPHY
   ========================================= */
/* Product Title */
.woocommerce ul.products li.product .woocommerce-loop-product__title {
    font-size: 16px !important;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 10px;
    line-height: 1.4;
    min-height: 44px; /* Aligns titles if some are 2 lines, some are 1 */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Price */
.woocommerce ul.products li.product .price {
    color: #0ea5a4; /* Teal */
    font-size: 18px;
    font-weight: 800;
    display: block;
    margin-bottom: 15px;
    margin-top: auto; /* Pushes price to bottom of text area */
}

.woocommerce ul.products li.product .price del {
    color: #94a3b8; /* Gray for original price */
    font-size: 14px;
    font-weight: normal;
    opacity: 0.8;
    margin-right: 5px;
}

/* =========================================
   5. BUTTONS & BADGES
   ========================================= */
/* Add to Cart Button */
.woocommerce ul.products li.product .button {
    display: block;
    width: 100%;
    text-align: center;
    background: linear-gradient(135deg, #0ea5a4 0%, #008f8f 100%) !important;
    color: #fff !important;
    font-weight: 600;
    padding: 10px 0;
    border-radius: 6px;
    text-decoration: none;
    transition: opacity 0.2s;
}

.woocommerce ul.products li.product .button:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* Sale Badge */
.woocommerce span.onsale {
    top: 10px !important;
    left: 10px !important;
    right: auto !important;
    background: #ef4444 !important; /* Red */
    color: #fff !important;
    font-size: 12px !important;
    font-weight: 700;
    padding: 4px 10px !important;
    border-radius: 4px !important;
    min-height: auto !important;
    min-width: auto !important;
    line-height: 1.2 !important;
    position: absolute;
    z-index: 5;
}

/* =========================================
   6. SHOP LAYOUT (Sidebar Fix)
   ========================================= */
@media (min-width: 900px) {
    .quill-shop-layout {
        display: flex;
        gap: 30px;
    }
    .quill-shop-sidebar {
        flex: 0 0 260px; /* Sidebar width */
    }
    .quill-shop-content {
        flex: 1;
    }
    
    /* Force 3 Columns when sidebar is present */
    .quill-shop-content ul.products {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

/* Mobile Fix */
@media (max-width: 600px) {
    .woocommerce ul.products {
        grid-template-columns: repeat(2, 1fr) !important; /* 2 cols on mobile */
        gap: 15px !important;
    }
    .woocommerce ul.products li.product {
        padding: 10px;
    }
    .woocommerce ul.products li.product .woocommerce-loop-product__title {
        font-size: 14px !important;
    }
}

/* =========================================
   6. FOOTER STYLES
   ========================================= */
.site-footer {
    background-color: var(--quill-bg-light);
    padding: 80px 0 40px;
    margin-top: 80px;
    border-top: 1px solid #eee;
    clear: both; /* Ensures footer sits below floated sidebar */
}
.footer-top {
    display: flex; justify-content: space-between; flex-wrap: wrap; gap: 40px; margin-bottom: 40px;
}
.footer-brand { flex: 1; min-width: 300px; }
.footer-navigation h4, .footer-payments h4 { font-size: 16px; margin-bottom: 20px; color: #333; }
.footer-menu-list { list-style: none; padding: 0; margin: 0; }
.footer-menu-list li { margin-bottom: 10px; }
.footer-menu-list li a { color: #555; }
.footer-bottom {
    border-top: 1px solid #e5e5e5; padding-top: 25px; text-align: center; font-size: 13px; color: #888;
    display: flex; justify-content: space-between;
}

/* =========================================
   7. MOBILE RESPONSIVENESS
   ========================================= */
.quill-mobile-toggle { display: none; background: none; border: none; font-size: 24px; cursor: pointer; color: #333; }
.quill-mobile-menu {
    background: #fff; position: absolute; top: 100%; left: 0; width: 100%; 
    z-index: 999; box-shadow: 0 10px 20px rgba(0,0,0,0.05); border-top: 1px solid #eee;
}
.quill-mobile-menu-list { list-style: none; padding: 0; margin: 0; }
.quill-mobile-menu-list li { border-bottom: 1px solid #f5f5f5; }
.quill-mobile-menu-list li a { display: block; padding: 15px 20px; color: #333; font-weight: 600; }

@media (max-width: 1024px) {
    ul.products, .quill-cats-grid { grid-template-columns: repeat(3, 1fr) !important; }
}

@media (max-width: 900px) {
    /* Mobile Header */
    .quill-primary-nav { display: none; }
    .quill-mobile-toggle { display: block; }
    .quill-hero-inner { flex-direction: column; text-align: center; }
    
    /* Shop Page Stack (Sidebar at bottom on mobile) */
    .quill-shop-layout { flex-direction: column; }
    .quill-shop-content { width: 100%; order: 1; }
    .quill-shop-sidebar { width: 100%; order: 2; margin-top: 40px; }
}

@media (max-width: 600px) {
    /* 2 Columns on Mobile */
    ul.products, .quill-cats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
    }
    .cat-card { padding: 15px; }
    .cat-media img { width: 40px; height: 40px; }
    
    ul.products li.product { padding: 10px; }
    ul.products li.product img { height: 160px; }
    ul.products li.product h2 { font-size: 14px !important; min-height: 40px; }
    
    .footer-top { flex-direction: column; }
    .footer-bottom { flex-direction: column; gap: 10px; }
}

/* =========================================
   8. ANIMATIONS & UTILS
   ========================================= */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}




/* =========================================
   HOSTING PAGE STYLES
   ========================================= */

/* 1. Hero Section */
.hosting-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #fff;
    padding: 80px 0 60px;
    text-align: center;
    margin-bottom: 50px;
}

.hero-badge {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
    padding: 5px 15px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 15px;
    border: 1px solid rgba(16, 185, 129, 0.4);
}

.hosting-hero h1 {
    font-size: 42px;
    margin-bottom: 15px;
    color: #fff;
    font-weight: 800;
}

.hosting-hero p {
    font-size: 18px;
    color: #94a3b8;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

.hero-updated {
    font-size: 14px !important;
    margin-top: 20px !important;
    opacity: 0.7;
}

/* 2. Grid Layout */
.hosting-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 80px;
}

/* 3. Hosting Card */
.host-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 30px;
    position: relative;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

/* Featured Card (Hostinger) */
.host-card.featured {
    border: 2px solid #673de6; /* Hostinger Purple */
    box-shadow: 0 10px 40px rgba(103, 61, 230, 0.15);
    transform: scale(1.02); /* Make it pop */
    z-index: 2;
}

.host-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.08);
}

/* Badges */
.host-badge {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: #673de6; /* Default Purple */
    color: #fff;
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    box-shadow: 0 5px 15px rgba(103, 61, 230, 0.3);
    white-space: nowrap;
}

.host-badge.blue { background: #0ea5a4; box-shadow: 0 5px 15px rgba(14, 165, 164, 0.3); }
.host-badge.purple { background: #8b5cf6; }
.host-badge.orange { background: #f97316; box-shadow: 0 5px 15px rgba(249, 115, 22, 0.3); }

/* Logo Area */
.host-logo {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    margin-top: 10px;
}

/* Features List */
.host-features h3 { font-size: 22px; margin-bottom: 10px; text-align: center; }
.host-features p { text-align: center; color: #64748b; font-size: 14px; margin-bottom: 20px; }

.host-features ul {
    list-style: none;
    padding: 0;
    margin: 0 0 25px 0;
}

.host-features li {
    font-size: 14px;
    color: #334155;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px dashed #e2e8f0;
}
.host-features li:last-child { border-bottom: none; }

/* Pricing */
.host-price {
    text-align: center;
    margin-top: auto; /* Pushes to bottom */
    margin-bottom: 20px;
}
.host-price .currency { font-size: 20px; vertical-align: top; font-weight: 700; }
.host-price .amount { font-size: 42px; font-weight: 800; color: #0f172a; line-height: 1; }
.host-price .period { font-size: 14px; color: #94a3b8; }
.host-price .discount { color: #16a34a; font-weight: 700; font-size: 13px; margin: 5px 0 0 0; }

/* Buttons */
.btn-host {
    display: block;
    width: 100%;
    padding: 14px;
    background: #1e293b;
    color: #fff;
    text-align: center;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 700;
    transition: background 0.2s;
}
.btn-host:hover { background: #0f172a; color: #fff; }
.btn-hostinger { background: #673de6; } /* Hostinger Purple */
.btn-hostinger:hover { background: #5025d1; }

.sub-text {
    display: block;
    text-align: center;
    font-size: 11px;
    color: #94a3b8;
    margin-top: 8px;
}

/* Content Section */
.hosting-content { max-width: 800px; margin: 0 auto 80px; }
.hosting-content h2 { font-size: 28px; margin-bottom: 20px; }
.hosting-content p { font-size: 16px; line-height: 1.7; color: #475569; margin-bottom: 20px; }
.hosting-faq { background: #f8fafc; padding: 30px; border-radius: 12px; border: 1px solid #e2e8f0; }

/* FOOTER MENU STYLES */
.footer-top {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    padding-bottom: 50px;
}

.footer-col h4 {
    color: #fff;
    margin-bottom: 20px;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Remove default WP Menu styling */
ul.footer-menu-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

ul.footer-menu-list li {
    margin-bottom: 12px;
}

ul.footer-menu-list li a {
    color: #94a3b8;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s ease;
    display: block;
}

ul.footer-menu-list li a:hover {
    color: #0ea5a4; /* Brand Color */
    transform: translateX(5px); /* Slight slide effect */
}