/*
Theme Name: sunyindustry
Theme URI: https://sunyindustry.com
Author: Aaron
Author URI: https://sunyindustry.com
Description: this is a website for wet wipes machine line
Version: 1.0
*/
/* 修复文本区域高度 - 减少高度 */
.wpcf7-form textarea.form-control {
    min-height: 120px !important; /* 减少高度 */
    height: 120px !important; /* 固定高度 */
}

/* ==========================================
   Contact Form 7 Bootstrap Toast
   ========================================== */
.cf7-toast-container {
    z-index: 1080;
}

.cf7-toast-container .toast {
    min-width: 320px;
    max-width: min(92vw, 520px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
}

.cf7-toast-container .toast .toast-body {
    font-size: 14px;
    line-height: 1.5;
}

#inquiry-form .wpcf7-response-output {
    display: none !important;
}

#inquiry-form .wpcf7-not-valid-tip {
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

#inquiry-form .wpcf7-spinner {
    margin-left: 0.75rem;
}

@media (max-width: 576px) {
    .cf7-toast-container {
        width: 100%;
        left: 50%;
        transform: translateX(-50%);
    }

    .cf7-toast-container .toast {
        min-width: auto;
        width: calc(100vw - 1.5rem);
    }
}

/* ==========================================
   404 Page
   ========================================== */
.error-404 {
    min-height: calc(100vh - 140px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    background:
        radial-gradient(circle at top, rgba(14, 116, 144, 0.12), transparent 42%),
        linear-gradient(180deg, #f8fbfc 0%, #ffffff 100%);
}

.error-404__hero {
    width: 100%;
}

.error-404__content {
    max-width: 760px;
    margin: 0 auto;
    padding: 56px 32px;
    text-align: center;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 28px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(10px);
}

.error-404__code {
    margin: 0 0 12px;
    font-size: clamp(4rem, 14vw, 8rem);
    line-height: 1;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: #0f766e;
}

.error-404__title {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3.25rem);
    line-height: 1.15;
    color: #0f172a;
}

.error-404__text {
    max-width: 560px;
    margin: 18px auto 0;
    font-size: 1.05rem;
    line-height: 1.8;
    color: #475569;
}

.error-404__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
    margin-top: 32px;
}

.error-404__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 160px;
    padding: 14px 22px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.error-404__button:hover {
    transform: translateY(-1px);
}

.error-404__button--primary {
    background: linear-gradient(135deg, #0f766e, #115e59);
    color: #ffffff;
    box-shadow: 0 12px 24px rgba(15, 118, 110, 0.22);
}

.error-404__button--primary:hover {
    color: #ffffff;
    box-shadow: 0 16px 30px rgba(15, 118, 110, 0.28);
}

.error-404__button--secondary {
    background: #ffffff;
    color: #0f172a;
    border: 1px solid rgba(15, 23, 42, 0.12);
}

.error-404__button--secondary:hover {
    color: #0f172a;
    border-color: rgba(15, 118, 110, 0.25);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

@media (max-width: 768px) {
    .error-404 {
        min-height: auto;
        padding: 48px 16px;
    }

    .error-404__content {
        padding: 40px 20px;
        border-radius: 22px;
    }

    .error-404__actions {
        flex-direction: column;
    }

    .error-404__button {
        width: 100%;
    }
}

/* ==========================================
   Product Card Image Flip
   ========================================== */
.product-image-flip {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 20px;
    background: #f8fafc;
    transform: translateZ(0);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.06);
}

.product-image-flip::before {
    content: '';
    display: block;
    padding-top: 100%;
}

.product-image-flip__front,
.product-image-flip__back {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition:
        opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.8s cubic-bezier(0.22, 1, 0.36, 1),
        filter 0.65s ease;
    backface-visibility: hidden;
    will-change: opacity, transform;
}

.product-image-flip__front {
    opacity: 1;
    transform: scale(1) rotate(0.001deg);
    z-index: 2;
}

.product-image-flip__back {
    opacity: 0;
    transform: scale(1.08) rotate(0.001deg);
    z-index: 1;
    filter: saturate(0.98) brightness(0.98);
}

.product-card:hover .product-image-flip__front {
    opacity: 0;
    transform: scale(1.04);
}

.product-card:hover .product-image-flip__back {
    opacity: 1;
    transform: scale(1);
    filter: saturate(1) brightness(1);
}

.product-card:hover .product-image-flip {
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.10);
}

@media (max-width: 768px) {
    .product-card {
        display: flex;
        flex-direction: column;
        gap: 14px;
    }

    .product-image-flip {
        border-radius: 18px;
    }

    .product-image-flip::before {
        padding-top: 78%;
    }

    .product-image-flip__front,
    .product-image-flip__back {
        object-fit: contain;
        object-position: center center;
    }

    .product-card:hover .product-image-flip__front {
        opacity: 1;
        transform: scale(1);
    }

    .product-card:hover .product-image-flip__back {
        opacity: 0;
        transform: scale(1.08);
    }

    .product-package-wrapper {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 10px;
        width: 100%;
        margin: 0;
        padding: 12px 14px;
        border-radius: 16px;
        background: rgba(248, 250, 252, 0.92);
        border: 1px solid rgba(15, 23, 42, 0.08);
        text-align: center;
    }

    .product-package-icon--mobile {
        display: inline-flex;
        flex: 0 0 72px;
        width: 72px;
        height: 72px;
        border-radius: 14px;
        overflow: hidden;
        background: #fff;
        box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
        margin: 0;
    }

    .product-package-icon--mobile .package-img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .product-package-note {
        font-size: 0.8rem;
        color: #0f766e;
        font-weight: 600;
        line-height: 1.4;
    }

    .product-package-spec {
        width: 100%;
        flex: none;
        font-size: 0.95rem;
        line-height: 1.6;
        color: #475569;
        text-align: center;
    }
}

@media (min-width: 769px) {
    .product-package-wrapper,
    .product-package-icon--mobile {
        display: none;
    }
}

.product-image-modal-close {
    position: absolute;
    top: -10px;
    right: -10px;
    z-index: 2;
    background-color: #fff;
    opacity: 1;
    border-radius: 999px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.18);
}

#mainProductImage {
    width: 100%;
    max-width: 400px;
    height: auto;
    display: block;
    margin: 0 auto;
    object-fit: contain;
}

@media (max-width: 768px) {
    .main-image {
        max-width: 100%;
        width: 100%;
        height: auto;
        aspect-ratio: 1 / 1;
    }

    .main-image img,
    #mainProductImage {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }
}

@media (max-width: 767px) {
    .category-tabs {
        gap: 0.75rem;
    }

    .category-tab {
        min-width: 0;
        flex: 1 1 100%;
        width: 100%;
        padding: 0.85rem 1rem;
    }

    .category-tab span {
        display: inline;
        font-size: 0.95rem;
        white-space: normal;
        text-align: center;
    }

    .category-tab i {
        flex: 0 0 auto;
    }
}

@media (max-width: 360px) {
    .category-tab i {
        display: none;
    }
}

.product-image-modal-img {
    max-height: 80vh;
    object-fit: contain;
    background: #ffffff;
    padding: 8px;
}
}

/* ==========================================
   Search Results Page
   ========================================== */
.search-results-page {
    background:
        radial-gradient(circle at top, rgba(14, 116, 144, 0.10), transparent 45%),
        linear-gradient(180deg, #f8fbfc 0%, #ffffff 100%);
}

.search-results-page__container {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
}

.search-results-page__hero {
    padding: 72px 0 28px;
}

.search-results-page__header {
    max-width: 760px;
    margin: 0 auto;
    text-align: center;
}

.search-results-page__eyebrow {
    margin: 0 0 12px;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #0f766e;
}

.search-results-page__title {
    margin: 0;
    font-size: clamp(2rem, 4.6vw, 3.4rem);
    line-height: 1.15;
    color: #0f172a;
}

.search-results-page__title span {
    color: #0f766e;
}

.search-results-page__description {
    max-width: 640px;
    margin: 16px auto 0;
    font-size: 1.05rem;
    line-height: 1.8;
    color: #475569;
}

.search-results-page__form {
    max-width: 860px;
    margin: 34px auto 0;
    padding: 28px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 28px;
    box-shadow: 0 22px 50px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(10px);
}

.search-results-page__form .search-form {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    margin: 0;
}

.search-results-page__form .search-form .search-form__label {
    margin: 0;
    color: #0f172a;
    font-weight: 600;
    white-space: nowrap;
}

.search-results-page__form .search-form .search-form__group {
    display: flex;
    align-items: stretch;
    gap: 12px;
    width: 100%;
}

.search-results-page__form .search-form .search-form__input {
    flex: 1;
    min-height: 60px;
    padding: 16px 18px;
    border-radius: 16px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: #ffffff;
    box-shadow: none;
    font-size: 1rem;
    color: #0f172a;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-results-page__form .search-form .search-form__input:focus {
    outline: none;
    border-color: rgba(15, 118, 110, 0.35);
    box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.10);
}

.search-results-page__form .search-form .search-form__button {
    min-width: 90px;
    height: 60px;
    padding: 0 22px;
    border-radius: 16px;
    border: none;
    background: linear-gradient(135deg, #0f766e, #115e59);
    color: #ffffff;
    font-weight: 700;
    box-shadow: 0 14px 28px rgba(15, 118, 110, 0.20);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.search-results-page__form .search-form .search-form__button:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 34px rgba(15, 118, 110, 0.26);
}

.search-results-page__body {
    padding: 16px 0 80px;
}

.search-results-page__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.search-result-card {
    height: 100%;
}

.search-result-card__link {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    overflow: hidden;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.06);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.search-result-card__link:hover {
    transform: translateY(-4px);
    border-color: rgba(15, 118, 110, 0.22);
    box-shadow: 0 24px 50px rgba(15, 23, 42, 0.10);
}

.search-result-card__thumb {
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, rgba(15, 118, 110, 0.12), rgba(17, 94, 89, 0.16));
    overflow: hidden;
}

.search-result-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.search-result-card__thumb-placeholder {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    font-size: 3rem;
    font-weight: 800;
    color: #0f766e;
}

.search-result-card__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 24px;
}

.search-result-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
    align-items: center;
    margin-bottom: 14px;
    font-size: 0.85rem;
    color: #64748b;
}

.search-result-card__type {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(15, 118, 110, 0.10);
    color: #0f766e;
    font-weight: 700;
}

.search-result-card__title {
    margin: 0;
    font-size: 1.25rem;
    line-height: 1.45;
    color: #0f172a;
}

.search-result-card__excerpt {
    margin: 14px 0 0;
    color: #475569;
    line-height: 1.75;
}

.search-result-card__more {
    margin-top: auto;
    padding-top: 18px;
    font-weight: 700;
    color: #0f766e;
}

.search-results-page__pagination {
    margin-top: 38px;
}

.search-results-page__pagination .pagination {
    gap: 8px;
    flex-wrap: wrap;
}

.search-results-page__pagination .page-link {
    min-width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    border: 1px solid rgba(15, 23, 42, 0.10);
    color: #0f172a;
    background: #ffffff;
    box-shadow: none;
}

.search-results-page__pagination .page-item.active .page-link {
    background: linear-gradient(135deg, #0f766e, #115e59);
    border-color: transparent;
    color: #ffffff;
}

.search-results-page__empty {
    max-width: 760px;
    margin: 20px auto 0;
    padding: 56px 32px;
    text-align: center;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 28px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.08);
}

.search-results-page__empty h2 {
    margin: 0;
    font-size: 2rem;
    color: #0f172a;
}

.search-results-page__empty p {
    max-width: 560px;
    margin: 16px auto 0;
    color: #475569;
    line-height: 1.8;
}

.search-results-state {
    padding: 18px 16px;
    text-align: center;
    border-radius: 16px;
    font-size: 0.95rem;
    line-height: 1.6;
}

.search-results-state--loading {
    color: #0f766e;
    background: rgba(15, 118, 110, 0.08);
}

.search-results-state--empty {
    color: #475569;
    background: #f8fafc;
    border: 1px dashed rgba(15, 23, 42, 0.12);
}

.search-results-state--error {
    color: #b42318;
    background: rgba(180, 35, 24, 0.08);
    border: 1px solid rgba(180, 35, 24, 0.18);
}

.search-results-page__empty-actions {
    margin-top: 28px;
}

.search-results-page__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 160px;
    padding: 14px 22px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 700;
}

.search-results-page__button--primary {
    background: linear-gradient(135deg, #0f766e, #115e59);
    color: #ffffff;
    box-shadow: 0 12px 24px rgba(15, 118, 110, 0.22);
}

@media (max-width: 992px) {
    .search-results-page__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .search-results-page__hero {
        padding: 48px 0 20px;
    }

    .search-results-page__container {
        width: min(100% - 24px, 1200px);
    }

    .search-results-page__form {
        padding: 18px;
        border-radius: 18px;
    }

    .search-results-page__form .search-form {
        flex-direction: column;
        align-items: stretch;
    }

    .search-results-page__form .search-form label {
        white-space: normal;
    }

    .search-results-page__form .search-form label input[type="search"],
    .search-results-page__form .search-form label input[type="text"],
    .search-results-page__form .search-form input[type="search"],
    .search-results-page__form .search-form input[type="text"],
    .search-results-page__form .search-form input[type="submit"],
    .search-results-page__form .search-form button[type="submit"] {
        width: 100%;
    }

    .search-results-page__grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .search-result-card__body {
        padding: 20px;
    }

    .search-results-page__empty {
        padding: 40px 20px;
        border-radius: 22px;
    }
}