/* ==========================================================================
   シンコー印刷ネットショップ CSS（カラーミー用・3カラム完全版）横スクロール修正版
   ========================================================================== */

/* General Styles */
body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    line-height: 1.6;
    color: #333;
    background-color: #f0f2f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    width: 100%;
}

.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

/* Header */
.contact-bar {
    background-color: #333;
    color: #fff;
    padding: 0.5rem 0;
    font-size: 0.85rem;
}

.main-header {
    background-color: #fff;
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 48px;
    max-width: 100%;
}

.nav a {
    text-decoration: none;
    color: #555;
    margin-left: 1.5rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav a:hover {
    color: #007bff;
}

.login-btn {
    background-color: #007bff;
    color: #fff !important;
    padding: 0.6rem 1.2rem;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.login-btn:hover {
    background-color: #0056b3;
}

/* Main Content Area - 3カラム構造（横スクロール修正版） */
.main-container {
    padding: 1.5rem 0;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

.main-content-area {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

/* Left Sidebar */
.left-sidebar {
    flex-shrink: 0;
    width: 280px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    position: static !important;
    float: none !important;
}

/* Main Content Wrapper (中央) - 横スクロール修正版 */
.main-content-wrapper {
    flex-grow: 1;
    flex-shrink: 1;
    min-width: 0;
    max-width: none;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    overflow-x: auto;
    position: relative !important;
}

/* Right Sidebar */
.right-sidebar {
    flex-shrink: 0;
    width: 280px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: static !important;
    float: none !important;
}

/* Dynamic Content Area */
.dynamic-content-area {
    width: 100%;
    max-width: none;
    overflow-x: auto;
}

.dynamic-category-display {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #007bff;
}

.category-display-title {
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 1rem;
    text-align: center;
    font-weight: 600;
    border-bottom: 2px solid #007bff;
    padding-bottom: 0.5rem;
}

.category-items-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.category-display-item {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
}

.category-display-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.category-display-item.disabled {
    opacity: 0.7;
}

.category-item-link {
    display: block;
    text-decoration: none;
    color: inherit;
    padding: 1rem;
}

.category-item-name {
    font-size: 0.9rem;
    color: #333;
    margin-bottom: 0.3rem;
    line-height: 1.3;
    font-weight: 600;
}

.category-item-price {
    font-size: 0.8rem;
    color: #007bff;
    font-weight: 500;
}

.coming-soon-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: linear-gradient(135deg, #ffc107, #ff8c00);
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: bold;
}

/* Sidebar Common Styles */
.sidebar-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #eee;
}

.sidebar-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.sidebar-header {
    background-color: #f7f7f7;
    padding: 1rem 1.5rem;
    font-weight: bold;
    color: #333;
    border-bottom: 1px solid #eee;
    font-size: 1rem;
}

/* Featured Products Section */
.featured-products-section .sidebar-item {
    padding: 1rem 1.5rem;
}

.product-promo {
    background-color: #e0f2f7;
    border-left: 4px solid #007bff;
    padding: 1rem;
    border-radius: 4px;
}

.product-promo-title {
    font-weight: bold;
    color: #0056b3;
    font-size: 1.1rem;
}

.product-promo-price {
    font-size: 0.95rem;
    color: #007bff;
    margin-top: 0.2rem;
}

/* Category Menu */
.category-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-item {
    border-bottom: 1px solid #eee;
}

.category-item:last-child {
    border-bottom: none;
}

.category-button, .category-link {
    display: block;
    width: 100%;
    text-align: left;
    padding: 1rem 1.5rem;
    background-color: transparent;
    border: none;
    font-size: 0.95rem;
    color: #555;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.category-button:hover, .category-link:hover {
    background-color: #f0f2f5;
    color: #007bff;
}

.category-arrow {
    float: right;
    font-size: 0.8em;
}

.subcategory {
    display: none;
    padding-left: 2rem;
    background-color: #f8f8f8;
}

.subcategory .category-link {
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    color: #666;
}

.subcategory .category-link:hover {
    background-color: #e9ecef;
}

/* Calendar Section */
.calendar-content {
    padding: 1rem 1.5rem;
    text-align: center;
    color: #666;
}

/* Various Guides Section */
.various-guides {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    padding: 0;
}

.guide-links-wrapper {
    padding: 1rem 1.5rem;
}

.guide-link {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 8px 0;
    color: #555;
    text-decoration: none;
    transition: color 0.2s;
}

.guide-link:hover {
    color: #007bff;
}

.guide-icon {
    color: #007bff;
    font-size: 1rem;
    width: 1.2em;
    text-align: center;
}

/* News Section (おしらせ) */
.news-section {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    padding: 0;
}

.news-content-wrapper {
    padding: 1rem 1.5rem;
    max-height: 300px;
    overflow-y: auto;
}

.news-item-sidebar {
    margin-bottom: 1rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid #f0f0f0;
}

.news-item-sidebar:last-of-type {
    border-bottom: none;
    margin-bottom: 0.5rem;
}

.news-date-sidebar {
    font-size: 0.8rem;
    color: #666;
    font-weight: bold;
    margin-bottom: 0.3rem;
}

.news-text-sidebar {
    font-size: 0.85rem;
    color: #444;
    line-height: 1.4;
}

.news-more-link {
    margin-top: 1rem;
    padding-top: 0.8rem;
    border-top: 1px solid #e9ecef;
}

.news-more-link a {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 6px 0;
    color: #007bff;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.news-more-link a:hover {
    color: #0056b3;
    padding-left: 8px;
}

/* Footer */
.footer {
    background-color: #f8f9fa;
    color: #333;
    padding: 2.5rem 0;
    font-size: 0.9rem;
}

.footer-content {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid #444;
    padding-bottom: 2rem;
}

.footer-section {
    flex: 1;
    min-width: 180px;
}

.footer-title {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 1rem;
    color: #495057;
}

.footer-section p,
.footer-section address {
    margin-bottom: 0.5rem;
    color: #6c757d;
}

.footer-link {
    display: block;
    color: #6c757d;
    text-decoration: none;
    margin-bottom: 0.5rem;
    transition: color 0.2s ease;
}

.footer-link:hover {
    color: #007bff;
}

.footer-product-list {
    border-top: 1px solid #e0e0e0;
    padding-top: 2rem;
    margin-top: 2rem;
}

.product-list-header {
    font-weight: bold;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: #444;
    border-bottom: 2px solid #007bff;
    padding-bottom: 0.5rem;
}

.product-list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.product-list-column {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.product-list-item {
    display: flex;
    flex-direction: column;
}

.item-title {
    font-weight: bold;
    font-size: 1rem;
    color: #007bff;
    margin-bottom: 0.5rem;
}

.sub-title {
    font-weight: 500;
    color: #555;
    margin-top: 0.5rem;
    display: block;
}

.item-links, .sub-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.item-links li, .sub-links li {
    margin-bottom: 0.2rem;
}

.item-links a, .sub-links a {
    text-decoration: none;
    color: #666;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.item-links a:hover, .sub-links a:hover {
    color: #0056b3;
    text-decoration: underline;
}

.copyright {
    text-align: center;
    color: #6c757d;
    margin-top: 1.5rem;
    font-size: 0.85rem;
}

/* Products Section (for Top Page) */
.products-section {
    background-color: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    margin-bottom: 1.5rem;
}

.products-title {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #eee;
    padding-bottom: 0.8rem;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.product-card {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.product-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
}

/* Product Overlays */
.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 150px;
    mix-blend-mode: multiply;
}

.product-overlay-flyer {
    background-color: rgba(255, 182, 193, 0.3);
}

.product-overlay-booklet {
    background-color: rgba(255, 255, 224, 0.3);
}

.product-overlay-pamphlet {
    background-color: rgba(144, 238, 144, 0.3);
}

.product-overlay-namecard {
    background-color: rgba(173, 216, 230, 0.3);
}

.product-overlay-sticker {
    background-color: rgba(221, 160, 221, 0.3);
}

.product-overlay-fan {
    background-color: rgba(255, 160, 122, 0.3);
}

/* Product Headers */
.product-header {
    color: #fff;
    padding: 0.8rem 1rem;
    font-weight: bold;
    font-size: 1.1rem;
    text-align: center;
}

.product-header-flyer {
    background-color: #ec4899;
}

.product-header-booklet {
    background-color: #eab308;
}

.product-header-pamphlet {
    background-color: #10b981;
}

.product-header-namecard {
    background-color: #3b82f6;
}

.product-header-sticker {
    background-color: #8b5cf6;
}

.product-header-fan {
    background-color: #f97316;
}

.product-price {
    padding: 1rem;
    text-align: center;
    font-size: 1.2rem;
    color: #333;
}

.price-unit {
    font-size: 14px;
}

.price-tax {
    font-size: 12px;
    margin-left: 4px;
}

.price-number {
    font-size: 1.8rem;
    font-weight: bold;
    color: #dc3545;
    margin-top: 0.2rem;
    display: block;
}

/* 商品詳細ページ用の追加CSS（横スクロール対応版） */
.option-table-container {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    margin: 2rem 0;
    background-color: #fff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 2px solid #dbeafe;
}

.option-table-wrapper {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    max-width: 100%;
}

.option-table-container table {
    width: 100%;
    min-width: 700px;
    max-width: none;
    border-collapse: collapse;
}

.product-detail-container {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
}

.product-detail-main {
    max-width: 100%;
    overflow-x: auto;
}

/* コンテンツ全体の幅制御 */
.main-content-area * {
    box-sizing: border-box;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .main-content-area {
        flex-direction: column;
        overflow-x: visible;
    }

    .left-sidebar,
    .right-sidebar {
        width: 100%;
        order: 1;
        position: static !important;
    }

    .main-content-wrapper {
        max-width: 100%;
        order: 2;
        overflow-x: auto;
    }

    .right-sidebar {
        order: 3;
    }
}

@media (max-width: 768px) {
    .main-content-area {
        flex-direction: column;
        gap: 1rem;
        overflow-x: visible;
    }

    .left-sidebar,
    .right-sidebar {
        width: 100%;
        margin-bottom: 1rem;
        position: static !important;
    }

    .main-content-wrapper {
        max-width: 100%;
        overflow-x: auto;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 1rem;
    }

    .header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .nav {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .nav a {
        margin-left: 0;
    }

    .contact-bar .container {
        justify-content: center;
        flex-wrap: wrap;
    }

    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .footer-section {
        margin-bottom: 1.5rem;
    }

    .dynamic-category-display {
        padding: 1rem;
        margin-bottom: 1rem;
    }

    .category-display-title {
        font-size: 1rem;
    }

    .category-item-name {
        font-size: 0.85rem;
    }

    .category-item-price {
        font-size: 0.75rem;
    }

    .container {
        padding: 0 0.5rem;
    }

    /* Welcome Banner Mobile */
    .welcome-banner {
        padding: 0.6rem 0;
        font-size: 0.8rem;
    }

    .welcome-message {
        display: block;
        line-height: 1.4;
    }
}