/**
 * BWA Store Frontend Styles
 */

/* Product Grid */
.bwa-products-grid {
    display: grid;
    gap: 30px;
    margin: 30px 0;
}

.bwa-products-grid.bwa-columns-2 {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.bwa-products-grid.bwa-columns-3 {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.bwa-products-grid.bwa-columns-4 {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

/* Product Card */
.bwa-product-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.bwa-product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
    border-color: #667eea;
}

.bwa-product-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.bwa-product-title {
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
    flex: 1;
}

.bwa-product-badge {
    display: inline-block;
    padding: 4px 12px;
    background: #667eea;
    color: #fff;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    margin-left: 12px;
}

.bwa-product-description {
    color: #6b7280;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 16px;
    flex-grow: 1;
}

.bwa-product-features {
    margin-bottom: 20px;
}

.bwa-product-features ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.bwa-product-features li {
    padding: 8px 0;
    padding-left: 24px;
    position: relative;
    color: #4b5563;
    font-size: 14px;
}

.bwa-product-features li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #10b981;
    font-weight: bold;
}

.bwa-product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.bwa-product-price {
    font-size: 28px;
    font-weight: 700;
    color: #667eea;
}

.bwa-price-period {
    font-size: 14px;
    color: #6b7280;
    font-weight: 400;
}

.bwa-buy-button {
    background: #667eea;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.bwa-buy-button:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.bwa-buy-button:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
}

/* Product Types */
.bwa-product-type-ebook {
    border-left: 4px solid #3b82f6;
}

.bwa-product-type-subscription {
    border-left: 4px solid #8b5cf6;
}

.bwa-product-type-bundle {
    border-left: 4px solid #f59e0b;
}

/* Account Page */
.bwa-account {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.bwa-account h2 {
    font-size: 32px;
    color: #1f2937;
    margin-bottom: 30px;
}

.bwa-account-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.bwa-account-table thead {
    background: #f9fafb;
}

.bwa-account-table th {
    padding: 16px;
    text-align: left;
    font-weight: 600;
    color: #374151;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bwa-account-table td {
    padding: 16px;
    border-top: 1px solid #e5e7eb;
    color: #4b5563;
}

.bwa-account-table tr:hover {
    background: #f9fafb;
}

.bwa-status-active {
    display: inline-block;
    padding: 4px 12px;
    background: #d1fae5;
    color: #065f46;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.bwa-status-cancelled,
.bwa-status-expired {
    display: inline-block;
    padding: 4px 12px;
    background: #fee2e2;
    color: #991b1b;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.bwa-cancel-subscription {
    background: #ef4444;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.bwa-cancel-subscription:hover {
    background: #dc2626;
}

/* Responsive */
@media (max-width: 768px) {
    .bwa-products-grid {
        grid-template-columns: 1fr;
    }
    
    .bwa-product-footer {
        flex-direction: column;
        gap: 16px;
    }
    
    .bwa-buy-button {
        width: 100%;
    }
    
    .bwa-account-table {
        font-size: 14px;
    }
    
    .bwa-account-table th,
    .bwa-account-table td {
        padding: 12px 8px;
    }
}
