/**
 * Additional styles for WordPress theme elements
 */

/* Search Form */
.search-form {
    display: flex;
    max-width: 500px;
    margin: 20px auto;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.search-field {
    flex: 1;
    padding: 12px 16px;
    border: none;
    font-size: 16px;
    background-color: var(--bg-white);
}

.search-submit {
    background-color: var(--accent);
    color: white;
    border: none;
    padding: 12px 20px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-submit:hover {
    background-color: #d63447;
}

/* Posts Grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin: 40px 0;
}

.post-card {
    background-color: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.post-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
}

.post-content {
    padding: 24px;
}

.entry-title {
    font-size: 20px;
    margin-bottom: 12px;
}

.entry-title a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.entry-title a:hover {
    color: var(--accent);
}

.entry-meta {
    font-size: 14px;
    color: var(--secondary);
    margin-bottom: 16px;
}

.entry-meta span {
    margin-right: 16px;
}

.entry-meta i {
    margin-right: 4px;
}

.read-more {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.read-more:hover {
    transform: translateX(5px);
}

/* 404 Page */
.error-404 {
    text-align: center;
    padding: 60px 20px;
}

.error-404 .page-title {
    font-size: 120px;
    color: var(--accent);
    margin-bottom: 16px;
    font-weight: bold;
}

.error-message {
    font-size: 24px;
    color: var(--primary);
    margin-bottom: 32px;
}

.error-actions {
    margin: 32px 0;
}

/* Search Results */
.search-results {
    padding: 40px 0;
}

.search-result-count {
    color: var(--secondary);
    margin-top: 8px;
}

.search-results-grid {
    margin: 40px 0;
}

.search-result-item {
    background-color: var(--bg-white);
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.search-result-item:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.post-type {
    background-color: var(--tag-bg);
    color: var(--accent);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

/* Single Post/Product */
.single-post,
.single-product {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
}

.product-single-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin: 40px 0;
}

@media (max-width: 768px) {
    .product-single-content {
        grid-template-columns: 1fr;
    }
}

.product-main-image img {
    width: 100%;
    height: auto;
    border-radius: 12px;
}

.price-info {
    background-color: var(--bg-light);
    padding: 24px;
    border-radius: 8px;
    margin: 20px 0;
}

.product-cta {
    margin: 20px 0;
}

.product-cta .button {
    width: 100%;
    text-align: center;
}

.product-features-section {
    margin: 40px 0;
}

.product-features-section h2 {
    font-size: 20px;
    margin-bottom: 20px;
    color: var(--primary);
}

/* Related Products */
.related-products {
    margin: 60px 0;
}

.related-products .section-title {
    text-align: center;
    margin-bottom: 40px;
}

/* Comments */
.comments-area {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid var(--border);
}

.comment-form {
    background-color: var(--bg-light);
    padding: 30px;
    border-radius: 12px;
}

.comment-form-comment textarea {
    width: 100%;
    min-height: 120px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: inherit;
}

.form-submit .submit {
    background-color: var(--accent);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.form-submit .submit:hover {
    background-color: #d63447;
    transform: translateY(-2px);
}

/* Sidebar */
.widget-area {
    margin-top: 40px;
}

@media (min-width: 992px) {
    /* Grid layout removed from .site-main to allow flexible layouts */
    /* Use specific grid layouts for individual page types instead */
    
    .widget-area {
        margin-top: 0;
    }
}

/* Pagination */
.nav-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 40px 0;
}

.page-numbers {
    padding: 8px 12px;
    background-color: var(--bg-light);
    color: var(--primary);
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.page-numbers:hover,
.page-numbers.current {
    background-color: var(--accent);
    color: white;
}

/* Post Navigation */
.post-navigation {
    margin: 40px 0;
    padding: 20px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.nav-subtitle {
    display: block;
    font-size: 14px;
    color: var(--secondary);
}

.nav-title {
    font-size: 18px;
    color: var(--primary);
    font-weight: 600;
}

/* Screen Reader Text */
.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
}

/* Edit Link */
.edit-link {
    margin-top: 20px;
    font-size: 14px;
}

.edit-link a {
    color: var(--secondary);
    text-decoration: none;
    padding: 4px 8px;
    border: 1px solid var(--border);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.edit-link a:hover {
    color: var(--accent);
    border-color: var(--accent);
}