/**
 * HQD Product Archive & Search Page Styles
 * Based on AI-generated design from autohtml-project
 * Unit: VW (converted from px using formula: px / 19.2 = vw)
 */

/* ==========================================
   CSS Variables
   ========================================== */
   :root {
    --hqd-white: #FFFFFF;
    --hqd-orange: #FD5000;
    --hqd-orange-light: #FF7130;
    --hqd-black: #1A1A1A;
    --hqd-grey: #F7F7F7;
    --hqd-grey-dark: #F2F2F2;
    --hqd-box-shadow: 0px 0.625vw 1.771vw 0px rgba(13, 10, 44, 0.08);
    --hqd-box-shadow-hover: 0px 0.625vw 1.771vw 0px rgba(13, 10, 44, 0.08), 0px 1.771vw 1.354vw 0px rgba(13, 10, 44, 0.05);
}

/* ==========================================
   Reset & Base Styles
   ========================================== */
.hqd-product-archive {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    background: var(--hqd-white);
    min-height: 100vh;
    position: relative;
}

.hqd-product-archive *,
.hqd-product-archive *::before,
.hqd-product-archive *::after {
    box-sizing: border-box;
}

/* ==========================================
   Page Header
   ========================================== */
.hqd-products-header {
    padding: 5vw 1.042vw 3.333vw;
    text-align: center;
}

.hqd-products-title {
    color: var(--hqd-black);
    ;
    text-align: center;
    font-family: "Roboto", sans-serif;
    font-size: 2.917vw;
    line-height: 150%;
    font-weight: 500;
    margin: 0;
}

/* ==========================================
   Filter Section
   ========================================== */
.hqd-filter-section {
    padding: 0 1.042vw 3.333vw;
    display: flex;
    justify-content: center;
}

.hqd-filter-wrapper {
    background: var(--hqd-grey);
    border-radius: 4.167vw;
    max-width: 62.5vw;
    width: 100%;
    height: 3.125vw;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 0.833vw;
}

.hqd-category-filters {
    display: flex;
    flex-direction: row;
    gap: 0.833vw;
    align-items: center;
}

.hqd-filter-btn {
    background: transparent;
    border-radius: 2.083vw;
    padding: 0.208vw 1.25vw;
    color: var(--hqd-black);
    ;
    text-align: center;
    font-family: "Roboto", sans-serif;
    font-size: 0.83vw;
    line-height: 150%;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.hqd-filter-btn:hover {
    background: rgba(253, 80, 0, 0.1);
}

.hqd-filter-btn.active {
    background: var(--hqd-orange);
    color: var(--hqd-white);
}

/* Search Box */
.hqd-search-box {
    display: flex;
    align-items: center;
    gap: 0.625vw;
    padding-right: 1.667vw;
}

.hqd-search-form {
    display: flex;
    align-items: center;
    gap: 0.417vw;
}

.hqd-search-input {
    color: var(--hqd-black);
    ;
    font-family: "Roboto", sans-serif;
    font-size: 0.83vw;
    line-height: 150%;
    font-weight: 500;
    background: transparent;
    border: none;
    outline: none;
    width: 4.479vw;
    transition: all 0.3s ease;
}

.hqd-search-input::placeholder {
    opacity: 0.4;
}

.hqd-search-input:focus {
    opacity: 1;
    width: 7.813vw;
}

.hqd-search-btn {
    width: 1.458vw;
    height: 1.458vw;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.hqd-search-btn:hover {
    transform: scale(1.1);
}

/* ==========================================
   Products Grid
   ========================================== */
.hqd-products-grid-wrapper {
    padding: 0 1.042vw 3.333vw;
    display: flex;
    justify-content: center;
}

.hqd-products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25vw;
    max-width: 62.5vw;
    width: 100%;
}

/* ==========================================
   Product Card
   ========================================== */
.hqd-product-card {
    background: var(--hqd-white);
    border-radius: 1.667vw;
    width: 100%;
    height: 20.469vw;
    position: relative;
    box-shadow: var(--hqd-box-shadow);
    transition: all 0.3s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* .hqd-product-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: -1;
    margin: -0.156vw;
    border-radius: inherit;
    background: linear-gradient(83.51deg, #FF8114 0%, #FF3333 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
} */

.hqd-product-card:hover {
    transform: translateY(-0.417vw);
    box-shadow: var(--hqd-box-shadow-hover);
    /*border: 0.156vw solid var(--hqd-orange);*/
    /* border-image: linear-gradient(45deg, #FF8114, #FF3333) 1;  */
}

.hqd-product-card:hover::before {
    opacity: 1;
}

/* Featured Product - With Orange Gradient Border */
.hqd-product-card.featured {
    border: 0.156vw solid;
    border-image: linear-gradient(83.51deg, rgba(255, 129, 20, 1) 0%, rgba(255, 51, 51, 1) 100%);
    border-image-slice: 1;
    /* 为了实现渐变边框，需要使用伪元素 */
    position: relative;
    background-clip: padding-box;
}

.hqd-product-card.featured::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: -1;
    margin: -0.156vw;
    border-radius: inherit;
    background: linear-gradient(83.51deg, rgba(255, 129, 20, 1) 0%, rgba(255, 51, 51, 1) 100%);
}

/* Product Image */
.hqd-product-image {
    width: 7.292vw;
    height: 8.75vw;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 0.938vw;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.hqd-product-image a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.hqd-product-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.hqd-product-card:hover .hqd-product-image img {
    transform: scale(1.1);
}

/* Product Info */
.hqd-product-info {
    position: absolute;
    top: 10.104vw;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 0 1.042vw 1.042vw;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hqd-product-title {
    color: var(--hqd-black);
    ;
    text-align: center;
    font-family: "Roboto", sans-serif;
    font-size: 1.25vw;
    line-height: 150%;
    font-weight: 600;
    margin: 0 0 0.521vw 0;
    padding: 0;
}

.hqd-product-title a {
    color: var(--hqd-black);
    ;
    text-decoration: none;
    transition: color 0.3s ease;
}

.hqd-product-title a:hover {
    color: var(--hqd-orange);
}

/* Product Features */
.hqd-product-features {
    margin-bottom: auto;
    width: max-content;
}

.hqd-product-features ul {
    color: var(--hqd-black);
    ;
    text-align: left;
    font-family: "Roboto", sans-serif;
    font-size: 12px;
    line-height: 150%;
    font-weight: 400;
    margin: 0;
    padding: 0;
    list-style: none;
}

.hqd-product-features li {
    margin-bottom: 0.208vw;
    position: relative;
    padding-left: 0.625vw;
}

/* .hqd-product-features li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--hqd-orange);
} */

/* Explore Button */
.hqd-product-button {
    width: 100%;
    margin-top: 0.625vw;
    text-align: center;
}

.hqd-explore-btn {
    background: var(--hqd-orange);
    border-radius: 2.083vw;
    padding: 0.208vw 1.25vw;
    display: inline-block;
    color: var(--hqd-white);
    text-align: center;
    font-family: "Roboto", sans-serif;
    font-size: 0.83vw;
    line-height: 150%;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    width: 8.333vw;
}

.hqd-explore-btn:hover {
    background: var(--hqd-orange-light);
    transform: translateY(-0.104vw);
    box-shadow: 0 0.208vw 0.625vw rgba(253, 80, 0, 0.3);
}

/* ==========================================
   Pagination
   ========================================== */
.hqd-pagination {
    display: flex;
    flex-direction: row;
    gap: 0.208vw;
    align-items: center;
    justify-content: center;
    padding: 0 1.042vw 4.167vw;
}

.hqd-page-btn,
.hqd-page-number {
    background: var(--hqd-grey);
    border-radius: 0.417vw;
    border: 0.052vw solid transparent;
    padding: 0.208vw 0.833vw;
    color: var(--hqd-black);
    ;
    text-align: center;
    font-family: "Roboto", sans-serif;
    font-size: 0.83vw;
    line-height: 150%;
    font-weight: 400;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.hqd-page-btn {
    padding: 0.208vw 1.25vw;
}

.hqd-page-btn:hover,
.hqd-page-number:hover {
    background: var(--hqd-grey-dark);
}

.hqd-page-number.active {
    background: var(--hqd-orange);
    color: var(--hqd-white);
}

.hqd-page-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.hqd-page-dots {
    padding: 0.208vw 0.417vw;
    color: var(--hqd-black);
    ;
    opacity: 0.5;
}

/* ==========================================
   Send Inquiry Button (Floating)
   ========================================== */
.hqd-send-inquiry-btn {
    background: url('../../assets/images/products/send-inquiry.svg');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: center center;
    width: 9.792vw;
    height: 10.521vw;
    position: fixed;
    right: 4.167vw;
    bottom: 4.167vw;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    z-index: 999;
    text-decoration: none;
    transition: all 0.3s ease;
    overflow: hidden;
}

.hqd-send-inquiry-btn:hover {
    transform: scale(1.05);
}

.hqd-send-inquiry-btn svg {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

@keyframes coinRotate {
    0% {
        transform: rotateY(0deg);
    }

    9% {
        transform: rotateY(360deg);
    }

    /* 9%~100%：后10秒（11秒×91%≈10秒）保持静止 */
    100% {
        transform: rotateY(360deg);
    }
}

.hqd-send-inquiry-btn {
    animation: coinRotate 11s linear 2s infinite;
}


.inquiry-text {
    color: var(--hqd-white);
    text-align: center;
    font-family: "Roboto", sans-serif;
    font-size: 1.25vw;
    line-height: 120%;
    font-weight: 700;
    position: relative;
    z-index: 1;
    transform: translateY(-0.938vw);
}

/* ==========================================
   No Products Found
   ========================================== */
.hqd-no-products {
    text-align: center;
    padding: 4.167vw 1.042vw;
    color: var(--hqd-black);
    ;
    font-family: "Roboto", sans-serif;
    font-size: 0.938vw;
    opacity: 0.6;
}

/* ==========================================
   Responsive Design
   ========================================== */

/* Tablet - 3 columns */
@media (max-width: 1680px) {
    .hqd-product-card {
        height: 21.6vw;
    }
}

/* Tablet - 3 columns */
@media (max-width: 1366px) {

    .hqd-explore-btn,
    .hqd-search-input,
    .hqd-page-btn,
    .hqd-page-number,
    .hqd-filter-btn {
        font-size: 12px;
    }

    .hqd-product-card {
        height: 22.8vw;
    }

    .hqd-product-title {
        font-size: 17.075px;
    }

}


/* Tablet - 3 columns */
@media (max-width: 1280px) {
    .hqd-products-grid {
        grid-template-columns: repeat(3, 1fr);
        max-width: 900px;
        gap: 3vw;
    }

    .hqd-send-inquiry-btn {
        right: 40px;
        bottom: 40px;
    }

    .hqd-product-card {
        height: 25.6vw;
    }
}

/* Tablet Portrait - 2 columns */
@media (max-width: 968px) {
    .hqd-products-title {
        font-size: 42px;
    }

    .hqd-products-grid {
        grid-template-columns: repeat(2, 1fr);
        max-width: 600px;
    }

    .hqd-filter-wrapper {
        flex-direction: column;
        height: auto;
        padding: 16px;
        gap: 16px;
        border-radius: 32px;
    }

    .hqd-category-filters {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }

    .hqd-send-inquiry-btn {
        right: 20px;
        bottom: 20px;
    }

    .hqd-search-input {
        width: 6vw;
    }
}

/* Mobile - 1 column */
@media (max-width: 768px) {
    .hqd-products-header {
        padding: 8.533vw 0 6.4vw;
    }

    .hqd-products-title {
        font-size: 8.533vw;
    }

    .hqd-filter-section {
        padding: 0 4.267vw;
        padding-bottom: 10.667vw;
    }

    .hqd-filter-wrapper {
        max-width: 100%;
        border-radius: 0;
        background: none;
        padding: 0;
        gap: 4.26vw;
    }

    .hqd-category-filters {
        max-width: 100%;
        padding: 2.133vw 4.267vw;
        border-radius: 21.333vw;
        background: #F7F7F7;
        gap: 3.467vw;
    }

    .hqd-filter-btn {
        display: flex;
        height: 8.533vw;
        padding: 1.067vw 4.267vw;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        border-radius: 10.667vw;
        text-align: center;
        font-size: 4.267vw;
    }

    .hqd-search-box {
        padding: 2.667vw 4.533vw;
        align-items: center;
        border-radius: 21.333vw;
        background: #F7F7F7;
        width: 100%;
        gap: 0;
    }

    .hqd-search-form {
        justify-content: space-between;
        gap: inherit;
        display: flex;
        width: 100%;
    }

    .hqd-search-input {
        font-size: 4.267vw;
        width: 68vw;
    }


    .hqd-search-input:focus {
        width: 60vw;
    }

    .hqd-products-grid-wrapper {
        padding: 0 4.267vw;
    }

    .hqd-product-card {
        width: 100%;
        height: 55.467vw;
        border-radius: 4.267vw;
        box-shadow: 0 3.2vw 9.067vw 0 rgba(13, 10, 44, 0.08);
    }

    .hqd-product-features {
        display: none;
    }

    .hqd-search-btn {
        width: 7.467vw;
        height: 7.467vw;
    }

    .hqd-product-image {
        height: 29.333vw;
        width: 100%;
    }

    .hqd-product-info {
        top: 32.267vw;
    }

    .hqd-product-title {
        font-size: 4.267vw;
        margin-bottom: 3.2vw
    }

    .hqd-product-button {
        margin: 0;
    }

    .hqd-explore-btn {
        font-size: 3.733vw;
        width: 36.267vw;
        height: 7.733vw;
        border-radius: 4vw;
        align-items: center;
        display: flex;
        justify-content: center;
        margin: 0 auto;
    }

    .hqd-pagination {
        padding: 10.667vw 0 16vw;
        gap: 1.067vw;
    }

    .hqd-page-btn,
    .hqd-page-number {
        font-size: 4.267vw;
        padding-top: 1.067vw;
        border-radius: 2.133vw;
    }

    .hqd-page-btn {
        padding: 1.067vw 6.4vw;
    }

    .hqd-send-inquiry-btn {
        right: -2vw;
        bottom: 26vw;
        width: 25.6vw;
        height: 28.4vw;
    }

    .inquiry-text {
        font-size: 3.2vw;
        transform: translateY(-2.667vw);
    }

    .hqd-product-archive {
        padding-bottom: 16vw;
    }
}