/*
Theme Name:  ChinPost Logistics
Theme URI:   https://chinpost.ir
Author:      ChinPost Team
Author URI:  https://chinpost.ir
Description: قالب تخصصی حمل‌ونقل و لجستیک بین‌المللی ChinPost
Version:     3.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
License:     Proprietary
Text Domain: chinpost
Tags:        logistics, rtl, custom-menu, custom-logo, responsive-layout
*/

/* =========================================================
   [FIX T01] اصلاح شد: Theme Name Header اضافه شد.
   بدون این هدر، وردپرس قالب را اصلاً شناسایی نمی‌کرد!
   ========================================================= */

/* ==================== ROOT VARIABLES ==================== */
:root {
    /* Color Palette */
    --primary:        #d4af37;
    --primary-dark:   #aa8c1f;
    --primary-light:  #e5c158;
    --navy:           #0f1a2e;
    --navy-light:     #1a2847;
    --navy-lighter:   #2a3a5f;
    --dark-bg:        #0f1a2e;
    --light-bg:       #f8fafc;
    --white:          #ffffff;

    /* Neutrals */
    --text-primary:   #0f1a2e;
    --text-secondary: #475569;
    --text-tertiary:  #94a3b8;
    --border-light:   #e2e8f0;
    --border-dark:    #cbd5e1;

    /* Semantic Colors */
    --success: #10b981;
    --warning: #f59e0b;
    --danger:  #ef4444;
    --info:    #0284c7;

    /* Spacing */
    --section-pad: 80px;
    --gap-sm: 8px;
    --gap-md: 16px;
    --gap-lg: 24px;
    --gap-xl: 40px;

    /* Shadows */
    --shadow-sm:  0 1px 3px rgba(0,0,0,0.07);
    --shadow-md:  0 4px 16px rgba(0,0,0,0.10);
    --shadow-lg:  0 10px 40px rgba(0,0,0,0.13);
    --shadow-gold: 0 5px 20px rgba(212,175,55,0.25);

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 30px;

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

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    font-family: 'Vazirmatn', Tahoma, Arial, sans-serif;
    direction:  rtl;
    text-align: right;
    background: var(--light-bg);
    color:      var(--text-primary);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

a  { text-decoration: none; color: inherit; transition: color var(--transition); }
ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; font-family: inherit; }
input, textarea, select { font-family: inherit; }

/* ==================== LAYOUT ==================== */
.container {
    max-width: 1280px;
    margin:  0 auto;
    padding: 0 1.5rem;
    width: 100%;
}

.section { padding: var(--section-pad) 0; }

/* ==================== BUTTONS ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 14px;
    border: none;
    transition: all var(--transition);
    cursor: pointer;
}

.btn-gold {
    background: var(--primary);
    color: var(--navy);
    box-shadow: var(--shadow-gold);
}
.btn-gold:hover { background: var(--primary-dark); transform: translateY(-2px); }

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

.btn-navy {
    background: var(--navy);
    color: var(--white);
}
.btn-navy:hover { background: var(--navy-light); }

/* ==================== CARDS ==================== */
.card {
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: box-shadow var(--transition), transform var(--transition);
}
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }

/* ==================== BADGES ==================== */
.badge               { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.badge-success       { background: #d1fae5; color: #065f46; }
.badge-warning       { background: #fef3c7; color: #92400e; }
.badge-danger        { background: #fee2e2; color: #991b1b; }
.badge-info          { background: #e0f2fe; color: #0c4a6e; }
.badge-primary       { background: #fef9e7; color: #78350f; }
.badge-secondary     { background: #f1f5f9; color: #475569; }

/* ==================== FORMS ==================== */
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 14px; color: var(--text-secondary); }

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--border-light);
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--text-primary);
    background: var(--white);
    transition: border-color var(--transition), box-shadow var(--transition);
}
.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(212,175,55,0.15);
}

/* ==================== SECTION TITLES ==================== */
.section-title { font-size: 2rem; font-weight: 800; color: var(--navy); margin-bottom: 0.5rem; }
.section-subtitle { color: var(--text-secondary); font-size: 1.05rem; margin-bottom: 2.5rem; }
.section-header { text-align: center; margin-bottom: 3rem; }
.title-line {
    display: block;
    width: 60px;
    height: 4px;
    background: var(--primary);
    border-radius: 2px;
    margin: 12px auto 0;
}

/* ==================== GRID HELPERS ==================== */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--gap-lg); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap-lg); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap-lg); }

/* ==================== TRACKING WIDGET ==================== */
.tracking-status-badge {
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    display: inline-block;
}
.status-pending          { background: #f3f4f6; color: #374151; }
.status-in_warehouse     { background: #ede9fe; color: #5b21b6; }
.status-in_transit_sea   { background: #e0f2fe; color: #0369a1; }
.status-in_transit_air   { background: #dbeafe; color: #1d4ed8; }
.status-customs_origin   { background: #fef3c7; color: #92400e; }
.status-customs_destination { background: #fff7ed; color: #9a3412; }
.status-out_for_delivery { background: #d1fae5; color: #065f46; }
.status-delivered        { background: #d1fae5; color: #065f46; }
.status-cancelled        { background: #fee2e2; color: #991b1b; }

/* ==================== LOADER ==================== */
.cp-loader {
    display: inline-block;
    width: 22px; height: 22px;
    border: 3px solid rgba(212,175,55,0.3);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ==================== SKELETON ==================== */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    :root { --section-pad: 50px; }
    .section-title { font-size: 1.5rem; }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .container { padding: 0 1rem; }
}