/* Extracted from inline <style> in page-after-sales-service.php (part of #11 front-end unification) */

/* ============================================
       After-Sales Service Page
       ============================================ */

    /* Service Cards */
    .as-services {
        padding: var(--space-10, 64px) 0;
    }
    .as-services__grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-6, 24px);
    }
    .as-service-card {
        background: var(--color-white, #fff);
        border: 1px solid var(--color-border, #e5e7eb);
        border-radius: var(--radius-xl, 16px);
        padding: var(--space-6, 24px);
        transition: all 0.3s ease;
        position: relative;
        overflow: hidden;
    }
    .as-service-card::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 3px;
        background: linear-gradient(90deg, var(--color-primary, #1a3a5c), var(--color-accent, #e8622c));
        opacity: 0;
        transition: opacity 0.3s ease;
    }
    .as-service-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
        border-color: transparent;
    }
    .as-service-card:hover::before {
        opacity: 1;
    }
    .as-service-card__icon {
        width: 56px;
        height: 56px;
        border-radius: var(--radius-lg, 12px);
        background: rgba(26, 58, 92, 0.06);
        display: flex;
        align-items: center;
        justify-content: center;
        margin-bottom: var(--space-4, 16px);
        color: var(--color-primary, #1a3a5c);
    }
    .as-service-card__icon svg {
        width: 28px;
        height: 28px;
    }
    .as-service-card__title {
        font-size: var(--text-lg, 18px);
        font-weight: 700;
        color: var(--color-dark, #111827);
        margin: 0 0 var(--space-2, 8px);
    }
    .as-service-card__desc {
        font-size: var(--text-sm, 14px);
        color: var(--color-gray-600, #4b5563);
        line-height: 1.7;
        margin: 0;
    }

    /* ══ Warranty Section — premium redesign ══ */
    .as-warranty {
        position: relative;
        background: linear-gradient(135deg, #0f2440 0%, #1a3a5c 55%, #234e7a 100%);
        color: #fff;
        padding: var(--space-12, 80px) 0;
        overflow: hidden;
    }
    .as-warranty::before {
        content: "";
        position: absolute;
        top: -160px;
        right: -120px;
        width: 460px;
        height: 460px;
        background: radial-gradient(circle, rgba(232, 98, 44, 0.28), transparent 70%);
        pointer-events: none;
    }
    .as-warranty::after {
        content: "";
        position: absolute;
        bottom: -200px;
        left: -120px;
        width: 420px;
        height: 420px;
        background: radial-gradient(circle, rgba(26, 58, 92, 0.9), transparent 70%);
        pointer-events: none;
    }
    .as-warranty__grid {
        position: relative;
        z-index: 1;
        display: grid;
        grid-template-columns: 1.05fr 0.95fr;
        gap: var(--space-10, 64px);
        align-items: center;
    }
    .as-warranty__content h2 {
        font-size: var(--text-3xl, 32px);
        font-weight: 800;
        color: #fff;
        margin: 0 0 var(--space-4, 16px);
        letter-spacing: -0.01em;
    }
    .as-warranty__content > p {
        font-size: var(--text-base, 16px);
        color: rgba(255, 255, 255, 0.78);
        line-height: 1.8;
        margin: 0 0 var(--space-6, 24px);
    }
    .as-warranty__list {
        list-style: none;
        margin: 0;
        padding: 0;
        display: flex;
        flex-direction: column;
        gap: var(--space-3, 12px);
    }
    .as-warranty__list li {
        display: flex;
        align-items: flex-start;
        gap: var(--space-3, 12px);
        font-size: var(--text-sm, 14px);
        color: rgba(255, 255, 255, 0.88);
        line-height: 1.6;
    }
    .as-warranty__list li .as-check {
        flex-shrink: 0;
        width: 22px;
        height: 22px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.14);
        color: #fff;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-top: 1px;
    }
    .as-warranty__list li .as-check svg {
        width: 12px;
        height: 12px;
    }
    .as-warranty__visual {
        position: relative;
        background: rgba(255, 255, 255, 0.07);
        border: 1px solid rgba(255, 255, 255, 0.16);
        -webkit-backdrop-filter: blur(20px);
        backdrop-filter: blur(20px);
        border-radius: var(--radius-2xl, 24px);
        padding: var(--space-8, 36px);
        text-align: center;
        box-shadow: 0 30px 60px rgba(0, 0, 0, 0.32);
    }
    .as-warranty__badge {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 140px;
        height: 140px;
        border-radius: 50%;
        background: linear-gradient(135deg, var(--color-accent, #e8622c) 0%, #f59e0b 100%);
        color: #fff;
        margin-bottom: var(--space-6, 24px);
        box-shadow: 0 14px 36px rgba(232, 98, 44, 0.45);
        position: relative;
    }
    .as-warranty__badge::after {
        content: "";
        position: absolute;
        inset: -8px;
        border-radius: 50%;
        border: 2px dashed rgba(255, 255, 255, 0.35);
    }
    .as-warranty__badge-inner {
        text-align: center;
    }
    .as-warranty__badge-years {
        font-size: 48px;
        font-weight: 900;
        line-height: 1;
    }
    .as-warranty__badge-text {
        font-size: 11px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.08em;
        opacity: 0.92;
    }
    .as-warranty__stats {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-4, 16px);
        margin-top: var(--space-6, 24px);
    }
    .as-warranty__stat {
        text-align: center;
        padding: var(--space-3, 12px) 4px;
        border-radius: var(--radius-lg, 12px);
        background: rgba(255, 255, 255, 0.05);
    }
    .as-warranty__stat-value {
        font-size: var(--text-2xl, 24px);
        font-weight: 800;
        color: #fff;
    }
    .as-warranty__stat-label {
        font-size: var(--text-xs, 12px);
        color: rgba(255, 255, 255, 0.65);
        margin-top: 2px;
    }

    /* Process Steps */
    .as-process {
        padding: var(--space-10, 64px) 0;
    }
    .as-process__grid {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: var(--space-6, 24px);
        position: relative;
    }
    .as-process__grid::before {
        content: "";
        position: absolute;
        top: 40px;
        left: 12.5%;
        right: 12.5%;
        height: 2px;
        background: linear-gradient(90deg, var(--color-primary, #1a3a5c), var(--color-accent, #e8622c));
        opacity: 0.2;
    }
    .as-step {
        text-align: center;
        position: relative;
    }
    .as-step__number {
        width: 56px;
        height: 56px;
        border-radius: 50%;
        background: linear-gradient(135deg, var(--color-primary, #1a3a5c), #2a6aac);
        color: #fff;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: var(--text-lg, 18px);
        font-weight: 800;
        margin: 0 auto var(--space-4, 16px);
        position: relative;
        z-index: 1;
    }
    .as-step__title {
        font-size: var(--text-base, 16px);
        font-weight: 700;
        color: var(--color-dark, #111827);
        margin: 0 0 var(--space-2, 8px);
    }
    .as-step__desc {
        font-size: var(--text-sm, 14px);
        color: var(--color-gray-600, #4b5563);
        line-height: 1.6;
    }

    /* FAQ Section */
    .as-faq {
        background: var(--color-gray-50, #f8f9fa);
        padding: var(--space-10, 64px) 0;
    }
    .as-faq__list {
        max-width: 800px;
        margin: 0 auto;
        display: flex;
        flex-direction: column;
        gap: var(--space-3, 12px);
    }
    .as-faq-item {
        background: var(--color-white, #fff);
        border: 1px solid var(--color-border, #e5e7eb);
        border-radius: var(--radius-lg, 12px);
        overflow: hidden;
        transition: border-color 0.2s ease;
    }
    .as-faq-item:hover {
        border-color: var(--color-primary, #1a3a5c);
    }
    .as-faq-item__q {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: var(--space-4, 16px) var(--space-5, 20px);
        cursor: pointer;
        font-size: var(--text-base, 16px);
        font-weight: 600;
        color: var(--color-dark, #111827);
        background: none;
        border: none;
        width: 100%;
        text-align: left;
        gap: var(--space-3, 12px);
    }
    .as-faq-item__q svg {
        flex-shrink: 0;
        width: 20px;
        height: 20px;
        color: var(--color-gray-400, #9ca3af);
        transition: transform 0.3s ease;
    }
    .as-faq-item.is-open .as-faq-item__q svg {
        transform: rotate(180deg);
        color: var(--color-accent, #e8622c);
    }
    .as-faq-item__a {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.35s ease;
    }
    .as-faq-item.is-open .as-faq-item__a {
        max-height: 500px;
    }
    .as-faq-item__a-inner {
        padding: 0 var(--space-5, 20px) var(--space-5, 20px);
        font-size: var(--text-sm, 14px);
        color: var(--color-gray-600, #4b5563);
        line-height: 1.8;
    }

    /* After-Sales Service Request Form (replaces old as-cta; distinct from Free Quote) */
    .as-form-section {
        padding: var(--space-10, 64px) 0;
    }
    .as-form-card {
        max-width: 760px;
        margin: 0 auto;
        background: #fff;
        border: 1px solid var(--color-border, #e5e7eb);
        border-radius: var(--radius-xl, 16px);
        box-shadow: var(--shadow-lg, 0 10px 30px rgba(15, 23, 42, 0.08));
        padding: var(--space-8, 32px);
        text-align: left;
    }
    .as-form-card__title {
        font-size: var(--text-2xl, 24px);
        font-weight: 800;
        margin: 0 0 var(--space-2, 8px);
        color: var(--color-gray-900, #111827);
    }
    .as-form-card__desc {
        font-size: var(--text-base, 16px);
        color: var(--color-gray-500, #6b7280);
        margin: 0 0 var(--space-6, 24px);
        line-height: 1.6;
    }
    /* 售后表单：字段宽度100% + 紧凑间距（一屏显示） */
    .as-form-card .wpcf7-form p,
    .as-form-card .form-row { margin-bottom: 10px; }
    .as-form-card .wpcf7-textarea,
    .as-form-card .form-textarea {
        width: 100% !important;
        min-height: 90px !important;
        max-height: 130px;
        box-sizing: border-box;
    }
    .as-form-card .wpcf7-form-control,
    .as-form-card .form-input,
    .as-form-card .form-select {
        width: 100% !important;
        box-sizing: border-box;
    }
    /* 售后表单：多图上传（最多 5 张，仅 JPG/GIF/PNG，单张 ≤ 2MB） */
    .as-upload-grid {
        display: flex;
        flex-wrap: wrap;
        gap: 14px;
        margin-top: 12px;
    }
    .as-upload-slot {
        position: relative;
        width: 110px;
        height: 110px;
        flex: 0 0 auto;
        border: 2px dashed #c9cdd4;
        border-radius: 14px;
        background: linear-gradient(135deg, #fafbfc 0%, #f0f2f5 100%);
        overflow: hidden;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all .25s cubic-bezier(.16,1,.3,1);
        cursor: pointer;
    }
    /* 默认仅显示第一个「+」框，其余由 JS 按需显现 */
    .as-upload-slot:nth-child(n+2) { display: none; }
    .as-upload-slot:hover {
        border-color: var(--color-accent, #e8622c);
        background: linear-gradient(135deg, #fff7f3 0%, #ffe8db 100%);
        box-shadow: 0 4px 16px rgba(232,98,44,.15);
        transform: translateY(-3px);
    }
    /* 空槽位：居中大号「+」圆 + 上传文案 */
    .as-upload-slot:not(.has-image)::before {
        content: "";
        display: block;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background: linear-gradient(135deg, var(--color-accent, #e8622c), #f59e0b);
        position: relative;
        z-index: 1;
        pointer-events: none;
        box-shadow: 0 2px 8px rgba(232,98,44,.25);
    }
    /* 在圆形内画一个白色 + 号（用渐变遮罩 trick） */
    .as-upload-slot:not(.has-image)::after {
        content: "Upload";
        position: absolute;
        bottom: 10px;
        left: 50%;
        transform: translateX(-50%);
        font-size: 11px;
        font-weight: 600;
        color: var(--color-gray-400, #9ca3af);
        letter-spacing: .02em;
        pointer-events: none;
        white-space: nowrap;
    }
    /* 白色 + 叠在橙色圆上（SVG 十字） */
    .as-upload-slot .as-plus-cross {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -55%);
        z-index: 2;
        pointer-events: none;
        display: none;
        line-height: 0;
    }
    .as-upload-slot:not(.has-image) .as-plus-cross {
        display: block;
    }
    /* 文件输入铺满整张卡片，透明覆盖层 → 点击任意位置触发选图 */
    .as-upload-slot .wpcf7-form-control-wrap,
    .as-upload-slot .as-file {
        position: absolute !important;
        inset: 0 !important;
        width: 100% !important;
        height: 100% !important;
        opacity: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        font-size: 0 !important;
        line-height: 0 !important;
        cursor: pointer !important;
        z-index: 10 !important;
        display: block !important;
        overflow: visible !important;
    }
    /* 已选图：隐藏选择输入，显示预览 */
    .as-upload-slot.has-image .as-file,
    .as-upload-slot.has-image .wpcf7-form-control-wrap { display: none !important; }
    .as-upload-slot.has-image {
        border-style: solid;
        border-color: #d1d5db;
        background: #fff;
        cursor: default;
        transform: none;
    }
    .as-upload-preview {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        pointer-events: none;
        z-index: 1;
    }
    .as-upload-preview img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        border-radius: 11px;
    }
    .as-upload-remove {
        position: absolute;
        top: -7px;
        right: -7px;
        width: 22px;
        height: 22px;
        border-radius: 50%;
        border: 2px solid #fff;
        background: #ef4444;
        color: #fff;
        font-size: 15px;
        line-height: 1;
        cursor: pointer;
        box-shadow: 0 2px 6px rgba(0, 0, 0, .3);
        z-index: 3;
        pointer-events: auto;
    }
    .as-upload-remove:hover { background: #dc2626; }

    /* 移动端：卡片稍小 */
    @media (max-width: 640px) {
        .as-upload-slot { width: 88px; height: 88px; }
        .as-upload-slot:not(.has-image)::before { width: 34px; height: 34px; }
        .as-upload-slot .as-plus-cross svg { width: 15px; height: 15px; }
        .as-upload-grid { gap: 10px; }
    }
    .as-upload-err {
        position: absolute;
        inset: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 6px;
        color: #ef4444;
        font-size: 11px;
        text-align: center;
        background: #fff5f5;
    }
    .as-form-card .wpcf7-form-control-wrap .wpcf7-not-valid-tip { font-size: 12px; }
    @media (max-width: 640px) {
        .as-upload-slot { width: 78px; height: 78px; }
        .as-upload-slot:not(.has-image)::before { font-size: 28px; }
    }
    .as-form-card .wpcf7-submit { margin-top: 4px; }

    /* Responsive */
    @media (max-width: 992px) {
        .as-services__grid { grid-template-columns: repeat(2, 1fr); }
        .as-warranty__grid { grid-template-columns: 1fr; }
        .as-process__grid { grid-template-columns: repeat(2, 1fr); }
        .as-process__grid::before { display: none; }
    }
    @media (max-width: 767px) {
        .as-services, .as-process, .as-form-section { padding: var(--space-8, 48px) 0; }
        .as-warranty, .as-faq { padding: var(--space-8, 48px) 0; }
        .as-services__grid { gap: var(--space-4, 16px); }
    }
    @media (max-width: 600px) {
        .as-services__grid { grid-template-columns: 1fr; }
        .as-process__grid { grid-template-columns: 1fr; }
        .as-warranty__stats { grid-template-columns: 1fr; gap: var(--space-3, 12px); }
    }
