/* Premium WooCommerce Product Tabs Base Styles */
.premium-woo-product-tabs-widget {
    position: relative;
    width: 100%;
}

.premium-tabs-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
    gap: 12px;
}

/* Horizontal Scroll on Mobile */
.premium-tabs-scroll-mobile-yes .premium-tabs-header {
    @media (max-width: 767px) {
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start !important;
        padding-bottom: 12px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
}
.premium-tabs-scroll-mobile-yes .premium-tabs-header::-webkit-scrollbar {
    display: none;
}

.premium-tab-pill {
    background: #f5f5f5;
    color: #222222;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 30px;
    transition: all 0.3s ease;
    outline: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.premium-tab-pill:hover,
.premium-tab-pill.is-active {
    background: #111111;
    color: #ffffff;
}

.premium-tab-count {
    font-size: 11px;
    opacity: 0.8;
}

/* Product Grid Layout */
.premium-products-grid-container {
    position: relative;
}

.premium-products-grid {
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.premium-products-grid-content {
    display: contents;
    transition: opacity 0.3s ease;
}

/* Loader Animation overlay */
.premium-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.premium-loading-overlay.is-loading {
    opacity: 1;
    pointer-events: auto;
}

.premium-loader-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #ccc;
    border-top-color: #111111;
    border-radius: 50%;
    animation: premium-spin 0.8s linear infinite;
}

@keyframes premium-spin {
    to { transform: rotate(360deg); }
}

/* Product Card Elements */
.premium-product-card {
    background-color: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.premium-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.premium-product-image-wrap {
    position: relative;
    width: 100%;
    overflow: hidden;
    margin-bottom: 15px;
    border-radius: 8px;
}

.premium-product-image-wrap img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.premium-product-card:hover .premium-product-image-wrap img {
    transform: scale(1.06);
}

/* Badges styling */
.premium-card-badge {
    position: absolute;
    top: 10px;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 4px;
    z-index: 2;
}

.sale-badge {
    left: 10px;
    background: #ff4444;
    color: #ffffff;
}

.discount-badge {
    right: 10px;
    background: #ffbb00;
    color: #111111;
}

/* Content Panel */
.premium-product-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.premium-product-category {
    font-size: 11px;
    text-transform: uppercase;
    color: #888888;
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}

.premium-product-title {
    font-size: 16px;
    line-height: 1.4;
    font-weight: 600;
    margin: 0 0 10px 0;
}

.premium-product-title a {
    color: #111111;
    text-decoration: none;
    transition: color 0.2s ease;
}

.premium-product-title a:hover {
    color: #0073aa;
}

.premium-product-description {
    font-size: 13px;
    color: #666666;
    margin: 0 0 12px 0;
    line-height: 1.5;
}

.premium-product-rating {
    margin-bottom: 10px;
}

.premium-product-rating .star-rating {
    font-size: 14px;
    color: #f5a623;
}

.premium-product-price {
    font-size: 18px;
    font-weight: 700;
    color: #111111;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.premium-product-price del {
    font-size: 14px;
    font-weight: 400;
    color: #999999;
}

.premium-product-price ins {
    text-decoration: none;
}

.premium-product-action-footer {
    margin-top: auto;
}

.premium-product-btn {
    display: block;
    width: 100%;
    text-align: center;
    background-color: #111111;
    color: #ffffff;
    text-decoration: none;
    font-weight: 700;
    font-size: 13px;
    padding: 12px 24px;
    border-radius: 6px;
    transition: background-color 0.3s ease, color 0.3s ease;
    border: none;
    cursor: pointer;
}

.premium-product-btn:hover {
    background-color: #333333;
    color: #ffffff;
}

.premium-tabs-no-products {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: #777777;
    background: #fdfdfd;
    border: 1px dashed #e1e1e1;
    border-radius: 8px;
}

/* Responsive Grid Columns override logic inside desktop theme queries */
@media (max-width: 1024px) {
    .premium-products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (max-width: 768px) {
    .premium-products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 480px) {
    .premium-products-grid {
        grid-template-columns: repeat(1, 1fr);
    }
}
