/*
Theme Name: MOSN Brand Theme
Theme URI: https://dev.mosn.com/brand
Description: Custom WordPress theme matching EC-CUBE style
Author: MOSN
Version: 1.0.0
Text Domain: mosn-brand
*/

/* Brand page content styles */
.brand-page-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 15px;
}

.brand-page-content h1 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: #333;
}

.brand-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    padding: 20px 0;
}

.brand-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.brand-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.brand-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.brand-card-content {
    padding: 20px;
}

.brand-card h3 {
    margin: 0 0 10px;
    font-size: 1.1rem;
}

.brand-card h3 a {
    color: #333;
    text-decoration: none;
}

.brand-card h3 a:hover {
    color: #dc3545;
}

.brand-card p {
    color: #666;
    font-size: 0.9rem;
    margin: 0;
}

.no-brands {
    text-align: center;
    padding: 60px 20px;
}

/* Brand single page */
.brand-single {
    margin-bottom: 40px;
}

.brand-header h1 {
    font-size: 2rem;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #333;
}

.brand-featured-image {
    margin-bottom: 30px;
}

.brand-featured-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.brand-content {
    margin-bottom: 30px;
    line-height: 1.8;
}

.brand-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.btn-primary {
    display: inline-block;
    background: #dc3545;
    color: #fff !important;
    padding: 12px 30px;
    border-radius: 4px;
    text-decoration: none;
    transition: background 0.3s;
}

.btn-primary:hover {
    background: #c82333;
    color: #fff;
    text-decoration: none;
}

.btn-outline {
    display: inline-block;
    background: transparent;
    color: #333 !important;
    padding: 12px 30px;
    border: 1px solid #333;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.3s;
}

.btn-outline:hover {
    background: #333;
    color: #fff !important;
    text-decoration: none;
}

/* Comments Section */
.brand-comments {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 2px solid #333;
}

.comments-title {
    font-size: 1.5rem;
    margin-bottom: 25px;
    color: #333;
}

.comments-count {
    color: #666;
    margin-bottom: 20px;
}

.no-comments {
    color: #666;
    font-style: italic;
    margin-bottom: 30px;
}

.comment-list {
    list-style: none;
    padding: 0;
    margin: 0 0 30px 0;
}

.comment-list .comment {
    padding: 20px;
    margin-bottom: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #dc3545;
}

.comment-list .comment .children {
    list-style: none;
    padding-left: 30px;
    margin-top: 15px;
}

.comment-list .comment .children .comment {
    background: #fff;
    border-left-color: #666;
}

.comment-body {
    position: relative;
}

.comment-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.comment-author {
    font-weight: bold;
    color: #333;
}

.comment-date {
    color: #999;
}

.comment-content {
    line-height: 1.7;
    color: #444;
}

.comment-content p {
    margin: 0;
}

.comment-awaiting {
    color: #f0ad4e;
    font-size: 0.85rem;
    margin-top: 10px;
}

.comment-reply {
    margin-top: 10px;
}

.comment-reply a {
    color: #dc3545;
    font-size: 0.85rem;
    text-decoration: none;
}

.comment-reply a:hover {
    text-decoration: underline;
}

/* Comment Form */
.comment-respond {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 8px;
    margin-top: 30px;
}

.comment-respond h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: #333;
}

.comment-notes {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.comment-form p {
    margin-bottom: 15px;
}

.comment-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

.comment-form .required {
    color: #dc3545;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.comment-form input[type="text"]:focus,
.comment-form input[type="email"]:focus,
.comment-form textarea:focus {
    border-color: #dc3545;
    outline: none;
}

.comment-form textarea {
    resize: vertical;
    min-height: 120px;
}

.comment-form .form-submit {
    margin-top: 20px;
}

.comment-form input[type="submit"] {
    background: #dc3545;
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s;
}

.comment-form input[type="submit"]:hover {
    background: #c82333;
}

.comments-closed {
    color: #999;
    font-style: italic;
}

/* Comments pagination */
.comments-pagination {
    margin-top: 20px;
    text-align: center;
}

.comments-pagination a {
    color: #dc3545;
    text-decoration: none;
    padding: 5px 10px;
}

.comments-pagination a:hover {
    text-decoration: underline;
}

/* Comment Success Message */
.comment-success-message {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-left: 4px solid #28a745;
    color: #155724;
    padding: 15px 20px;
    border-radius: 4px;
    margin-bottom: 25px;
}

.comment-success-message p {
    margin: 0;
    font-size: 1rem;
}

/* Hide EC-CUBE sidebar on WordPress pages */
.ec-layoutRole__left {
    display: none !important;
}

.ec-layoutRole__contents {
    display: block !important;
    max-width: 100% !important;
}

.ec-layoutRole__main {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
}

/* Comment item clear separation */
.comment-list .comment {
    border: 1px solid #e0e0e0 !important;
    border-left: 4px solid #dc3545 !important;
    margin-bottom: 20px !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.comment-list .comment + .comment {
    border-top: 1px solid #e0e0e0 !important;
}

.comment-list .comment:not(:last-child)::after {
    content: "";
    display: block;
    height: 1px;
    background: linear-gradient(to right, #dc3545, #e0e0e0, #dc3545);
    margin-top: 20px;
}

/* Stronger comment separation */
.comment-list > .comment {
    position: relative;
    padding-bottom: 25px !important;
    margin-bottom: 25px !important;
    border-bottom: 2px solid #ddd !important;
}

.comment-list > .comment:last-child {
    border-bottom: none !important;
    margin-bottom: 0 !important;
}

/* Indent reply comments */
.comment-list .children {
    margin-left: 40px !important;
    padding-left: 0 !important;
}

.comment-list .children .comment {
    border-left: 3px solid #666 !important;
}

/* Remove dividers and reduce spacing */
.comment-list > .comment {
    padding-bottom: 15px !important;
    margin-bottom: 15px !important;
    border-bottom: none !important;
}

.comment-list .comment:not(:last-child)::after {
    display: none !important;
}

.comment-list .comment {
    padding: 15px !important;
    margin-bottom: 10px !important;
}

/* Further reduce comment spacing */
.comment-list .comment {
    padding: 10px 15px !important;
    margin-bottom: 5px !important;
}

.comment-list > .comment {
    padding-bottom: 10px !important;
    margin-bottom: 5px !important;
}

/* Campaign Section */
.campaign-section {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 2px solid #333;
}

.campaign-section h2 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: #333;
}

.campaign-section > p {
    color: #666;
    margin-bottom: 20px;
}

.campaign-card .campaign-date {
    display: block;
    margin-top: 10px;
    font-size: 0.8rem;
    color: #999;
}

.no-campaigns {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

/* News Styles */
.news-date {
    display: inline-block;
    font-size: 0.85rem;
    color: #999;
    margin-bottom: 8px;
}

.news-single .brand-header .news-date {
    display: block;
    margin-bottom: 10px;
}

/* Pagination */
.navigation.pagination {
    margin-top: 40px;
    text-align: center;
}

.navigation.pagination .nav-links {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.navigation.pagination .page-numbers {
    display: inline-block;
    padding: 8px 15px;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
    text-decoration: none;
    transition: all 0.3s;
}

.navigation.pagination .page-numbers:hover {
    background: #dc3545;
    border-color: #dc3545;
    color: #fff;
}

.navigation.pagination .page-numbers.current {
    background: #dc3545;
    border-color: #dc3545;
    color: #fff;
}

/* News Metrics and Share Buttons */
.news-metrics {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 12px;
    border-top: 1px solid #eee;
    font-size: 13px;
}

.metrics-left {
    display: flex;
    gap: 15px;
    align-items: center;
}

.metric-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #666;
    text-decoration: none;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-size: 13px;
    transition: color 0.2s;
}

.metric-item:hover {
    color: #dc3545;
}

.metric-item svg {
    flex-shrink: 0;
}

.metric-item.metric-likes.liked {
    color: #e74c3c;
}

.metric-item.metric-likes.liked svg {
    fill: #e74c3c;
}

.metric-count {
    font-weight: 500;
}

/* Share Buttons */
.share-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    transition: transform 0.2s, opacity 0.2s;
}

.share-btn:hover {
    transform: scale(1.1);
    opacity: 0.9;
}

.share-btn.share-x {
    background: #000;
    color: #fff;
}

.share-btn.share-facebook {
    background: #1877f2;
    color: #fff;
}

.share-btn.share-line {
    background: #00b900;
    color: #fff;
}

.share-btn.share-copy {
    background: #6c757d;
    color: #fff;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .news-metrics {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
    
    .metrics-left {
        gap: 12px;
    }
    
    .share-buttons {
        width: 100%;
        justify-content: flex-start;
    }
}

/* Single page metrics */
.single-metrics {
    margin-top: 15px;
    padding-top: 0;
    border-top: none;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

/* Copy button success state */
.share-btn.share-copy.copied {
    background: #28a745;
}

/* =============================================
   Comment Image Upload Styles
   ============================================= */

/* Image upload form field */
.comment-form-image {
    margin-bottom: 1.5rem;
}

.comment-form-image label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

.image-upload-wrapper {
    position: relative;
}

.comment-form-image input[type="file"] {
    width: 100%;
    padding: 12px;
    border: 2px dashed #ddd;
    border-radius: 8px;
    background: #f9f9f9;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.comment-form-image input[type="file"]:hover {
    border-color: #c0a36a;
}

.comment-form-image input[type="file"]:focus {
    outline: none;
    border-color: #c0a36a;
    background: #fff;
}

.image-upload-hint {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #777;
}

/* Image preview */
.image-preview {
    position: relative;
    margin-top: 1rem;
}

.image-preview img {
    max-width: 200px;
    max-height: 200px;
    border-radius: 8px;
    border: 1px solid #ddd;
    object-fit: cover;
}

.image-preview .remove-preview {
    position: absolute;
    top: -8px;
    left: 192px;
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 50%;
    background: #ff4444;
    color: #fff;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.image-preview .remove-preview:hover {
    background: #cc0000;
}

/* Comment image display */
.comment-image {
    margin-top: 1rem;
}

.comment-image img {
    max-width: 100%;
    max-height: 400px;
    border-radius: 8px;
    border: 1px solid #eee;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.comment-image img:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.comment-image a {
    display: inline-block;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .image-preview img {
        max-width: 150px;
        max-height: 150px;
    }
    
    .image-preview .remove-preview {
        left: 142px;
    }
    
    .comment-image img {
        max-height: 300px;
    }
}

/* =============================================
   Mobile Menu Fix - Show Media Menu Item
   ============================================= */
@media only screen and (max-width: 959px) {
    .ec-headerNav-item.navi-magazine {
        display: flex !important;
    }
}
