/* DATD Website Styles - Dark Theme */

/* Basic Bootstrap replacements for testing */
.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 15px;
}

.text-center {
    text-align: center;
}

.py-2 {
    padding: 10px 0;
}

.py-5 {
    padding: 40px 0;
}

.mb-4 {
    margin-bottom: 20px;
}

.mb-5 {
    margin-bottom: 30px;
}

.d-flex {
    display: flex;
}

.align-items-center {
    align-items: center;
}

.justify-content-center {
    justify-content: center;
}

.btn {
    display: inline-block;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    cursor: pointer;
}

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

.btn-success {
    background: #28a745;
    color: white;
}

.w-100 {
    width: 100%;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.col-md-4 {
    flex: 0 0 33.333%;
    max-width: 33.333%;
    padding: 0 15px;
}

.col-lg-6 {
    flex: 0 0 50%;
    max-width: 50%;
    padding: 0 15px;
}

body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: #ffffff;
    background-color: #0d132d;
    margin: 0;
}

/* Dark theme overrides for links and text */
a {
    color: #ffffff;
}

a:hover {
    color: #cccccc;
}

.text-muted {
    color: #cccccc !important;
}

.card-body {
    color: #ffffff;
}

.navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.8);
}

.navbar-dark .navbar-nav .nav-link:hover {
    color: #ffffff;
}

/* Deep Dark Theme Overrides */
.bg-dark {
    background-color: #2a2a2a !important;
    border-color: #333 !important;
}

.bg-light {
    background-color: #1a1a1a !important;
    color: #ffffff !important;
}

/* Navbar specific overrides */
.navbar-dark {
    background-color: #0d132d !important;
    border-bottom: 1px solid #333 !important;
}

.navbar-dark .navbar-brand {
    color: #ffffff !important;
}

.navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
}

.navbar-dark .navbar-nav .nav-link:hover {
    color: #ffffff !important;
}

.navbar-dark .navbar-toggler {
    border-color: rgba(255, 255, 255, 0.1) !important;
}

.navbar-dark .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.5%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

.text-dark {
    color: #ffffff !important;
}

.border-bottom {
    border-bottom-color: #333 !important;
}

/* Additional dark theme elements */
.btn-outline-secondary {
    color: #cccccc;
    border-color: #555;
    background-color: transparent;
}

.btn-outline-secondary:hover {
    color: #ffffff;
    background-color: #555;
    border-color: #777;
}

.country-selector {
    border: 1px solid #555 !important;
    background: #2a2a2a !important;
    color: #ffffff !important;
}

.navbar-brand img {
    height: 40px;
}

.hero-section {
    background: linear-gradient(319deg, #08346c 0%, #0d132d 100%);
    color: white;
    padding: 100px 0;
    border-bottom: 1px solid #000000;
}

.product-card {
    border: 1px solid #333;
    box-shadow: 0 4px 8px rgba(255,255,255,0.1);
    transition: transform 0.3s;
    margin-bottom: 30px;
    background-color: #000000;
}

.product-card:hover {
    transform: translateY(-5px);
}

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    margin: 20px 0;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 8px;
}

.whatsapp-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    border-radius: 50px;
    padding: 15px 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.social-links a {
    color: #cccccc;
    margin: 0 10px;
    font-size: 20px;
    transition: color 0.3s;
}

.social-links a:hover {
    color: #ffffff;
}

.footer {
    background: #0d132d;
    padding: 50px 0 20px;
    color: #ffffff;
}

.subscribe-section {
    background: #D9DEE8;
    color: white;
    padding: 50px 0;
}

.feature-item {
    text-align: center;
    padding: 20px;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(255,255,255,0.1);
    margin-bottom: 20px;
}

.feature-item i {
    font-size: 3rem;
    color: #ffffff;
    margin-bottom: 15px;
}

.country-selector {
    border: 1px solid #555;
    border-radius: 5px;
    padding: 8px 12px;
    background: #2a2a2a;
    color: #ffffff;
    display: inline-block;
}

.table {
    margin-bottom: 0;
}

.table th, .table td {
    padding: 12px;
    border: 1px solid #555;
    color: #ffffff;
}

.contact-info {
    background: #1a1a1a;
    border: 1px solid #333;
    padding: 40px;
    border-radius: 8px;
    margin-bottom: 40px;
    color: #ffffff;
}

.contact-form {
    background: #1a1a1a;
    border: 1px solid #333;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(255,255,255,0.1);
}

.blog-post {
    margin-bottom: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid #555;
}

.blog-post:last-child {
    border-bottom: none;
}

.blog-post img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 20px;
}

.news-content {
    background: #1a1a1a;
    border: 1px solid #333;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(255,255,255,0.1);
    margin-bottom: 40px;
    color: #ffffff;
}

.company-content {
    background: #0D132D;
    border: 1px solid #333;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(255,255,255,0.1);
    margin-bottom: 40px;
    color: #ffffff;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

.product-item {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(255,255,255,0.1);
    transition: transform 0.3s;
}

.product-item:hover {
    transform: translateY(-5px);
}

.product-item img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.product-item .card-body {
    padding: 20px;
}

.btn-custom {
    background: #b50000;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    display: inline-block;
    transition: background 0.3s;
}

.btn-custom:hover {
    background: #0056b3;
    color: white;
    text-decoration: none;
}

/* Pagination Styles */
.pagination,
.pagelist,
ul.pagination,
div.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    list-style: none;
    padding: 0;
    margin: 20px 0;
    flex-wrap: wrap;
    gap: 8px;
}

.pagination li,
.pagelist li {
    display: inline-block;
    margin: 0;
    padding: 0;
}

.pagination a,
.pagelist a,
.pagination span,
.pagelist span {
    display: inline-block;
    padding: 10px 16px;
    background: #1a1a1a;
    color: #ffffff;
    border: 2px solid #333;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.3s;
    min-width: 44px;
    text-align: center;
    font-size: 14px;
    position: relative;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.pagination a:hover,
.pagelist a:hover {
    background: #2a2a2a;
    border-color: #555;
    color: #ffffff;
}

.pagination li.active a,
.pagelist li.active a,
.pagination .active a,
.pagelist .active a,
.pagination .current,
.pagelist .current,
.pagination li.active,
.pagelist li.active {
    background: #1a1a1a;
    border: 2px solid #333;
    color: #ffffff;
    font-weight: normal;
}

.pagination li.active a:hover,
.pagelist li.active a:hover {
    border-color: #555;
    background: #2a2a2a;
}

.pagination .disabled,
.pagelist .disabled,
.pagination a.disabled,
.pagelist a.disabled,
.pagination li.disabled a,
.pagelist li.disabled a {
    background: #1a1a1a;
    color: #666;
    border-color: #333;
    cursor: not-allowed;
    opacity: 0.5;
    pointer-events: none;
}

.pagination .disabled:hover,
.pagelist .disabled:hover {
    background: #1a1a1a;
    border-color: #333;
    transform: none;
}

/* 更通用的分页样式选择器 */
.pagination > li > a,
.pagination > li > span,
.pagelist > li > a,
.pagelist > li > span {
    display: inline-block;
    padding: 10px 16px;
    background: #1a1a1a;
    color: #ffffff;
    border: 2px solid #333;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.3s;
    min-width: 44px;
    text-align: center;
    font-size: 14px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.pagination > li > a:hover,
.pagelist > li > a:hover {
    background: #2a2a2a;
    border-color: #555;
    color: #ffffff;
}

.pagination > li.active > a,
.pagination > li.active > span,
.pagelist > li.active > a,
.pagelist > li.active > span {
    background: #b50000;
    border: 2px solid #333;
    color: #ffffff;
    font-weight: normal;
}

.pagination > li.disabled > a,
.pagination > li.disabled > span,
.pagelist > li.disabled > a,
.pagelist > li.disabled > span {
    background: #1a1a1a;
    color: #666;
    border-color: #333;
    cursor: not-allowed;
    opacity: 0.5;
    pointer-events: none;
}

/* Category Navigation Styles */
.category-nav-section {
    background: #0d132d;
    border-bottom: 1px solid #000000;
}

.category-nav {
    width: 100%;
}

.category-menu {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    flex-wrap: wrap;
    gap: 0;
    justify-content: center;
}

.category-item {
    position: relative;
    margin: 0;
}

.category-link {
    display: block;
    padding: 12px 24px;
    color: #ffffff;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
}

.category-link:hover,
.category-link.active,
.category-link.nav-current {
    color: #007bff;
    border-bottom-color: #007bff;
    background: rgba(0, 123, 255, 0.1);
}

.category-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: #2a2a2a;
    list-style: none;
    padding: 8px 0;
    margin: 0;
    border: 1px solid #444;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.category-item.has-dropdown:hover .category-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.category-dropdown li {
    margin: 0;
    padding: 0;
}

.category-dropdown a {
    display: block;
    padding: 10px 20px;
    color: #cccccc;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s ease;
}

.category-dropdown a:hover,
.category-dropdown a.active,
.category-dropdown a.nav-current {
    color: #007bff;
    background: rgba(0, 123, 255, 0.1);
    padding-left: 24px;
}

/* Responsive Category Navigation */
@media (max-width: 768px) {
    .category-menu {
        flex-direction: column;
    }
    
    .category-item {
        width: 100%;
    }
    
    .category-link {
        padding: 12px 20px;
        border-bottom: 1px solid #333;
        border-left: 3px solid transparent;
    }
    
    .category-link:hover,
    .category-link.active {
        border-left-color: #007bff;
        border-bottom-color: #333;
    }
    
    .category-dropdown {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        border: none;
        border-top: 1px solid #333;
        border-radius: 0;
        box-shadow: none;
        background: #1a1a1a;
        margin-top: 0;
    }
    
    .category-dropdown a {
        padding-left: 40px;
    }
}

.page-header {
    background: linear-gradient(135deg, #0D132D 0%, #0D132D 100%);
    color: white;
    padding: 80px 0;
    margin-bottom: 40px;
    border-bottom: 1px solid #333;
}

.page-header h1 {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 20px;
}

.page-header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Image optimization */
img {
    max-width: 100%;
    height: auto;
}

/* Loading animation for images */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 992px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .hero-section, .page-header {
        padding: 60px 0;
    }

    .hero-section h1, .page-header h1 {
        font-size: 2rem;
    }

    .navbar-nav {
        text-align: center;
        margin-top: 20px;
    }

    .country-selector {
        margin-bottom: 10px;
    }

    .social-links {
        text-align: center;
        margin-top: 20px;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 576px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .pagination li,
    .pagelist li,
    .pagination a,
    .pagelist a,
    .pagination span,
    .pagelist span {
        padding: 6px 10px;
        font-size: 14px;
        min-width: 35px;
    }
}

/* Search Modal Styles */
.search-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

.search-modal-content {
    position: relative;
    margin: 5% auto;
    width: 90%;
    max-width: 800px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    max-height: 80vh;
    overflow-y: auto;
}

.search-modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: flex-end;
}

.search-close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #6c757d;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.search-close-btn:hover {
    background-color: #f8f9fa;
    color: #495057;
}

.search-modal-body {
    padding: 30px 20px;
}

.search-input-container {
    display: flex;
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.search-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 25px 0 0 25px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.2s;
}

.search-input:focus {
    border-color: #b50000;
}

.search-submit-btn {
    padding: 12px 20px;
    background-color: #b50000;
    color: white;
    border: none;
    border-radius: 0 25px 25px 0;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.2s;
}

.search-submit-btn:hover {
    background-color: #0056b3;
}

.country-region-section h4 {
    color: #333;
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: 600;
}

.country-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 8px;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 10px;
}

.country-grid::-webkit-scrollbar {
    width: 6px;
}

.country-grid::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.country-grid::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.country-grid::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.country-item {
    display: block;
    padding: 8px 12px;
    color: #495057;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.2s;
    font-size: 14px;
}

.country-item:hover {
    background-color: #f8f9fa;
    color: #007bff;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Contact Page Styles */
.contact-info {
    padding: 30px;
    background: #0d132d;
    border-radius: 8px;
    border: 1px solid #333;
}

.contact-content {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.contact-image {
    padding: 0;
    overflow: hidden;
    height: 100%;
    min-height: 400px;
}

.contact-image img {
    height: 100%;
    min-height: 400px;
    object-fit: cover;
}

.contact-form {
    margin-top: 40px;
    padding: 30px;
    background: #0d132d;
    border-radius: 8px;
    border: 1px solid #333;
}

.contact-form .form-control {
    background: #0d132d;
    border: 1px solid #444;
    color: #ffffff;
    padding: 12px 15px;
}

.contact-form .form-control:focus {
    background: #0d132d;
    border-color: #007bff;
    color: #ffffff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.contact-form .form-control::placeholder {
    color: #999;
}

@media (max-width: 991px) {
    .contact-info {
        padding: 20px;
    }
    
    .contact-content {
        margin-bottom: 20px;
    }
    
    .contact-image {
        margin-top: 20px;
        padding: 0;
        min-height: 300px;
    }
    
    .contact-image img {
        min-height: 300px;
    }
}

/* Product Carousel Styles */
.product-images {
    position: relative;
}

#productCarousel {
    background: #1a1a1a;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #333;
}

#productCarousel .carousel-inner {
    max-height: 800px;
}

#productCarousel .carousel-item img {
    width: 100%;
    height: 800px;
    object-fit: cover;
    display: block;
}

#productCarousel .carousel-control-prev,
#productCarousel .carousel-control-next {
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.7;
}

#productCarousel .carousel-control-prev {
    left: 15px;
}

#productCarousel .carousel-control-next {
    right: 15px;
}

#productCarousel .carousel-control-prev:hover,
#productCarousel .carousel-control-next:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.8);
}

#productCarousel .carousel-indicators {
    margin-bottom: 20px;
}

#productCarousel .carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.8);
}

#productCarousel .carousel-indicators button.active {
    background-color: #007bff;
    border-color: #007bff;
}

@media (max-width: 991px) {
    #productCarousel .carousel-item img {
        height: auto;
        max-height: 500px;
    }
    
    #productCarousel .carousel-inner {
        max-height: 500px;
    }
    
    /* Ensure product detail row uses flexbox for ordering */
    .product-detail-section .row {
        display: flex !important;
        flex-direction: column !important;
        flex-wrap: nowrap !important;
    }
    
    /* Force order on mobile - images first, content second */
    .product-detail-section .col-lg-6.order-lg-1 {
        order: 1 !important;
        -webkit-order: 1 !important;
    }
    
    .product-detail-section .col-lg-6.order-lg-2 {
        order: 2 !important;
        -webkit-order: 2 !important;
    }
    
    /* Alternative: directly target the columns */
    .product-detail-section .product-images {
        order: 1 !important;
        margin-bottom: 20px;
    }
    
    .product-detail-section .product-info {
        order: 2 !important;
    }
    
    /* Mobile image adjustments */
    .product-detail-section .product-images img {
        width: 100% !important;
        height: auto !important;
        max-height: 500px;
    }
    
    .product-detail-section .product-images #productCarousel {
        margin-bottom: 0;
    }
    
    /* Make product detail section full width on mobile */
    .product-detail-section .container {
        padding-left: 0 !important;
        padding-right: 0 !important;
        max-width: 100% !important;
    }
    
    .product-detail-section .row {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    .product-detail-section .col-lg-6 {
        padding-left: 0 !important;
        padding-right: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .product-detail-section .product-images {
        width: 100% !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    .product-detail-section .product-info {
        width: 100% !important;
        padding-left: 15px;
        padding-right: 15px;
    }
    
    /* Remove border radius and padding from carousel on mobile */
    .product-detail-section #productCarousel {
        border-radius: 0 !important;
        border-left: none !important;
        border-right: none !important;
    }
    
    .product-detail-section .product-images img {
        border-radius: 0 !important;
    }
}
