/* Shared product cards, listing and responsive styles. */

/* .products-section {
    position: relative;
    width: 100%;
    margin-top: 100px;
    padding-bottom: 80px;
} */
.products-section {
    background: var(--white);
}

.products-header {
    text-align: center;
    margin-bottom: 50px;
}

.products-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9.22px 20px;
    background: #A3DEFF;
    border-radius: 138.29px;
    margin-bottom: 20px;
}

.products-badge span {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 15.37px;
    line-height: 19px;
    color: var(--text-primary);
}

.products-title {
    font-family: var(--font-family-inter);
    font-weight: var(--font-weight-600);
    font-size: var(--text-3xl);
    line-height: var(--leading-8);
    text-align: center;
    color: var(--text-primary);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-radius: 20px;
    background: linear-gradient(135deg, #F8FBFF 0%, #E8F4FF 100%);
    gap: 20px;
    padding-inline: 18px;
    padding-block: 18px;
}

.products-grid[data-columns="3"] {
    grid-template-columns: repeat(3, 1fr);
}

.products-grid[data-columns="2"] {
    grid-template-columns: repeat(2, 1fr);
}

.product-card {
    background: #FFFFFF;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
    width: 100%;
    min-width: 280px;
    max-width: 340px;
    margin: 0;
    box-sizing: border-box;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.product-card-inner {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    min-height: 430px;
}

.product-discount-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #FF4757;
    color: #FFFFFF;
    padding: 6px 12px;
    border-radius: 20px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 12px;
    z-index: 2;
}

.product-image {
    width: 200px;
    height: 240px;
    margin: 20px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #FFFFFF;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
}

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

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

.product-info {
    padding: 0 25px 25px 25px;
    display: flex;
    flex-direction: column;
    min-height: auto;
}

.product-title {
    display:flex;
    justify-content: flex-start;
    font-family: var(--font-family-inter);
    font-weight: var(--font-weight-600);
    font-size: var(--text-sm);
    line-height: var(--leading-55);
    color: var(--text-primary);
    margin: 0px;
    min-height: 48px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-title a {
    color: inherit;
    text-decoration: none;
}

.product-title a:hover {
    color: #294AFF;
}

.product-prices {
    /* min-height: 60px; */
    display: flex;
    flex-direction: column;
    /* justify-content: flex-start; */
}

.product-details {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    gap: 8px;
    width: 100%;
    flex-wrap: nowrap;
}

.product-details p {
    margin:0px;
    color: var(--text-secondary);
}

.product-details span {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: var(--text-xl);
    line-height: var(--leading-72);
    color: var(--text-primary);
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    /* width: 100%; */
    max-height: 30px;
}

.data-product-payment {
    font-size: var(--text-xs);
    color: var(--text-secondary);
    margin-bottom: 10px;
    padding: 0px;
}

.product-installment-price {
    margin: 0px;
    padding: 0px;
}

.regular-price {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 18px;
    color: #999999;
    text-decoration: line-through;
    display: block;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.sale-price {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: var(--text-xl);
    line-height: var(--leading-72);
    color: var(--text-primary);
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    min-height: 30px;
}

.product-payment-info {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 12px;
    line-height: 16px;
    color: #666666;
    margin-bottom: 20px;
    min-height: 32px;
}

.btn-buy,
.btn-out-of-stock {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 15px 20px;
    border: none;
    border-radius: 2px;
    font-family: var(--font-family-inter);
    font-weight: var(--font-weight-600);
    font-size: var(--text-sm);
    line-height: var(--leading-41);
    cursor: var(--cursor-pointer);
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-buy {
    background: linear-gradient(135deg, #1FD3FF 0%, #294AFF 100%);
    color: #FFFFFF;
}

.btn-buy:hover {
    background: linear-gradient(135deg #1ab8db 0%, #1e3acc 100%);
    transform: translateY(-2px);
}

.btn-out-of-stock {
    background: #E0E0E0;
    color: #999999;
    cursor: not-allowed;
}

.cart-icon {
    width: 18px;
    height: 18px;
}

.products-footer {
    text-align: center;
    margin-top: 50px;
}

.view-all-products {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 16px;
    line-height: 20px;
    color: #1B5A9B;
    text-decoration: none;
    padding: 15px 30px;
    border: 2px solid #1B5A9B;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.view-all-products:hover {
    background: #1B5A9B;
    color: #FFFFFF;
    transform: translateY(-2px);
}

@media (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }

}

@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .product-image {
        width: 150px;
        height: 190px;
        margin: 15px auto;
    }

    .product-title {
        font-size: 16px;
        line-height: 22px;
        min-height: auto;
    }

    .sale-price {
        font-size: 24px;
        line-height: 30px;
    }

    .product-payment-info {
        font-size: 11px;
        min-height: auto;
    }

}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .product-card {
        max-width: 400px;
        margin: 0 auto;
    }

    .product-image {
        width: 150px;
        height: 190px;
    }

    .product-title {
        font-size: 20px;
        line-height: 26px;
        min-height: auto;
    }

    .sale-price {
        font-size: 26px;
        line-height: 32px;
    }

    .product-payment-info {
        font-size: 14px;
        min-height: auto;
    }

}

@media (max-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 25px;
        max-width: 1200px;
    }

    .product-card {
        max-width: 360px;
    }

}

@media (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        max-width: 800px;
    }

    .product-card {
        max-width: 380px;
        margin: 0 auto;
    }

    .product-image {
        width: 180px;
        height: 220px;
        margin: 20px auto;
    }

    .product-info {
        padding: 0 20px 20px 20px;
    }

    .product-title {
        font-size: 17px;
        line-height: 23px;
        min-height: 46px;
    }

    .sale-price {
        font-size: 28px;
        line-height: 34px;
    }

}

@media (max-width: 768px) {
    .products-section {
        margin-top: 60px;
        padding-bottom: 60px;
    }

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

    .products-grid::before {
        top: -15px;
        left: -15px;
        right: -15px;
        bottom: -15px;
        border-radius: 15px;
    }

    .product-card {
        max-width: 100%;
        min-width: 260px;
    }

    .product-card-inner {
        min-height: 400px;
    }

    .product-image {
        width: 160px;
        height: 200px;
        margin: 15px auto;
    }

    .product-info {
        padding: 0 15px 15px 15px;
        min-height: 160px;
    }

    .product-title {
        font-size: 16px;
        line-height: 22px;
        min-height: 44px;
        margin-bottom: 10px;
    }

    .product-prices {
        min-height: 50px;
        margin-bottom: 8px;
    }

    .regular-price {
        font-size: 13px;
        line-height: 16px;
    }

    .sale-price {
        font-size: 24px;
        line-height: 30px;
        min-height: 30px;
    }

    .product-payment-info {
        font-size: 11px;
        line-height: 14px;
        min-height: 28px;
        margin-bottom: 15px;
    }

    .btn-buy,
    .btn-out-of-stock {
        padding: 12px 15px;
        font-size: 13px;
        line-height: 16px;
    }

}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        max-width: 400px;
    }

    .product-card {
        max-width: 350px;
        margin: 0 auto;
    }

    .product-card-inner {
        min-height: 450px;
    }

    .product-image {
        width: 180px;
        height: 220px;
        margin: 20px auto;
    }

    .product-info {
        padding: 0 20px 20px 20px;
        min-height: 180px;
    }

    .product-title {
        font-size: 18px;
        line-height: 24px;
        min-height: 48px;
        margin-bottom: 15px;
    }

    .product-prices {
        min-height: 55px;
        margin-bottom: 10px;
    }

    .sale-price {
        font-size: 28px;
        line-height: 34px;
        min-height: 34px;
    }

    .product-payment-info {
        font-size: 12px;
        line-height: 16px;
        min-height: 32px;
        margin-bottom: 20px;
    }

    .btn-buy,
    .btn-out-of-stock {
        padding: 15px 20px;
        font-size: 14px;
        line-height: 18px;
    }

}

@media (hover: none) and (pointer: coarse) {
    .btn-buy,
    .btn-out-of-stock {
        min-height: 44px; /* Apple's recommended minimum touch target */
        min-width: 44px;
    }

    .product-card:hover {
        transform: none; /* Disable hover effects on touch devices */
    }
}