/* Shopglut Tabs Frontend Styles */

.shopglut-tabs {
    position: relative;
    width: 100%;
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Tab Navigation - Horizontal Layout (default) */
.shopglut-tabs .tab-nav {
    display: flex;
    gap: 2px;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 20px;
    background: #f8f9fa;
    border-radius: 8px 8px 0 0;
    overflow: hidden;
}

/* Vertical Layout Styles */
.shopglut-tabs.vertical-layout {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.shopglut-tabs.vertical-layout .tab-nav {
    flex-direction: column;
    border-bottom: none;
    border-right: 2px solid #e0e0e0;
    margin-bottom: 0;
    margin-right: 0;
    border-radius: 8px 0 0 8px;
    min-width: 200px;
    flex-shrink: 0;
}

.shopglut-tabs.vertical-layout .tab-content {
    flex: 1;
    min-width: 0;
}

.shopglut-tabs .tab-btn {
    flex: 1;
    background: transparent !important;
    color: #666 !important;
    border: none !important;
    padding: 15px 20px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer;
    transition: all 0.3s ease !important;
    position: relative;
    margin: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    text-transform: none !important;
    line-height: 1.4 !important;
    min-height: auto !important;
    height: auto !important;
}

.shopglut-tabs .tab-btn:hover {
    background: #e9ecef !important;
    color: #333 !important;
}

.shopglut-tabs .tab-btn.active {
    background: #fff !important;
    color: #0073aa !important;
    border-bottom: 3px solid #0073aa !important;
}

/* Vertical layout active button styles */
.shopglut-tabs.vertical-layout .tab-btn.active {
    border-bottom: none !important;
    border-right: 3px solid #0073aa !important;
}

.shopglut-tabs .tab-btn:focus {
    outline: 2px solid #0073aa;
    outline-offset: -2px;
}

.shopglut-tabs .tab-btn.switching {
    transform: scale(0.98);
    opacity: 0.7;
}

/* Loading animation for better UX */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

.shopglut-tabs .tab-panel {
    opacity: 1;
    transition: opacity 0.3s ease;
}

.shopglut-tabs .tab-panel:not(.active) {
    opacity: 0;
    pointer-events: none;
}

/* Enhanced hover effects */
.shopglut-tabs .tab-btn {
    position: relative;
    overflow: hidden;
}

.shopglut-tabs .tab-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.shopglut-tabs .tab-btn:hover::before {
    left: 100%;
}

/* Tab Content */
.shopglut-tabs .tab-content {
    position: relative;
}

.shopglut-tabs .tab-panel {
    display: none;
    animation: fadeIn 0.3s ease;
}

.shopglut-tabs .tab-panel.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Product Content Layout */
.shopglut-tabs .product-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    border: 1px solid #f0f0f0;
    transition: all 0.3s ease;
}

.shopglut-tabs .product-content:hover {
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}

.shopglut-tabs .product-image {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 10px;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.shopglut-tabs .product-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%);
    z-index: 1;
    pointer-events: none;
}

.shopglut-tabs .product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.4s ease;
    border-radius: 8px;
}

.shopglut-tabs .product-content:hover .product-image img {
    transform: scale(1.08) rotate(1deg);
}

.shopglut-tabs .product-image a {
    display: block;
    width: 100%;
    height: 100%;
}

.shopglut-tabs .product-details {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.shopglut-tabs .product-title {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.3;
    color: #2c3e50;
    text-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.shopglut-tabs .product-title a {
    color: inherit;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.shopglut-tabs .product-title a:hover {
    color: #3498db;
}

.shopglut-tabs .product-title a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #3498db, #2980b9);
    transition: width 0.3s ease;
}

.shopglut-tabs .product-title a:hover::after {
    width: 100%;
}

.shopglut-tabs .product-description {
    font-size: 16px;
    line-height: 1.6;
    color: #666;
    margin: 0;
    padding: 15px 0;
    border-top: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
}

.shopglut-tabs .product-price {
    font-size: 28px;
    font-weight: 800;
    color: #27ae60;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
    margin: 10px 0;
}

.shopglut-tabs .product-price del {
    color: #95a5a6;
    font-weight: 400;
    font-size: 20px;
    margin-right: 10px;
    text-decoration: line-through;
}

.shopglut-tabs .product-price ins {
    text-decoration: none;
    color: #e74c3c;
}

.shopglut-tabs .product-cart {
    margin-top: auto;
    padding-top: 15px;
}

.shopglut-tabs .add-to-cart-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white !important;
    padding: 12px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.shopglut-tabs .add-to-cart-btn:hover {
    background: linear-gradient(135deg, #2980b9 0%, #21618c 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
    color: white !important;
}

.shopglut-tabs .add-to-cart-btn:active {
    transform: translateY(0);
}

.shopglut-tabs .add-to-cart-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* Preview specific styles */
.shopglut-tabs-preview .product-content {
    border: 2px dashed #ddd;
    background: #fafafa;
}

.shopglut-tabs-preview .product-title {
    font-size: 20px;
}

.shopglut-tabs-preview .product-price {
    font-size: 22px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .shopglut-tabs .product-content {
        grid-template-columns: 1fr 1.5fr;
        gap: 20px;
        padding: 20px;
    }
    
    .shopglut-tabs .product-title {
        font-size: 22px;
    }
    
    .shopglut-tabs .product-price {
        font-size: 24px;
    }
}

@media (max-width: 768px) {
    .shopglut-tabs .tab-btn {
        padding: 12px 15px !important;
        font-size: 13px !important;
    }
    
    .shopglut-tabs .product-content {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px;
        text-align: center;
    }
    
    .shopglut-tabs .product-image {
        max-width: 300px;
        margin: 0 auto;
    }
    
    .shopglut-tabs .product-details {
        gap: 12px;
    }
    
    .shopglut-tabs .product-title {
        font-size: 20px;
    }
    
    .shopglut-tabs .product-description {
        font-size: 15px;
        padding: 12px 0;
    }
    
    .shopglut-tabs .product-price {
        font-size: 24px;
    }
    
    .shopglut-tabs .add-to-cart-btn {
        padding: 15px 30px;
        font-size: 16px;
        width: 100%;
        max-width: 280px;
        margin: 0 auto;
    }
    
    /* Vertical layout becomes horizontal on mobile */
    .shopglut-tabs.vertical-layout {
        flex-direction: column;
    }
    
    .shopglut-tabs.vertical-layout .tab-nav {
        flex-direction: row;
        border-right: none;
        border-bottom: 2px solid #e0e0e0;
        margin-right: 0;
        margin-bottom: 20px;
        border-radius: 8px 8px 0 0;
        min-width: auto;
        width: 100%;
    }
    
    .shopglut-tabs.vertical-layout .tab-btn.active {
        border-right: none !important;
        border-bottom: 3px solid #0073aa !important;
    }
}

@media (max-width: 480px) {
    .shopglut-tabs {
        margin: 15px 0;
    }
    
    .shopglut-tabs .tab-nav {
        flex-wrap: wrap;
        gap: 2px;
        margin-bottom: 15px;
    }
    
    .shopglut-tabs .tab-btn {
        text-align: center;
        padding: 12px 10px !important;
        font-size: 12px !important;
        flex: 1;
        min-width: 120px;
        word-break: break-word;
    }
    
    .shopglut-tabs .product-content {
        padding: 15px;
        gap: 15px;
        border-radius: 8px;
    }
    
    .shopglut-tabs .product-image {
        max-width: 250px;
    }
    
    .shopglut-tabs .product-title {
        font-size: 18px;
        margin-bottom: 8px;
    }
    
    .shopglut-tabs .product-description {
        font-size: 14px;
        padding: 10px 0;
    }
    
    .shopglut-tabs .product-price {
        font-size: 22px;
    }
    
    .shopglut-tabs .add-to-cart-btn {
        padding: 12px 20px;
        font-size: 14px;
        width: 100%;
    }
}