/**
 * Products Widget Styles
 * @package OpenCom_UI_Kit
 * @since 2.2.0
 */

/* ========================================
   Products Category Wrapper
   ======================================== */
.products-category {
    width: 100%;
}

.category-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--opencom-gray-200);
}

.category-title {
    margin: 0;
    font-family: var(--opencom-font-heading);
    font-size: clamp(1.25rem, 2vw, 1.5rem);
    line-height: 1.3;
    color: var(--opencom-gray-900);
    font-weight: 700;
}

.category-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-family: var(--opencom-font-body);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: normal;
    color: var(--opencom-gray-700);
}

/* ========================================
   Products Grid
   ======================================== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

/* ========================================
   Product Card
   ======================================== */
.product-card {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    border: 1px solid var(--opencom-gray-200);
    border-radius: var(--opencom-radius-xl);
    background: var(--opencom-white);
    box-shadow: var(--opencom-shadow-sm);
    overflow: hidden;
    transition: transform var(--opencom-transition-base), box-shadow var(--opencom-transition-base), border-color var(--opencom-transition-base);
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--opencom-shadow-lg);
    border-color: var(--opencom-gray-300);
}

.product-card-content {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 12px;
    padding: 20px 20px 16px;
}

.product-title {
    margin: 0;
    font-family: var(--opencom-font-heading);
    font-size: 1.05rem;
    line-height: 1.35;
    color: var(--opencom-gray-900);
    font-weight: 700;
}

.product-terms {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
}

.product-term {
    display: inline-flex;
    align-items: center;
    font-family: var(--opencom-font-body);
    font-size: 0.72rem;
    line-height: 1.2;
    font-weight: 600;
    color: var(--opencom-gray-600);
}

.product-text {
    margin: 0;
    font-family: var(--opencom-font-body);
    font-size: 0.92rem;
    line-height: 1.6;
    color: var(--opencom-gray-600);
}

.product-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 20px 20px;
    border-top: 1px solid var(--opencom-gray-100);
}

/* ========================================
   Product Status
   ======================================== */
.product-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border-radius: var(--opencom-radius-full);
    font-family: var(--opencom-font-body);
    font-size: 0.72rem;
    line-height: 1.2;
    font-weight: 500;
    letter-spacing: 0.03em;
    text-transform: capitalize;
}

.product-status--available {
    color: var(--opencom-success-700);
    background: var(--opencom-success-100);
}

.product-status--in-progress {
    color: var(--opencom-blue-600);
    background: color-mix(in oklch, var(--opencom-blue-600) 12%, white);
}

.product-status--coming-soon {
    color: var(--opencom-warm-700);
    background: var(--opencom-warm-100);
}

.product-status .product-status-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    margin-right: 4px;
    border-radius: 50%;
    background: currentColor;
    vertical-align: middle;
}

/* ========================================
   Download Action
   ======================================== */
.product-download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    white-space: nowrap;
    padding: 8px 12px;
    border-radius: var(--opencom-radius-md);
    border: 1px solid var(--opencom-primary-300);
    background: var(--opencom-white);
    color: var(--opencom-primary-700);
    font-family: var(--opencom-font-body);
    font-size: 0.84rem;
    font-weight: 600;
    transition: all var(--opencom-transition-base);
}

.product-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: var(--opencom-radius-md);
    background: var(--opencom-primary-100);
    color: var(--opencom-primary-700);
}

.product-card-icon i,
.product-card-icon svg {
    width: 20px;
    height: 20px;
    display: block;
}

.product-card-icon i::before {
    font-size: 20px;
}

.product-download svg {
    width: 18px;
    height: 18px;
    display: block;
}

.product-download:hover,
.product-download:focus-visible {
    border-color: var(--opencom-primary-500);
    color: var(--opencom-primary-800);
    background: var(--opencom-primary-50);
}

.product-download--disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
    border-color: var(--opencom-gray-300);
    color: var(--opencom-gray-500);
    background: var(--opencom-gray-100);
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 767px) {
    .category-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .product-card-footer {
        flex-wrap: wrap;
    }

    .product-download {
        width: 100%;
    }
}
