/* Custom Styles for SPC Flooring - Modern Green Theme */

:root {
    --primary-blue: #008000;
    --secondary-blue: #007A00;
    --dark-blue: #006400;
    --light-blue: #00A000;
    --accent-cyan: #008A00;
    --gradient-1: linear-gradient(135deg, #008000 0%, #007A00 100%);
    --gradient-2: linear-gradient(135deg, #006400 0%, #007A00 100%);
    --gradient-3: linear-gradient(135deg, #007A00 0%, #00A000 100%);
    --gradient-cyan: linear-gradient(135deg, #007000 0%, #008A00 100%);
    --gradient-dark: linear-gradient(135deg, #006000 0%, #008000 100%);
    --text-dark: #1e293b;
    --text-muted: #64748b;
    --bg-light: #f8fafc;
    --white: #ffffff;
}

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

.bg-gradient-1 {
    background: var(--gradient-1);
}

.bg-gradient-2 {
    background: var(--gradient-2);
}

/* Floating Contact Widget - Three Icons */
.floating-widget-icons {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.floating-icon-item {
    position: relative;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: white !important;
    font-size: 24px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    cursor: pointer;
}

.floating-icon-item i {
    color: white !important;
}

.floating-icon-item:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.floating-icon-item:nth-child(1) {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
}

.floating-icon-item:nth-child(1):hover {
    background: linear-gradient(135deg, #128C7E 0%, #25D366 100%);
}

.floating-icon-item:nth-child(2) {
    background: linear-gradient(135deg, #25D366 0%, #006400 100%);
}

.floating-icon-item:nth-child(2):hover {
    background: linear-gradient(135deg, #006400 0%, #25D366 100%);
}

.floating-icon-item:nth-child(3) {
    background: linear-gradient(135deg, #25D366 0%, #006400 100%);
}

.floating-icon-item:nth-child(3):hover {
    background: linear-gradient(135deg, #006400 0%, #25D366 100%);
}

.floating-tooltip {
    position: absolute;
    right: 75px;
    top: 50%;
    transform: translateY(-50%);
    background: #ffffff;
    color: #000;
    padding: 12px 15px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 1001;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    min-width: 160px;
    max-width: 300px;
    text-align: center;
    line-height: 1.6;
    word-wrap: break-word;
}

.floating-tooltip a {
    pointer-events: auto;
    display: block;
    margin: 4px 0;
    transition: opacity 0.2s;
    color: #000 !important;
    text-decoration: none !important;
}

.floating-tooltip a:hover {
    opacity: 0.8;
}

.floating-tooltip img {
    display: block;
    margin: 0 auto;
}

.floating-icon-item:hover .floating-tooltip {
    pointer-events: auto;
    opacity: 1;
    visibility: visible;
    right: 80px;
}

.floating-tooltip::after {
    content: '';
    position: absolute;
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    border: 8px solid transparent;
    border-left-color: #ffffff;
}

@media (max-width: 768px) {
    .floating-widget-icons {
        right: 10px;
        gap: 10px;
    }
    
    .floating-icon-item {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .floating-tooltip {
        right: 65px;
        font-size: 12px;
        padding: 8px 12px;
    }
    
    .floating-icon-item:hover .floating-tooltip {
        right: 70px;
    }
}

/* Footer - Optimized Layout */
.footer-optimized {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: white;
    min-height: 500px;
    padding: 0;
    margin-top: 4rem;
    position: relative;
    overflow: hidden;
}

.footer-optimized::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #008000 0%, #006400 100%);
}

.footer-main-content {
    padding: 3.5rem 0 2rem;
}

.footer-section {
    height: 100%;
}

.footer-title {
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    position: relative;
    padding-bottom: 0.75rem;
}

.footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: #008000;
}

.footer-description {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 0;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: inline-block;
    position: relative;
}

.footer-links a::before {
    content: '→';
    position: absolute;
    left: -20px;
    opacity: 0;
    transition: all 0.3s ease;
    color: #008000;
}

.footer-links a:hover {
    color: #008000;
    padding-left: 20px;
}

.footer-links a:hover::before {
    opacity: 1;
    left: 0;
}

.footer-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0;
}

.footer-friendly-links {
    padding: 1rem 0;
    text-align: center;
}

.footer-friendly-links a {
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-friendly-links a:hover {
    color: #008000;
    text-decoration: underline;
}

.footer-bottom {
    padding: 1.5rem 0;
    text-align: center;
}

.footer-copyright {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    margin: 0;
}

.footer-address {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.9rem;
    line-height: 1.6;
}

.footer-contact-row {
    display: flex;
    flex-direction: row;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    width: 100%;
}

.footer-contact-row:last-child {
    margin-bottom: 0;
}

.footer-contact-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 0.85rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
    flex: 1;
}

.footer-contact-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.1);
}

.footer-contact-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 128, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #008000;
    font-size: 1.2rem;
    flex-shrink: 0;
    margin-right: 15px; /* 与右侧内容增加距离 */
}

.footer-contact-content {
    font-size: 0.9rem;
}

.footer-contact-content strong {
    color: white;
    font-size: 0.95rem;
}

#footerWhatsApp {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

@media (max-width: 768px) {
    .footer-contact-row {
        flex-direction: column;
    }
}

/* Navbar Styles */
.navbar {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, #008000 0%, #008000 100%) !important;
}

.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 5px;
}

.navbar-nav .dropdown-menu {
    background: white;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    margin-top: 0.5rem;
}

.navbar-nav .dropdown-item {
    color: #1e293b;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
}

.navbar-nav .dropdown-item:hover {
    background: #f8f9fa;
    color: #008000;
    padding-left: 2rem;
}

/* Banner Carousel Styles */
.carousel-item-wrapper {
    position: relative;
    padding-top: 0;
}

.carousel-item img {
    filter: brightness(1) contrast(1.05) saturate(1.1);
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

.carousel-caption {
    background: rgba(0, 0, 0, 0.5);
    padding: 2rem;
    border-radius: 15px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.carousel-caption h2 {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    font-weight: 700;
}

.carousel-caption .lead {
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
}

.carousel-caption .btn {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.carousel-inner {
    margin-top: 0;
}

/* Carousel should start right after navbar */
#bannerCarousel {
    margin-top: 0;
}

/* Ensure carousel starts immediately after navbar */
#bannerCarousel .carousel-inner {
    margin-top: 0 !important;
}

#bannerCarousel .carousel-item-wrapper {
    padding-top: 100px !important;
}

.carousel-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 15;
    display: flex;
    justify-content: center;
    padding: 0;
    margin: 0;
    list-style: none;
}

.carousel-indicators [data-bs-target] {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.8);
    margin: 0 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-indicators [data-bs-target]:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: scale(1.2);
}

.carousel-indicators [data-bs-target].active {
    background: #008000;
    border-color: #008000;
    width: 30px;
    border-radius: 6px;
}

/* Banner Generated Backgrounds */
.banner-generated {
    position: relative;
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.banner-generated.banner-1 {
    background: linear-gradient(135deg, #008000 0%, #006400 50%, #007A00 100%);
}

.banner-generated.banner-2 {
    background: linear-gradient(135deg, #007A00 0%, #008000 50%, #00A000 100%);
}

.banner-generated.banner-3 {
    background: linear-gradient(135deg, #006400 0%, #007A00 50%, #008000 100%);
}

.banner-gradient-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
}

/* Animation Classes */
.animate-fade-in {
    animation: fadeIn 1s ease-in;
}

.animate-fade-in-delay {
    animation: fadeIn 1s ease-in 0.3s both;
}

.animate-slide-up {
    animation: slideUp 1s ease-out 0.6s both;
}

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

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

/* Product Card Styles */
.product-card {
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
    border-color: #008000 !important;
}

.product-card .card-img-top {
    transition: transform 0.3s ease;
}

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

/* Button Styles */
.btn-primary {
    background: var(--gradient-1);
    border: none;
    color: white;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: var(--gradient-2);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 128, 0, 0.3);
}

.btn-outline-primary {
    border: 2px solid #008000;
    color: #008000;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    background: #008000;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 128, 0, 0.3);
}

/* Badge Styles */
.badge.bg-gradient-1 {
    background: var(--gradient-1) !important;
}

/* Top Info Bar */
.top-info-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
}

/* Case Card Styles */
.case-card {
    transition: all 0.3s ease;
}

.case-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
}

/* Fix H1 Title Being Hidden by Fixed Navbar */
/* Homepage banner should start right after navbar */
#bannerCarousel {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* Sections after banner should have normal padding */
#bannerCarousel + section {
    padding-top: 3rem !important;
}

/* First section on pages (except homepage which has banner first) should have padding-top */
main > section:first-of-type {
    padding-top: 120px !important;
}

/* But if the first element is #bannerCarousel, then the first section after it should have normal padding */
main > #bannerCarousel ~ section:first-of-type {
    padding-top: 3rem !important;
}

/* All H1 titles should have scroll-margin for anchor navigation */
h1 {
    scroll-margin-top: 120px;
}

/* Ensure main content doesn't overlap with fixed navbar */
main {
    padding-top: 0;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .navbar {
        top: 0 !important;
    }
    
    main {
        padding-top: 80px !important;
    }
    
    /* First section on pages should have padding-top on mobile */
    main > section:first-of-type {
        padding-top: 100px !important;
    }
    
    /* Banner should not have padding-top on mobile */
    #bannerCarousel {
        padding-top: 0 !important;
        margin-top: 0 !important;
    }
    
    /* Sections after banner should have normal padding on mobile */
    #bannerCarousel + section {
        padding-top: 3rem !important;
    }
    
    h1 {
        scroll-margin-top: 100px;
    }
    
    .top-info-bar {
        display: none;
    }
    
    .carousel-item-wrapper {
        padding-top: 0;
    }
    
    .carousel-caption {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .carousel-caption h2 {
        font-size: 1.5rem;
    }
    
    .carousel-caption .lead {
        font-size: 0.9rem;
    }
    
    /* Navbar search responsive */
    .navbar-nav .input-group {
        max-width: 100% !important;
        margin-top: 0.5rem;
    }
    
    .navbar-nav .nav-item:last-child {
        width: 100%;
        margin-top: 0.5rem;
    }
}

/* Product Image Container - Consistent Display */
.product-image-container {
    width: 100%;
    height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
    overflow: hidden;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

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

