/*
Theme Name: ProGlobal Trade
Theme URI: https://proglobal.in
Description: WooCommerce child theme for ProGlobal - India's Import & Export Trading Platform
Author: ProGlobal
Author URI: https://proglobal.in
Template: astra
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: proglobal
Tags: woocommerce, e-commerce, import, export, trade

ProGlobal Trade - Built for international commerce.
*/

/* ============================================
   ProGlobal Theme - Child of flavor flavor flavor Flavor
   Based on Flavor of flavor flavor Flavor flavor flavor
   ============================================ */

/* --- CSS Variables --- */
:root {
    --pg-primary: #1B365D;       /* Navy blue - trust, global */
    --pg-secondary: #E8A838;     /* Gold - premium, trade */
    --pg-accent: #2ECC71;        /* Green - growth, money */
    --pg-dark: #0D1B2A;
    --pg-light: #F7F9FC;
    --pg-text: #333333;
    --pg-text-light: #6B7280;
    --pg-border: #E5E7EB;
    --pg-success: #10B981;
    --pg-warning: #F59E0B;
    --pg-danger: #EF4444;
    --pg-radius: 8px;
    --pg-shadow: 0 2px 8px rgba(27, 54, 93, 0.1);
    --pg-shadow-lg: 0 8px 24px rgba(27, 54, 93, 0.15);
    --pg-transition: all 0.3s ease;
}

/* --- Global Resets --- */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--pg-text);
    background: var(--pg-light);
}

a {
    color: var(--pg-primary);
    transition: var(--pg-transition);
}

a:hover {
    color: var(--pg-secondary);
}

/* --- Header / Navigation --- */
.pg-header {
    background: var(--pg-dark);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--pg-shadow-lg);
}

.pg-top-bar {
    background: var(--pg-primary);
    padding: 8px 0;
    font-size: 13px;
    color: #fff;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.pg-top-bar a {
    color: var(--pg-secondary);
    text-decoration: none;
}

.pg-top-bar .currency-switcher {
    float: right;
}

.pg-nav-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1280px;
    margin: 0 auto;
    padding: 12px 20px;
}

.pg-logo {
    font-size: 24px;
    font-weight: 800;
    color: #fff;
    text-decoration: none;
    letter-spacing: -0.5px;
}

.pg-logo span {
    color: var(--pg-secondary);
}

.pg-nav-links {
    display: flex;
    gap: 28px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.pg-nav-links a {
    color: #fff;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    padding: 8px 0;
    border-bottom: 2px solid transparent;
    transition: var(--pg-transition);
}

.pg-nav-links a:hover,
.pg-nav-links a.active {
    color: var(--pg-secondary);
    border-bottom-color: var(--pg-secondary);
}

.pg-nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.pg-nav-actions .cart-count {
    background: var(--pg-secondary);
    color: var(--pg-dark);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* --- Hero Section --- */
.pg-hero {
    background: linear-gradient(135deg, var(--pg-dark) 0%, var(--pg-primary) 100%);
    color: #fff;
    padding: 80px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.pg-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('assets/images/world-map-dots.png') center/cover no-repeat;
    opacity: 0.08;
}

.pg-hero h1 {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 16px;
    position: relative;
}

.pg-hero h1 span {
    color: var(--pg-secondary);
}

.pg-hero p {
    font-size: 20px;
    color: rgba(255,255,255,0.8);
    max-width: 600px;
    margin: 0 auto 32px;
    position: relative;
}

.pg-hero-cta {
    display: inline-flex;
    gap: 16px;
    position: relative;
}

/* --- Buttons --- */
.pg-btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: var(--pg-radius);
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    transition: var(--pg-transition);
    cursor: pointer;
    border: none;
}

.pg-btn-primary {
    background: var(--pg-secondary);
    color: var(--pg-dark);
}

.pg-btn-primary:hover {
    background: #D4952E;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(232, 168, 56, 0.4);
}

.pg-btn-outline {
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255,255,255,0.4);
}

.pg-btn-outline:hover {
    border-color: #fff;
    background: rgba(255,255,255,0.1);
}

/* --- Trade Type Tabs --- */
.pg-trade-tabs {
    display: flex;
    justify-content: center;
    gap: 0;
    margin: 40px auto;
    max-width: 400px;
    background: var(--pg-border);
    border-radius: var(--pg-radius);
    padding: 4px;
}

.pg-trade-tab {
    flex: 1;
    padding: 12px 24px;
    text-align: center;
    font-weight: 600;
    font-size: 15px;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--pg-transition);
    color: var(--pg-text-light);
    background: transparent;
    border: none;
}

.pg-trade-tab.active {
    background: var(--pg-primary);
    color: #fff;
    box-shadow: var(--pg-shadow);
}

.pg-trade-tab[data-type="export"].active {
    background: var(--pg-accent);
}

.pg-trade-tab[data-type="import"].active {
    background: var(--pg-primary);
}

/* --- Category Cards --- */
.pg-categories {
    max-width: 1280px;
    margin: 0 auto;
    padding: 60px 20px;
}

.pg-categories h2 {
    text-align: center;
    font-size: 32px;
    margin-bottom: 8px;
    color: var(--pg-dark);
}

.pg-categories .subtitle {
    text-align: center;
    color: var(--pg-text-light);
    margin-bottom: 40px;
    font-size: 16px;
}

.pg-cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}

.pg-cat-card {
    background: #fff;
    border-radius: var(--pg-radius);
    padding: 24px;
    text-align: center;
    box-shadow: var(--pg-shadow);
    transition: var(--pg-transition);
    border: 1px solid var(--pg-border);
    text-decoration: none;
    color: var(--pg-text);
}

.pg-cat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--pg-shadow-lg);
    border-color: var(--pg-secondary);
}

.pg-cat-card .icon {
    font-size: 40px;
    margin-bottom: 12px;
}

.pg-cat-card h3 {
    font-size: 16px;
    margin-bottom: 4px;
    color: var(--pg-dark);
}

.pg-cat-card .count {
    font-size: 13px;
    color: var(--pg-text-light);
}

/* --- Product Grid --- */
.pg-products {
    max-width: 1280px;
    margin: 0 auto;
    padding: 60px 20px;
}

.pg-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.pg-product-card {
    background: #fff;
    border-radius: var(--pg-radius);
    overflow: hidden;
    box-shadow: var(--pg-shadow);
    transition: var(--pg-transition);
    border: 1px solid var(--pg-border);
}

.pg-product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--pg-shadow-lg);
}

.pg-product-card .image-wrap {
    position: relative;
    padding-top: 65%;
    background: #f0f0f0;
    overflow: hidden;
}

.pg-product-card .image-wrap img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--pg-transition);
}

.pg-product-card:hover .image-wrap img {
    transform: scale(1.05);
}

.pg-product-card .badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-export {
    background: var(--pg-accent);
    color: #fff;
}

.badge-import {
    background: var(--pg-primary);
    color: #fff;
}

.badge-trending {
    background: var(--pg-warning);
    color: var(--pg-dark);
}

.pg-product-card .details {
    padding: 16px;
}

.pg-product-card .product-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--pg-dark);
    margin-bottom: 6px;
    line-height: 1.3;
}

.pg-product-card .product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--pg-text-light);
    margin-bottom: 12px;
}

.pg-product-card .product-meta .hs-code {
    font-family: 'JetBrains Mono', monospace;
    background: var(--pg-light);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
}

.pg-product-card .growth {
    font-weight: 600;
}

.pg-product-card .growth.positive {
    color: var(--pg-success);
}

.pg-product-card .growth.negative {
    color: var(--pg-danger);
}

.pg-product-card .price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pg-product-card .price {
    font-size: 18px;
    font-weight: 700;
    color: var(--pg-dark);
}

.pg-product-card .price small {
    font-size: 12px;
    color: var(--pg-text-light);
    font-weight: 400;
}

.pg-product-card .add-to-cart {
    background: var(--pg-primary);
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--pg-transition);
}

.pg-product-card .add-to-cart:hover {
    background: var(--pg-secondary);
    color: var(--pg-dark);
}

/* --- Demand Indicator --- */
.pg-demand {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 8px 0;
}

.pg-demand-bar {
    flex: 1;
    height: 4px;
    background: var(--pg-border);
    border-radius: 2px;
    overflow: hidden;
}

.pg-demand-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.5s ease;
}

.pg-demand-fill.high { background: var(--pg-success); }
.pg-demand-fill.medium { background: var(--pg-warning); }
.pg-demand-fill.low { background: var(--pg-danger); }

.pg-demand-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

/* --- Stats Bar --- */
.pg-stats {
    background: #fff;
    border-top: 1px solid var(--pg-border);
    border-bottom: 1px solid var(--pg-border);
    padding: 24px 20px;
}

.pg-stats-inner {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    text-align: center;
}

.pg-stat-item .number {
    font-size: 28px;
    font-weight: 800;
    color: var(--pg-primary);
}

.pg-stat-item .label {
    font-size: 13px;
    color: var(--pg-text-light);
    margin-top: 4px;
}

/* --- Trending Section --- */
.pg-trending {
    background: var(--pg-dark);
    color: #fff;
    padding: 60px 20px;
}

.pg-trending h2 {
    text-align: center;
    font-size: 28px;
    margin-bottom: 32px;
}

.pg-trending-list {
    max-width: 800px;
    margin: 0 auto;
}

.pg-trending-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.pg-trending-item .rank {
    font-size: 14px;
    font-weight: 700;
    color: var(--pg-secondary);
    width: 40px;
}

.pg-trending-item .name {
    flex: 1;
    font-size: 15px;
}

.pg-trending-item .growth {
    font-weight: 600;
    color: var(--pg-accent);
}

/* --- Footer --- */
.pg-footer {
    background: var(--pg-dark);
    color: rgba(255,255,255,0.7);
    padding: 60px 20px 30px;
    border-top: 3px solid var(--pg-secondary);
}

.pg-footer-grid {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.pg-footer h4 {
    color: #fff;
    font-size: 15px;
    margin-bottom: 16px;
}

.pg-footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.pg-footer ul li {
    margin-bottom: 8px;
}

.pg-footer ul a {
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    font-size: 14px;
    transition: var(--pg-transition);
}

.pg-footer ul a:hover {
    color: var(--pg-secondary);
}

.pg-footer-bottom {
    max-width: 1280px;
    margin: 0 auto;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: space-between;
    font-size: 13px;
}

/* --- Inquiry / RFQ Button --- */
.pg-rfq-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--pg-accent);
    color: #fff;
    padding: 14px 24px;
    border-radius: 50px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(46, 204, 113, 0.4);
    z-index: 999;
    transition: var(--pg-transition);
}

.pg-rfq-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(46, 204, 113, 0.5);
}

/* --- WooCommerce Overrides --- */
.woocommerce ul.products li.product .price {
    color: var(--pg-primary);
    font-weight: 700;
}

.woocommerce ul.products li.product .button,
.woocommerce a.button,
.woocommerce button.button {
    background: var(--pg-primary) !important;
    color: #fff !important;
    border-radius: var(--pg-radius) !important;
    font-weight: 600 !important;
    transition: var(--pg-transition) !important;
}

.woocommerce a.button:hover,
.woocommerce button.button:hover {
    background: var(--pg-secondary) !important;
    color: var(--pg-dark) !important;
}

.woocommerce .woocommerce-ordering select,
.woocommerce .quantity .qty {
    border: 1px solid var(--pg-border);
    border-radius: var(--pg-radius);
    padding: 8px 12px;
}

.woocommerce nav.woocommerce-pagination ul li a,
.woocommerce nav.woocommerce-pagination ul li span {
    border-color: var(--pg-border);
}

.woocommerce nav.woocommerce-pagination ul li span.current {
    background: var(--pg-primary);
    border-color: var(--pg-primary);
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .pg-hero h1 { font-size: 32px; }
    .pg-hero p { font-size: 16px; }
    .pg-stats-inner { grid-template-columns: repeat(2, 1fr); }
    .pg-footer-grid { grid-template-columns: 1fr 1fr; }
    .pg-nav-links { display: none; }
    .pg-cat-grid { grid-template-columns: repeat(2, 1fr); }
    .pg-product-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .pg-hero { padding: 40px 16px; }
    .pg-hero h1 { font-size: 26px; }
    .pg-cat-grid { grid-template-columns: 1fr; }
    .pg-footer-grid { grid-template-columns: 1fr; }
    .pg-hero-cta { flex-direction: column; }
}
