/* ===== Order Tracking Page ===== */

/* Hero Section */
.track-hero-section {
    background: #ffffff;
    padding: 40px 0 50px;
    border-bottom: 1px solid #f0f0f0;
}

/* Breadcrumb */
.pro-breadcrumb {
    font-size: 12px;
    color: #757575;
    padding: 20px 0 0;
    display: flex;
    gap: 6px;
    align-items: center;
    list-style: none;
    margin: 0;
}
.pro-breadcrumb li { display: flex; align-items: center; }
.pro-breadcrumb a { color: #757575; text-decoration: none; transition: color 0.3s ease; }
.pro-breadcrumb a:hover { color: var(--secondary-color); }
.pro-breadcrumb .sep { color: #e0e0e0; margin: 0 3px; }

/* Hero Content */
.track-hero-content {
    margin-top: 30px;
}

.track-title {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 12px;
    margin-top: 0;
    line-height: 1.2;
    color: var(--text-dark);
    letter-spacing: -0.5px;
}

.track-subtitle {
    font-size: 15px;
    color: #757575;
    margin: 0 0 32px;
    font-weight: 400;
}

/* Search Box */
.track-search-box {
    background: #f8f9fa;
    border: 1.5px solid #e8e8e8;
    border-radius: 16px;
    padding: 28px 32px;
    max-width: 680px;
}

.track-search-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    display: block;
}

.track-search-row {
    display: flex;
    gap: 12px;
    align-items: stretch;
}

.track-search-input {
    flex: 1;
    padding: 12px 18px;
    border: 1.5px solid #e0e0e0;
    border-radius: 10px;
    font-size: 15px;
    font-family: 'Manrope', sans-serif;
    color: var(--text-dark);
    background: #fff;
    outline: none;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.track-search-input:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(29, 93, 154, 0.08);
}

.track-search-input::placeholder { color: #b0b0b0; }

.track-btn {
    padding: 12px 28px;
    background: var(--secondary-color);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Manrope', sans-serif;
    cursor: pointer;
    transition: background 0.25s ease, transform 0.15s ease;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.track-btn:hover { background: #174d82; transform: translateY(-1px); }
.track-btn:active { transform: translateY(0); }

/* ===== Results Section ===== */
.track-results-section {
    padding: 60px 0 80px;
    background: #fff;
}

/* Alert Messages */
.track-alert {
    padding: 16px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 680px;
    margin-bottom: 32px;
}

.track-alert-error {
    background: #fff5f5;
    border: 1.5px solid #ffd0d0;
    color: #c0392b;
}

.track-alert-info {
    background: #f0f7ff;
    border: 1.5px solid #c2dcf5;
    color: var(--secondary-color);
}

/* Order Card */
.order-card {
    background: #fff;
    border: 1.5px solid #e8e8e8;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 28px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.04);
}

.order-card-header {
    background: var(--secondary-color);
    padding: 22px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.order-card-title {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    margin: 0;
}

.order-card-date {
    font-size: 13px;
    color: rgba(255,255,255,0.75);
    font-weight: 500;
}

.order-card-body {
    padding: 28px;
}

/* Order Meta Grid */
.order-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.order-meta-item {}

.order-meta-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #999;
    margin-bottom: 4px;
    display: block;
}

.order-meta-value {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-dark);
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge-pending    { background: #fff8e1; color: #f57c00; }
.status-badge-confirmed  { background: #e8f5e9; color: #2e7d32; }
.status-badge-packed     { background: #e3f2fd; color: #1565c0; }
.status-badge-shipped    { background: #f3e5f5; color: #6a1b9a; }
.status-badge-out_for_delivery { background: #fff3e0; color: #e65100; }
.status-badge-delivered  { background: #e8f5e9; color: #1b5e20; }
.status-badge-cancelled  { background: #fce4ec; color: #880e4f; }
.status-badge-returned   { background: #fce4ec; color: #880e4f; }

.status-badge-pay-pending { background: #fff8e1; color: #f57c00; }
.status-badge-pay-success { background: #e8f5e9; color: #2e7d32; }
.status-badge-pay-failed  { background: #fce4ec; color: #c62828; }

/* ===== Order Status Stepper ===== */
.order-stepper-section {
    padding-top: 24px;
    border-top: 1.5px solid #f0f0f0;
    margin-bottom: 0;
}

.order-stepper-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #999;
    margin-bottom: 24px;
}

.order-stepper {
    display: flex;
    align-items: flex-start;
    position: relative;
    overflow-x: auto;
    padding-bottom: 8px;
}

.stepper-line {
    position: absolute;
    top: 18px;
    left: 0;
    right: 0;
    height: 2px;
    background: #e8e8e8;
    z-index: 0;
}

.stepper-line-fill {
    height: 100%;
    background: var(--secondary-color);
    transition: width 0.5s ease;
}

.stepper-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
    z-index: 1;
    min-width: 80px;
}

.stepper-dot {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e8e8e8;
    border: 3px solid #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #bbb;
    box-shadow: 0 0 0 1.5px #e8e8e8;
    transition: all 0.3s ease;
    margin-bottom: 10px;
}

.stepper-step.completed .stepper-dot {
    background: var(--secondary-color);
    color: #fff;
    box-shadow: 0 0 0 1.5px var(--secondary-color);
}

.stepper-step.current .stepper-dot {
    background: #fff;
    color: var(--secondary-color);
    box-shadow: 0 0 0 2px var(--secondary-color);
    border-color: var(--secondary-color);
}

.stepper-step.cancelled .stepper-dot,
.stepper-step.returned .stepper-dot {
    background: #fce4ec;
    color: #c62828;
    box-shadow: 0 0 0 1.5px #ef9a9a;
}

.stepper-label {
    font-size: 10px;
    font-weight: 600;
    text-align: center;
    color: #bbb;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.3;
    max-width: 70px;
}

.stepper-step.completed .stepper-label,
.stepper-step.current .stepper-label {
    color: var(--secondary-color);
}

.stepper-step.cancelled .stepper-label,
.stepper-step.returned .stepper-label {
    color: #c62828;
}

/* ===== Order History Timeline ===== */
.history-card {
    background: #fff;
    border: 1.5px solid #e8e8e8;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 2px 16px rgba(0,0,0,0.04);
}

.history-card-header {
    padding: 20px 28px;
    border-bottom: 1.5px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.history-card-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
}

.history-card-body {
    padding: 24px 28px;
}

.history-timeline {
    position: relative;
    padding-left: 32px;
}

.history-timeline::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: #e8e8e8;
}

.history-item {
    position: relative;
    margin-bottom: 24px;
    padding-bottom: 0;
}

.history-item:last-child {
    margin-bottom: 0;
}

.history-dot {
    position: absolute;
    left: -26px;
    top: 3px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--secondary-color);
    border: 2.5px solid #fff;
    box-shadow: 0 0 0 1.5px var(--secondary-color);
}

.history-item:first-child .history-dot {
    background: var(--secondary-color);
    box-shadow: 0 0 0 2.5px rgba(29,93,154,0.2);
}

.history-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.history-message {
    font-size: 14px;
    color: #444;
    line-height: 1.6;
    margin-bottom: 4px;
}

.history-time {
    font-size: 12px;
    color: #aaa;
    font-weight: 500;
}

.history-empty {
    text-align: center;
    padding: 24px 0;
    color: #aaa;
    font-size: 14px;
}

/* ===== Return Info ===== */
.return-info-card {
    background: #fff5f5;
    border: 1.5px solid #ffd0d0;
    border-radius: 16px;
    padding: 20px 24px;
    margin-top: 24px;
}

.return-info-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #c0392b;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.return-info-label {
    font-size: 12px;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 3px;
    display: block;
}

.return-info-value {
    font-size: 14px;
    color: #444;
    margin-bottom: 12px;
    line-height: 1.6;
}

.return-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.return-status-none      { background: #f5f5f5; color: #888; }
.return-status-requested { background: #fff3e0; color: #e65100; }
.return-status-approved  { background: #e8f5e9; color: #2e7d32; }
.return-status-rejected  { background: #fce4ec; color: #880e4f; }
.return-status-refunded  { background: #e8f5e9; color: #1b5e20; }

/* ===== Animations ===== */
.fade-up {
    animation: trackFadeUp 0.5s ease-out;
}

@keyframes trackFadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .track-title { font-size: 34px; }
    .track-search-box { padding: 20px; }
    .track-search-row { flex-direction: column; }
    .track-btn { width: 100%; justify-content: center; }
    .order-card-header { flex-direction: column; align-items: flex-start; }
    .order-meta-grid { grid-template-columns: repeat(2, 1fr); }
    .order-card-body { padding: 20px; }
    .history-card-body { padding: 20px; }
    .order-card-header { padding: 18px 20px; }
    .history-card-header { padding: 16px 20px; }
}

@media (max-width: 576px) {
    .track-title { font-size: 26px; }
    .track-search-box { padding: 16px; border-radius: 12px; }
    .order-meta-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
    .order-stepper { gap: 0; }
    .stepper-label { font-size: 9px; max-width: 56px; }
    .stepper-dot { width: 30px; height: 30px; font-size: 12px; }
    .stepper-line { top: 15px; }
    .history-timeline { padding-left: 26px; }
    .history-dot { left: -21px; }
    .track-results-section { padding: 32px 0 50px; }
}

@media (max-width: 400px) {
    .track-title { font-size: 22px; }
    .order-meta-grid { grid-template-columns: 1fr; }
}
