.fullscreen-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    animation: slideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    opacity: 1;
    visibility: visible;
}

@keyframes slideIn {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}
.modal-overlay{
    display:none;
}

.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    display: none;
}

.modal-backdrop.show {
    display: block;
}
#products-modal{
    background:#eee;
}
.panel-header {
    padding: 12px 20px;
    background: #fff;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
    position: relative;
    flex-shrink: 0;
}

.panel-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    flex: 1;
}

.panel-close {
    width: 32px;
    height: 32px;
    border: none;
    background: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 24px;
    transition: all 0.2s;
}

.panel-close:hover {
    background: #f5f5f5;
    color: #333;
}

.panel-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f8f9fa;
    height: calc(100vh - 180px);
    max-height: calc(100vh - 180px);
    padding-bottom: 160px;
}

.color-size-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.fullscreen-panel:not(.multi-products-panel) .color-size-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: all 0.3s ease;
}

.fullscreen-panel:not(.multi-products-panel) .color-size-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.color-preview {
    position: relative;
    cursor: pointer;
    padding: 16px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
}

.color-thumb {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #eee;
}

.color-info {
    flex: 1;
}

.color-name {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 4px;
}

.color-code {
    font-size: 12px;
    color: #666;
    margin-left: 8px;
}

.color-status {
    font-size: 13px;
    color: #666;
}

.size-input-area {
    padding: 16px;
    background: #fff;
}

.size-grid {
    display: grid;
    gap: 12px;
    max-height: 300px;
    overflow: scroll;
}

.size-input-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    transition: all 0.2s;
}

.size-input-group:hover {
    background: #f0f0f0;
}

.size-label {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.size-name {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
}

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

.quantity-control {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border-radius: 6px;
    padding: 4px;
    border: 1px solid #eee;
}

.qty-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: #fff;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #1a1a1a;
    transition: all 0.2s;
}

.qty-btn:hover {
    background: #f0f0f0;
}

.qty-input {
    width: 48px;
    text-align: center;
    border: none;
    font-size: 15px;
    font-weight: 500;
    color: #1a1a1a;
    padding: 4px;
    background: transparent;
}

.qty-input:focus {
    outline: none;
}

.selected-summary {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    margin-top: 24px;
}

.selected-items {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.selected-item {
    background: #e6f4ff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 14px;
    color: #0066cc;
    display: flex;
    align-items: center;
    gap: 8px;
}

.selected-item::before {
    content: '';
    display: block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #0066cc;
}

.price-summary {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 16px;
}

.price-breakdown {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: #666;
    padding: 8px 0;
}

.price-row.total {
    margin-top: 16px;
    padding: 16px;
    border-top: 2px solid #e0e0e0;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.panel-footer {
    padding: 16px 20px;
    background: #fff;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    min-height: 80px;
}

.footer-prices {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 24px;
}

.quantity-display {
    font-size: 14px;
    color: #666;
    padding: 4px 12px;
    background: #f5f5f5;
    border-radius: 4px;
}

.per-piece-price,
.total-price {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.per-piece-price .label,
.total-price .label {
    font-size: 13px;
    color: #666;
}

.per-piece-price .value {
    font-size: 20px;
    font-weight: 600;
    color: #0066cc;
}

.total-price .value {
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
}

.confirm-selection {
    padding: 12px 24px;
    background: #0066cc;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.confirm-selection:hover {
    background: #0052a3;
}

@media (max-width: 767px) {
    .panel-footer {
        min-height: 160px;
        padding: 16px;
        display: flex;
        flex-wrap: wrap;
    }

    .footer-prices {
        width: 100%;
        flex-wrap: wrap;
        justify-content: space-between;
        gap: 12px;
        margin-bottom: 12px;
    }

    .quantity-display,
    .per-piece-price,
    .total-price {
        flex: 1;
        min-width: 100px;
        text-align: center;
    }

    .confirm-selection {
        width: 100%;
        padding: 16px 0;
        margin-top: 0;
        height: 50px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .panel-content {
        height: calc(100vh - 70px);
        max-height: calc(100vh - 70px);
        padding-bottom: 180px;
    }
}

@media (max-width: 375px) {
    .panel-footer {
        min-height: 140px;
    }

    .footer-prices {
        gap: 8px;
        margin-bottom: 0;
    }

    .quantity-display,
    .per-piece-price,
    .total-price {
        min-width: 90px;
        font-size: 13px;
    }

    .panel-content {
        height: calc(100vh - 320px);
        max-height: calc(100vh - 240px);
        padding-bottom: 200px;
    }
}

.product-card {
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    border: 1px solid #eee;
    display: flex;
    flex-direction: column;
    gap: 12px;
    cursor: default;
    overflow: hidden;
    will-change: transform;
    transform: translateZ(0);
}

.product-card:not(:has(.favorite-btn.processing)):hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-color: #e0e0e0;
}

/* 商品画像のスタイル改善 */
.product-card img {
    width: 100%;
    height: 200px;
    object-fit: contain;
    border-radius: 8px;
    background: #f8f9fa;
    padding: 8px;
    transition: transform 0.3s ease;
}

.product-card:hover img {
    transform: scale(1.05);
}

/* 商品名のスタイル */
.product-card h5 {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 8px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 商品コードのスタイル */
.product-card p {
    font-size: 14px;
    color: #666;
    margin: 4px 0;
}

/* 色情報のスタイル */
.product-colors {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    border-top: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
}

.product-colors strong {
    font-size: 13px;
    color: #666;
}

.product-colors span {
    font-size: 13px;
    color: #333;
    background: #f5f5f5;
    padding: 4px 8px;
    border-radius: 4px;
}

/* 価格情報のスタイル改善 */
.price-breakdown {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 12px;
    margin-top: 8px;
}

.price-detail {
    font-size: 13px;
    color: #666;
    margin: 4px 0;
    display: flex;
    justify-content: space-between;
}

.total-price-per-piece {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed #ddd;
    font-size: 14px;
    color: #1a1a1a;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.total-price-per-piece strong {
    color: #0066cc;
}

/* 生地厚情報のスタイル */
.oz {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #f0f7ff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 13px;
    color: #0066cc;
}

/* 新着バッジ（オプション） */
.product-card.new::before {
    content: 'NEW';
    position: absolute;
    top: 12px;
    right: 12px;
    background: #ff4d4f;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    z-index: 1;
}

/* アニメーション効果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-card {
    animation: fadeIn 0.3s ease-out;
}

/* レスポンシブ対応 */
@media (max-width: 767px) {
    .product-card {
        padding: 12px;
    }

    .product-card img {
        height: 160px;
    }

    .product-card h5 {
        font-size: 15px;
    }

    .price-breakdown {
        padding: 10px;
    }
    .modal-header h3{
        font-size:1rem!important;
    }
}

.price-details {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.3s ease-out;
}

.price-details.open {
    max-height: 200px; /* 十分な高さを設定 */
}

.price-details-toggle {
    background: #f5f5f5;
    border: none;
    padding: 8px 12px;
    margin: 10px 0;
    width: 100%;
    text-align: left;
    cursor: pointer;
    border-radius: 4px;
    position: relative;
    transition: all 0.3s ease;
    font-weight: 500;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.price-details-toggle:hover {
    background: #e9e9e9;
}

.price-details-toggle::after {
    position: absolute;
    right: 12px;
    transition: transform 0.3s ease;
}

.price-details-toggle.open {
    background: #e6f7ff;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    margin-bottom: 0;
    box-shadow: 0 -1px 3px rgba(0,0,0,0.1);
}

.price-details {
    display: none;
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-top: none;
    padding: 0;
    overflow: hidden;
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    max-height: 0;
}

.price-details.open {
    display: block;
    padding: 12px;
    max-height: 300px;
    animation: slideDown 0.3s ease forwards;
}

@keyframes slideDown {
    from {
        max-height: 0;
        opacity: 0;
    }
    to {
        max-height: 300px;
        opacity: 1;
    }
}

.price-breakdown {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.price-detail {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px dashed #e0e0e0;
}

.price-detail:last-child {
    border-bottom: none;
}

/* 素材情報のスタイル */
.product-material {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    border-top: 1px solid #f0f0f0;
}

.product-material strong {
    font-size: 13px;
    color: #666;
}

.product-material span {
    font-size: 13px;
    color: #333;
    background: #f5f5f5;
    padding: 4px 8px;
    border-radius: 4px;
}

/* サイズ情報セクションのスタイル */
.size-info-section {
    margin: 16px 0;
    padding: 16px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.size-info-toggle {
    width: 100%;
    padding: 12px;
    background: #f8f9fa;
    border: 1px solid #eee;
    border-radius: 6px;
    color: #333;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.size-info-toggle:hover {
    background: #f0f0f0;
}

.size-info-content {
    margin-top: 16px;
    padding: 16px;
    background: #fff;
    border-radius: 6px;
    border: 1px solid #eee;
}

.size-table-container {
    overflow-x: auto;
    margin-bottom: 16px;
}

.size-table-container table {
    width: 100%!important;
    border-collapse: collapse;
    font-size: 14px;
}

.size-table-container th,
.size-table-container td {
    padding: 8px;
    border: 1px solid #eee;
    text-align: center;
}

.size-table-container th {
    background: #f8f9fa;
    font-weight: 600;
}

.size-image-container {
    text-align: center;
    margin-top: 16px;
}

.size-chart-image {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* モバイル対応 */
@media (max-width: 767px) {
    .size-info-section {
        margin: 12px 0;
        padding: 12px;
    }

    .size-table-container {
        font-size: 12px;
    }
}

/* スライドショー関連のスタイル */
.product-image-container {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    cursor: default;
}

.main-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: opacity 0.3s ease;
}

.product-slideshow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    opacity: 0;
    transition: opacity 0.3s ease;
    display: none;
    z-index: 2;
    pointer-events: auto !important;
}

.product-card:hover .product-slideshow {
    display: block;
    opacity: 1;
}

.slideshow-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.3s ease;
    display: none;
    pointer-events: auto !important;
}

.slide.active {
    opacity: 1;
    display: block;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #fff;
}

.slide-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-size: 12px;
    text-align: center;
}

.slide-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 3;
}

.product-slideshow:hover .slide-nav {
    opacity: 1;
}

.slide-nav.prev {
    left: 10px;
}

.slide-nav.next {
    right: 10px;
}

.slide-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
}

.slide-dot {
    width: 8px;
    height: 8px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    padding: 0;
}

.slide-dot.active {
    background: #fff;
}

.image-zoom-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 99999;
}

.zoom-modal-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.zoomed-image {
    max-width: 95vw;
    max-height: 85vh;
    object-fit: contain;
}

.zoom-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 40px;
    cursor: pointer;
    padding: 10px;
    z-index: 10001;
}

.zoom-caption {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    color: white;
    text-align: center;
    padding: 10px;
    background: rgba(0, 0, 0, 0.5);
}

.zoom-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: all 0.3s ease;
    z-index: 10001;
}

.zoom-nav:hover {
    background: rgba(255, 255, 255, 0.3);
}

.zoom-nav.prev {
    left: 20px;
}

.zoom-nav.next {
    right: 20px;
}

.zoom-dots {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10001;
}

.zoom-dot {
    width: 10px;
    height: 10px;
    border: 2px solid white;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    padding: 0;
    transition: all 0.3s ease;
}

.zoom-dot.active {
    background: white;
}

.slide-image {
    position: relative;
    z-index: 3;
    cursor: zoom-in !important;
    pointer-events: auto !important;
}

.select-product-btn {
    width: 100%;
    padding: 12px;
    background: #0066cc;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin: 8px 0;
}

.select-product-btn:hover {
    background: #0052a3;
    transform: translateY(-1px);
}

.select-product-btn:active {
    transform: translateY(0);
}


/* 複数商品選択パネル */
.multi-products-container {
    padding: 20px;
    overflow-y: auto;
    max-height: calc(100vh - 200px);
}

.multi-product-item {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #dee2e6;
}

.multi-product-item h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 18px;
}

/* 複数商品選択専用のスタイル（既存UIと衝突しないよう別クラス名を使用） */

/* 複数商品選択画面の改良スタイル */
.multi-product-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.multi-product-image {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
}

.multi-product-info {
    flex: 1;
}

.multi-product-info h4 {
    margin: 0 0 5px 0;
    font-size: 16px;
}

.multi-product-info .product-code {
    color: #666;
    font-size: 13px;
}

.color-toggle-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s;
}

.color-toggle-btn:hover {
    background: #e0e0e0;
}

/* カラーアコーディオン */
.color-accordion-container {
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    overflow: hidden;
}

.color-accordion-item {
    border-bottom: 1px solid #e0e0e0;
}

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

.color-accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: #fafafa;
    cursor: pointer;
    transition: background 0.2s;
}

.color-accordion-header:hover {
    background: #f0f0f0;
}

.color-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.color-thumbnail {
    width: 50px;
    height: 50px;
    object-fit: contain;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.color-name {
    font-weight: 500;
    color: #333;
}

.color-code {
    color: #666;
    font-size: 13px;
}

.color-expand-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #666;
    font-size: 16px;
    transition: transform 0.2s;
}

.color-accordion-content {
    padding: 15px;
    background: white;
    border-top: 1px solid #e0e0e0;
}

.size-inputs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 12px;
}

.multi-size-input-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 5px;
}

.size-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.size-name {
    font-weight: 500;
    color: #333;
}

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

.qty-control {
    display: flex;
    align-items: center;
    gap: 5px;
}

.qty-btn {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.qty-btn:hover {
    background: #f0f0f0;
}

.qty-btn:active {
    transform: scale(0.95);
}

.qty-control .multi-qty-input {
    width: 60px;
    height: 30px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.color-subtotal {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e0e0e0;
    text-align: right;
    color: #666;
}

.color-subtotal strong {
    color: #333;
    font-size: 16px;
}
.favorite-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #666;
    transition: all 0.2s ease;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    pointer-events: auto;
    isolation: isolate;
}

.favorite-btn.processing {
    pointer-events: none;
}

.favorite-btn:hover {
    background: #fff;
    transform: scale(1.1);
}

.favorite-btn.active {
    color: #ff4d4f;
    animation: heartPop 0.3s ease;
}

@keyframes heartPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}
/* 選択済み商品のインジケーター */
.product-card .selected-indicator {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #0066cc;
    color: white;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    z-index: 2;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

@media (max-width: 600px) {
    .products-search {
        position: static !important;
        top: auto !important;
        z-index: auto !important;
      padding: 8px 4px;
      margin-bottom: 8px;
      font-size: 14px;
      background: #f8f9fa;
    }
    .products-search form {
      display: flex;
      flex-direction: column;
      gap: 6px;
    }
    .products-search input,
    .products-search select,
    .products-search button {
      font-size: 15px;
      padding: 6px 8px;
      height: 36px;
      width: 100%;
      box-sizing: border-box;
    }
    .products-search .search-label {
      display: none; /* ラベルを省略 */
    }
  }