/*
Theme Name: Mosalas
Theme URI: https://imantimuri.com
Author: Iman Timuri
Author URI: https://imantimuri.com
Description: A clean, modern blog theme with featured posts and sidebar layout. Designed for readability and performance. Includes WooCommerce support.
Version: 1.0.0
Requires at least: 6.2
Tested up to: 6.6
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mosalas
*/

/* ========== 1. RESET ========== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ========== 2. CONTAINER ========== */
.container {
    width: 100%;
    margin-inline: auto;
}

.container--full {
    max-width: 1200px;
    padding-inline: 20px;
}

/* ========== 3. HEADER ========== */
.site-header {
    padding-block: 20px;
    border-bottom: 1px solid #e2e8f0;
    background-color: #ffffff;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-logo a {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0a0f1c;
    text-decoration: none;
}

.site-nav ul {
    display: flex;
    list-style: none;
    gap: 20px;
    align-items: center;
}

.site-nav a {
    color: #334155;
    text-decoration: none;
    font-weight: 500;
}

.site-nav a:hover {
    color: #0a0f1c;
}

/* Cart Icon */
.cart-icon {
    position: relative;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -12px;
    background-color: #ef4444;
    color: #ffffff;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 50%;
    font-weight: 700;
}

/* ========== 4. MAIN LAYOUT (Zweispaltig) ========== */
.main-layout {
    display: flex;
    gap: 40px;
    padding-block: 40px;
}

.main-content {
    flex: 1;
    min-width: 0;
}

.sidebar {
    width: 300px;
    flex-shrink: 0;
}

/* ========== 5. POSTS (Allgemein) ========== */
.post {
    margin-bottom: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid #e2e8f0;
}

.post:last-child {
    border-bottom: none;
}

.post-header {
    margin-bottom: 20px;
}

.post-category {
    margin-bottom: 8px;
}

.post-category a {
    display: inline-block;
    background-color: #f1f5f9;
    color: #475569;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    text-decoration: none;
    letter-spacing: 0.5px;
}

.post-category a:hover {
    background-color: #e2e8f0;
}

.post-title {
    margin-bottom: 0;
    font-size: 1.75rem;
    line-height: 1.3;
}

.post-title a {
    color: #0a0f1c;
    text-decoration: none;
}

.post-title a:hover {
    color: #3b82f6;
}

/* Zweiteilung: Thumbnail links, Content rechts */
.post-body {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.post-body .post-thumbnail {
    width: 50%;
    flex-shrink: 0;
}

.post-body .post-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

.post-body .post-details {
    flex: 1;
}

.post-meta {
    margin-bottom: 15px;
    font-size: 0.875rem;
    color: #64748b;
}

.post-excerpt {
    color: #475569;
    line-height: 1.7;
}

/* ========== 6. POST LIST (kleinere Posts) ========== */
.post-list .post {
    margin-bottom: 30px;
    padding-bottom: 30px;
}

.post-list .post-title {
    font-size: 1.25rem;
}

.post-list .post-body {
    gap: 20px;
}

.post-list .post-body .post-thumbnail {
    width: 40%;
}

/* ========== 7. SIDEBAR ========== */
.widget {
    margin-bottom: 30px;
    padding: 20px;
    background-color: #f8fafc;
    border-radius: 8px;
}

.widget-title {
    margin-bottom: 15px;
    font-size: 1.1rem;
    color: #0a0f1c;
}

.widget ul {
    list-style: none;
}

.widget ul li {
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e2e8f0;
}

.widget ul li:last-child {
    border-bottom: none;
}

.widget a {
    color: #475569;
    text-decoration: none;
}

.widget a:hover {
    color: #3b82f6;
}

.search-form {
    display: flex;
    gap: 5px;
}

.search-form input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-size: 0.9rem;
}

.search-form button {
    padding: 8px 15px;
    background-color: #0a0f1c;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
}

.search-form button:hover {
    background-color: #3b82f6;
}

/* ========== 8. FOOTER ========== */
.site-footer {
    padding-block: 30px;
    border-top: 1px solid #e2e8f0;
    text-align: center;
    color: #64748b;
    font-size: 0.9rem;
}

/* ========== 9. PAGINATION ========== */
.pagination {
    margin-top: 40px;
    text-align: center;
}

.pagination .page-numbers {
    display: inline-block;
    padding: 8px 14px;
    margin: 0 3px;
    border-radius: 4px;
    color: #475569;
    text-decoration: none;
    font-weight: 500;
}

.pagination .page-numbers.current {
    background-color: #0a0f1c;
    color: #ffffff;
}

.pagination .page-numbers:hover {
    background-color: #e2e8f0;
}

/* ========== 10. WOOCOMMERCE STYLES ========== */
.woocommerce-products-header {
    margin-bottom: 30px;
}

.woocommerce-products-header h1 {
    font-size: 2rem;
    color: #0a0f1c;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.product-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.product-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.product-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.product-card-content {
    padding: 20px;
}

.product-card-content h2 {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.product-card-content h2 a {
    color: #0a0f1c;
    text-decoration: none;
}

.product-card-content h2 a:hover {
    color: #3b82f6;
}

.product-card-content .price {
    font-size: 1.2rem;
    font-weight: 700;
    color: #0a0f1c;
    margin-bottom: 15px;
}

.product-card-content .button {
    display: inline-block;
    padding: 10px 20px;
    background-color: #0a0f1c;
    color: #ffffff;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    transition: background-color 0.2s ease;
}

.product-card-content .button:hover {
    background-color: #3b82f6;
}

/* Single Product Page */
.single-product-layout {
    display: flex;
    gap: 40px;
    margin-bottom: 40px;
}

.product-images {
    width: 50%;
}

.product-images img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.product-details {
    flex: 1;
}

.product-details .product_title {
    font-size: 2rem;
    margin-bottom: 15px;
    color: #0a0f1c;
}

.product-details .price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0a0f1c;
    margin-bottom: 20px;
}

.product-details .cart {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 20px;
}

.product-details .quantity input {
    width: 60px;
    padding: 10px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    text-align: center;
}

.product-details .single_add_to_cart_button {
    padding: 12px 30px;
    background-color: #0a0f1c;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
}

.product-details .single_add_to_cart_button:hover {
    background-color: #3b82f6;
}

.product-meta {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
    font-size: 0.9rem;
    color: #64748b;
}

/* ========== 11. RESPONSIVE ========== */
@media (max-width: 768px) {
    .main-layout {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
    }

    .post-body {
        flex-direction: column;
    }

    .post-body .post-thumbnail {
        width: 100%;
    }

    .post-list .post-body .post-thumbnail {
        width: 100%;
    }

    .header-inner {
        flex-direction: column;
        gap: 15px;
    }

    .site-nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }

    .single-product-layout {
        flex-direction: column;
    }

    .product-images {
        width: 100%;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}