/* FINAL LAYOUT FIX: NEW ARRIVALS CAROUSEL */

/* 1. Force the Carousel Slot to Equal Height */
#new-arrivals-carousel .owl-stage {
    display: flex !important;
}

#new-arrivals-carousel .owl-item {
    display: flex !important;
    flex: 1 0 auto !important;
}

/* 2. Force the Card to Fill the Slot Completely */
#new-arrivals-carousel .product-item {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    /* Fill the carousel column width */
    height: 100% !important;
    /* Fill the carousel column height */
    margin: 0 !important;
    /* Reset any CSS margins (let JS handle gaps) */
    background: var(--card-bg, #ffffff) !important;
    /* Ensure card background is solid */
    border: 1px solid var(--card-border, #eee) !important;
    overflow: hidden !important;
}

/* 3. The Aspect Ratio Fix (Crucial) */
#new-arrivals-carousel .product-item .position-relative,
#new-arrivals-carousel .product-item img {
    width: 100% !important;
    height: 300px !important;
    /* STRICT fixed height */
    object-fit: cover !important;
    /* Crop image to fit box perfectly */
    object-position: center !important;
    /* Center the subject */
    display: block !important;
    flex-shrink: 0 !important;
}

/* 4. Content Spacing (Mapped to .card-body for index.html compatibility) */
#new-arrivals-carousel .card-body,
#new-arrivals-carousel .product-content {
    flex-grow: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    padding: 15px !important;
}

/* 5. Truncate Long Titles (Safety) */
#new-arrivals-carousel h5,
#new-arrivals-carousel .product-title {
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    margin-bottom: 5px !important;
    font-size: 1.1rem !important;
    font-weight: 700 !important;
}

/* 6. Truncate Description to prevent overflow (Safety) */
#new-arrivals-carousel .card-text {
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    font-size: 0.85rem !important;
    margin-bottom: 0 !important;
}

/* --- TRENDING SECTIONS (Lifestyle Cards) --- */
/* Updated Trending Card to match New Arrivals Size */
.lifestyle-card {
    background: #fff;
    border: 1px solid #eee;
    /* Match standard card border */
    border-radius: 5px;
    /* standard corner radius */
    overflow: hidden;
    position: relative;
    margin-bottom: 20px;
    height: 100%;
    /* Fill the carousel item */
}

.lifestyle-card .img-wrapper {
    width: 100%;
    height: 280px;
    /* REDUCED from 400px to match standard products */
    overflow: hidden;
    position: relative;
}

.lifestyle-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Ensures image fills the box without stretching */
    transition: transform 0.5s ease;
}

.lifestyle-card:hover img {
    transform: scale(1.05);
    /* Gentle zoom */
}

.lifestyle-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    /* Subtle overlay */
    padding: 15px;
    text-align: center;
    z-index: 2;
    /* Ensure text overlay sits on top */
}

.lifestyle-content h3 {
    color: #fff;
    font-size: 1.1rem;
    /* Smaller font to match product titles */
    margin: 0;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --- FORCE OWL NAV ARROWS --- */
.owl-carousel .owl-nav button.owl-prev,
.owl-carousel .owl-nav button.owl-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background-color: #fff !important;
    /* White circle */
    color: #000 !important;
    /* Black arrow */
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 100;
    /* High z-index as requested */
    display: flex !important;
    align-items: center;
    justify-content: center;
    font-size: 24px !important;
    cursor: pointer;
    transition: all 0.3s ease;
}

.owl-carousel .owl-nav button.owl-prev {
    left: -25px;
}

.owl-carousel .owl-nav button.owl-next {
    right: -25px;
}

.owl-carousel .owl-nav button:hover {
    background-color: #000 !important;
    color: #fff !important;
    transform: translateY(-50%) scale(1.1);
    /* Pop effect */
}

/* Navbar Search Bar - Always White (Light/Dark Mode) */
#search-form .input-group {
    background-color: #fff !important;
    border-radius: 0.375rem;
}

#global-search,
[data-bs-theme="dark"] #global-search,
.dark-mode #global-search {
    box-shadow: none !important;
    border-color: #ced4da !important;
    background-color: #fff !important;
    color: #333 !important;
    max-width: 250px;
    transition: max-width 0.3s ease;
}

#global-search:focus,
[data-bs-theme="dark"] #global-search:focus,
.dark-mode #global-search:focus {
    max-width: 300px;
    border-color: #000 !important;
    background-color: #fff !important;
    color: #333 !important;
}

#global-search::placeholder {
    color: #6c757d !important;
}

/* =========================================
   UNIVERSAL PRODUCT CARD FIX (Force Fill)
   ========================================= */

/* 1. Define the Rigid Container (The Box) */
.lifestyle-card,
.lifestyle-card .img-wrapper,
.product-item .product-img,
.product-item .position-relative {
    width: 100% !important;
    height: 300px !important;
    /* Fixed height for ALL cards */
    position: relative;
    overflow: hidden;
    /* Cut off overflowing parts */
    background-color: #f0f0f0;
    /* Gray placeholder background */
    border-bottom: 1px solid #eee;
    /* Clean separation from text */
}

/* 2. Force the Image to Fill the Box */
.lifestyle-card .img-wrapper img,
.product-item .product-img img,
.product-item .position-relative img {
    width: 100% !important;
    height: 100% !important;
    /* Force image to touch top and bottom */
    object-fit: cover !important;
    /* The Magic: Zooms and crops to fit */
    object-position: top center;
    /* Focus on the top (head/shoulders) */
    display: block !important;
    /* Removes the 4px baseline gap */
    margin: 0 !important;
    padding: 0 !important;
}

/* 3. Ensure Hover Zoom still works */
.lifestyle-card:hover .img-wrapper img,
.product-item:hover .product-img img,
.product-item:hover .position-relative img {
    transform: scale(1.1);
    transition: transform 0.5s ease;
}

/* ============================================
   PRODUCT CARD IMAGE FIX - Uniform Height
   ============================================ */

/* 1. Force the Wrapper to be a specific shape (3:4 Ratio) */
.product-item .product-img,
.product-item .position-relative {
    position: relative;
    width: 100%;
    height: 380px;
    /* Adjust this to match your desired card height */
    overflow: hidden;
    /* Cut off anything that sticks out */
    background-color: #f8f9fa;
    /* Light grey placeholder so gaps aren't white */
}

/* 2. Force the Image to fill that wrapper completely */
.product-item .product-img img,
.product-item .position-relative img,
.product-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* THE MAGIC FIX: Zooms image to fill gaps */
    object-position: center top;
    /* Focus on the top of the product (usually the head/neck) */
    transition: all 0.5s;
}

/* 3. Ensure Hover effects still work */
.product-item:hover .product-img img,
.product-item:hover .position-relative img,
.product-item:hover img {
    transform: scale(1.1);
    /* Gentle zoom on hover */
}

#search-icon,
.input-group-text,
[data-bs-theme="dark"] .input-group-text,
.dark-mode .input-group-text,
#search-form .input-group-text {
    background-color: #fff !important;
    border-color: #ced4da !important;
    color: #6c757d !important;
}

/* --- FIX FOR HORIZONTAL WHITESPACE GAP --- */
.lifestyle-card {
    height: 300px !important;
    /* 1. Force the outer card to a fixed height */
    background: transparent !important;
    /* 2. Remove white background so gaps aren't visible */
    border: none !important;
    /* 3. Remove border if it's creating spacing issues */
    padding: 0 !important;
    /* 4. Ensure no internal padding creates space */
    margin-bottom: 0 !important;
}

.lifestyle-card .img-wrapper {
    height: 100% !important;
    /* 5. Force image wrapper to fill 100% of the card */
    width: 100% !important;
    margin: 0 !important;
}

.lifestyle-card .img-wrapper img {
    height: 100% !important;
    /* 6. Force actual image to fill the wrapper */
    object-fit: cover !important;
    display: block !important;
    /* 7. Kills the text-baseline gap */
}

/* Contact Page Mobile Fix */
@media (max-width: 991px) {
    .contact-hero {
        height: auto !important;
        /* Let it grow tall */
        padding-bottom: 50px;
    }

    .contact-hero .container {
        position: relative !important;
        /* Stop floating */
        top: 0 !important;
        left: 0 !important;
        transform: none !important;
        margin-top: 50px;
        width: 100% !important;
    }
}

/* --- Modern Blog Card Styles --- */
.blog-card-modern {
    background: #fff;
    /* Clean white background */
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.4s ease;
    border: 1px solid #eee;
    height: 100%;
    position: relative;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.blog-card-modern:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    border-color: #28a745;
    /* Trendwave Green */
}

.blog-img-wrapper {
    height: 240px;
    width: 100%;
    overflow: hidden;
    position: relative;
}

.blog-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.blog-card-modern:hover .blog-img-wrapper img {
    transform: scale(1.1);
    /* Zoom effect */
}

.blog-date {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(40, 167, 69, 0.9);
    /* Green Badge */
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.blog-content {
    padding: 25px;
}

.blog-category {
    color: #28a745;
    text-transform: uppercase;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    display: block;
    margin-bottom: 10px;
}

.blog-content h3 {
    font-size: 1.25rem;
    margin-bottom: 15px;
    font-weight: 700;
    line-height: 1.4;
}

.read-more-link {
    color: #333;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    transition: color 0.3s;
}

.read-more-link:hover {
    color: #28a745;
}

.read-more-link i {
    margin-left: 5px;
    transition: margin 0.3s;
}

.read-more-link:hover i {
    margin-left: 10px;
}

/* --- BLOG REPAIR KIT --- */
.blog-card-modern {
    background-color: #ffffff !important;
    /* Force white background */
    display: flex;
    flex-direction: column;
}

.blog-img-wrapper img {
    object-fit: cover !important;
}

/* --- 3D LIVING CTA SECTION --- */
.cta-section {
    /* 1. Deep Space Background */
    background: radial-gradient(circle at center, #1e293b 0%, #0f172a 100%) !important;
    position: relative;
    overflow: hidden;
    padding: 100px 0 !important;
    /* 2. The "Tech Grid" Pattern */
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px) !important;
    background-size: 40px 40px !important;
    /* Creates the grid boxes */
}

.cta-card,
body.dark-mode .cta-card {
    background: linear-gradient(135deg, #f0fff4 0%, #ffffff 100%) !important;
    /* Vibrant Light Green Tint */
    border: 1px solid #dcfce7 !important;
    border-top: 10px solid #28a745 !important;
    /* Bold 10px Athletic Sidebar */
    box-shadow:
        0 20px 25px -5px rgba(40, 167, 69, 0.1),
        0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
    border-radius: 16px !important;
    padding: 60px 40px !important;
    position: relative;
    z-index: 10;
    overflow: hidden;
}

/* Typography Updates (Forced Black for Visibility) */
.cta-card h2,
body.dark-mode .cta-card h2 {
    color: #000000 !important;
    font-weight: 800;
    letter-spacing: -1px;
    font-size: 3rem;
    margin-bottom: 20px;
}

.cta-card p,
body.dark-mode .cta-card p {
    color: #1a1a1a !important;
    /* Almost pure black for extreme readability */
    font-size: 1.15rem;
    margin-bottom: 40px;
}

/* Why Choose Us: Wow Redesign Styling */
.benefits-title,
body.dark-mode .benefits-title {
    color: #166534 !important;
    /* Deeper Green for contrast */
    font-size: 1.75rem !important;
    font-weight: 800 !important;
    letter-spacing: 1px;
}

.benefit-card,
body.dark-mode .benefit-card {
    background: #ffffff !important;
    border: 1px solid #dcfce7 !important;
    border-radius: 15px !important;
    transition: all 0.3s ease !important;
}

.benefit-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(40, 167, 69, 0.15) !important;
    border-color: #28a745 !important;
}

.benefit-icon-wrapper {
    width: 60px;
    height: 60px;
    background: #f0fdf4;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    transition: all 0.3s ease;
}

.benefit-card:hover .benefit-icon-wrapper {
    background: #28a745;
    transform: scale(1.1);
}

.benefit-icon {
    font-size: 1.5rem;
    color: #28a745;
}

.benefit-card:hover .benefit-icon {
    color: #ffffff;
}

.benefit-card h5,
body.dark-mode .benefit-card h5 {
    color: #000000 !important;
    font-weight: 700 !important;
    font-size: 1.1rem !important;
}

.benefit-card p,
body.dark-mode .benefit-card p {
    color: #4b5563 !important;
    font-size: 0.9rem !important;
}

/* The Button (High Contrast - Branded Design) */
.cta-card .btn-dark-puma,
body.dark-mode .cta-card .btn-dark-puma {
    color: #000000 !important;
    border: 2px solid #000000 !important;
    background: #ffffff !important;
    border-radius: 8px !important;
    padding: 15px 45px !important;
    font-size: 1.1rem !important;
    letter-spacing: 1px;
    font-weight: 800 !important;
    transition: all 0.3s ease-in-out !important;
}

.cta-card .btn-dark-puma::before,
body.dark-mode .cta-card .btn-dark-puma::before {
    display: none !important;
}

.cta-card .btn-dark-puma:hover,
body.dark-mode .cta-card .btn-dark-puma:hover {
    color: #ffffff !important;
    background: #000000 !important;
    /* Flip to black for stark contrast */
    border-color: #000000 !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4) !important;
    transform: translateY(-3px) !important;
}

/* CTA Card Lock Enforced */