/**
 * Annapoorna WooCommerce Complete - Product Tabs Styles
 *
 * @package Annapoorna_WooCommerce_Complete
 * @version 2.0.0
 */

/* ============================================
   Main Wrapper
   ============================================ */
.wc-category-tabs-wrapper {
    margin: 40px 0;
    padding: 0;
}

/* ============================================
   Tab Navigation
   ============================================ */
.wcct-tabs-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
    padding: 0;
    list-style: none;
    border-bottom: 2px solid #e0e0e0;
}

.wcct-tabs-nav li {
    margin: 0;
    padding: 0;
}

.wcct-tabs-nav button {
    padding: 12px 24px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: #666;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    margin-bottom: -2px;
}

.wcct-tabs-nav button:hover {
    color: #4CAF50;
    background-color: rgba(76, 175, 80, 0.05);
}

.wcct-tabs-nav button.active {
    color: #4CAF50;
    border-bottom-color: #4CAF50;
    background-color: rgba(76, 175, 80, 0.08);
}

.wcct-tabs-nav button .tab-count {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 8px;
    background: #e0e0e0;
    color: #666;
    font-size: 12px;
    font-weight: 600;
    border-radius: 12px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.wcct-tabs-nav button.active .tab-count {
    background: #4CAF50;
    color: #fff;
}

/* ============================================
   Tab Content Area
   ============================================ */
.wcct-tab-content {
    position: relative;
    min-height: 300px;
}

/* ============================================
   Products Grid
   ============================================ */
.wcct-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

/* ============================================
   Product Card
   ============================================ */
.wcct-product-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    position: relative;
}

.wcct-product-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transform: translateY(-4px);
}

/* Product Image */
.wcct-product-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1;
    background: #f5f5f5;
}

.wcct-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.wcct-product-card:hover .wcct-product-image img {
    transform: scale(1.05);
}

/* Product Badges */
.wcct-product-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 2;
}

.wcct-badge {
    display: inline-block;
    padding: 4px 10px;
    background: #ff5722;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

.wcct-badge.sale {
    background: #ff5722;
}

.wcct-badge.featured {
    background: #4CAF50;
}

.wcct-badge.out-of-stock {
    background: #9e9e9e;
}

/* Quick View Button */
.wcct-quick-view-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 12px 24px;
    background: #4CAF50;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 3;
}

.wcct-product-card:hover .wcct-quick-view-btn {
    opacity: 1;
}

.wcct-quick-view-btn:hover {
    background: #45a049;
}

/* Product Details */
.wcct-product-details {
    padding: 20px;
}

.wcct-product-category {
    display: block;
    margin-bottom: 6px;
    color: #999;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wcct-product-title {
    margin: 0 0 10px 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
}

.wcct-product-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.wcct-product-title a:hover {
    color: #4CAF50;
}

.wcct-product-excerpt {
    margin: 0 0 15px 0;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

/* Product Footer */
.wcct-product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

.wcct-product-price {
    font-size: 18px;
    font-weight: 700;
    color: #4CAF50;
}

.wcct-product-price del {
    display: block;
    margin-bottom: 4px;
    color: #999;
    font-size: 14px;
    font-weight: 400;
}

.wcct-add-to-cart-btn {
    padding: 10px 20px;
    background: #4CAF50;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.wcct-add-to-cart-btn:hover {
    background: #45a049;
}

.wcct-add-to-cart-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* ============================================
   Pagination
   ============================================ */
.wcct-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 40px;
}

.wcct-pagination button,
.wcct-pagination span {
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    background: #fff;
    border: 1px solid #e0e0e0;
    color: #666;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.wcct-pagination button:hover {
    background: #4CAF50;
    border-color: #4CAF50;
    color: #fff;
}

.wcct-pagination button.active {
    background: #4CAF50;
    border-color: #4CAF50;
    color: #fff;
}

.wcct-pagination button:disabled {
    background: #f5f5f5;
    border-color: #e0e0e0;
    color: #ccc;
    cursor: not-allowed;
}

.wcct-pagination .page-dots {
    border: none;
    cursor: default;
}

/* ============================================
   Loading State
   ============================================ */
.wcct-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.wcct-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #4CAF50;
    border-radius: 50%;
    animation: wcct-spin 1s linear infinite;
}

@keyframes wcct-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ============================================
   Error State
   ============================================ */
.wcct-error-message {
    padding: 40px;
    text-align: center;
    background: #ffebee;
    border: 1px solid #ffcdd2;
    border-radius: 8px;
    margin: 20px 0;
}

.wcct-error-message h3 {
    margin: 0 0 15px 0;
    color: #c62828;
    font-size: 18px;
}

.wcct-error-message p {
    margin: 0 0 20px 0;
    color: #666;
    font-size: 14px;
}

.wcct-retry-btn {
    padding: 12px 24px;
    background: #ff5722;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.wcct-retry-btn:hover {
    background: #e64a19;
}

/* ============================================
   Empty State
   ============================================ */
.wcct-empty-state {
    padding: 60px 40px;
    text-align: center;
    color: #999;
}

.wcct-empty-state svg {
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
    opacity: 0.3;
}

.wcct-empty-state h3 {
    margin: 0 0 10px 0;
    color: #666;
    font-size: 20px;
}

.wcct-empty-state p {
    margin: 0;
    color: #999;
    font-size: 14px;
}

/* ============================================
   Quick View Modal
   ============================================ */
.wcct-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.wcct-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.wcct-modal-content {
    background: #fff;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 12px;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.wcct-modal-overlay.active .wcct-modal-content {
    transform: scale(1);
}

.wcct-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: #fff;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.wcct-modal-close:hover {
    background: #ff5722;
    color: #fff;
}

.wcct-modal-body {
    padding: 40px;
}

.wcct-modal-product {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.wcct-modal-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.wcct-modal-details h2 {
    margin: 0 0 15px 0;
    font-size: 28px;
    color: #333;
}

.wcct-modal-price {
    font-size: 24px;
    font-weight: 700;
    color: #4CAF50;
    margin-bottom: 20px;
}

.wcct-modal-description {
    margin-bottom: 30px;
    color: #666;
    line-height: 1.6;
}

.wcct-modal-add-to-cart {
    padding: 15px 40px;
    background: #4CAF50;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.wcct-modal-add-to-cart:hover {
    background: #45a049;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 1024px) {
    .wcct-products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .wcct-tabs-nav {
        gap: 5px;
    }

    .wcct-tabs-nav button {
        padding: 10px 16px;
        font-size: 14px;
    }

    .wcct-products-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }

    .wcct-product-details {
        padding: 15px;
    }

    .wcct-product-title {
        font-size: 14px;
    }

    .wcct-product-price {
        font-size: 16px;
    }

    .wcct-add-to-cart-btn {
        padding: 8px 16px;
        font-size: 12px;
    }

    .wcct-modal-product {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .wcct-modal-body {
        padding: 20px;
    }

    .wcct-modal-close {
        top: 10px;
        right: 10px;
        width: 35px;
        height: 35px;
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .wcct-products-grid {
        grid-template-columns: 1fr;
    }

    .wcct-tabs-nav {
        flex-direction: column;
    }

    .wcct-tabs-nav button {
        width: 100%;
        text-align: left;
    }

    .wcct-pagination {
        gap: 5px;
    }

    .wcct-pagination button,
    .wcct-pagination span {
        min-width: 35px;
        height: 35px;
        font-size: 12px;
    }
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    .wcct-tabs-nav,
    .wcct-pagination,
    .wcct-quick-view-btn,
    .wcct-add-to-cart-btn {
        display: none;
    }
}
