/* Basic Reset & Body Styles */
body {
    font-family: "Comic Sans MS", Comic Sans, cursive; /* Comic Sans font */
    margin: 0;
    padding: 0;
    background-color: #FDF5E6; /* Pale cream/yellow background */
    color: #333;
    line-height: 1.6;
}

.container {
    display: flex;
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
    gap: 20px; /* Space between main content and sidebar */
}

/* Header Styles */
.site-header {
    background-color: #FFD700; /* Gold/Yellow - slightly muted for pale tone */
    color: #333;
    padding: 1rem 0;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.site-header nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap; /* Allow items to wrap on smaller screens */
}

.site-header nav ul li {
    margin: 0 15px;
}

.site-header nav ul li a {
    color: #333;
    text-decoration: none;
    font-weight: bold;
    padding: 5px 10px;
    transition: color 0.3s ease, background-color 0.3s ease;
}

.site-header nav ul li a:hover {
    color: #8B4513; /* SaddleBrown */
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 5px;
}

/* Main Content & Sidebar Layout */
.main-content {
    flex: 3; /* Takes up 3 parts of the available space */
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.sidebar {
    flex: 1; /* Takes up 1 part of the available space */
    background-color: #FFF8DC; /* Cornsilk/Light Yellow */
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.sidebar .logo img {
    max-width: 100%;
    height: auto;
    display: block;
    margin-bottom: 20px;
}

.sidebar-nav ul {
    list-style: none;
    padding: 0;
}

.sidebar-nav ul li a {
    text-decoration: none;
    color: #8B4513; /* SaddleBrown */
    display: block;
    padding: 8px 0;
    border-bottom: 1px solid #F0E68C; /* Khaki */
    transition: color 0.3s ease;
}

.sidebar-nav ul li a:hover {
    color: #FF8C00; /* DarkOrange */
}

/* Section Headings */
.new-posts, .products {
    margin-bottom: 40px;
}

.new-posts h2, .products h2 {
    color: #FFA07A; /* Light Salmon - a pale orange tone */
    border-bottom: 2px solid #FFD700; /* Gold */
    padding-bottom: 10px;
    margin-bottom: 20px;
}

/* Blog Posts Display: One under another */
.post-list {
    display: flex; /* Use flexbox for stacking */
    flex-direction: column; /* Stack items vertically */
    gap: 20px;
}

.post-item {
    background-color: #FFFACD; /* LemonChiffon/Lighter Yellow */
    border: 1px solid #FFD700; /* Gold */
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    display: flex; /* Use flex for internal layout */
    flex-direction: column; /* Stack image, title, text, button */
    align-items: center; /* Center content horizontally */
}

.post-item img {
    width: 300px; /* Fixed width for blog post images */
    height: 200px; /* Fixed height for blog post images */
    object-fit: cover; /* Ensures images cover the area without distortion */
    border-radius: 5px;
    margin-bottom: 10px;
}

.post-item h3 {
    color: #8B4513; /* SaddleBrown */
    margin-top: 0;
    font-size: 1.5em;
    margin-bottom: 10px;
}

.post-item p {
    text-align: left; /* Align text within the post item */
    margin-bottom: 15px;
}


/* Products Display: One next to another */
.product-list {
    display: flex; /* This makes items flow horizontally */
    flex-wrap: wrap; /* This allows them to wrap to the next line */
    justify-content: center; /* This centers products when they don't fill a row */
    gap: 20px; /* Space between products */
}

.product-item {
    /* ... other styles ... */
    width: 280px; /* This gives each product a fixed width, allowing multiple to fit per row */
    flex-shrink: 0; /* Prevents shrinking below this width */
    /* ... other styles ... */
}

/* Ensure images within product items have a consistent size */
.product-item img {
    width: 100%; /* Make image fill the width of its container */
    height: 250px; /* Set a fixed height for all product images. Adjust this value as needed. */
    object-fit: cover; /* This is crucial: it crops the image to fit the dimensions without distorting it, covering the entire space. Use 'contain' if you want the whole image to be visible, potentially leaving blank space. */
    display: block; /* Removes any extra space below the image, especially important if it's in a flex container */
    margin-bottom: 10px; /* Add some space between the image and the title/description */
}

/* Also ensure your product items have a consistent height if content varies */
.product-item {
    display: flex; /* Keep this for internal layout within the item if needed */
    flex-direction: column; /* Stack content vertically */
    width: 280px; /* Keep the desired width */
    /* Set a min-height for uniformity across all product items */
    min-height: 550px; /* Adjust this value as needed to accommodate your longest content */
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    background-color: #fff;
    text-align: center;
    text-decoration: none; /* Remove underline from the whole item if it's an anchor */
    color: #333;
    transition: transform 0.2s ease-in-out;
}

.product-item:hover {
    transform: translateY(-5px);
}

.product-item h3 {
    font-size: 1.2em;
    margin-top: 0;
    margin-bottom: 10px;
    flex-grow: 0; /* Prevents h3 from taking up extra space */
}

.product-item .description {
    font-size: 0.9em;
    color: #555;
    margin-bottom: 15px;
    flex-grow: 1; /* Allows description to grow and push button down */
}

.product-item h4 {
    font-size: 1em;
    color: #444;
    margin-bottom: 5px;
}

.product-item ul {
    list-style: none;
    padding: 0;
    margin-bottom: 15px;
    text-align: left;
    flex-grow: 0; /* Prevents ul from taking up extra space */
}

.product-item ul li {
    font-size: 0.85em;
    color: #666;
    line-height: 1.4;
    margin-left: 15px; /* Indent list items slightly */
    list-style-type: disc; /* Add bullet points */
}

.product-item .button {
    display: inline-block;
    background-color: #5c677d;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    margin-top: auto; /* Pushes the button to the bottom if the flex item has extra space */
    align-self: center; /* Centers the button horizontally within the flex item */
}

.product-item .button:hover {
    background-color: #4a5367;
}

/* Make sure the .product-list styles are still present */
.product-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    padding: 20px 0;
}

/* Footer Styles */
.site-footer {
    background-color: #8B4513; /* SaddleBrown */
    color: white;
    padding: 20px 0;
    text-align: center;
    margin-top: 40px;
}

.site-footer nav ul {
    list-style: none;
    padding: 0;
    margin-bottom: 15px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.site-footer nav ul li {
    margin: 0 10px;
}

.site-footer nav ul li a {
    color: white;
    text-decoration: none;
    transition: color 0.3s ease;
}

.site-footer nav ul li a:hover {
    color: #FFD700; /* Gold */
}

.social-links img {
    width: 30px;
    height: 30px;
    margin: 0 8px;
    vertical-align: middle;
    transition: transform 0.3s ease;
}

.social-links img:hover {
    transform: scale(1.1);
}

.site-footer p {
    margin-top: 15px;
    font-size: 0.9em;
}

/* Blog Page Specific Styles (if you still use a separate blog page) */
.blog-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

.pagination {
    display: flex;
    justify-content: center;
    margin-top: 30px;
    gap: 15px;
}

.pagination .button {
    min-width: 120px;
    text-align: center;
}

.pagination .button.disabled {
    background-color: #ccc;
    cursor: not-allowed;
    opacity: 0.7;
}

/* Single Post Page Styles */
.single-post {
    margin-bottom: 30px;
}

.single-post h1 {
    color: #8B4513;
    margin-bottom: 10px;
}

.single-post .post-meta {
    font-style: italic;
    color: #666;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.single-post .post-main-image {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 20px auto;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.single-post p {
    margin-bottom: 1em;
    text-align: justify;
}

.single-post h3 {
    color: #FF8C00;
    margin-top: 30px;
    margin-bottom: 15px;
}

.single-post ul {
    list-style: disc;
    margin-left: 20px;
    margin-bottom: 1em;
}

.back-to-blog {
    text-align: center;
    margin-top: 30px;
}

/* Form and Simple Page Styles */
.page-image {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 20px auto;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.form-placeholder {
    background-color: #FFFACD;
    border: 1px dashed #FFD700;
    padding: 30px;
    margin-top: 30px;
    text-align: center;
    border-radius: 8px;
}

.form-placeholder iframe {
    max-width: 100%;
    height: auto;
    min-height: 400px;
    border: none;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }

    .site-header nav ul {
        flex-direction: column;
        align-items: center;
    }

    .site-header nav ul li {
        margin: 5px 0;
    }

    .product-item {
        width: 100%; /* Products stack on small screens */
        max-width: 300px; /* Max width for product items */
    }

    .product-list {
        justify-content: center; /* Center stacked products */
    }
}

}

.navigation-buttons button:hover {
    background-color: #CD5C5C; /* IndianRed - consistent hover */
    transform: translateY(-2px);
}

/* Responsive adjustments for manga pages */
@media (max-width: 900px) { /* Adjusted breakpoint for larger images */
    .manga-container {
        flex-direction: column; /* Stack pages vertically on smaller screens */
        gap: 10px;
        margin: 15px auto;
        padding: 10px;
    }
    .manga-page img {
        max-width: 100%; /* Allow images to fill container on smaller screens */
    }
}

@media (max-width: 480px) {
    .navigation-buttons button {
        padding: 10px 20px;
        font-size: 16px;
    }
}