/* DAM (Digital Asset Management) Styles */
/* Inherits base styles from PIM for consistent CI */

/* ========================================
   Breadcrumb Navigation
   ======================================== */
#breadcrumbs {
    background-color: #eeeeee;
    padding: 0;
    margin: 0;
}

#breadcrumbs .container {
    background-color: white;
    padding: 15px 20px;
}

#breadcrumbs .breadcrumb {
    background-color: transparent;
    margin-bottom: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    list-style: none;
}

#breadcrumbs .breadcrumb-item {
    color: #333;
}

#breadcrumbs .breadcrumb-item a {
    color: rgb(1, 108, 184);
    text-decoration: none;
    font-weight: 400;
}

#breadcrumbs .breadcrumb-item a:hover {
    color: #004999;
    text-decoration: underline;
}

#breadcrumbs .breadcrumb-item.active {
    color: #333;
}

#breadcrumbs .breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    color: rgb(129, 138, 145);
    padding: 0 7px;
}

/* ========================================
   Base Layout - Sticky Footer
   ======================================== */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

#main {
    flex: 1 0 auto;
    padding: 0;
}

#footer {
    flex-shrink: 0;
}

/* ========================================
   Gallery Grid Layout
   ======================================== */
.dam-gallery-grid {
    padding-bottom: 30px;
}

.image-card {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 100%;
}

.image-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 102, 204, 0.15) !important;
}

.image-card .card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.image-card:hover .card {
    border-color: #0066cc;
}

.image-thumbnail-wrapper {
    height: 250px;
    overflow: hidden;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.image-card .card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.image-card .card-title {
    color: #0066cc;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 8px;
}

.image-card .image-meta {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 10px;
}

.image-card .image-tags {
    margin-top: auto;
}

.image-card .badge {
    font-size: 0.75rem;
    margin-right: 4px;
    margin-bottom: 4px;
}

/* ========================================
   Image Detail View
   ======================================== */
.image-detail-view {
    padding-bottom: 30px;
}

.image-detail-main {
    background: #f8f9fa;
    padding: 30px;
    text-align: center;
    border-radius: 8px;
    margin-bottom: 30px;
}

.image-detail-main img {
    max-width: 100%;
    max-height: 600px;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.image-info-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
}

.image-info-card h2 {
    font-size: 1.5rem;
    color: #0066cc;
    margin-bottom: 20px;
}

.image-metadata-table {
    width: 100%;
    margin-bottom: 20px;
}

.image-metadata-table td {
    padding: 10px 15px;
    border-bottom: 1px solid #f0f0f0;
}

.image-metadata-table td:first-child {
    width: 150px;
    font-weight: 600;
    color: #666;
}

.image-metadata-table tr:last-child td {
    border-bottom: none;
}

.download-options {
    margin-top: 20px;
}

.download-options .btn {
    margin-right: 10px;
    margin-bottom: 10px;
}

/* ========================================
   Filters Sidebar
   ======================================== */
.filters-sidebar {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
}

.filters-sidebar h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #0066cc;
}

.filter-section {
    margin-bottom: 25px;
}

.filter-section h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #666;
    margin-bottom: 12px;
}

.filter-section .form-check {
    margin-bottom: 8px;
}

.filter-section .form-check-label {
    font-size: 0.9rem;
    color: #333;
}

.filter-actions {
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

/* ========================================
   Product Image Grid (for Product Detail)
   ======================================== */
.product-images-grid {
    padding-bottom: 30px;
}

.product-images-grid h2 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #0066cc;
    margin-bottom: 25px;
}

.product-images-grid .product-meta {
    background: #f8f9fa;
    border-left: 4px solid #0066cc;
    padding: 15px 20px;
    margin-bottom: 30px;
    border-radius: 4px;
}

.product-images-grid .product-meta .sku {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 5px;
}

.product-images-grid .product-meta .product-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0;
}

/* Override style.css image-thumbnail-wrapper for DAM product pages */
.product-images-grid .image-thumbnail-link {
    display: block;
    text-decoration: none;
}

.product-images-grid .image-thumbnail-wrapper {
    height: 250px;
    padding-top: 0;  /* Reset padding-top from style.css */
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-images-grid .image-thumbnail {
    position: static;  /* Reset absolute positioning from style.css */
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Card hover effect for product images grid */
.product-images-grid .image-card {
    height: 100%;
}

.product-images-grid .image-card .card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-images-grid .image-card:hover .card {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 102, 204, 0.15) !important;
    border-color: #0066cc;
}

.bulk-download-section {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    text-align: center;
}

.bulk-download-section h3 {
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 15px;
}

/* ========================================
   Collections
   ======================================== */
.collections-grid {
    padding-bottom: 30px;
}

.collection-card {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease;
}

.collection-card:hover {
    transform: translateY(-4px);
}

.collection-card .card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    height: 100%;
}

.collection-card:hover .card {
    box-shadow: 0 8px 20px rgba(0, 102, 204, 0.15) !important;
    border-color: #0066cc;
}

.collection-preview {
    height: 200px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.collection-preview-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 2px;
    width: 100%;
    height: 100%;
    background: white;
}

.collection-preview-grid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.collection-preview-empty {
    text-align: center;
    color: #999;
}

.collection-preview-empty svg {
    width: 60px;
    height: 60px;
    color: #dee2e6;
}

.collection-card .card-body h5 {
    color: #0066cc;
    font-weight: 600;
}

.collection-card .card-body .text-muted {
    font-size: 0.85rem;
}

/* ========================================
   Search Results
   ======================================== */
.search-results {
    padding-bottom: 30px;
}

.search-results-header {
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #0066cc;
}

.search-results-header h1 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #333;
}

.search-results-count {
    font-size: 1rem;
    color: #666;
    margin-top: 10px;
}

.no-results {
    text-align: center;
    padding: 60px 20px;
}

.no-results svg {
    width: 80px;
    height: 80px;
    color: #dee2e6;
    margin-bottom: 20px;
}

.no-results h3 {
    font-size: 1.5rem;
    color: #666;
    margin-bottom: 15px;
}

.no-results p {
    color: #999;
    font-size: 1rem;
}

/* ========================================
   Pagination
   ======================================== */
.pagination {
    margin-top: 40px;
    justify-content: center;
}

.pagination .page-link {
    color: #0066cc;
    border-color: #dee2e6;
}

.pagination .page-link:hover {
    color: #004999;
    background-color: #f8f9fa;
}

.pagination .page-item.active .page-link {
    background-color: #0066cc;
    border-color: #0066cc;
    color: #ffffff;
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 768px) {
    .image-thumbnail-wrapper {
        height: 200px;
    }

    .filters-sidebar {
        margin-bottom: 30px;
    }

    .image-detail-main {
        padding: 20px;
    }

    .image-detail-main img {
        max-height: 400px;
    }

    .download-options .btn {
        width: 100%;
        margin-right: 0;
    }

    .bulk-download-section {
        padding: 15px;
    }
}

@media (max-width: 576px) {
    .image-thumbnail-wrapper {
        height: 180px;
    }

    .collection-preview {
        height: 150px;
    }
}
