/**
 * Products Content Type Styles
 * /css/content-types/products.css
 */

/* ========================================
   Products Header
   ======================================== */
.products-header {
    background: #f8fafc;
}

/* Filter Pills */
.filter-pill {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: #fff;
    color: #6b7280;
    font-size: 0.9rem;
    border-radius: 50px;
    text-decoration: none;
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease;
}

.filter-pill:hover {
    border-color: var(--bs-primary);
    color: var(--bs-primary);
}

.filter-pill.active {
    background: var(--bs-primary);
    border-color: var(--bs-primary);
    color: #fff;
}

/* ========================================
   Products Grid
   ======================================== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
}

.products-grid.related {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

/* ========================================
   Product Card
   ======================================== */
.product-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transform: translateY(-4px);
}

/* Product Image */
.product-image {
    position: relative;
    height: 220px;
    overflow: hidden;
    background: #f8fafc;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 1rem;
    transition: transform 0.5s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-placeholder i {
    font-size: 4rem;
    color: #d1d5db;
}

/* Product Badge */
.product-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 4px;
    z-index: 1;
}

.product-badge.featured {
    background: #fbbf24;
    color: #1f2937;
}

.product-badge.discount {
    background: #ef4444;
    color: #fff;
    right: 1rem;
    left: auto;
}

/* Product Actions */
.product-actions {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    gap: 0.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-card:hover .product-actions {
    opacity: 1;
}

.action-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #fff;
    color: #1f2937;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.action-btn:hover {
    background: var(--bs-primary);
    color: #fff;
}

/* Product Info */
.product-info {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-category {
    font-size: 0.8rem;
    color: var(--bs-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.product-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

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

.product-title a:hover {
    color: var(--bs-primary);
}

.product-excerpt {
    color: #6b7280;
    font-size: 0.85rem;
    margin-bottom: 1rem;
    flex: 1;
}

/* Product Price */
.product-price {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: auto;
}

.old-price {
    color: #9ca3af;
    text-decoration: line-through;
    font-size: 0.9rem;
}

.current-price {
    color: var(--bs-primary);
    font-weight: 700;
    font-size: 1.25rem;
}

/* ========================================
   Product Detail
   ======================================== */
.product-gallery {
    position: sticky;
    top: 100px;
}

.main-image {
    position: relative;
    background: #f8fafc;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.main-image img {
    width: 100%;
    height: 400px;
    object-fit: contain;
    padding: 2rem;
}

.thumbnail-images {
    display: flex;
    gap: 0.75rem;
}

.thumbnail {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    transition: border-color 0.2s ease;
    background: #f8fafc;
}

.thumbnail:hover,
.thumbnail.active {
    border-color: var(--bs-primary);
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 0.5rem;
}

/* Product Info Detail */
.product-info-detail {
    padding-left: 2rem;
}

.product-info-detail .product-title {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.product-sku {
    color: #6b7280;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.product-price-detail {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.product-price-detail .old-price {
    font-size: 1.25rem;
}

.product-price-detail .current-price {
    font-size: 2rem;
}

.product-short-desc {
    color: #4b5563;
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

/* Product Specs */
.product-specs {
    margin-bottom: 1.5rem;
}

.spec-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.spec-label {
    color: #6b7280;
}

.spec-value {
    font-weight: 500;
}

/* Product Actions Detail */
.product-actions-detail {
    display: flex;
    gap: 1rem;
}

/* Category Link */
.category-link {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: #f1f5f9;
    color: #475569;
    font-size: 0.8rem;
    border-radius: 50px;
    text-decoration: none;
    margin-right: 0.5rem;
    transition: all 0.2s ease;
}

.category-link:hover {
    background: var(--bs-primary);
    color: #fff;
}

/* Product Tabs */
.product-tabs {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.product-tabs .nav-tabs {
    border-bottom: 1px solid #e5e7eb;
    padding: 0 1.5rem;
}

.product-tabs .nav-link {
    border: none;
    padding: 1rem 1.5rem;
    color: #6b7280;
    font-weight: 500;
    position: relative;
}

.product-tabs .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--bs-primary);
    transform: scaleX(0);
    transition: transform 0.2s ease;
}

.product-tabs .nav-link.active {
    color: var(--bs-primary);
}

.product-tabs .nav-link.active::after {
    transform: scaleX(1);
}

.product-tabs .tab-content {
    padding: 2rem;
}

.product-content,
.specifications-content {
    font-size: 1.05rem;
    line-height: 1.8;
}

.product-content img,
.specifications-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 991.98px) {
    .product-info-detail {
        padding-left: 0;
        margin-top: 2rem;
    }
    
    .product-gallery {
        position: static;
    }
}

@media (max-width: 767.98px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .product-image {
        height: 180px;
    }
    
    .product-info {
        padding: 1rem;
    }
    
    .product-title {
        font-size: 0.9rem;
    }
    
    .current-price {
        font-size: 1rem;
    }
    
    .main-image img {
        height: 300px;
    }
    
    .product-info-detail .product-title {
        font-size: 1.5rem;
    }
    
    .product-price-detail .current-price {
        font-size: 1.5rem;
    }
}
