/* ===== GLOBAL ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --dark-brown: #4A2C2A; /* Define dark brown color */
}

html, body {
    overflow-x: hidden;
    overflow-y: visible; /* Ensure vertical scrolling is visible for sticky navbar */
    scroll-behavior: smooth;
    font-family: 'Poppins', sans-serif;
    background-color: #faf7f0;
    color: var(--dark-brown); /* Set default text color to dark brown */
}


/* ===== HERO ===== */
.hero {
    position: relative;
    width: 100%;
    height: calc(var(--vh, 1vh) * 100); /* 👈 use JS-calculated vh */
    display: flex;
    align-items: center;
    justify-content: flex-start; /* left-align content */
    text-align: left;
    padding: 0 100px;
    background: url('../upload/bg.jpg') center/cover no-repeat;
}

.hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.25); /* overlay */
}

.hero .hero-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
}

.hero h1 {
    font-size: 4rem;
    color: #fff;
    margin-bottom: 20px;
    text-shadow: 2px 2px 6px rgba(0,0,0,0.5);
}

.hero p {
    font-size: 1.4rem;
    color: #fff;
    margin-bottom: 30px;
    line-height: 1.5;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.5);
}

.section-title-left {
    font-size: 2.5rem; /* Adjusted to match "Shop by categories" h2 */
    font-weight: 600; /* Slightly bolder */
    margin: 0 0 10px; /* Adjusted margin-bottom to match "Shop by categories" h2 */
    color: var(--dark-brown); /* Changed to dark brown */
    position: relative; /* Needed for pseudo-element underline */
    padding-bottom: 5px; /* Space for the underline */
    text-align: left;
}

.section-title-left::after {
    content: "";
    position: absolute;
    bottom: -5px;
    left: 0; /* Align underline to the left */
    width: 100px;
    height: 4px;
    background-color: #E67E00;
}

.section-spacing {
    margin-bottom: 60px; /* Add spacing between sections */
}

.hero-btn {
    display: inline-block;
    padding: 12px 20px;
    font-size: 1.2rem;
    font-weight: 600;
    background: #E67E00; /* SteelBlue - bluish shade */
    color: #fff; /* White text for contrast */
    text-decoration: none;
    border-radius: 21px; /* Rounded corners */
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(70, 130, 180, 0.3); /* SteelBlue shadow */
}

.hero-btn:hover {
    background: #E67E00; /* Darker SteelBlue on hover */
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(70, 130, 180, 0.4); /* More pronounced darker SteelBlue shadow on hover */
}

/* ===== SECTION TITLES ===== */
.section-title {
    text-align: center;
    font-size: 2.5rem; /* Adjusted to match "Shop by categories" h2 */
    font-weight: 600; /* Slightly bolder */
    margin: 65px 0 10px; /* Adjusted margin-bottom to match "Shop by categories" h2 */
    color: var(--dark-brown); /* Changed to dark brown */
    position: relative; /* Needed for pseudo-element underline */
    padding-bottom: 5px; /* Space for the underline */
}

.new-collections-wrapper .section-title {
    margin-top: 0; /* Remove top margin when inside the wrapper */
    color: #fff; /* Change title color to white */
}

.section-title::after {
    content: "";
    position: absolute;
    bottom: -5px;
    left: 50%; /* Center the underline */
    transform: translateX(-50%); /* Center the underline */
    width: 100px;
    height: 4px;
    background-color: #E67E00;
}

.section-subtitle {
    text-align: center;
    font-size: 1.1rem; /* Adjusted to match "200 + unique products" */
    font-weight: 500;
    color: var(--dark-brown); /* Changed to dark brown */
    margin-bottom: 30px;
}

.new-collections-wrapper .section-subtitle {
    color: #fff; /* Change subtitle color to white */
}

/* ===== CAROUSEL ===== */
.full-carousel {
    position: relative;
    width: 100%;
    margin: 30px 0;
    overflow: hidden;
}

.full-carousel .carousel-track {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.full-carousel .carousel-track::-webkit-scrollbar {
    display: none;
}

.full-carousel .carousel-card {
    flex: 0 0 auto;
    width: 330px;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1); /* Adjusted shadow */
    display: flex;
    flex-direction: column;
    height: 420px;
    overflow: hidden;
}

.full-carousel .carousel-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.full-carousel .card-info {
    padding: 15px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1;
}

.full-carousel .card-info h3 {
    font-size: 1.2rem; /* Bigger font size */
    font-weight: 600; /* Less bold */
    margin-bottom: 8px; /* Adjusted margin */
}

.full-carousel .card-info p {
    font-weight: 500;
    color: var(--dark-brown);
    font-size: 1.3rem;
    margin-top: auto;
}

.full-carousel .carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 1.2rem;
    z-index: 10;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.full-carousel .carousel-btn.prev {
    left: 10px;
}

.full-carousel .carousel-btn.next {
    right: 10px;
}

/* ===== CATEGORIES ===== */
.categories-section {
    padding: 20px 20px; /* Reduced top padding to raise the section */
    background-color: #faf7f0; /* Set background color to white */
}

.categories-tabs {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.category-btn {
    background: none;
    border: none;
    font-weight: 600;
    font-size: 1rem;
    color: #555;
    padding: 8px 12px;
    cursor: pointer;
    position: relative;
    transition: 0.2s;
}

.category-btn.active {
    color: #222;
}

.category-btn.active::after {
    content: "";
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 3px;
    background: #E67E00; /* Orange color, consistent with hero-btn */
}

/* Desktop default - keep 4 per row */
/* Desktop default - 4 per row */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    max-width: 1300px;
    margin: 0 auto;
}

/* Tablet - 2 per row */
@media (max-width: 768px) {
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

/* ===== STAY IN TOUCH ===== */
.stay-in-touch {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #f8f8f8; /* Light background */
    padding: 60px 100px; /* Reduced padding */

    overflow: hidden; /* Ensure image doesn't overflow */
}

.stay-in-touch-content {
    flex: 1;
    max-width: 500px;
    text-align: left;
}

.stay-in-touch-content h2 {
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--dark-brown);
    margin-bottom: 15px;
}

.stay-in-touch-content p {
    font-size: 1.1rem;
    color: var(--dark-brown);
    line-height: 1.6;
    margin-bottom: 30px;
}

.newsletter-form {
    display: flex;
    width: 100%;
    max-width: 400px;
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
}

.newsletter-form input[type="email"] {
    flex: 1;
    padding: 12px 15px;
    border: none;
    font-size: 1rem;
    outline: none;
}

.newsletter-form button {
    background-color: #E67E00; /* Orange color */
    color: #fff;
    border: none;
    padding: 12px 20px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.newsletter-form button:hover {
    background-color: #d47300; /* Darker orange on hover */
}

.stay-in-touch {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #f8f8f8; /* Light background */
    padding: 60px 100px; /* Reduced padding */
    gap: 50px;
    overflow: hidden; /* Ensure image doesn't overflow */
    background: url('../upload/touchthumbnail.png') center/cover no-repeat; /* New background image */
    border-radius: 8px; /* Apply border-radius to the section itself */
    box-shadow: 0 10px 30px rgba(0,0,0,0.1); /* Apply shadow to the section itself */
    margin-top: 50px; /* Added to lower the section */
}

.stay-in-touch-image {
    display: none; /* Hide the image container */
}

/* Responsive adjustments for Stay in Touch section */
@media (max-width: 1200px) {
    .stay-in-touch {
        flex-direction: column;
        padding: 60px 50px;
        text-align: center;
    }

    .stay-in-touch-content {
        max-width: 100%;
        margin-bottom: 40px;
    }

    .stay-in-touch-content h2 {
        font-size: 2.2rem;
    }

    .newsletter-form {
        max-width: 500px;
        margin: 0 auto;
    }

    .stay-in-touch-image {
        width: 100%;
        height: 280px; /* Reduced height for tablet */
        min-width: unset;
    }
}

@media (max-width: 768px) {
    .stay-in-touch {
        padding: 40px 20px;
    }

    .stay-in-touch-content h2 {
        font-size: 1.8rem;
    }

    .stay-in-touch-content p {
        font-size: 1rem;
    }

    .newsletter-form {
        flex-direction: column;
        border: none;
        max-width: 300px;
    }

    .newsletter-form input[type="email"] {
        border: 1px solid #ddd;
        border-radius: 5px;
        margin-bottom: 10px;
    }

    .newsletter-form button {
        border-radius: 5px;
        font-size: 1rem;
        padding: 10px 15px;
    }

    .stay-in-touch-image {
        height: 200px; /* Reduced height for mobile */
    }
}

/* ===== SHOP BY CATEGORIES ===== */
.shop-by-categories {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 50px 100px;
    background-color: #faf7f0; /* Set background color to white */
    gap: 50px;
}

.shop-by-categories .category-info {
    flex: 1;
    max-width: 350px;
}

.shop-by-categories .category-info h2 {
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--dark-brown); /* Changed to dark brown */
    margin-bottom: 5px; /* Reduced spacing */
}

.shop-by-categories .category-info .underline {
    width: 60px;
    height: 4px;
    background-color: #E67E00;
    margin-bottom: 10px; /* Reduced spacing */
}

.shop-by-categories .category-info .product-count {
    display: flex;
    align-items: center;
    margin-bottom: 15px; /* Reduced spacing */
    color: var(--dark-brown); /* Changed to dark brown */
    font-size: 1.1rem;
}

.shop-by-categories .category-info .chair-icon {
    width: 30px;
    height: 30px;
    margin-right: 10px;
}

.shop-by-categories .category-info .view-all-btn {
    display: inline-block;
    font-size: 1rem;
    font-weight: 600;
    color: black;
    text-decoration: none;
    border-bottom: 2px solid #E67E00;
    padding-bottom: 5px;
    transition: color 0.3s ease, border-color 0.3s ease;
}

.shop-by-categories .category-info .view-all-btn:hover {
    color: #36648B;
    border-color: #36648B;
}

.shop-by-categories .category-cards {
    flex: 2;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.shop-by-categories .category-card {
    background-color: #fff; /* Set background color for cards to white */
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1); /* Added shadow */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 12px;
}

.shop-by-categories .category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.15); /* More pronounced shadow on hover */
}

.shop-by-categories .category-card img {
    width: 100%;
    max-height: 180px;
    object-fit: contain;
    margin-bottom: 15px;
}

.shop-by-categories .category-card p {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark-brown);
}

/* Responsive adjustments for Shop by Categories */
@media (max-width: 1200px) {
    .shop-by-categories {
        padding: 40px 50px;
        flex-direction: column;
        text-align: center;
        gap: 30px; /* Reduced gap between info and cards */
    }

    .shop-by-categories .category-info {
        max-width: 100%;
        margin-bottom: 20px; /* Reduced spacing */
    }

    .shop-by-categories .category-info .underline {
        margin: 0 auto 10px; /* Reduced spacing */
    }

    .shop-by-categories .category-info .product-count {
        justify-content: center;
        margin-bottom: 8px; /* Reduced spacing */
    }

    .shop-by-categories .category-cards {
        grid-template-columns: repeat(2, 1fr);
        max-width: 700px;
    }
}

@media (max-width: 768px) {
    .shop-by-categories {
        padding: 30px 20px;
        gap: 20px; /* Further reduced gap */
    }

    .shop-by-categories .category-info h2 {
        font-size: 2rem;
        margin-bottom: 5px;
    }

    .shop-by-categories .category-info .underline {
        margin: 0 auto 8px; /* Further reduced spacing */
    }

    .shop-by-categories .category-info .product-count {
        margin-bottom: 5px; /* Further reduced spacing */
    }

    .shop-by-categories .category-cards {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (max-width: 576px) {
    .shop-by-categories .category-info h2 {
        font-size: 1.8rem;
    }

    .shop-by-categories .category-info .product-count {
        font-size: 1rem;
    }

    .shop-by-categories .category-info .chair-icon {
        width: 25px;
        height: 25px;
    }

    .shop-by-categories .category-card img {
        max-height: 150px;
    }

    .shop-by-categories .category-card p {
        font-size: 1rem;
    }
}

/* Mobile - 2 per row */
@media (max-width: 480px) {
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .category-card img {
        height: 120px; /* Further reduce image height for smaller screens */
    }

    .category-card h3 {
        font-size: 0.9rem; /* Slightly smaller font */
        min-height: auto; /* Remove min-height to allow it to shrink */
        -webkit-line-clamp: 1; /* Limit to 1 line on very small screens */
    }

    .category-card .card-bottom {
        padding: 0 10px 10px;
    }
}

.category-card {
    background: #fafafa;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1); /* Added shadow */
    display: flex; /* Make it a flex container */
    flex-direction: column; /* Stack children vertically */
    height: 100%; /* Ensure cards take full height in grid */
}

.category-card img {
    width: 100%;
    height: 250px; /* Lowered default height for better proportion */
    object-fit: cover;
}

.category-card h3 {
    margin: 10px 15px; /* Adjusted margin to reduce space above text */
    font-size: 1rem; /* Smaller font size */
    font-weight: 500; /* Less bold */
    min-height: 40px; /* Adjusted minimum height */
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
   
    -webkit-box-orient: vertical;
}

.category-card .card-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 18px 15px;
    margin-top: auto; /* Push to the bottom */
}

.category-card .price {
    font-weight: 500;
    font-size: 1.1rem;
    color: var(--dark-brown);
}


.see-more-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 25px;
    flex-direction: column;
}

.see-more-btn {
    padding: 12px 25px;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    background: #E67E00; /* Orange color, consistent with hero-btn */
    color: #fff; /* White text for contrast */
    font-weight: bold;
    border-radius: 21px; /* Rounded corners, consistent with hero-btn */
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(70, 130, 180, 0.3); /* SteelBlue shadow */
}

.see-more-btn:hover {
    background: #d47300; /* Darker orange on hover */
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(230, 126, 0, 0.4); /* More pronounced darker orange shadow on hover */
}

#no-more {
    margin-top: 10px;
    color: var(--dark-brown);
    font-size: 0.95rem;
    display: none;
}

/* ===== MOBILE RESPONSIVE ===== */
@media (max-width: 1200px) {
    .hero {
        padding: 0 50px;
    }
    .hero h1 {
        font-size: 3rem;
    }
    .hero p {
        font-size: 1.2rem;
    }
}

/* Custom styles for categories carousel in index.php */
.category-carousel-container {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.category-cards-track {
    display: flex;
    gap: 20px;
    /* Remove overflow-x: auto; and scroll-behavior: smooth; as CSS animation will handle movement */
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
    padding-bottom: 10px; /* Space for potential scrollbar on some systems */
    animation: scrollLeft 20s linear infinite; /* Made faster */
}


@keyframes scrollLeft {
    0% {
        transform: translateX(0);
    }
    100% {
        /* Calculate the width of one set of original cards (5 cards * 280px width + 5 gaps * 20px) */
        /* (5 * 280px) + (4 * 20px) = 1400px + 80px = 1480px */
        /* Or, more simply, 5 cards * (280px + 20px) = 5 * 300px = 1500px */
        transform: translateX(calc(-1 * (280px * 5 + 20px * 4))); /* Translate by the width of the original set of cards */
    }
}

.category-cards-track::-webkit-scrollbar {
    display: none; /* Hide scrollbar for Chrome, Safari, Opera */
}

/* Remove category-carousel-btn styles as buttons are being removed */

.shop-by-categories .category-card {
    flex: 0 0 auto; /* Prevent cards from shrinking */
    width: 280px; /* Fixed width for carousel items */
    /* Ensure other styles like padding, text-align, box-shadow are applied from existing .category-card */
}

/* Custom styles for categories carousel in newLandingpage.php */
#categories-carousel::-webkit-scrollbar {
    display: none; /* Hide scrollbar for Chrome, Safari, Opera */
}

#categories-carousel {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

@media (max-width: 992px) {
    .hero {
        height: 85vh; /* increased for bigger hero on medium screens */
        padding: 0 40px;
        justify-content: center;
        text-align: center;
    }
    .hero h1 {
        font-size: 2.5rem;
    }
    .hero p {
        font-size: 1.1rem;
    }
    .full-carousel .carousel-card {
        width: 280px;
        height: 380px;
    }
    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 0 20px;
        height: 100vh; /* full mobile screen height */
        justify-content: center;
        text-align: center;
    }
    .hero h1 {
        font-size: 2rem;
    }
    .hero p {
        font-size: 1rem;
    }
    .full-carousel .carousel-card {
        width: 240px;
        height: 350px;
    }
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    .section-title {
        font-size: 2.2rem;
    }
    .section-subtitle {
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .hero {
        padding: 0 15px;
        height: 100vh; /* full mobile screen height */
    }
    .hero h1 {
        font-size: 1.6rem;
    }
    .hero p {
        font-size: 0.95rem;
    }
    .full-carousel .carousel-card {
        width: 200px;
        height: 320px;
    }
    .categories-grid {
        grid-template-columns: repeat(2, 1fr); /* Make it 2x2 on mobile */
        gap: 10px;
    }
    .hero-btn, .see-more-btn {
        font-size: 1rem;
        padding: 10px 16px;
    }
}

/* ===== ROOM CATEGORIES ===== */
.room-categories {
    display: flex;
    justify-content: center;
    gap: 20px; /* Add space between cards */
    width: 100%; /* Make it span full viewport width */
    padding: 0 20px; /* Add spacing on left and right sides */
    /* Removed background-color from here */
}

.new-collections-wrapper {
    background: linear-gradient(to bottom, #8d745d, #faf7f0); /* Apply linear gradient from original bottom color to #faf7f0 */
    padding: 20px 0 50px 0; /* Add more bottom padding to the wrapper */
}

/* Fade-in animation styles */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.room-card {
    position: relative;
    width: calc(50% - 10px); /* Each card takes 50% of the viewport width minus half the gap */
    height: 500px; /* Increased height */
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-align: center;
    border-radius: 0; /* Remove border-radius to touch edges */
    overflow: hidden;
}

.room-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3); /* Dark overlay */
    z-index: 1;
}

.room-card.living-room {
    background-image: url('../upload/livingroomthumbnail.jpeg'); /* Placeholder image */
}

.room-card.dining-room {
    background-image: url('../upload/diningroomthumbnail.jpg'); /* Placeholder image */
}

.room-content {
    position: relative;
    z-index: 2;
    padding: 20px;
}

.room-content .subtitle {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 5px;
    letter-spacing: 1px;
    text-transform: uppercase;
    opacity: 0.8;
    color: #fff; /* Changed text color to white */
}

.room-content h3 {
    font-size: 2.5rem;
    font-weight: 500;
    margin-bottom: 20px;
    color: #fff; /* Changed text color to white */
}

.shop-now-btn {
    display: inline-block;
    padding: 12px 25px;
    font-size: 1rem;
    font-weight: 600;
    background: #FF8C00; /* Orange color for shop now button */
    color: #fff;
    text-decoration: none;
    border-radius: 25px;
    transition: background-color 0.3s ease;
}

.shop-now-btn:hover {
    background: #E67E00; /* Darker orange on hover */
}

/* Responsive adjustments for Room Categories */
@media (max-width: 992px) {
    .room-categories {
        flex-direction: column;
        padding: 40px 50px;
    }

    .room-card {
        width: 100%; /* Make cards take full width when stacked */
        height: 400px;
    }

    .room-content h3 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .room-categories {
        padding: 30px 20px;
    }

    .room-card {
        height: 350px;
    }

    .room-content h3 {
        font-size: 1.8rem;
    }

    .shop-now-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .room-categories {
        gap: 20px;
        padding: 20px 15px; /* Adjust padding for very small screens */
    }

    .room-card {
        height: 300px;
    }

    .room-content h3 {
        font-size: 1.5rem;
    }

    .room-content .subtitle {
        font-size: 0.8rem;
    }
}

/* Animation for products appearing */
.product-fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 0.5s ease-out forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
