/* ================================
   CYBERPUNK 2077 MANUFACTURER STYLES
   ================================ */

/* Main Container */
#content.page-manufacturer {
    padding-top: 20px;
}

/* Brand Title - Clean without brackets */
#content h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 30px;
    color: #ff0040;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-family: 'Orbitron', sans-serif;
    text-shadow: 0 0 20px rgba(255, 0, 64, 0.5);
}

/* Brand Description Sections */
#manufacturer-short_description,
#manufacturer-description {
    margin-bottom: 25px;
    line-height: 1.8;
    color: #e0e0e0;
    font-size: 1.1rem;
    background: transparent;
    padding: 0;
}

/* Force remove white background from all description elements */
#manufacturer-short_description *,
#manufacturer-description *,
.manufacturer-description * {
    background-color: transparent !important;
    background: none !important;
}

#manufacturer-short_description span[style*="background-color"],
#manufacturer-description span[style*="background-color"],
.manufacturer-description span[style*="background-color"] {
    background-color: transparent !important;
    background: none !important;
}

#manufacturer-description {
    margin-bottom: 40px;
}

/* Remove white backgrounds */
#manufacturer-short_description p,
#manufacturer-description p {
    background: transparent !important;
    color: #e0e0e0;
}

/* Products Section Spacing */
.products-section {
    margin-top: 40px;
}

/* Sort Dropdown - Modern Style */
.products-sort-order {
    position: relative;
    z-index: 10;
}

/* Sort by label */
.sort-by {
    color: #ff0040;
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
}

/* Sort dropdown button */
.products-sort-order .select-title {
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid #ff0040;
    color: #ff0040;
    padding: 10px 15px;
    border-radius: 0;
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.products-sort-order .select-title:hover {
    background: rgba(255, 0, 64, 0.1);
    border-color: #ff0040;
    box-shadow: 0 0 10px rgba(255, 0, 64, 0.5);
}

.products-sort-order .select-title:focus {
    outline: none;
    box-shadow: 0 0 15px rgba(255, 0, 64, 0.7);
}

/* Material icon in dropdown */
.products-sort-order .select-title .material-icons {
    color: #ff0040;
    transition: transform 0.3s ease;
}

.products-sort-order .select-title[aria-expanded="true"] .material-icons {
    transform: rotate(180deg);
}

/* Dropdown menu */
.products-sort-order .dropdown-menu {
    background: rgba(0, 0, 0, 0.95);
    border: 1px solid #ff0040;
    border-radius: 0;
    margin-top: 5px;
    padding: 0;
    min-width: 100%;
    box-shadow: 0 5px 20px rgba(255, 0, 64, 0.3);
}

/* Dropdown items */
.products-sort-order .dropdown-menu .select-list {
    display: block;
    padding: 12px 20px;
    color: #e0e0e0;
    text-decoration: none;
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(255, 0, 64, 0.2);
}

.products-sort-order .dropdown-menu .select-list:last-child {
    border-bottom: none;
}

.products-sort-order .dropdown-menu .select-list:hover {
    background: rgba(255, 0, 64, 0.2);
    color: #ff0040;
    padding-left: 25px;
}

.products-sort-order .dropdown-menu .select-list.current {
    background: rgba(255, 0, 64, 0.1);
    color: #ff0040;
    font-weight: 700;
}

/* Products Top Bar */
.products-top {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 0, 64, 0.3);
    padding: 15px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Hide unnecessary FILTERS button on desktop */
@media (min-width: 768px) {
    .products-top .filter-button {
        display: none !important;
    }
}

/* Total products counter styling */
.total-products {
    color: #ff0040;
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.total-products p {
    margin: 0;
    display: flex;
    align-items: center;
    height: 100%;
}

/* Product Grid Spacing */
#products .products.row {
    margin-top: 20px;
}

/* Fix any z-index issues */
.dropdown-menu {
    z-index: 1050;
}

.modal {
    z-index: 1060;
}

.modal-backdrop {
    z-index: 1055;
}

/* Product cards enhancement for manufacturer page */
.page-manufacturer .product-miniature {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-manufacturer .product-miniature:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(255, 0, 64, 0.3);
}

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

.page-manufacturer .pagination .page-link {
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid #ff0040;
    color: #ff0040;
    margin: 0 5px;
    transition: all 0.3s ease;
}

.page-manufacturer .pagination .page-link:hover {
    background: rgba(255, 0, 64, 0.2);
    border-color: #ff0040;
}

.page-manufacturer .pagination .page-item.active .page-link {
    background: #ff0040;
    border-color: #ff0040;
    color: #000;
}

/* Responsive adjustments for larger screens */
@media (min-width: 1200px) {
    #content h1 {
        font-size: 3rem;
    }
    
    #manufacturer-short_description,
    #manufacturer-description {
        font-size: 1.2rem;
        max-width: 80%;
        margin-left: auto;
        margin-right: auto;
    }
    
    /* Better spacing for desktop */
    #content.page-manufacturer {
        padding-top: 40px;
    }
    
    .products-section {
        margin-top: 60px;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    #content h1 {
        color: #ff0066;
        text-shadow: none;
    }
    
    .products-sort-order .select-list {
        border-width: 2px;
    }
}

/* Back to top button */
.page-manufacturer .up a.btn-secondary {
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid #ff0040;
    color: #ff0040;
    border-radius: 0;
    padding: 10px 20px;
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.page-manufacturer .up a.btn-secondary:hover {
    background: rgba(255, 0, 64, 0.2);
    box-shadow: 0 0 15px rgba(255, 0, 64, 0.5);
    transform: translateY(-2px);
}

.page-manufacturer .up a.btn-secondary .material-icons {
    vertical-align: middle;
    margin-left: 5px;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        animation: none !important;
    }
}

/* Force dropdown to be closed by default */
.products-sort-order.dropdown {
    position: relative;
}

.products-sort-order .dropdown-menu {
    display: none !important;
}

.products-sort-order.open .dropdown-menu,
.products-sort-order.show .dropdown-menu {
    display: block !important;
}

/* ULTRA CYBERPUNK PRODUCTS GRID */
#products,
.products-grid {
    width: 100%;
    padding: 0 20px;
}

#products .products,
.products-grid .products {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 40px !important;
    margin: 40px 0;
}

/* Reset all PrestaShop columns */
#products .products > *,
.products-grid .products > * {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    position: relative;
}

/* Cyberpunk Product Card */
.product-miniature {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.9) 0%, rgba(26, 0, 0, 0.9) 100%);
    border: 1px solid #ff0040;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    height: 100%;
}

article.product-miniature.js-product-miniature {
    height: 450px !important;
}

.product-miniature::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #ff0040, transparent, #ff0040);
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease;
    animation: rotate-border 3s linear infinite;
}

@keyframes rotate-border {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.product-miniature:hover::before {
    opacity: 1;
}

/* Thumbnail Container with Glitch Effect */
.thumbnail-container {
    position: relative;
    overflow: hidden;
    background: #000;
}

.thumbnail-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(255, 0, 64, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-miniature:hover .thumbnail-container::after {
    opacity: 1;
}

/* Product Image Hover Effects */
.product-thumbnail {
    transition: transform 0.6s ease, filter 0.6s ease;
    width: 100%;
    height: auto;
}

.product-miniature:hover .product-thumbnail {
    transform: scale(1.1);
    filter: saturate(1.5) contrast(1.2);
}

/* Cyberpunk Scan Line Effect */
.product-miniature::after {
    content: '';
    position: absolute;
    top: -100%;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #ff0040, transparent);
    box-shadow: 0 0 10px #ff0040;
    opacity: 0;
    transition: top 0.8s ease, opacity 0.3s ease;
}

.product-miniature:hover::after {
    top: 100%;
    opacity: 1;
}

/* Product Info Section */
.product-description {
    padding: 20px;
    background: rgba(0, 0, 0, 0.8);
    position: relative;
}

/* Product Title */
.product-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-title a {
    color: #e0e0e0;
    text-decoration: none;
    transition: color 0.3s ease;
}

.product-miniature:hover .product-title a {
    color: #ff0040;
    text-shadow: 0 0 10px rgba(255, 0, 64, 0.5);
}

/* Price Display */
.product-price-and-shipping {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 15px;
}

.price {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: #ff0040;
    text-shadow: 0 0 10px rgba(255, 0, 64, 0.5);
}

/* Flags and Labels */
.product-flags {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
}

.product-flag {
    background: #ff0040;
    color: #000;
    padding: 5px 10px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 5px rgba(255, 0, 64, 0.5); }
    50% { box-shadow: 0 0 20px rgba(255, 0, 64, 0.8); }
}

/* Quick View Button */
.highlighted-informations {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 0, 64, 0.9);
    transform: translateY(100%);
    transition: transform 0.3s ease;
    text-align: center;
    padding: 10px;
}

.product-miniature:hover .highlighted-informations {
    transform: translateY(0);
}

.quick-view {
    color: #000;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    font-family: 'Orbitron', sans-serif;
}

/* Add to Cart Button Enhancement */
.product-miniature .add-to-cart {
    background: linear-gradient(135deg, #ff0040 0%, #cc0033 100%);
    border: none;
    color: #fff;
    padding: 10px 20px;
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.product-miniature .add-to-cart::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.product-miniature .add-to-cart:hover::before {
    left: 100%;
}

.product-miniature .add-to-cart:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(255, 0, 64, 0.5);
}

/* Responsive Grid */
@media (max-width: 1400px) {
    #products .products,
    .products-grid .products {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 30px !important;
    }
}

@media (max-width: 992px) {
    #products .products,
    .products-grid .products {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 25px !important;
    }
}

@media (max-width: 576px) {
    #products .products,
    .products-grid .products {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
}