/* style.css */

/* General Styles */
body {
    font-family: sans-serif;
    margin: 0;
    color: #333;
    line-height: 1.6;
}

.container {
    width: 80%;
    margin: 0 auto;
    max-width: 1200px;
    padding: 20px;
}

h2 {
    font-size: 2.5em;
    margin-bottom: 20px;
    text-align: center;
    color: #4a4a4a;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: #007bff; /* Example link color */
}

/* Header Styles */
header {
    background-color: #f8f8f8;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header .logo {
    margin-right: 20px; /* Adjust spacing between logo and title */
}

header .logo img {
    height: 50px; /* Adjust logo height as needed */
    vertical-align: middle; /* Align logo with title text */
}

header h1 a, header .logo a {
    display: inline-block; /* Make title and logo clickable area */
    color: inherit; /* Inherit color from header styles */
}


header h1 {
    margin: 0;
    font-size: 1.8em;
    color: #333;
}

header nav ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
}

header nav ul li {
    margin-left: 20px;
}

header nav ul li a {
    color: #555;
    padding: 8px 12px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

header nav ul li a:hover {
    background-color: #ddd;
}

/* Hero Section Styles */
#hero {
    overflow: hidden; /* Clip slideshow overflow */
    position: relative; /* For positioning slideshow container */
    padding-top: 0; /* Reset default padding */
    padding-bottom: 80px; /* Add padding below the slideshow */
}

.hero-slideshow-container {
    position: relative; /* For positioning hero text */
    display: flex;
    justify-content: center;
    align-items: center;
    height: 500px; /* Adjust slideshow height */
    perspective: 1000px; /* For 3D effect */
}

.hero-slideshow {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d; /* Enable 3D transformations for children */
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0; /* Initially hidden */
    transition: opacity 1s ease-in-out, transform 1s ease-in-out; /* Smooth transitions */
    transform: translateX(100%); /* Start off-screen to the right */
    z-index: 0; /* Stack order */
}

.slide.active {
    opacity: 1; /* Make active slide visible */
    transform: translateX(0) rotateY(0deg); /* Center and no rotation for active slide */
    z-index: 1; /* Bring active slide to front */
}

.slide.prev {
    opacity: 0;
    transform: translateX(-100%) rotateY(-45deg); /* Slide from left, slight rotation */
    z-index: 0;
}

.slide.next {
    opacity: 0;
    transform: translateX(100%) rotateY(45deg); /* Slide from right, slight rotation */
    z-index: 0;
}


.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Cover container, crop if needed */
    border-radius: 0; /* Adjust if you want rounded corners on slides */
    display: block; /* Prevent extra space below image */
}

.hero-text {
    position: absolute; /* Overlay text on slideshow */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white; /* Text color on slideshow */
    z-index: 2; /* Ensure text is on top of slides */
    background-color: rgba(0, 0, 0, 0.4); /* Optional background for text readability */
    padding: 30px;
    border-radius: 10px;
    max-width: 80%; /* Limit text width */
}

.hero-text h2, .hero-text p {
    color: white; /* Ensure text inside hero-text is white */
}


/* Shop Section Styles */
#shop {
    padding: 50px 0;
}

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

.categories {
    margin-bottom: 30px;
}

.category-button {
    padding: 10px 20px;
    margin: 5px;
    border: none;
    background-color: #eee;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.category-button:hover, .category-button.active {
    background-color: #ddd;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.product-item {
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    background-color: white;
    transition: transform 0.3s ease;
}

.product-item:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.product-image-container {
    overflow: hidden; /* To contain image zoom */
    position: relative; /* For zoom effect positioning */
}

.product-image {
    width: 100%;
    height: 200px; /* Fixed height for product images */
    object-fit: cover; /* Cover container, crop if needed */
    transition: transform 0.3s ease; /* Smooth zoom transition */
}

.product-item:hover .product-image {
    transform: scale(1.1); /* Zoom in on hover */
}


.product-info {
    padding: 15px;
    text-align: left;
}

.product-name {
    font-weight: bold;
    margin-bottom: 5px;
    font-size: 1.1em;
}

.product-description {
    color: #777;
    font-size: 0.9em;
    margin-bottom: 10px;
    overflow: hidden; /* Hide overflow text */
    text-overflow: ellipsis; /* Add ellipsis (...) for overflow */
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Limit to 2 lines */
    -webkit-box-orient: vertical;
}

.product-price {
    font-weight: bold;
    color: #555;
}


/* Product Modal Styles */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0,0,0,0.5); /* Black w/ opacity */
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto; /* 15% from the top and centered */
    padding: 20px;
    border: 1px solid #888;
    width: 80%; /* Could be more or less, depending on screen size */
    border-radius: 8px;
    position: relative; /* For close button positioning */
}

.close-button {
    color: #aaa;
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-button:hover,
.close-button:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.product-detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Two columns layout */
    gap: 20px;
    align-items: start; /* Align items to the start of the grid area */
}

.product-detail-gallery {
    /* Styles for the image gallery in modal */
}

.product-detail-info {
    text-align: left;
}

.product-detail-gallery-main-image {
    width: 100%;
    max-height: 500px; /* Adjust as needed */
    object-fit: contain; /* Or 'cover' depending on desired behavior */
    border-radius: 8px;
    margin-bottom: 10px;
}

.product-detail-gallery-thumbnails {
    display: flex;
    gap: 10px;
    overflow-x: auto; /* Enable horizontal scrolling for thumbnails */
}

.product-detail-thumbnail-image {
    width: 80px; /* Adjust thumbnail size */
    height: 80px;
    object-fit: cover;
    border-radius: 5px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s ease;
    border: 2px solid transparent;
}

.product-detail-thumbnail-image:hover, .product-detail-thumbnail-image.active-thumbnail {
    opacity: 1;
    border-color: #007bff; /* Highlight active thumbnail */
}


.product-detail-name {
    font-size: 2em;
    margin-bottom: 10px;
    color: #333;
}

.product-detail-description {
    margin-bottom: 20px;
    color: #555;
}

.product-detail-details-list {
    list-style: none;
    padding: 0;
}

.product-detail-details-list li {
    margin-bottom: 8px;
    font-size: 0.95em;
    color: #666;
}

.product-detail-contact-cta {
    margin-top: 20px;
    text-align: center;
}


/* About Us Section Styles */
#about {
    padding: 50px 0;
    background-color: #f8f8f8;
}

.about-container {
    /* Inherits container styles */
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: center;
}

.about-image img {
    border-radius: 8px;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.1);
}

.about-text h3 {
    font-size: 2em;
    color: #4a4a4a;
    margin-bottom: 15px;
}

.about-text p {
    color: #555;
    margin-bottom: 15px;
}


/* Contact Us Section Styles */
#contact {
    padding: 50px 0;
}

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

.contact-content {
    max-width: 700px;
    margin: 0 auto;
}

.contact-content p {
    margin-bottom: 20px;
    color: #555;
}

.contact-methods {
    display: flex;
    justify-content: center;
    gap: 30px;
}

.contact-method {
    display: flex;
    align-items: center;
}

.contact-icon {
    width: 30px;
    height: 30px;
    margin-right: 10px;
}


/* Footer Styles */
footer {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 20px 0;
}

.footer-container {
    /* Inherits container styles */
}


/* Responsive Design */
@media (max-width: 768px) {
    .container {
        width: 95%;
        padding: 15px;
    }

    header h1 {
        font-size: 1.5em;
    }

    header nav ul li {
        margin-left: 10px;
    }

    #hero {
        padding: 60px 0;
    }

    #hero h2 {
        font-size: 2.2em;
    }

    .product-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 20px;
    }

    .product-image {
        height: 150px; /* Adjust for smaller screens */
    }

    .modal-content {
        width: 95%;
        margin-top: 20%; /* Adjust modal position on smaller screens */
    }

    .product-detail-content {
        grid-template-columns: 1fr; /* Stack columns on smaller screens */
    }

    .about-content {
        grid-template-columns: 1fr; /* Stack columns on smaller screens */
        text-align: center;
    }

    .about-image {
        margin-bottom: 20px;
    }

    .contact-methods {
        flex-direction: column; /* Stack contact methods on smaller screens */
        gap: 20px;
    }
}