/**
 * Sani Afrique - Product Detail Page CSS Extension
 * 
 * MINIMAL overrides on top of the Amerce theme's native classes.
 * Only adds enhancements specific to the product detail page
 * that aren't covered by the base styles.css.
 * 
 * @package SaniAfrique
 */

/* ============================================================
   BREADCRUMB
   ============================================================ */
.tf-breadcrumb {
    padding: 12px 0;
    background: var(--bg, #f8f8f8);
}
.tf-breadcrumb-list {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 13px;
    color: var(--text-2, #666);
}
.tf-breadcrumb-item.link {
    color: var(--text-2, #666);
    text-decoration: none;
    transition: color 0.2s;
}
.tf-breadcrumb-item.link:hover {
    color: var(--primary, #95C11F);
}
.tf-breadcrumb-item.fw-medium {
    color: var(--text, #1a1a1a);
}
.tf-breadcrumb-item .icon {
    font-size: 10px;
    opacity: 0.5;
}

/* ============================================================
   STOCK BADGE
   ============================================================ */
.stock-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 500;
}
.stock-badge.in-stock {
    color: #16a34a;
}
.stock-badge.out-of-stock {
    color: #dc2626;
}

/* ============================================================
   PRODUCT ATTRIBUTES TABLE
   ============================================================ */
.tf-product-attrs {
    display: grid;
    gap: 8px;
    padding: 12px 0;
}
.tf-product-attrs .attr-row {
    display: flex;
    align-items: baseline;
    gap: 12px;
}
.tf-product-attrs .attr-label {
    font-weight: 500;
    min-width: 100px;
    color: var(--text-2, #666);
    font-size: 14px;
}
.tf-product-attrs .attr-value {
    color: var(--text, #1a1a1a);
    font-size: 14px;
}

/* ============================================================
   PRODUCT DOCS & VIDEOS
   ============================================================ */
.tf-product-docs,
.tf-product-videos {
    padding: 12px 0;
}
.tf-product-docs a,
.tf-product-videos a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 8px;
    background: var(--bg, #f8f8f8);
    color: var(--text, #1a1a1a);
    font-size: 14px;
    transition: background 0.2s;
    margin-bottom: 4px;
}
.tf-product-docs a:hover,
.tf-product-videos a:hover {
    background: var(--line, #e5e5e5);
}
.tf-product-docs a .icon,
.tf-product-videos a .icon {
    font-size: 16px;
    color: var(--primary, #95C11F);
}

/* ============================================================
   PRODUCT TABS (description, specs, shipping)
   ============================================================ */
.tf-product-tab .nav-tabs {
    border-bottom: 2px solid var(--line, #e5e5e5);
    gap: 0;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.tf-product-tab .nav-tabs::-webkit-scrollbar {
    display: none;
}
.tf-product-tab .nav-link {
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    padding: 12px 20px;
    font-weight: 500;
    color: var(--text-2, #666);
    white-space: nowrap;
    transition: all 0.25s;
}
.tf-product-tab .nav-link:hover {
    color: var(--text, #1a1a1a);
}
.tf-product-tab .nav-link.active {
    color: var(--primary, #95C11F);
    border-bottom-color: var(--primary, #95C11F);
}
.tf-product-tab .tab-content {
    padding: 24px 0;
}
.tf-product-tab .tf-rte {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-2, #666);
}
.tf-product-tab .tf-rte h6 {
    color: var(--text, #1a1a1a);
}
.tf-product-tab .tf-rte ul {
    padding-left: 20px;
}
.tf-product-tab .tf-rte ul li {
    margin-bottom: 8px;
}
.tf-product-tab .tf-sizeguide-table {
    width: 100%;
    border-collapse: collapse;
}
.tf-product-tab .tf-sizeguide-table td {
    padding: 10px 16px;
    border-bottom: 1px solid var(--line, #e5e5e5);
    font-size: 14px;
}
.tf-product-tab .tf-sizeguide-table tr:last-child td {
    border-bottom: none;
}
.tf-product-tab .tf-sizeguide-table td:first-child {
    width: 180px;
    color: var(--text-2, #666);
    background: var(--bg, #fafafa);
}

/* ============================================================
   STICKY ADD-TO-CART (mobile bottom bar)
   ============================================================ */
.tf-sticky-btn-atc {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white, #fff);
    border-top: 1px solid var(--line, #e5e5e5);
    padding: 10px 0;
    z-index: 1000;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}
.tf-sticky-btn-atc.visible {
    transform: translateY(0);
}
.tf-sticky-btn-atc img {
    border-radius: 4px;
    object-fit: cover;
}

/* ============================================================
   PRODUCT IMAGE GALLERY ENHANCEMENTS
   ============================================================ */
.tf-product-media-wrap {
    position: relative;
}
.section-product-single .tf-product-media-main .item {
    cursor: zoom-in;
}
/* Badges overlay on the main product image */
.pd-badges {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 5;
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    pointer-events: none;
}
/* Gallery: show full product image */
.banner-product-single .product-thumbs-slider .tf-product-media-main .item {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 16px;
    background: var(--bg, #fafafa);
    height: auto !important;
}
.banner-product-single .product-thumbs-slider .tf-product-media-main .item img {
    width: 100% !important;
    height: auto !important;
    max-height: 600px;
    object-fit: contain !important;
}
/* Thumbs: ensure visible at all breakpoints */
.banner-product-single .tf-product-media-thumbs .item {
    border-radius: 8px;
    overflow: hidden;
}
.banner-product-single .tf-product-media-thumbs .item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
/* Mobile/tablet: thumbs horizontal below the main image */
@media (max-width: 1199px) {
    .banner-product-single .tf-product-media-thumbs {
        width: 100% !important;
        margin-top: 10px;
    }
    .banner-product-single .tf-product-media-thumbs .swiper-slide {
        width: 80px !important;
        height: 80px !important;
    }
    .banner-product-single .product-thumbs-slider .tf-product-media-main .item img {
        max-height: 450px;
    }
}
/* Desktop: thumbs vertical on the left */
@media (min-width: 1200px) {
    .banner-product-single .tf-product-media-thumbs .tf-product-thumb {
        height: 500px;
    }
    .banner-product-single .tf-product-media-thumbs .swiper-slide {
        height: auto;
    }
}

/* ============================================================
   RELATED PRODUCTS
   ============================================================ */
.heading-section .heading-title {
    font-size: 24px;
    letter-spacing: -0.5px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* Mobile : < 576px */
@media (max-width: 575.98px) {
    .tf-breadcrumb-list {
        font-size: 12px;
    }
    .section-product-single .tf-product-info-wrap {
        margin-top: 20px;
    }
    .tf-product-tab .nav-link {
        padding: 10px 14px;
        font-size: 14px;
    }
    .tf-product-tab .tf-sizeguide-table td:first-child {
        width: 120px;
    }
    .heading-section .heading-title {
        font-size: 20px;
    }
}

/* Tablet : 576px - 1199px */
@media (min-width: 576px) and (max-width: 1199.98px) {
    .section-product-single .tf-product-info-wrap {
        margin-top: 24px;
    }
}

/* Desktop : >= 1200px */
@media (min-width: 1200px) {
    .section-product-single .tf-product-info-wrap {
        margin-top: 0;
        position: sticky;
        top: 80px;
    }
    .tf-sticky-btn-atc {
        display: none !important;
    }
}

/* Toolbar mobile offset when sticky is visible */
@media (max-width: 1199.98px) {
    .tf-sticky-btn-atc.visible ~ .tf-toolbar-bottom {
        bottom: 66px;
    }
}
