/* Custom Styles for Homepage Redesign */

:root {
    --primary-color: #52b6b2;
    --primary-color-hover: #45a09d;
}

/* Brand Color Overrides */
a {
    color: var(--primary-color);
}

a:hover {
    color: var(--primary-color-hover);
}

.btn-primary {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: #fff !important;
}

.btn-primary:hover, .btn-primary:focus {
    background-color: var(--primary-color-hover) !important;
    border-color: var(--primary-color-hover) !important;
    color: #fff !important;
}

.text-primary {
    color: var(--primary-color) !important;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

/* Slider Nav & Dots Overrides */
.owl-carousel .owl-nav button[class*=owl-] {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}

.owl-carousel .owl-nav button[class*=owl-]:hover {
    background-color: var(--primary-color-hover) !important;
}

.owl-theme .owl-dots .owl-dot.active span {
    background: var(--primary-color) !important;
}

/* Hero Slider Adjustments */
.home-slider .banner-content h2.text-shadow {
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

/* Force Equal Height for Hero Slider */
.home-slider .home-slide {
    height: 600px; /* Fixed height for desktop */
}

.home-slider .slide-bg {
    height: 100%;
    object-fit: cover;
}

.home-slider{
    .owl-next, .owl-prev{
        color: #fafafa !important;
    }
} 

@media (max-width: 768px) {
    .home-slider .home-slide {
        height: 350px; /* Fixed height for mobile */
    }
}

/* Circular Categories */
.product-category.category-circular figure {
    border-radius: 50%;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    margin-bottom: 1rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    border: 3px solid #fff;
}

.product-category.category-circular:hover figure {
    transform: translateY(-5px);
    border-color: var(--primary-color);
}

.product-category.category-circular .category-content {
    text-align: center;
}

/* Special Offers / Deal Section Styles */
.deal-products-section {
    padding: 3rem 0;
}

.deal-product {
    background: #fff;
    padding: 20px;
    border: 1px solid #eee;
    height: 100%;
}

.deal-product figure {
    position: relative;
    margin-bottom: 2rem;
}

.product-countdown-container {
    padding: 1rem;
    background: #f4f4f4;
    border-radius: 5px;
    text-align: center;
    margin-top: 1rem;
}

.product-countdown-title {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    color: #333;
}

.product-countdown {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.product-countdown .countdown-section {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.product-countdown .countdown-amount {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary-color);
}

.product-countdown .countdown-period {
    font-size: 1rem;
    text-transform: uppercase;
    color: #777;
}

.deal-product .btn-add-cart {
    width: 100%;
    justify-content: center;
    padding: 1.2rem;
    font-size: 1.4rem;
    background-color: var(--primary-color) !important;
}

/* Row Joined / Divide Styles */
.products-with-divide {
    border: 1px solid #eee;
    background: #fff;
}

.row-joined [class*="col-"] {
    border-right: 1px solid #eee;
    border-bottom: 1px solid #eee;
    padding: 20px;
}

.row-joined .product-default {
    margin-bottom: 0;
}

.product-label.label-hot {
    background-color: #28a745; /* Modern Green for Hot */
}

.product-label.label-sale {
    background-color: #e27c7c; /* Soft Red for Sale */
}

/* "Sleep Better for Less" Cards */
.category-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 2rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

.badge-price {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--primary-color);
    color: #fff;
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Fabric Samples Banner */
.fabric-banner {
    background: var(--primary-color);
    color: #fff;
    padding: 4rem 0;
    text-align: center;
}

.fabric-banner h2 {
    color: #fff;
    font-weight: 700;
    margin-bottom: 1rem;
}

/* Best Sellers section */
.best-sellers-section .section-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: #333;
}

.product-default.inner-quickview figure img {
    width: 100%;
    height: 300px; /* Fixed height for product images */
    object-fit: cover;
}

.product-default.inner-quickview .product-details {
    padding-top: 15px;
    text-align: center;
}

/* Inspiration Grid */
.inspiration-grid .banner {
    position: relative;
    height: 300px;
    overflow: hidden;
}

.inspiration-grid .banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.inspiration-grid .banner:hover img {
    transform: scale(1.05);
}

.inspiration-grid .banner-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    z-index: 1;
}

/* Testimonials Section Styles (Trustpilot-inspired) */
.testimonials-section {
    padding: 60px 0;
    background-color: #fff;
    overflow: hidden;
}

.tp-summary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    font-size: 1.6rem;
    font-weight: 700;
}

.tp-stars-container {
    display: flex;
    gap: 3px;
}

.tp-star {
    background-color: #00b67a; /* Trustpilot Green */
    color: #fff;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    border-radius: 2px;
}

.tp-count {
    color: var(--primary-color); /* Brand Teal */
    text-decoration: underline;
}

.tp-logo {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 1.4rem;
}

.tp-logo i {
    color: #00b67a !important;
    font-size: 2rem;
}

/* Testimonial Card */
.testimonial-card {
    background-color: #f1f7f9;
    border-radius: 12px;
    padding: 30px;
    min-height: 280px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-align: left;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin: 5px;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.testimonial-card .testimonial-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 12px;
    line-height: 1.2;
}

.testimonial-card p {
    font-size: 1.35rem;
    line-height: 1.5;
    color: #444;
    margin-bottom: 15px;
}

.testimonial-footer {
    border-top: 1px solid rgba(0,0,0,0.05);
    padding-top: 15px;
    margin-top: auto;
}

.testimonial-footer .client-name {
    display: block;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-color);
}

.testimonial-footer .client-date {
    display: block;
    font-size: 1.2rem;
    color: #777;
    margin-bottom: 8px;
}

.tp-stars-small {
    display: flex;
    gap: 2px;
}

.tp-stars-small .tp-star {
    width: 16px;
    height: 16px;
    font-size: 0.8rem;
}

/* Carousel Nav Override */
.testimonials-section .owl-nav .owl-prev,
.testimonials-section .owl-nav .owl-next {
    background-color: var(--primary-color) !important;
    color: #fff !important;
    border-radius: 50% !important;
    width: 40px !important;
    height: 40px !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 1.8rem !important;
}

.testimonials-section .owl-nav .owl-prev { left: -50px !important; }
.testimonials-section .owl-nav .owl-next { right: -50px !important; }

@media (max-width: 1200px) {
    .testimonials-section .container {
        padding-left: 60px;
        padding-right: 60px;
    }
}

@media (max-width: 768px) {
    .testimonials-section .owl-nav { display: none !important; }
    .testimonials-section .container {
        padding-left: 15px;
        padding-right: 15px;
    }
}

/* Centered Button */
.btn-read-more {
    background-color: var(--primary-color) !important;
    color: #fff !important;
    border: none;
    padding: 12px 35px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1.4rem;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.btn-read-more:hover {
    background-color: var(--primary-color-hover) !important;
    transform: scale(1.05);
}

.bg-gray {
    background-color: #f8f9fa;
}

/* Responsive Tweaks */
@media (max-width: 768px) {
    .fabric-banner {
        padding: 2.5rem 0;
    }
    .inspiration-grid .banner {
        height: 200px;
    }
}


/* Expert Inspiration & Guidance Section */
.expert-inspiration-section {
    padding: 60px 0;
    background-color: #fff;
}

.expert-inspiration-section .section-title {
    display: inline-block;
    border-bottom: 2px solid #333;
    padding-bottom: 5px;
    margin-bottom: 40px;
    font-size: 2.2rem;
    font-weight: 700;
}

.expert-banner {
    position: relative;
    margin-bottom: 60px; /* Space for the overlapping card */
}

.expert-banner img {
    width: 100%;
    height: 450px;
    object-fit: cover;
    border-radius: 4px;
}

.expert-card {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    width: 85%;
    padding: 30px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border-radius: 4px;
    z-index: 2;
}

.expert-card h3 {
    font-size: 2rem;
    color: #444;
    margin-bottom: 10px;
    font-weight: 600;
}

.expert-card .card-divider {
    width: 40px;
    height: 2px;
    background-color: var(--primary-color);
    margin: 15px auto;
}

.expert-card p {
    font-size: 1.35rem;
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
}

.expert-card .btn-expert {
    background-color: #3b475c; /* Using a darker tone for contrast as per mockup, or use --primary-color */
    color: #fff !important;
    padding: 10px 30px;
    font-size: 1.3rem;
    font-weight: 700;
    text-transform: none;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.expert-card .btn-expert:hover {
    background-color: var(--primary-color);
}

@media (max-width: 991px) {
    .expert-banner img {
        height: 350px;
    }
    .expert-card {
        width: 90%;
        padding: 20px;
    }
}

@media (max-width: 767px) {
    .expert-banner {
        margin-bottom: 80px;
    }
    .expert-banner img {
        height: 300px;
    }
    .expert-card h3 {
        font-size: 1.8rem;
    }
}

.owl-carousel .owl-nav button.owl-next, .owl-carousel .owl-nav button.owl-prev, .owl-carousel button.owl-dot {
    background: none;
    color: inherit;
    border: 0;
    padding: 0 !important;
    font: inherit;
    border-radius: 50%;
    width: 50px;
    height: 50px;
}

/* Fix: allow carousel items to overflow so hover effects aren't clipped */
.categories-slider .owl-stage-outer,
.categories-slider .owl-stage {
    overflow: visible !important;
}

.categories-section .product-category {
    overflow: visible; /* ensure individual item can overflow */
}

.categories-section .product-category:hover {
    z-index: 5; /* bring hovered item above neighbors */
}

.categories-section .product-category figure img {
    display: block;
    max-width: 100%;
    height: auto;
}