/* Ofisupli - Category and Product Styles */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    list-style: none;
    padding: 15px 0;
    margin: 0;
    font-size: 14px;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: ">";
    padding: 0 8px;
    color: #666;
}

.breadcrumb-item a {
    color: #007bff;
    text-decoration: none;
}

.breadcrumb-item.active {
    color: #666;
}

/* Categories Grid */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

.category-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    transition: box-shadow 0.2s;
}

.category-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.category-card a {
    text-decoration: none;
    color: inherit;
}

.category-card img {
    max-width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 12px;
}

.category-card h3 {
    margin: 12px 0 8px 0;
    color: #333;
    font-size: 18px;
}

.category-card p {
    color: #666;
    font-size: 14px;
    margin: 0;
}

/* Category Header */
.category-header {
    text-align: center;
    padding: 24px 0;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 32px;
}

.category-context {
    color: #666;
    font-weight: normal;
    font-size: 0.8em;
}

.category-header h1 {
    margin: 0 0 12px 0;
    color: #333;
    font-size: 32px;
}

.category-description {
    font-size: 16px;
    color: #666;
    max-width: 600px;
    margin: 0 auto 12px auto;
}

.product-count {
    color: #888;
    font-size: 14px;
    margin: 0;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.product-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.product-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.product-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.product-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.no-image {
    width: 100%;
    height: 200px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 14px;
}

.product-info {
    padding: 16px;
}

.product-name {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    line-height: 1.3;
    height: 40px;
    overflow: hidden;
}

.product-brand {
    display: inline-block;
    background: #f0f0f0;
    color: #666;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 12px;
    margin-bottom: 8px;
}

.product-price {
    margin: 8px 0;
}

.price {
    font-size: 18px;
    font-weight: bold;
    color: #007bff;
}

.price-original {
    text-decoration: line-through;
    color: #999;
    margin-right: 8px;
}

.price-discount {
    font-size: 18px;
    font-weight: bold;
    color: #dc3545;
}

.stock-status {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 500;
}

.stock-status.in_stock {
    background: #d4edda;
    color: #155724;
}

.stock-status.out_of_stock {
    background: #f8d7da;
    color: #721c24;
}

.stock-status.backorder {
    background: #fff3cd;
    color: #856404;
}

/* Product Detail */
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin: 32px 0;
}

.product-images .main-image {
    width: 100%;
    max-height: 400px;
    object-fit: contain;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 8px;
    margin-top: 12px;
}

.image-gallery img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    cursor: pointer;
}

.product-info h1 {
    margin: 0 0 16px 0;
    font-size: 28px;
    color: #333;
}

.brand, .sku {
    margin: 8px 0;
    color: #666;
}

.price-section {
    margin: 20px 0;
    padding: 16px 0;
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
}

.price-section .price {
    font-size: 24px;
}

.price-section .price-discount {
    font-size: 24px;
}

.discount-percent {
    background: #dc3545;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    margin-left: 8px;
}

.stock-info {
    margin: 16px 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.stock-quantity {
    color: #666;
    font-size: 14px;
}

.description {
    margin: 24px 0;
}

.description h3 {
    margin: 0 0 12px 0;
    color: #333;
}

.product-attributes {
    margin: 24px 0;
}

.product-attributes h3 {
    margin: 0 0 12px 0;
    color: #333;
}

.product-attributes dl {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 8px 16px;
    margin: 0;
}

.product-attributes dt {
    font-weight: 600;
    color: #555;
}

.product-attributes dd {
    margin: 0;
    color: #666;
}

.product-actions {
    margin: 32px 0;
    display: flex;
    gap: 12px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    transition: all 0.2s;
}

.btn-primary {
    background: #007bff;
    color: white;
}

.btn-primary:hover {
    background: #0056b3;
}

.btn-outline {
    background: white;
    color: #007bff;
    border: 2px solid #007bff;
}

.btn-outline:hover {
    background: #007bff;
    color: white;
}

.back-to-category {
    text-align: center;
    margin: 40px 0;
}

/* Pagination */
.pagination-nav {
    display: flex;
    justify-content: center;
    margin: 40px 0;
}

.pagination {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 4px;
}

.pagination li {
    display: block;
}

.pagination a {
    display: block;
    padding: 8px 12px;
    color: #007bff;
    text-decoration: none;
    border: 1px solid #dee2e6;
    border-radius: 4px;
}

.pagination .active a {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.pagination a:hover {
    background: #e9ecef;
}

/* Brand Filter */
.brand-filter {
    margin: 32px 0;
    padding: 24px;
    background: #f8f9fa;
    border-radius: 8px;
}

.brand-filter h3 {
    margin: 0 0 16px 0;
    color: #333;
    font-size: 18px;
}

.brand-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.brand-card {
    display: flex;
    flex-direction: column;
    padding: 12px 16px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
}

.brand-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-color: #007bff;
}

.brand-card strong {
    color: #333;
    margin-bottom: 4px;
}

.brand-card .product-count {
    color: #666;
    font-size: 12px;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 16px;
    }
    
    .product-detail {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .product-actions {
        flex-direction: column;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
    }
    
    .brand-grid {
        grid-template-columns: 1fr;
    }
}
}