/* ==========================================================================
   Products Page Styles
   ========================================================================== */

.woppy-admin-card-wide {
    grid-column: 1 / -1;
}

.woppy-products-count {
    font-weight: 600;
    color: #0073aa;
}

/* ==========================================================================
   Search and Filters
   ========================================================================== */

.woppy-products-filters {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.woppy-search-box {
    position: relative;
    max-width: 400px;
}

.woppy-search-input {
    width: 100%;
    padding: 10px 40px 10px 15px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.woppy-search-input:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.woppy-search-box .dashicons {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    font-size: 18px;
}

.woppy-filter-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.woppy-filter-btn {
    padding: 8px 16px;
    font-size: 13px;
    transition: all 0.3s ease;
}

.woppy-filter-btn.button-primary {
    background: #0073aa;
    border-color: #0073aa;
}

/* ==========================================================================
   Products Table
   ========================================================================== */

.woppy-products-table-container {
    overflow-x: auto;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    background: #fff;
}

.woppy-products-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

.woppy-products-table thead {
    background: #f8f9fa;
    border-bottom: 2px solid #e9ecef;
}

.woppy-products-table th {
    padding: 15px 12px;
    text-align: left;
    font-weight: 600;
    color: #333;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.woppy-products-table tbody tr {
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

.woppy-products-table tbody tr:hover {
    background: #f8f9fa;
}

.woppy-products-table tbody tr:last-child {
    border-bottom: none;
}

.woppy-products-table td {
    padding: 15px 12px;
    vertical-align: middle;
}

/* ==========================================================================
   Table Columns
   ========================================================================== */

.woppy-radio-col {
    width: 40px;
    text-align: center;
}

.woppy-image-col {
    width: 80px;
}

.woppy-name-col {
    min-width: 200px;
}

.woppy-sku-col {
    width: 120px;
}

.woppy-product-sku {
    font-size: 13px;
    color: #666;
    font-family: monospace;
    background: #f8f9fa;
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
}

.woppy-price-col {
    width: 120px;
}

.woppy-sortable-link {
    color: #333;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: color 0.2s ease;
}

.woppy-sortable-link:hover {
    color: #0073aa;
}

.woppy-sortable-link .dashicons {
    font-size: 16px;
    color: #0073aa;
}

.woppy-stock-col {
    width: 100px;
}

.woppy-status-col {
    width: 100px;
}

/* ==========================================================================
   Radio Buttons
   ========================================================================== */

.woppy-product-radio {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #0073aa;
}

.woppy-product-radio:checked {
    background: #0073aa;
}

/* ==========================================================================
   Pagination
   ========================================================================== */

.woppy-products-pagination {
    margin: 20px 0;
    padding: 20px 0;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: center;
}

.woppy-products-pagination .page-numbers {
    display: flex;
    gap: 5px;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
    justify-content: center;
}

.woppy-products-pagination .page-numbers li {
    margin: 0;
    display: inline-block;
}

.woppy-products-pagination .page-numbers a,
.woppy-products-pagination .page-numbers span {
    display: inline-block;
    padding: 8px 12px;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    text-decoration: none;
    color: #0073aa;
    transition: all 0.3s ease;
}

.woppy-products-pagination .page-numbers a:hover {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
}

.woppy-products-pagination .page-numbers .current {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
}

/* ==========================================================================
   Product Images
   ========================================================================== */

.woppy-product-image {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.woppy-no-image {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    color: #999;
}

.woppy-no-image .dashicons {
    font-size: 20px;
}

/* ==========================================================================
   Product Info
   ========================================================================== */

.woppy-product-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.woppy-product-name {
    font-size: 14px;
    color: #333;
    line-height: 1.4;
}

.woppy-product-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.woppy-category-tag {
    background: #e9ecef;
    color: #666;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 500;
}

/* ==========================================================================
   Price Info
   ========================================================================== */

.woppy-price-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.woppy-regular-price,
.woppy-sale-price {
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.woppy-sale-price {
    color: #d63384;
}

.woppy-sale-badge {
    background: #d63384;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    align-self: flex-start;
}

/* ==========================================================================
   Stock Badges
   ========================================================================== */

.woppy-stock-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.woppy-stock-in {
    background: #d1e7dd;
    color: #0f5132;
}

.woppy-stock-out {
    background: #f8d7da;
    color: #842029;
}

/* ==========================================================================
   Product Status
   ========================================================================== */

.woppy-product-status {
    font-size: 12px;
    color: #666;
    font-weight: 500;
    text-transform: capitalize;
}

/* ==========================================================================
   Action Buttons
   ========================================================================== */

.woppy-products-actions {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.woppy-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.woppy-action-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.woppy-action-btn .dashicons {
    font-size: 16px;
}

.woppy-btn-count {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 700;
}

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

@media (max-width: 1200px) {
    .woppy-products-table-container {
        font-size: 13px;
    }
    
    .woppy-products-table th,
    .woppy-products-table td {
        padding: 12px 8px;
    }
    
    .woppy-name-col {
        min-width: 150px;
    }
}

@media (max-width: 768px) {
    .woppy-products-filters {
        padding: 15px;
    }
    
    .woppy-filter-buttons {
        flex-direction: column;
    }
    
    .woppy-filter-btn {
        width: 100%;
        text-align: center;
    }
    
    .woppy-products-table {
        font-size: 12px;
    }
    
    .woppy-products-table th,
    .woppy-products-table td {
        padding: 10px 6px;
    }
    
    .woppy-image-col,
    .woppy-status-col {
        display: none;
    }
    
    .woppy-name-col {
        min-width: 120px;
    }
    
    .woppy-price-col,
    .woppy-stock-col {
        width: 80px;
    }
    
    .woppy-products-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .woppy-action-btn {
        justify-content: center;
    }
}

/* ==========================================================================
   Loading Animation
   ========================================================================== */

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.woppy-products-table-container .dashicons-update {
    animation: spin 1s linear infinite;
    display: inline-block;
}

@media (max-width: 480px) {
    .woppy-products-table th,
    .woppy-products-table td {
        padding: 8px 4px;
    }
    
    .woppy-product-image {
        width: 40px;
        height: 40px;
    }
    
    .woppy-no-image {
        width: 40px;
        height: 40px;
    }
    
    .woppy-product-name {
        font-size: 13px;
    }
    
    .woppy-regular-price,
    .woppy-sale-price {
        font-size: 13px;
    }
}




