/* industricraft/static/css/styles.css */

/* Colors */
:root {
    --dark-brown: #4c3424;
    --medium-brown: #724e37;
    --light-brown: #996849;
    --tan: #b58465;
    --beige: #c7a38c;
    --light-beige: #dac1b2;
    --off-white: #ece0d8;
    --dark-accent: #1e323e;
    --medium-accent: #2d4b5d;
    --light-accent: #6294b3;
}

/* Ensure no overflow and proper sizing */
html, body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden; /* Prevent horizontal overflow */
    box-sizing: border-box;
    font-family: Arial, sans-serif;
    background-color: var(--off-white);
    color: var(--dark-brown);
    display: flex;
    flex-direction: column;
    align-items: center;
}

*, *::before, *::after {
    box-sizing: inherit; /* Include padding and border in element's total size */
}

header {
    width: 100%;
    background-color: var(--medium-brown); /* Changed to brown color */
    padding: 20px 0;
    text-align: center;
}

header .logo img {
    max-width: 150px;
}

.container {
    width: 90%;
    max-width: 800px;
    background-color: var(--off-white);
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 40px;
    margin: 20px auto;
    text-align: center;
}

.bio {
    margin-bottom: 30px;
}

.products {
    margin-bottom: 30px;
    overflow: hidden; /* Hide any vertical overflow */
}

.product {
    flex: 0 0 auto; /* Prevent the product items from shrinking */
    width: 150px; /* Width of each product image */
}

.product img {
    width: 100%; /* Make the image take full width of the container */
    height: auto; /* Ensure the aspect ratio is maintained */
    border-radius: 5px; /* Optional: Add a slight border radius */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Optional: Add a shadow for depth */
}

@media (max-width: 600px) {
    .product img {
        max-width: 100%; /* Ensure images don't overflow on small screens */
    }
}

.shop-links {
    margin-bottom: 30px;
}

.shop-button {
    display: block;
    background-color: var(--dark-brown);
    color: var(--off-white);
    padding: 15px;
    margin: 15px 0;
    text-decoration: none;
    border-radius: 5px;
    font-size: 1.2em;
}

.shop-button:hover {
    background-color: var(--light-brown);
}

footer {
    width: 100%;
    background-color: var(--medium-brown);
    padding: 20px 0;
    text-align: center;
    color: var(--off-white);
    margin-top: auto;
    position: relative;
    bottom: 0;
    left: 0;
}

.social-media {
    margin-bottom: 10px;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 5px;
}

.social-icon svg, .social-icon img {
    width: 60px;
    height: 60px;
    fill: var(--medium-accent); /* Change fill color for embedded SVGs */
}

.social-icon:hover svg, .social-icon:hover img {
    fill: var(--light-accent); /* Hover effect for SVGs */
}

.social-icon:hover img {
    filter: brightness(0.8); /* Darken icon on hover for external SVGs */
}


footer p {
    font-size: 0.8em;
    margin-top: 10px;
}

/* Media query for larger screens */
@media (min-width: 768px) {
    .container {
        padding: 60px;
    }
}

/* Container and section styling */
.container {
    width: 100%;
    padding: 20px;
    max-width: 1200px;
}

.category {
    margin-bottom: 40px;
}

.category h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    text-align: center;
    color: var(--medium-brown);
}

/* Product card grid */
.product-list {
    display: flex;
    flex-wrap: wrap;
    /*justify-content: space-between;*/
    justify-content: flex-start;
    gap: 20px;
}


.product-card {
    position: relative;
    width: 220px; /* Set a fixed width for the product cards */
    background-color: var(--off-white); /* Background for the card */
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Slight shadow for depth */
    overflow: hidden;
    transition: box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2); /* Shadow on hover */
}

.card-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%; /* Ensure the link covers the entire card */
}

/* Product image */
.product-card img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

/* Product info section */
.card-content {
    padding: 15px;
    text-align: center;
    background-color: #f5f5f5; /* Slight background color for product info */
    flex-grow: 1;
}

/* Product name */
.product-name {
    font-size: 1.1rem;
    margin-bottom: 10px;
    font-weight: bold;
    color: var(--dark-brown);
}

/* Product price */
.product-price {
    font-size: 1rem;
    color: var(--medium-accent);
}

/* Responsive design */
@media (max-width: 768px) {
    .product-list {
        justify-content: center;
    }
}

.product-banner {
    position: absolute; /* Position it relative to the card */
    top: 110px; /* Adjust to make room for the diagonal */
    left: -110px; /* Move left so the diagonal covers the card */
    width: 200%; /* Make the banner longer to cover the diagonal */
    background-color: rgba(255, 0, 0, 0.8); /* Red background with some transparency */
    color: white;
    font-size: 0.9rem;
    text-align: center;
    padding: 5px 0;
    font-weight: bold;
    z-index: 10; /* Ensure it stays on top */
    transform: rotate(-45deg); /* Rotate the banner by 45 degrees */
    transform-origin: center; /* Keep rotation centered */
}

.product-detail {
    max-width: 100%;  /* Ensure it does not exceed the screen width */
    padding: 20px;    /* Add some spacing to make it look consistent */
    overflow: hidden; /* Prevent overflow */
    margin: 0 auto;   /* Center the section */
}

.product-image {
    width: 100%;      /* Make the image fill the container width */
    height: auto;     /* Maintain the aspect ratio of the image */
    max-width: 100%;  /* Prevent the image from exceeding the container's width */
    object-fit: contain;  /* Ensure the image is contained within its box without cropping */
}

.product-image-container {
    position: relative;
    display: inline-block;
    max-width: 100%;
}

.image-nav-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
    font-size: 2rem;
    z-index: 10;
    opacity: 0.8;
}

.image-nav-button:hover {
    opacity: 1;
}

.image-nav-button.hidden {
    display: none;
}

#prev-button {
    left: 10px;
}

#next-button {
    right: 10px;
}

/* Styling for video guide pages */

.container video {
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
}

/* Styling for the contact info section */
.contact-info {
    text-align: center;
    color: var(--dark-brown);
    font-size: 1.4rem;
}

.contact-info a {
    color: var(--medium-accent);
    text-decoration: none;
    font-size: 1.4rem;
}

.contact-info a:hover {
    text-decoration: underline;
}
