/**
 * Order Tracking Page — P&D Representaciones
 * Reuses .ty-timeline from thankyou.css
 *
 * @package PYD_Theme
 */

/* ── Page layout ── */
.trk-page {
    background: var(--pyd-bg-alt, #F3F3F1);
    min-height: 100vh;
}

.trk-hero {
    text-align: center;
    padding: 120px 24px 0;
    margin-bottom: 32px;
}
.trk-hero__label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--pyd-primary, #0070C0);
    margin-bottom: 12px;
}
.trk-hero__title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(36px, 5vw, 56px);
    font-weight: 700;
    color: var(--pyd-heading, #1A1A1A);
    line-height: 1.05;
    margin-bottom: 16px;
}
.trk-hero__subtitle {
    font-size: 17px;
    color: var(--pyd-text-light, #6B7280);
    line-height: 1.7;
    margin-bottom: 24px;
}

/* ── Wrapper ── */
.trk {
    max-width: 680px;
    margin: 0 auto;
    padding: 0 24px 96px;
}

/* ── Form ── */
.trk-form-header {
    text-align: center;
    margin-bottom: 32px;
}
.trk-form-title {
    font-family: 'EB Garamond', 'Garamond', serif;
    font-size: 24px;
    font-weight: 500;
    color: var(--pyd-heading, #1A1A1A);
    margin: 0 0 8px;
}
.trk-form-subtitle {
    font-size: 14px;
    color: var(--pyd-text-light, #6B7280);
    margin: 0;
    line-height: 1.5;
}

.trk-form-section {
    background: white;
    border: 1px solid var(--pyd-border, #E5E7EB);
    border-radius: 16px;
    padding: 40px 32px;
}

.trk-form {
    max-width: 400px;
    margin: 0 auto;
}

.trk-form__field {
    margin-bottom: 20px;
}
.trk-form__field label {
    display: block;
    font-family: 'Archivo', sans-serif;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--pyd-text-light, #6B7280);
    margin-bottom: 6px;
}
.trk-form__field input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--pyd-border, #E5E7EB);
    border-radius: 8px;
    font-family: 'Archivo', sans-serif;
    font-size: 15px;
    color: var(--pyd-heading, #1A1A1A);
    transition: border-color 0.2s;
    box-sizing: border-box;
}
.trk-form__field input:focus {
    outline: none;
    border-color: var(--pyd-primary, #0070C0);
    box-shadow: 0 0 0 3px rgba(0, 112, 192, 0.1);
}

.trk-form__btn {
    width: 100%;
    padding: 14px 24px;
    background: var(--pyd-primary, #0070C0);
    color: white;
    border: none;
    border-radius: 8px;
    font-family: 'Archivo', sans-serif;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 8px;
}
.trk-form__btn:hover {
    background: var(--pyd-primary-dark, #005A9E);
}
.trk-form__btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.trk-form__error {
    margin-top: 16px;
    padding: 12px 16px;
    background: #FEE2E2;
    color: #991B1B;
    border-radius: 8px;
    font-size: 14px;
    text-align: center;
}

/* Turnstile widget centering */
.trk-form .cf-turnstile {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}

/* ── Result header ── */
.trk-header {
    text-align: center;
    padding: 0 0 8px;
}
.trk-header__title {
    font-family: 'Archivo', sans-serif;
    font-size: 22px;
    font-weight: 600;
    color: var(--pyd-heading, #1A1A1A);
    margin: 0 0 4px;
}
.trk-header__date {
    font-size: 14px;
    color: var(--pyd-text-light, #6B7280);
    margin: 0;
}

/* ── Cards ── */
.trk-card {
    background: white;
    border: 1px solid var(--pyd-border, #E5E7EB);
    border-radius: 12px;
    padding: 24px;
    margin-top: 20px;
}
.trk-card--tracking {
    border-left: 4px solid var(--pyd-primary, #0070C0);
}
.trk-card__title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--pyd-text-light, #6B7280);
    margin: 0 0 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--pyd-border, #E5E7EB);
}
.trk-card__row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 8px 0;
}
.trk-card__row + .trk-card__row {
    border-top: 1px solid #f5f5f5;
}
.trk-card__row--total {
    border-top: 2px solid var(--pyd-heading, #1A1A1A) !important;
    margin-top: 4px;
    padding-top: 12px;
    font-weight: 700;
}
.trk-card__label {
    font-size: 14px;
    color: var(--pyd-text-light, #6B7280);
}
.trk-card__value {
    font-size: 14px;
    color: var(--pyd-heading, #1A1A1A);
    font-weight: 500;
    text-align: right;
}
.trk-card__link {
    display: inline-block;
    margin-left: 8px;
    font-size: 13px;
    color: var(--pyd-primary, #0070C0);
    text-decoration: none;
    font-weight: 600;
}
.trk-card__link:hover { text-decoration: underline; }
.trk-card__hint {
    display: block;
    font-size: 12px;
    color: var(--pyd-text-light, #6B7280);
    margin-top: 4px;
}
.trk-card__address {
    font-size: 14px;
    line-height: 1.6;
    color: var(--pyd-heading, #1A1A1A);
    margin: 0;
}

/* ── Products ── */
.trk-product {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 0;
}
.trk-product + .trk-product {
    border-top: 1px solid #f5f5f5;
}
.trk-product__img {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--pyd-bg-alt, #F3F3F1);
}
.trk-product__img--placeholder {
    border: 1px dashed var(--pyd-border, #E5E7EB);
}
.trk-product__info {
    flex: 1;
    min-width: 0;
}
.trk-product__name {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--pyd-heading, #1A1A1A);
}
.trk-product__qty {
    display: block;
    font-size: 12px;
    color: var(--pyd-text-light, #6B7280);
    margin-top: 2px;
}
.trk-product__price {
    font-size: 14px;
    font-weight: 600;
    color: var(--pyd-heading, #1A1A1A);
    flex-shrink: 0;
}

/* ── Actions ── */
.trk-actions {
    text-align: center;
    margin-top: 32px;
}
.trk-btn-back {
    background: none;
    border: none;
    color: var(--pyd-primary, #0070C0);
    font-family: 'Archivo', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 8px;
    transition: background 0.15s;
}
.trk-btn-back:hover {
    background: rgba(0, 112, 192, 0.08);
}

/* ── Timeline completed steps (green check) ── */
.ty-timeline__step.done .ty-timeline__dot {
    background: #059669;
    border-color: #059669;
}
.ty-timeline__step.done .ty-timeline__dot svg { stroke: white; }
.ty-timeline__step.done::after { background: #059669; }
.ty-timeline__step.done .ty-timeline__label { color: #059669; }

/* ── Responsive ── */
@media (max-width: 768px) {
    .trk-hero { padding-top: 100px; }
    .trk { padding: 0 16px 64px; }
    .trk-form-section { padding: 28px 20px; }
    .trk-card { padding: 20px 16px; }
    .trk-card__row { flex-direction: column; gap: 4px; }
    .trk-card__value { text-align: left; }
}
