/* Reset default styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: #000000; /* Light Gray */
    color: #fcffe2;
}

/* ======= Main Container ======= */
main {
    flex: 1;
}

/* ======= Hero Section ======= */
.hero {
    position: relative;
    height: 40vh; /* Adjust the height as needed */
    overflow: hidden;
    display: flex;
    flex-direction: column; /* Arrange items in a column */
    align-items: center; /* Center items horizontally */
    justify-content: center; /* Center items vertically */
    text-align: center; /* Center text */
    width: 100%; /* Ensure the hero section takes up full width */
}

#hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    z-index: 1;
    transform: translate(-50%, -50%);
    background-size: cover;
    pointer-events: none;
}

.hero .typewriter-container,
.hero button {
    position: relative;
    z-index: 2;
    margin-bottom: 20px; /* Adjust space between elements */
}

.hero::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* Overlay to enhance text visibility */
    z-index: 1;
}

.hero h1 {
    font-size: 2.5rem; /* Default font size for larger screens */
    margin-bottom: 10px;
}

.hero p {
    font-size: 16px; /* Default font size for larger screens */
    margin-bottom: 20px; /* Add margin for spacing */
}

.hero button {
    padding: 18px 30px; /* Default padding for larger screens */
    font-size: 1.3rem; /* Default font size for larger screens */
    border: none;
    background-color: #201f1f;
    color: white;
    cursor: pointer;
    border-radius: 10px;
    transition: background 0.3s ease, transform 0.3s ease;
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem; /* Smaller font size for tablets */
    }

    .hero p {
        font-size: 14px; /* Smaller font size for tablets */
    }

    .hero button {
        padding: 14px 24px; /* Smaller padding for tablets */
        font-size: 1.1rem; /* Smaller font size for tablets */
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.5rem; /* Even smaller font size for mobile devices */
    }

    .hero p {
        font-size: 12px; /* Even smaller font size for mobile devices */
    }

    .hero button {
        padding: 12px 20px; /* Even smaller padding for mobile devices */
        font-size: 1rem; /* Even smaller font size for mobile devices */
    }
}

.hero button:hover {
    background-color: #666666; /* Darker Grey */
    transform: translateY(-2px);
}

/* ======= Featured Products ======= */
.featured-products {
    background-color: #000000;
    padding: 20px 20px; /* Adjust padding */
    margin-bottom: 20px; /* Add margin */
    text-align: center;
}

.featured-products h2 {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 20px;
    color: #fcffe2;
}

.products h2 {
    padding-top: 16px;
    padding-left: 10px;
    color: #fcffe2;
}

/* ======= Responsive Product Grid ======= */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); /* Ensure responsiveness with flexible columns */
    gap: 20px;
    padding: 16px 20px;
    justify-content: center;
}

@media (max-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); /* Adjusted columns */
    }
}

@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); /* Adjusted columns */
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); /* Adjusted columns */
    }
}

/* Product Card */
.product-card {
    background: white;
    max-width: 100%; /* Ensure product cards do not overflow */
    width: 100%;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* Ensure images maintain aspect ratio */
.product-card img {
    width: 100%;
    max-height: 300px; /* Limits the height */
    object-fit: cover; /* Maintains aspect ratio */
    border-radius: 10px;
}

.product-card h2 {
    font-size: 18px; /* Adjusted font size */
    margin: 12px 0;
    color: #333
}

.price {
    font-size: 1rem; /* Adjusted font size */
    font-weight: bold;
    color: #f54343;
    margin-bottom: 10px;
}

/* View button */
.view-btn {
    display: inline-block;
    background-color: #007bff; /* Blue color */
    color: rgb(255, 255, 255);
    padding: 8px 15px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: 0.3s;
}

.view-btn:hover {
    background-color: #0056b3;
}

.out-of-stock {
    background-color: gray !important;
    font-style: italic;
    cursor: not-allowed;
}

/* No Products Message */
.no-products {
    text-align: center;
    font-size: 1.1rem;
    color: #777;
    margin-top: 20px;
}

/* Typewriter Container */
.typewriter-container {
    max-width: 600px; /* Adjust this value as needed */
    margin: 0 auto;
    overflow: hidden;
}

.typewriter h1,
.typewriter p {
    overflow: hidden; /* Ensures that the text is hidden */
    border-right: 0.15em solid #fff; /* Cursor effect */
    white-space: nowrap; /* Prevents text from wrapping */
    margin: 0 auto; /* Center the text */
    letter-spacing: 0.15em; /* Adjust this value for cursor distance */
    animation: typing 3s steps(30, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

@keyframes blink-caret {
    from,
    to {
        border-color: transparent;
    }
    50% {
        border-color: white;
    }
}

@keyframes fade-caret {
    from {
        border-color: white;
    }
    to {
        border-color: transparent;
    }
}

/* Blink caret after typing is done */
.typewriter h1.completed,
.typewriter p.completed {
    animation: blink-caret 0.75s step-end infinite;
}

/* Fade out caret */
.typewriter h1.hide-caret,
.typewriter p.hide-caret {
    animation: fade-caret 0.5s forwards;
}


.image-upload-btn {
    padding: 10px;
    cursor: pointer;
    color: #555;
    transition: color 0.3s;
}

.image-upload-btn:hover {
    color: #000;
}


.image-preview {
    position: relative;
    margin: 5px;
    max-width: 100px;
    max-height: 100px;
    overflow: hidden;
    border-radius: 5px;
}

.image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.remove-image {
    position: absolute;
    top: 0;
    right: 0;
    background: rgba(0,0,0,0.5);
    color: white;
    width: 20px;
    height: 20px;
    text-align: center;
    line-height: 20px;
    cursor: pointer;
    z-index: 2;
}


.message-image {
    margin-bottom: 5px;
}

.message-image img {
    max-width: 200px;
    max-height: 200px;
    border-radius: 5px;
    cursor: pointer;
    transition: opacity 0.3s;
}

.message-image img:hover {
    opacity: 0.8;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 80%;
    max-height: 80%;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}
