/**
 * PRODUCT TABS & REVIEWS - IMPROVED DESIGN
 * Modern tabs, reviews, and description sections
 */

:root {
    --tab-primary: #007bff;
    --tab-border: #e0e0e0;
    --tab-bg: #ffffff;
    --tab-hover: #f8f9fa;
    --tab-active: #007bff;
    --tab-text: #212529;
    --tab-muted: #6c757d;
    --tab-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* ===== PRODUCT TABS NAVIGATION ===== */
.nav-tabs {
    border-bottom: 2px solid var(--tab-border);
    margin-bottom: 0;
    gap: 8px;
    flex-wrap: wrap;
}

.nav-tabs .nav-item {
    margin-bottom: -2px;
}

.nav-tabs .nav-link {
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--tab-muted);
    font-size: 15px;
    font-weight: 600;
    padding: 16px 24px;
    transition: all 0.3s ease;
    background: transparent;
    position: relative;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-tabs .nav-link:hover {
    background: var(--tab-hover);
    color: var(--tab-text);
    border-radius: 8px 8px 0 0;
}

.nav-tabs .nav-link.active {
    color: var(--tab-active);
    background: transparent;
    border-bottom-color: var(--tab-active);
    font-weight: 700;
}

.nav-tabs .nav-link i {
    margin-right: 6px;
}

@media (max-width: 767px) {
    .nav-tabs {
        gap: 4px;
    }

    .nav-tabs .nav-link {
        font-size: 13px;
        padding: 12px 16px;
        letter-spacing: 0.3px;
    }
}

/* ===== TAB CONTENT ===== */
.tab-content {
    background: var(--tab-bg);
    border-radius: 0 0 12px 12px;
    padding: 32px;
    box-shadow: var(--tab-shadow);
    margin-top: -1px;
    min-height: 300px;
}

@media (max-width: 767px) {
    .tab-content {
        padding: 20px 16px;
    }
}

.tab-pane {
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== DESCRIPTION TAB ===== */
.description {
    font-size: 15px;
    line-height: 1.8;
    color: var(--tab-text);
}

.description h1,
.description h2,
.description h3,
.description h4 {
    margin-top: 24px;
    margin-bottom: 16px;
    font-weight: 700;
    color: var(--tab-text);
}

.description h1 { font-size: 28px; }
.description h2 { font-size: 24px; }
.description h3 { font-size: 20px; }
.description h4 { font-size: 18px; }

.description p {
    margin-bottom: 16px;
}

.description ul,
.description ol {
    margin-bottom: 16px;
    padding-left: 24px;
}

.description li {
    margin-bottom: 8px;
}

.description img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 20px 0;
    box-shadow: var(--tab-shadow);
}

.description table {
    width: 100%;
    margin: 20px 0;
    border-collapse: collapse;
}

.description table th,
.description table td {
    padding: 12px;
    border: 1px solid var(--tab-border);
    text-align: left;
}

.description table th {
    background: var(--tab-hover);
    font-weight: 600;
}

/* ===== SIZE CHART TAB ===== */
#sizechart-tab-pane h3 {
    font-size: 24px;
    font-weight: 700;
    color: var(--tab-text);
    margin-bottom: 20px;
}

#sizechart-tab-pane .table {
    margin-bottom: 0;
    border-radius: 8px;
    overflow: hidden;
}

#sizechart-tab-pane .table thead {
    background: linear-gradient(135deg, var(--tab-active) 0%, #0056b3 100%);
    color: white;
}

#sizechart-tab-pane .table thead th {
    font-weight: 600;
    padding: 14px 12px;
    border: none;
}

#sizechart-tab-pane .table tbody tr {
    transition: background 0.3s ease;
}

#sizechart-tab-pane .table tbody tr:hover {
    background: var(--tab-hover);
}

#sizechart-tab-pane .table tbody td {
    padding: 12px;
    vertical-align: middle;
}

#sizechart-tab-pane .bg-light {
    background: #f8f9fa !important;
    border: 1px solid var(--tab-border);
}

#sizechart-tab-pane .bg-light h5 {
    font-size: 16px;
    font-weight: 600;
    color: var(--tab-active);
}

#sizechart-tab-pane .bg-light ul {
    padding-left: 20px;
}

#sizechart-tab-pane .bg-light li {
    margin-bottom: 8px;
    font-size: 14px;
    line-height: 1.6;
}

/* ===== REVIEWS TAB ===== */
.review-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--tab-text);
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--tab-border);
}

.review-title span {
    color: var(--tab-active);
}

/* Review Images Grid */
.reviews {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 12px;
    margin-bottom: 32px;
}

@media (max-width: 767px) {
    .reviews {
        grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
        gap: 8px;
    }
}

.review-img {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    box-shadow: var(--tab-shadow);
    transition: all 0.3s ease;
    cursor: pointer;
}

.review-img:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.review-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.review-img:hover img {
    transform: scale(1.1);
}

.limit_position {
    display: inline-block;
    padding: 12px 24px;
    background: var(--tab-active);
    color: white !important;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    text-decoration: none !important;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.limit_position:hover {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}

/* Rating Statistics */
.rating-statistics {
    background: var(--tab-hover);
    padding: 24px;
    border-radius: 12px;
    margin-bottom: 24px;
}

.rating-statistics h4 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 16px;
}

.rating-bar {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    gap: 12px;
}

.rating-bar-label {
    min-width: 60px;
    font-size: 14px;
    font-weight: 600;
    color: var(--tab-text);
}

.rating-bar-fill {
    flex: 1;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.rating-bar-inner {
    height: 100%;
    background: linear-gradient(90deg, #ffc107 0%, #ff9800 100%);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.rating-bar-count {
    min-width: 40px;
    text-align: right;
    font-size: 13px;
    color: var(--tab-muted);
}

/* Individual Review Card */
.review-card {
    background: white;
    border: 1px solid var(--tab-border);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    transition: all 0.3s ease;
}

.review-card:hover {
    box-shadow: var(--tab-shadow);
    transform: translateY(-2px);
}

.review-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
}

.review-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.review-author-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--tab-active) 0%, #0056b3 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
}

.review-author-info h5 {
    font-size: 15px;
    font-weight: 600;
    margin: 0;
    color: var(--tab-text);
}

.review-author-info small {
    color: var(--tab-muted);
    font-size: 13px;
}

.review-rating {
    display: flex;
    align-items: center;
    gap: 4px;
}

.review-body {
    margin-top: 12px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--tab-text);
}

.review-images {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.review-images img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.review-images img:hover {
    transform: scale(1.05);
}

/* Write Review Button */
.write-review-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--tab-active);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.write-review-btn:hover {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}

/* ===== FAQ TAB ===== */
.faq-item {
    background: white;
    border: 1px solid var(--tab-border);
    border-radius: 12px;
    margin-bottom: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    box-shadow: var(--tab-shadow);
}

.faq-question {
    padding: 18px 24px;
    background: var(--tab-hover);
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    color: var(--tab-text);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s ease;
}

.faq-question:hover {
    background: #e9ecef;
}

.faq-question i {
    transition: transform 0.3s ease;
}

.faq-question.active i {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 24px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-answer.show {
    padding: 18px 24px;
    max-height: 500px;
}

.faq-answer p {
    font-size: 14px;
    line-height: 1.6;
    color: var(--tab-muted);
    margin: 0;
}

/* ===== MOBILE OPTIMIZATIONS ===== */
@media (max-width: 767px) {
    .rating-bar-label {
        min-width: 50px;
        font-size: 13px;
    }

    .review-card {
        padding: 16px;
    }

    .review-author-avatar {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .review-images img {
        width: 70px;
        height: 70px;
    }

    .faq-question {
        padding: 14px 16px;
        font-size: 14px;
    }

    .faq-answer.show {
        padding: 14px 16px;
    }
}

/* ===== LOADING SKELETON ===== */
.loading-review {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 12px;
    height: 120px;
    margin-bottom: 16px;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state-icon {
    font-size: 64px;
    color: var(--tab-border);
    margin-bottom: 16px;
}

.empty-state h4 {
    font-size: 20px;
    font-weight: 600;
    color: var(--tab-text);
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--tab-muted);
    font-size: 14px;
}
