/* ============================================================
   DENBA ショップ CSS
   ============================================================ */

/* 共通 */
.inr {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================================
   SEO ページヘッダー
   ============================================================ */
.page-header {
    background-image: url('../img/pagebnr_bg.png');
    background-size: 60%;
    background-position: right;
    background-repeat: no-repeat;
    padding: 60px 0 40px;
    margin-bottom: 30px;
    position: relative;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgb(63 99 135 / 85%) 0%, rgb(3 9 15 / 85%) 100%);
    z-index: 1;
}

.page-header .inr {
    position: relative;
    z-index: 2;
}

.page-header .page-title {
    font-size: 32px;
    font-weight: bold;
    color: #fff;
    margin: 0 0 20px 0;
    line-height: 1.4;
}

.page-header .page-description {
    font-size: 16px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.95);
    margin: 0;
    max-width: 900px;
}

/* 通知 */
#notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

.notification {
    background: #fff;
    color: #333;
    padding: 15px 20px;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin-bottom: 10px;
    min-width: 300px;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
}

.notification.show {
    opacity: 1;
    transform: translateX(0);
}

.notification-success {
    border-left: 4px solid #28a745;
}

.notification-success i {
    color: #28a745;
    margin-right: 8px;
}

.notification-error {
    border-left: 4px solid #dc3545;
}

.notification-error i {
    color: #dc3545;
    margin-right: 8px;
}

/* ボタン共通スタイル */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    line-height: 1.5;
}

.btn-primary {
    background-color: #0066cc;
    color: #fff;
}

.btn-primary:hover {
    background-color: #0052a3;
}

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

.btn-secondary:hover {
    background-color: #5a6268;
}

.btn-cart {
    background-color: #28a745;
    color: #fff;
    font-size: 14px;
    padding: 8px 16px;
}

.btn-cart:hover {
    background-color: #218838;
}

.btn-cart-large {
    background-color: #28a745;
    color: #fff;
    padding: 15px 40px;
    font-size: 18px;
    font-weight: bold;
}

.btn-cart-large:hover {
    background-color: #218838;
}

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

.btn-back:hover {
    background-color: #5a6268;
}

.btn-checkout {
    background-color: #dc3545;
    color: #fff;
    font-weight: bold;
}

.btn-checkout:hover {
    background-color: #c82333;
}

.btn-continue {
    background-color: #fff;
    color: #333;
    border: 1px solid #ddd;
}

.btn-continue:hover {
    background-color: #f8f9fa;
}

/* カート情報 */
.cart-info {
    background-color: #f8f9fa;
    padding: 15px 0;
    margin-bottom: 30px;
    border-bottom: 1px solid #ddd;
}

.cart-section {
    display: flex;
    align-items: center;
    margin-right: auto;
}

.filter-sort-wrapper > .filter-section,
.filter-sort-wrapper > .sort-section,
.filter-sort-wrapper > .result-count {
    margin-left: 0;
}

.cart-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #fff;
    text-decoration: none;
    padding: 8px 16px;
    background: #0066cc;
    border: none;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    font-weight: 600;
}

.cart-link:hover {
    background: #0052a3;
}

.cart-link i {
    font-size: 18px;
}

.cart-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #fff;
    color: #667eea;
    border-radius: 50%;
    min-width: 28px;
    height: 28px;
    line-height: 1;
    padding: 0 6px;
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.cart-count-pulse {
    animation: cartPulse 0.6s ease;
}

@keyframes cartPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.3);
        background-color: #28a745;
        color: #fff;
    }
    100% {
        transform: scale(1);
    }
}

.cart-info-top {
    text-align: right;
    margin-bottom: 20px;
}

/* ソート・結果表示バー */
.sort-result-bar {
    background: #f8f9fa;
    padding: 15px 0;
    margin-bottom: 0;
    border-bottom: 1px solid #e0e0e0;
}

.sort-result-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    background: #fff;
    padding: 12px 15px;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
    justify-content: space-between;
}

/* 追従型カートボタン */
.floating-cart-button {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    opacity: 1;
    transition: all 0.3s ease;
}

.floating-cart-button.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.floating-cart-button.hide {
    opacity: 0;
    transform: translateX(-50%) translateY(100px);
    pointer-events: none;
}

.floating-cart-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 25px;
    background: #0066cc;
    color: #fff;
    text-decoration: none;
    border-radius: 50px;
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 16px;
}

.floating-cart-link:hover {
    background: #0052a3;
    box-shadow: 0 6px 16px rgba(0, 102, 204, 0.4);
}

.floating-cart-link i {
    font-size: 20px;
}

.floating-cart-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #fff;
    color: #0066cc;
    border-radius: 50%;
    min-width: 28px;
    height: 28px;
    padding: 2px 6px;
    font-size: 14px;
    font-weight: bold;
}

@keyframes cart-pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.3);
        background-color: #28a745;
        color: #fff;
    }
    100% {
        transform: scale(1);
    }
}

.cart-count-pulse {
    animation: cart-pulse 0.6s ease;
}

.filter-section,
.sort-section {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-section label,
.sort-section label {
    font-weight: 600;
    font-size: 13px;
    color: #333;
    white-space: nowrap;
}

.filter-select,
.sort-select {
    padding: 6px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 13px;
    background-color: #fff;
    min-width: 200px;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.filter-select:hover,
.sort-select:hover {
    border-color: #0066cc;
}

.filter-select:focus,
.sort-select:focus {
    outline: none;
    border-color: #0066cc;
}

.result-count {
    background: #f0f0f0;
    color: #333;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid #ddd;
}

.result-count #display-count {
    font-weight: 700;
    font-size: 16px;
    margin: 0 3px;
    color: #0066cc;
}

/* フィルタータブ */
.product-filter-tabs,
.product-category-tabs {
    background: #fff;
    padding: 12px 0;
    margin-bottom: 0;
    border-bottom: 1px solid #e0e0e0;
}

.filter-tabs-label {
    font-size: 14px;
    font-weight: 600;
    color: #666;
    margin-bottom: 10px;
}

.device-tabs,
.category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.device-tab,
.category-tab {
    padding: 8px 16px;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #333;
}

.device-tab:hover,
.category-tab:hover {
    background: #e9ecef;
    border-color: #0066cc;
}

.device-tab.active,
.category-tab.active {
    background: #0066cc;
    color: #fff;
    border-color: #0066cc;
}

/* 商品グリッド */
.product-grid {
    margin: 40px 0;
}

.products-wrapper {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.product-item {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

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

.product-image {
    width: 100%;
    height: 180px;
    overflow: hidden;
    background-color: #f8f9fa;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-type {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: #0066cc;
    color: #fff;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
}

.product-title {
    font-size: 16px;
    font-weight: bold;
    margin: 15px 15px 10px;
    /* min-height: 48px; */
}

.product-title a {
    color: #0066cc;
    text-decoration: none;
    transition: color 0.2s ease;
}

.product-title a:hover {
    color: #0052a3;
    text-decoration: underline;
}

.product-code {
    font-size: 12px;
    color: #666;
    margin: 0 15px 10px;
}

.product-price {
    margin: 0px 15px;
    font-size: 16px;
    font-weight: bold;
    color: #dc3545;
}

.tax-note {
    font-size: 12px;
    color: #666;
    font-weight: normal;
}

.product-actions {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.quantity-cart-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.quantity-selector-inline {
    display: flex;
    align-items: center;
    gap: 8px;
}

.quantity-selector-inline label {
    font-size: 14px;
    font-weight: bold;
    margin: 0;
}

.quantity-input-inline {
    width: 60px;
    padding: 6px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.no-products {
    text-align: center;
    padding: 60px 20px;
    font-size: 18px;
    color: #666;
}

.shop-desc {
    text-align: center;
    font-size: 16px;
    color: #666;
    margin-top: 10px;
}

/* 商品一覧 - 対応製品 */
.product-compatible {
    font-size: 12px;
    color: #666;
    margin: 0 15px 10px;
    /* min-height: 36px; */
}

/* 商品詳細ページ */
.product-detail {
    margin: 40px 0;
}

.product-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    margin-bottom: 60px;
}

.product-image-gallery {
    width: 100%;
}

.product-image-gallery .main-image {
    width: 100%;
    margin-bottom: 15px;
}

.product-image-gallery .main-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.thumbnail-images {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.thumbnail-item {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border: 2px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.thumbnail-item:hover {
    border-color: #0066cc;
}

.thumbnail-item.active {
    border-color: #0066cc;
    box-shadow: 0 0 5px rgba(0, 102, 204, 0.5);
}

.product-image-large {
    width: 100%;
}

.product-image-large img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.product-info {
    padding: 20px 0;
}

.product-type-badge {
    display: inline-block;
    background-color: #0066cc;
    color: #fff;
    padding: 6px 16px;
    border-radius: 4px;
    font-size: 14px;
    margin-bottom: 15px;
}

.product-info .product-title {
    font-size: 28px;
    margin: 0 0 20px;
    min-height: auto;
}

.product-info .product-code {
    margin: 0 0 20px;
    font-size: 14px;
}

.product-compatible-box {
    background-color: #f0f8ff;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #0066cc;
}

.product-compatible-box strong {
    display: block;
    margin-bottom: 10px;
    color: #0066cc;
}

.compatible-list {
    margin: 0;
    padding-left: 20px;
}

.compatible-list li {
    margin-bottom: 5px;
    color: #333;
}

.product-price-box {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
}

.price-row.main-price {
    border-top: 2px solid #ddd;
    padding-top: 15px;
    margin-top: 10px;
}

.price-label {
    font-size: 14px;
    color: #666;
}

.price-row.main-price .price-label {
    font-size: 16px;
    font-weight: bold;
    color: #333;
}

.price-value-tax-ex {
    font-size: 20px;
    font-weight: bold;
    color: #666;
}

.price-value {
    font-size: 16px;
    font-weight: bold;
    color: #333;
}

.add-to-cart-section {
    margin-bottom: 30px;
}

.quantity-selector {
    margin-bottom: 15px;
}

.quantity-selector label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}

.quantity-selector input[type="number"] {
    width: 100px;
    padding: 8px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.product-description {
    background-color: #f8f9fa;
    padding: 40px;
    border-radius: 8px;
}

.product-description h2 {
    font-size: 24px;
    margin-bottom: 20px;
    border-bottom: 2px solid #0066cc;
    padding-bottom: 10px;
}

.description-content {
    line-height: 1.8;
}

.product-links {
    margin-top: 30px;
}

/* カートページ */
.cart-contents {
    margin: 40px 0;
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 40px;
    background-color: #fff;
}

.cart-table thead {
    background-color: #f8f9fa;
}

.cart-table th,
.cart-table td {
    padding: 15px;
    text-align: center;
    border-bottom: 1px solid #e0e0e0;
}

.cart-table th {
    font-weight: bold;
    color: #333;
}

.cart-table .product-thumbnail {
    width: 100px;
}

.cart-table .product-thumbnail img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
}

.cart-table .product-name {
    text-align: left;
}

.cart-table .product-name a {
    color: #333;
    text-decoration: none;
}

.cart-table .product-name a:hover {
    color: #0066cc;
}

.cart-table .product-code {
    font-size: 12px;
    color: #666;
}

.cart-table .product-price,
.cart-table .product-subtotal {
    font-weight: normal;
    color: #333;
}

.quantity-input {
    width: 70px;
    padding: 6px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.btn-remove {
    background-color: #dc3545;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.btn-remove:hover {
    background-color: #c82333;
}

.cart-summary {
    display: flex;
    justify-content: flex-end;
}

.summary-box {
    width: 400px;
    background-color: #f8f9fa;
    padding: 30px;
    border-radius: 8px;
}

.summary-box h2 {
    font-size: 20px;
    margin-bottom: 20px;
    border-bottom: 2px solid #0066cc;
    padding-bottom: 10px;
}

.summary-table {
    width: 100%;
    margin-bottom: 20px;
}

.summary-table th,
.summary-table td {
    padding: 10px 0;
}

.summary-table th {
    text-align: left;
    font-weight: normal;
}

.summary-table td {
    text-align: right;
}

.total-row {
    border-top: 2px solid #333;
    font-size: 20px;
    font-weight: bold;
}

.total-price {
    color: #dc3545;
}

.cart-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.empty-cart {
    text-align: center;
    padding: 80px 20px;
}

.empty-message {
    font-size: 20px;
    color: #666;
    margin-bottom: 30px;
}

.empty-message i {
    font-size: 60px;
    display: block;
    margin-bottom: 20px;
    color: #ccc;
}

/* 注文フォーム */
.checkout-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    margin: 40px 0;
}

.order-form {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.order-form h2 {
    font-size: 24px;
    margin-bottom: 30px;
    border-bottom: 2px solid #0066cc;
    padding-bottom: 10px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}

.required-mark {
    color: #dc3545;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.form-group textarea {
    resize: vertical;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: normal;
}

.radio-label input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    justify-content: space-between;
}

.order-summary {
    background-color: #f8f9fa;
    padding: 30px;
    border-radius: 8px;
    position: sticky;
    top: 20px;
    align-self: start;
}

.order-summary h2 {
    font-size: 20px;
    margin-bottom: 20px;
    border-bottom: 2px solid #0066cc;
    padding-bottom: 10px;
}

.summary-items {
    margin-bottom: 20px;
}

.summary-item {
    padding: 15px 0;
    border-bottom: 1px solid #ddd;
}

.item-name {
    font-weight: bold;
    margin-bottom: 5px;
}

.item-quantity {
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
}

.item-price {
    font-weight: bold;
    color: #333;
}

.summary-total {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #333;
}

.summary-total .total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 20px;
    font-weight: bold;
}

.total-amount {
    color: #333;
    font-size: 16px;
    font-weight: bold;
}

.order-summary .note {
    font-size: 12px;
    color: #666;
    margin-top: 15px;
}

.error-messages,
.error-message {
    background-color: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    border: 1px solid #f5c6cb;
}

.error-messages ul {
    margin: 0;
    padding-left: 20px;
}

/* 注文完了ページ */
.complete-message {
    text-align: center;
    padding: 60px 20px;
    max-width: 800px;
    margin: 0 auto;
}

.check-icon {
    font-size: 80px;
    color: #28a745;
    margin-bottom: 20px;
}

.complete-message h1 {
    font-size: 32px;
    margin-bottom: 20px;
}

.order-id {
    font-size: 18px;
    margin-bottom: 30px;
}

.message-box {
    background-color: #f8f9fa;
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 40px;
    line-height: 1.8;
}

.contact-info {
    background-color: #fff;
    padding: 30px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 40px;
}

.contact-info h3 {
    font-size: 20px;
    margin-bottom: 15px;
}

.action-links {
    display: flex;
    gap: 15px;
    justify-content: center;
}

/* ページネーション */
.pagination {
    margin: 40px 0;
    text-align: center;
}

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

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

.pagination .page-numbers:hover,
.pagination .page-numbers.current {
    background-color: #0066cc;
    color: #fff;
    border-color: #0066cc;
}

/* レスポンシブ */
@media screen and (max-width: 768px) {
    /* ページヘッダー */
    .page-header {
        padding: 40px 0 30px;
        margin-bottom: 20px;
    }

    .page-header .page-title {
        font-size: 24px;
        margin-bottom: 15px;
    }

    .page-header .page-description {
        font-size: 14px;
        line-height: 1.7;
    }

    #notification-container {
        top: 10px;
        right: 10px;
        left: 10px;
    }

    .notification {
        min-width: auto;
        width: 100%;
    }

    .products-wrapper {
        grid-template-columns: 1fr;
    }

    .filter-sort-wrapper {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }

    .cart-section {
        justify-content: center;
        margin-right: 0;
    }

    .sort-section {
        flex-direction: column;
        align-items: stretch;
        gap: 5px;
    }

    .device-tabs,
    .category-tabs {
        justify-content: center;
    }

    .device-tab,
    .category-tab {
        font-size: 13px;
        padding: 6px 12px;
    }

    .sort-select {
        width: 100%;
        min-width: auto;
    }

    .result-count {
        text-align: center;
    }

    .product-main {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .cart-table {
        font-size: 14px;
    }

    .cart-table th,
    .cart-table td {
        padding: 8px;
    }

    .cart-table .product-thumbnail {
        width: 60px;
    }

    .cart-table .product-thumbnail img {
        width: 60px;
        height: 60px;
    }

    .cart-table .product-code {
        display: none;
    }

    .summary-box {
        width: 100%;
    }

    .checkout-container {
        grid-template-columns: 1fr;
    }

    .order-summary {
        position: static;
    }

    .form-actions {
        flex-direction: column;
    }

    .action-links {
        flex-direction: column;
    }

    .quantity-input-inline {
        width: 50px;
    }
}

/* ============================================================
   送料通知
   ============================================================ */
.shipping-notice {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px 20px;
    margin: 20px 0;
}

.shipping-notice .notice-icon {
    font-size: 16px;
    font-weight: bold;
    color: #495057;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.shipping-notice .notice-icon i {
    color: #007bff;
}

.shipping-notice .notice-text {
    font-size: 14px;
    line-height: 1.6;
    color: #495057;
    margin: 0;
}

.shipping-notice .notice-text small {
    font-size: 12px;
    color: #6c757d;
    display: block;
    margin-top: 5px;
}
