/* HardLevel Plugin Styles */

/* Admin Page Styles */
.hardlevel-admin-wrap {
    max-width: none !important;
    margin-right: 20px;
}

.hardlevel-admin-wrap .card {
    max-width: none;
    margin-bottom: 20px;
}

.hardlevel-admin-wrap .form-table {
    width: 100%;
}

.hardlevel-admin-wrap .wp-list-table {
    width: 100%;
    table-layout: auto;
}

.hardlevel-admin-wrap .wp-list-table th,
.hardlevel-admin-wrap .wp-list-table td {
    padding: 12px;
    word-wrap: break-word;
}

/* Responsive columns */
.hardlevel-admin-wrap .wp-list-table th:nth-child(1),
.hardlevel-admin-wrap .wp-list-table td:nth-child(1) {
    width: 15%;
}

.hardlevel-admin-wrap .wp-list-table th:nth-child(2),
.hardlevel-admin-wrap .wp-list-table td:nth-child(2) {
    width: 15%;
}

.hardlevel-admin-wrap .wp-list-table th:nth-child(3),
.hardlevel-admin-wrap .wp-list-table td:nth-child(3) {
    width: 25%;
}

.hardlevel-admin-wrap .wp-list-table th:nth-child(7),
.hardlevel-admin-wrap .wp-list-table td:nth-child(7) {
    width: 20%;
}

/* Ads Styles */
.hardlevel-header-ads,
.hardlevel-footer-ads {
    margin: 20px 0;
    text-align: center;
}

.hardlevel-post-ad {
    margin: 20px 0;
    padding: 15px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 5px;
    text-align: center;
}

.hardlevel-ad {
    margin: 10px 0;
}

/* Ad Groups Styles */
.hardlevel-ad-group {
    margin: 20px 0;
    padding: 15px;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    background: #fafafa;
}

.hardlevel-ad-item {
    margin: 10px 0;
    padding: 10px;
    background: #fff;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.hardlevel-ad-item:last-child {
    margin-bottom: 0;
}

/* Admin Styles */
.status-active {
    color: #46b450;
    font-weight: bold;
}

.status-inactive {
    color: #dc3232;
    font-weight: bold;
}

/* Shortcode containers */
.hl-product-single,
.hl-products-list,
.hl-products-grid,
.hl-categories-list {
    margin: 20px 0;
    clear: both;
}

/* Single product styles */
.hl-product-single {
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    padding: 20px;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.hl-product-single h3 {
    margin: 15px 0 10px 0;
    color: #333;
    font-size: 24px;
    line-height: 1.3;
}

.hl-product-single img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    margin-bottom: 15px;
}

.hl-product-description {
    margin: 15px 0;
    color: #666;
    line-height: 1.6;
}

.hl-product-price {
    font-size: 20px;
    font-weight: bold;
    color: #0073aa;
    margin: 15px 0;
}

/* Products list styles */
.hl-products-list .hl-product-item {
    display: flex;
    align-items: center;
    border: 1px solid #e1e1e1;
    border-radius: 6px;
    padding: 15px;
    margin: 12px 0;
    background: #fafafa;
    transition: background-color 0.2s ease;
}

.hl-products-list .hl-product-item:hover {
    background: #f0f0f0;
}

.hl-products-list .hl-product-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 15px;
}

.hl-products-list .hl-product-info {
    flex: 1;
}

.hl-products-list .hl-product-info h4 {
    margin: 0 0 8px 0;
    color: #333;
    font-size: 16px;
    line-height: 1.3;
}

.hl-products-list .hl-product-info .price {
    color: #0073aa;
    font-weight: bold;
    margin: 5px 0;
}

.hl-products-list .hl-product-info a {
    color: #0073aa;
    text-decoration: none;
    font-size: 14px;
}

.hl-products-list .hl-product-info a:hover {
    text-decoration: underline;
}

/* Products grid styles */
.hl-products-grid {
    display: flex;
    flex-wrap: wrap;
    margin: 20px -1%;
}

.hl-product-grid-item {
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin: 1%;
    flex: 1 1 calc(33.333% - 2%);
    min-width: 250px;
}

.hl-product-grid-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.hl-product-grid-item img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.hl-product-grid-item .content {
    padding: 15px;
}

.hl-product-grid-item h4 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 16px;
    line-height: 1.3;
    height: 2.6em;
    overflow: hidden;
}

.hl-product-grid-item .price {
    color: #0073aa;
    font-weight: bold;
    margin: 10px 0;
    font-size: 16px;
}

.hl-product-grid-item a.button {
    display: inline-block;
    background: #0073aa;
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    margin-top: 10px;
    transition: background-color 0.2s ease;
}

.hl-product-grid-item a.button:hover {
    background: #005a87;
}

/* Categories list styles */
.hl-categories-list {
    margin: 20px 0;
}

.hl-category-item {
    display: inline-block;
    margin: 6px;
    padding: 8px 16px;
    background: #f8f9fa;
    border: 1px solid #e1e1e1;
    border-radius: 20px;
    font-size: 14px;
    color: #333;
    transition: background-color 0.2s ease;
}

.hl-category-item:hover {
    background: #e9ecef;
}

/* Messages */
.hl-error {
    background: #fff5f5;
    border: 1px solid #fed7d7;
    color: #c53030;
    padding: 12px 16px;
    border-radius: 4px;
    margin: 10px 0;
}

.hl-info {
    background: #ebf8ff;
    border: 1px solid #bee3f8;
    color: #2b6cb0;
    padding: 12px 16px;
    border-radius: 4px;
    margin: 10px 0;
}

.hl-success {
    background: #f0fff4;
    border: 1px solid #9ae6b4;
    color: #276749;
    padding: 12px 16px;
    border-radius: 4px;
    margin: 10px 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hl-products-list .hl-product-item {
        flex-direction: column;
        text-align: center;
    }
    
    .hl-products-list .hl-product-item img {
        margin: 0 0 15px 0;
    }
    
    .hl-product-grid-item {
        flex: 1 1 calc(50% - 2%);
        min-width: 200px;
    }
}

@media (max-width: 480px) {
    .hl-product-grid-item {
        flex: 1 1 calc(100% - 2%);
    }
    
    .hl-product-single {
        padding: 15px;
    }
    
    .hl-category-item {
        margin: 3px;
        padding: 6px 12px;
        font-size: 13px;
    }
}
