/**
 * 顧客予約画面 CSS
 */

/* 全体 */
body.customer-page {
    background: #f5f5f5;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #333;
    margin: 0;
    padding: 0;
}

/* ヘッダー */
.customer-header {
    background: var(--theme-gradient-light, linear-gradient(135deg, rgba(255,255,255,0.95), rgba(245,245,245,0.95)));
    border-bottom: 3px solid var(--theme-primary, #2563eb);
    padding: 0.25rem 1rem 1rem;
    text-align: center;
    box-shadow: 0 2px 8px var(--theme-shadow, rgba(0,0,0,0.1));
}

.header-container {
    max-width: 800px;
    margin: 0 auto;
}

.store-logo {
    max-width: 100%;
    width: auto;
    max-height: 120px;
    height: auto;
    margin-bottom: 1.5rem;
    display: block;
    margin-left: auto;
    margin-right: auto;
    object-fit: contain;
}

.store-name {
    margin: 0 0 0.5rem 0;
    font-size: 2rem;
    color: var(--theme-primary, #2563eb);
    font-weight: bold;
}

.store-description {
    margin: 0 0 1rem 0;
    color: #666;
    line-height: 1.6;
}

.store-description a {
    color: var(--theme-primary, #2563eb);
    word-break: break-all;
}

.store-description a:hover,
.store-description a:focus {
    text-decoration: underline;
}

.header-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.header-link {
    padding: 0.5rem 1.5rem;
    background: white;
    color: var(--theme-color, #61b9e4);
    text-decoration: none;
    border-radius: 20px;
    border: 2px solid var(--theme-color, #61b9e4);
    font-weight: bold;
    transition: all 0.3s;
}

.header-link:hover {
    background: var(--theme-color, #61b9e4);
    color: white;
}

/* メインコンテンツ */
.customer-main {
    padding: 1rem 1rem;
    min-height: calc(100vh - 300px);
}

/* 予約フォーム */
.reservation-container {
    max-width: 800px;
    margin: 0 auto;
}

.reservation-form-wrapper {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.form-title {
    margin: 0 0 2rem 0;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--theme-color, #61b9e4);
    font-size: 1.5rem;
    color: #333;
}

/* フォームセクション */
.form-section {
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e0e0e0;
}

.form-section:last-of-type {
    border-bottom: none;
}

.section-title {
    margin: 0 0 1.5rem 0;
    font-size: 1.2rem;
    color: var(--theme-color, #61b9e4);
    display: flex;
    align-items: center;
}

.section-title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 1.2rem;
    background: var(--theme-color, #61b9e4);
    margin-right: 0.5rem;
}

/* フォームグループ */
.form-group {
    margin-bottom: 1.5rem;
}

/* 来店日プルダウン：休業日（選択不可） */
#reservation_date option.reservation_date_option_closed {
    color: #9ca3af;
}

.reservation_date_closed_hint {
    margin: 0.35rem 0 0;
    font-size: 0.85rem;
    color: #6b7280;
    line-height: 1.4;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: #333;
}

.form-group label.required::after {
    content: ' *';
    color: #dc3545;
    font-weight: bold;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--theme-color, #61b9e4);
}

.form-group input:disabled,
.form-group select:disabled {
    background: #f5f5f5;
    cursor: not-allowed;
}

.form-help {
    margin-top: 0.25rem;
    font-size: 0.85rem;
    color: #666;
}

.cookie-notice {
    margin-top: 0.5rem;
    padding: 0.5rem 1rem;
    background: #d4edda;
    color: #155724;
    border-radius: 4px;
    font-size: 0.85rem;
    border-left: 3px solid #28a745;
}

/* 商品選択エリア */
#products-container {
    margin-bottom: 1.5rem;
}

.product-item {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.product-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #ddd;
}

.product-number {
    margin: 0;
    font-size: 1.1rem;
    color: #333;
}

.btn-remove-product {
    padding: 0.5rem 1rem;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.3s;
}

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

.product-fields {
    display: grid;
    gap: 1rem;
}

.product-description-display {
    padding: 0.75rem 1rem;
    background: #f0f7ff;
    border-left: 3px solid var(--theme-color, #61b9e4);
    border-radius: 4px;
    margin-top: 0.5rem;
}

.product-description-text {
    margin: 0;
    color: #555;
    font-size: 0.95rem;
    line-height: 1.6;
}

.options-container {
    display: grid;
    gap: 1rem;
}

.price-display {
    padding: 1rem;
    background: white;
    border: 2px solid var(--theme-color, #61b9e4);
    border-radius: 4px;
    text-align: right;
    font-size: 1.1rem;
}

.price-label {
    font-weight: bold;
    color: #666;
}

.price-value {
    font-weight: bold;
    color: var(--theme-color, #61b9e4);
    font-size: 1.3rem;
    margin-left: 0.5rem;
}

.btn-add {
    width: 100%;
    padding: 1rem;
    background: white;
    color: var(--theme-color, #61b9e4);
    border: 2px dashed var(--theme-color, #61b9e4);
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-add:hover {
    background: var(--theme-color, #61b9e4);
    color: white;
}

.total-amount {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: var(--theme-color, #61b9e4);
    border-radius: 8px;
    text-align: right;
    color: white;
}

.total-label {
    font-size: 1.2rem;
    font-weight: bold;
}

.total-value {
    font-size: 2rem;
    font-weight: bold;
    margin-left: 1rem;
}

/* 送信ボタン */
.form-actions {
    text-align: center;
    margin-top: 2rem;
}

.btn-submit {
    padding: 1rem 3rem;
    background: var(--theme-color, #61b9e4);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.btn-submit:hover {
    background: var(--theme-secondary, var(--theme-primary, #2563eb));
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.3);
}

.btn-submit:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* ローディング */
#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    color: white;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

#loading-overlay p {
    margin-top: 1rem;
    font-size: 1.2rem;
}

.loading-message {
    color: #666;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* エラーメッセージ */
.error-messages {
    max-width: 800px;
    margin: 0 auto 2rem;
    padding: 1rem;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    color: #721c24;
}

.error-message {
    margin: 0;
    line-height: 1.6;
}

/* 完了画面 */
.complete-container {
    max-width: 800px;
    margin: 0 auto;
}

.complete-wrapper {
    background: white;
    border-radius: 8px;
    padding: 3rem 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    text-align: center;
}

.complete-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: #28a745;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: bold;
}

.complete-title {
    margin: 0 0 2rem 0;
    font-size: 2rem;
    color: #28a745;
}

.reservation-info {
    text-align: left;
    margin-bottom: 2rem;
}

.info-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e0e0e0;
}

.info-section:last-child {
    border-bottom: none;
}

.info-title {
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
    color: var(--theme-color, #61b9e4);
}

.reservation-number {
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
    margin: 0;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 4px;
    text-align: center;
}

.info-table {
    width: 100%;
    border-collapse: collapse;
}

.info-table th,
.info-table td {
    padding: 0.75rem;
    border-bottom: 1px solid #e0e0e0;
    text-align: left;
}

.info-table th {
    width: 30%;
    font-weight: bold;
    color: #666;
}

.info-table tr:last-child th,
.info-table tr:last-child td {
    border-bottom: none;
}

.visit-datetime {
    font-size: 1.3rem;
    font-weight: bold;
    color: #333;
    margin: 0;
}

.products-table {
    width: 100%;
    border-collapse: collapse;
}

.products-table th,
.products-table td {
    padding: 0.75rem;
    border: 1px solid #e0e0e0;
    text-align: left;
}

.products-table thead th {
    background: #f8f9fa;
    font-weight: bold;
    color: #333;
}

.products-table tbody td:nth-child(2),
.products-table tbody td:nth-child(3) {
    text-align: center;
}

.product-option {
    font-size: 0.9rem;
    color: #666;
    margin-top: 0.25rem;
}

.total-row {
    background: #f8f9fa;
    font-weight: bold;
}

.total-row th,
.total-row td {
    font-size: 1.1rem;
    color: var(--theme-color, #61b9e4);
}

.note-text {
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 4px;
    line-height: 1.6;
    margin: 0;
}

.complete-message {
    padding: 1.5rem;
    background: #e7f3ff;
    border-radius: 4px;
    margin-bottom: 2rem;
}

.complete-message p {
    margin: 0 0 0.75rem 0;
    line-height: 1.6;
}

.complete-message p:last-child {
    margin-bottom: 0;
}

.contact-info {
    font-size: 1.1rem;
}

.contact-info a {
    color: var(--theme-color, #61b9e4);
    text-decoration: none;
    font-weight: bold;
}

.contact-info a:hover {
    text-decoration: underline;
}

.complete-actions {
    margin-top: 2rem;
}

.btn-back {
    display: inline-block;
    padding: 1rem 2rem;
    background: var(--theme-color, #61b9e4);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: bold;
    transition: all 0.3s;
}

.btn-back:hover {
    background: var(--theme-secondary, var(--theme-primary, #2563eb));
    transform: translateY(-2px);
}

/* 予約確認画面 */
.check-reservation-container,
.view-reservation-container {
    max-width: 800px;
    margin: 0 auto;
}

.check-form-wrapper,
.view-wrapper {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.search-section {
    margin-bottom: 2rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.search-description {
    margin: 0 0 1.5rem 0;
    color: #666;
    line-height: 1.6;
}

.search-form {
    max-width: 400px;
    margin: 0 auto;
}

.btn-search {
    width: 100%;
    padding: 1rem;
    background: var(--theme-color, #61b9e4);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-search:hover {
    background: var(--theme-secondary, var(--theme-primary, #2563eb));
}

.reservations-section {
    margin-top: 2rem;
}

.result-count {
    margin: 0 0 1.5rem 0;
    color: #666;
    font-size: 0.95rem;
}

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

.reservation-card {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s;
}

.reservation-card:hover {
    border-color: var(--theme-color, #61b9e4);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
}

.store-name-small {
    font-size: 0.85rem;
    color: #666;
    font-weight: normal;
    margin-bottom: 0.25rem;
}

.card-body {
    padding: 1.5rem;
}

.reservation-status {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: bold;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-ready {
    background: #d1ecf1;
    color: #0c5460;
}

.status-completed {
    background: #d4edda;
    color: #155724;
}

.status-cancelled {
    background: #f8d7da;
    color: #721c24;
}

.reservation-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.info-row {
    display: flex;
    align-items: baseline;
}

.info-label {
    font-weight: bold;
    color: #666;
    min-width: 120px;
}

.info-value {
    color: #333;
}

.card-actions {
    display: flex;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
}

.btn-detail,
.btn-edit {
    flex: 1;
    padding: 0.75rem;
    text-align: center;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    transition: all 0.3s;
}

.btn-detail {
    background: white;
    color: var(--theme-color, #61b9e4);
    border: 2px solid var(--theme-color, #61b9e4);
}

.btn-detail:hover {
    background: var(--theme-color, #61b9e4);
    color: white;
}

.btn-edit {
    background: var(--theme-color, #61b9e4);
    color: white;
    border: 2px solid var(--theme-color, #61b9e4);
}

.btn-edit:hover {
    background: var(--theme-secondary, var(--theme-primary, #2563eb));
    border-color: var(--theme-secondary, var(--theme-primary, #2563eb));
}

.back-section {
    margin-top: 2rem;
    text-align: center;
}

/* 予約詳細画面 */
.current-reservation {
    padding: 1.5rem;
    background: #e7f3ff;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.current-reservation h3 {
    margin: 0 0 1rem 0;
    color: var(--theme-color, #61b9e4);
}

.current-reservation p {
    margin: 0.5rem 0;
}

.edit-notice {
    padding: 1.5rem;
    background: #fff3cd;
    border-radius: 8px;
    margin: 2rem 0;
}

.edit-notice p {
    margin: 0.5rem 0;
    line-height: 1.6;
}

.edit-notice p:first-child {
    margin-top: 0;
}

.edit-notice p:last-child {
    margin-bottom: 0;
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 2rem 0;
}

.btn-edit-large,
.btn-cancel-large {
    padding: 1rem 2rem;
    border: none;
    border-radius: 4px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    text-decoration: none;
    display: block;
}

.btn-edit-large {
    background: var(--theme-color, #61b9e4);
    color: white;
}

.btn-edit-large:hover {
    background: var(--theme-secondary, var(--theme-primary, #2563eb));
}

.btn-cancel-large {
    background: white;
    color: #dc3545;
    border: 2px solid #dc3545;
}

.btn-cancel-large:hover {
    background: #dc3545;
    color: white;
}

.btn-cancel-link {
    display: inline-block;
    padding: 1rem 2rem;
    background: #6c757d;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    transition: background 0.3s;
}

.btn-cancel-link:hover {
    background: #5a6268;
}

.form-notice {
    padding: 1rem;
    background: #fff3cd;
    border-radius: 4px;
    margin: 1.5rem 0;
    border-left: 4px solid #ffc107;
}

.form-notice p {
    margin: 0;
    color: #856404;
    font-size: 0.95rem;
}

.btn-primary {
    display: inline-block;
    padding: 1rem 2rem;
    background: var(--theme-primary, #2563eb);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: bold;
    transition: all 0.3s;
    margin: 0.5rem;
    box-shadow: 0 2px 8px var(--theme-shadow, rgba(0,0,0,0.2));
}

.btn-primary:hover {
    background: var(--theme-secondary, var(--theme-primary, #2563eb));
    transform: translateY(-2px);
    box-shadow: 0 4px 15px var(--theme-shadow, rgba(0,0,0,0.3));
}

.btn-secondary {
    display: inline-block;
    padding: 1rem 2rem;
    background: white;
    color: var(--theme-color, #61b9e4);
    text-decoration: none;
    border-radius: 50px;
    border: 2px solid var(--theme-color, #61b9e4);
    font-weight: bold;
    transition: all 0.3s;
    margin: 0.5rem;
}

.btn-secondary:hover {
    background: var(--theme-color, #61b9e4);
    color: white;
    transform: translateY(-2px);
}

/* ダイアログ */
.dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.dialog-content {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.dialog-content h3 {
    margin: 0 0 1rem 0;
    color: #333;
}

.dialog-content p {
    margin: 0 0 1rem 0;
    color: #666;
}

.dialog-content .warning {
    color: #dc3545;
    font-weight: bold;
}

.dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1.5rem;
}

.btn-danger {
    background: #dc3545;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

.btn-danger:hover {
    background: #c82333;
}

.complete-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

/* フッター */
.customer-footer {
    background: #333;
    color: white;
    padding: 1rem 1rem;
    margin-top: 3rem;
    text-align: center;
}

.footer-container {
    max-width: 800px;
    margin: 0 auto;
}

.footer-text {
    margin: 0 0 0.5rem 0;
    font-size: 0.9rem;
}

.footer-tel {
    margin: 0;
    font-size: 1rem;
}

.footer-tel a {
    color: white;
    text-decoration: none;
}

.footer-tel a:hover {
    text-decoration: underline;
}

/* レスポンシブ */
@media (max-width: 768px) {
    .customer-header {
        padding: 0.25rem 1rem 1rem;
    }
    
    .store-logo {
        max-height: 80px;
        margin-bottom: 1rem;
    }
    
    .store-name {
        font-size: 1.5rem;
    }
    
    .customer-main {
        padding: 1rem;
    }
    
    .reservation-form-wrapper {
        padding: 1.5rem;
    }
    
    .form-title {
        font-size: 1.3rem;
    }
    
    .product-item {
        padding: 1rem;
    }
    
    .product-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .btn-remove-product {
        align-self: flex-end;
    }
    
    .total-label {
        font-size: 1rem;
    }
    
    .total-value {
        font-size: 1.5rem;
    }
    
    .btn-submit {
        padding: 0.75rem 2rem;
        font-size: 1rem;
    }
    
    .complete-wrapper {
        padding: 1rem 1rem;
    }
    
    .complete-title {
        font-size: 1.5rem;
    }
    
    .info-table th {
        width: 40%;
    }
    
    .products-table {
        font-size: 0.9rem;
    }
    
    .products-table th,
    .products-table td {
        padding: 0.5rem;
    }
}

/* 印刷ボタン */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-title {
    margin: 0;
    font-size: 1.2rem;
    color: var(--theme-color, #61b9e4);
    flex: 1;
}

.result-count {
    margin: 0;
    color: #666;
    font-size: 0.95rem;
}

.btn-print-customer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: #17a2b8;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}

.btn-print-customer:hover {
    background: #138496;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.btn-print-customer i {
    font-size: 1rem;
}

/* 予約画面: 画像カード方式の商品選択（reservation.php） */
.reservation_product_pick_group_card {
    margin-bottom: 1rem;
}

.reservation_product_pick_group_card > .required {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.reservation_product_card_grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.85rem;
    margin-top: 0.75rem;
}

@media (min-width: 560px) {
    .reservation_product_card_grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 920px) {
    .reservation_product_card_grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.reservation_product_card_pick {
    display: flex;
    flex-direction: column;
    text-align: left;
    cursor: pointer;
    border-radius: 10px;
    border: 2px solid #e5e7eb;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    padding: 0;
    outline: none;
}

.reservation_product_card_pick:focus-visible {
    border-color: var(--theme-color, #61b9e4);
    box-shadow: 0 0 0 3px rgba(97, 185, 228, 0.35);
}

.reservation_product_card_pick:hover:not(.reservation_product_card_pick_disabled) {
    border-color: var(--theme-color, #61b9e4);
}

.reservation_product_card_pick_selected {
    border-color: var(--theme-color, #61b9e4);
    background: rgba(97, 185, 228, 0.08);
    box-shadow: 0 4px 12px rgba(97, 185, 228, 0.25);
}

.reservation_product_card_pick_disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.reservation_product_card_img_wrap {
    width: 100%;
    aspect-ratio: 16 / 10;
    background: #eef2f6;
    overflow: hidden;
}

/* 画像未設定: ストライプ枠 + 「画像なし」（SVGプレースホルダより顧客向けに親しみやすい見た目） */
.megumino_reservation_no_product_image.reservation_product_card_img_wrap {
    background: repeating-linear-gradient(
        -42deg,
        #e9ecef,
        #e9ecef 11px,
        #f5f7fa 11px,
        #f5f7fa 22px
    );
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.megumino_reservation_no_product_image_label {
    font-size: 0.95rem;
    font-weight: bold;
    color: #bcc4ce;
    letter-spacing: 0.04em;
    user-select: none;
}

.reservation_product_card_img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.reservation_product_card_body {
    padding: 0.65rem 0.85rem 0.85rem;
}

.reservation_product_card_name {
    font-weight: bold;
    font-size: 1rem;
    color: #222;
    line-height: 1.35;
    margin-bottom: 0.25rem;
}

.reservation_product_card_price {
    color: var(--theme-color, #61b9e4);
    font-weight: bold;
    font-size: 0.95rem;
}

.reservation_product_card_stock {
    font-size: 0.82rem;
    color: #666;
    margin-top: 0.15rem;
}

.reservation_product_card_desc {
    font-size: 0.82rem;
    color: #555;
    line-height: 1.45;
    margin-top: 0.35rem;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.reservation_card_select_hint {
    margin-top: 0.35rem;
}

/* 予約画面: 画像カート方式（各カードに数量・オプション／reservation.php + customer_reservation.js） */
.megumino_card_products_container {
    margin-top: 0.75rem;
}

.megumino_reservation_cart_compact_grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
    margin-top: 0.5rem;
}

.megumino_cart_compact_tile {
    border-radius: 10px;
    border: 2px solid #e5e7eb;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    cursor: pointer;
    text-align: left;
    outline: none;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.megumino_cart_compact_tile:focus-visible {
    border-color: var(--theme-color, #61b9e4);
    box-shadow: 0 0 0 3px rgba(97, 185, 228, 0.35);
}

.megumino_cart_compact_tile:hover:not(.megumino_cart_compact_sold) {
    border-color: var(--theme-color, #61b9e4);
}

.megumino_cart_compact_sold {
    opacity: 0.65;
    cursor: not-allowed;
}

.megumino_cart_compact_tile_ordered {
    border-color: var(--theme-color, #61b9e4);
    background: rgba(97, 185, 228, 0.06);
}

.megumino_compact_thumb {
    width: 100%;
    aspect-ratio: 4 / 3;
    background: #eef2f6;
    overflow: hidden;
}

.megumino_compact_thumb_img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.megumino_compact_thumb_no_img {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    color: #8a939e;
    background: repeating-linear-gradient(
        135deg,
        #eef2f6,
        #eef2f6 6px,
        #e2e8f0 6px,
        #e2e8f0 12px
    );
}

.megumino_compact_meta {
    padding: 0.5rem 0.55rem 0.58rem;
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
    flex: 1 1 auto;
}

.megumino_compact_name {
    font-weight: bold;
    font-size: 0.88rem;
    line-height: 1.35;
    color: #222;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    line-clamp: 2;
}

.megumino_compact_price {
    color: var(--theme-color, #61b9e4);
    font-weight: bold;
    font-size: 0.88rem;
}

.megumino_compact_stock {
    font-size: 0.74rem;
    color: #666;
}

.megumino_compact_stock_out {
    color: #c53030;
    font-weight: bold;
}

.megumino_compact_hint {
    font-size: 0.7rem;
    color: #888;
    margin-top: auto;
    padding-top: 0.15rem;
}

.megumino_compact_selected_badge {
    margin-top: 0.28rem;
    display: inline-block;
    align-self: flex-start;
    font-size: 0.72rem;
    font-weight: bold;
    padding: 0.14rem 0.45rem;
    border-radius: 999px;
    background: var(--theme-color, #61b9e4);
    color: #fff;
}

body.megumino_res_modal_open {
    overflow: hidden;
}

.megumino_customer_reservation_cart_modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10050;
}

.megumino_customer_reservation_cart_modal.megumino_customer_reservation_cart_modal_open {
    display: block;
}

.megumino_customer_reservation_cart_modal_overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
}

.megumino_customer_reservation_cart_modal_sheet {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
    width: 100%;
    max-width: 520px;
    max-height: min(92vh, 760px);
    background: #fff;
    border-radius: 14px 14px 0 0;
    box-shadow: 0 -6px 30px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

@media (min-width: 560px) {
    .megumino_customer_reservation_cart_modal_sheet {
        bottom: auto;
        top: 50%;
        transform: translate(-50%, -50%);
        border-radius: 14px;
        max-height: min(85vh, 720px);
    }
}

.megumino_customer_reservation_cart_modal_btn_close {
    position: absolute;
    top: 0.45rem;
    right: 0.45rem;
    z-index: 2;
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 50%;
    border: none;
    background: rgba(248, 250, 252, 0.95);
    color: #334155;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

#megumino_customer_reservation_cart_modal_body {
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0.75rem 0.95rem 0.5rem;
    -webkit-overflow-scrolling: touch;
}

.megumino_modal_title {
    font-size: 1.15rem;
    margin: 0 2.25rem 0 0;
    line-height: 1.35;
}

.megumino_modal_unit_price {
    margin: 0.35rem 0 0;
    color: var(--theme-color, #61b9e4);
    font-weight: bold;
    font-size: 1rem;
}

.megumino_modal_visual {
    margin: 0 auto 0.65rem;
    border-radius: 10px;
    overflow: hidden;
    background: #eef2f6;
}

.megumino_modal_visual .megumino_modal_product_img {
    width: 100%;
    max-height: 220px;
    object-fit: cover;
    display: block;
}

.megumino_modal_thumb_no_photo {
    padding: 1.85rem;
    text-align: center;
    font-size: 0.92rem;
    color: #8a939e;
    background: repeating-linear-gradient(
        135deg,
        #eef2f6,
        #eef2f6 6px,
        #e2e8f0 6px,
        #e2e8f0 12px
    );
}

.megumino_modal_thumb_sold {
    color: #c53030;
    font-weight: bold;
}

.megumino_modal_stock_line {
    font-size: 0.88rem;
    color: #666;
    margin: 0.35rem 0 0;
}

.megumino_modal_description {
    font-size: 0.88rem;
    color: #555;
    margin-top: 0.65rem;
    line-height: 1.55;
}

.megumino_modal_qty_group select,
.megumino_modal_options_wrap select {
    width: 100%;
    margin-top: 0.35rem;
    box-sizing: border-box;
}

.megumino_modal_opt_row.form-group {
    margin-bottom: 0.65rem;
}

.megumino_modal_price_row {
    margin-top: 0.75rem;
    padding-top: 0.6rem;
    border-top: 1px dashed #e2e8f0;
    text-align: right;
    font-weight: bold;
}

.megumino_modal_price_label {
    color: #666;
    font-size: 0.92rem;
    margin-right: 0.35rem;
}

.megumino_modal_line_subtotal {
    color: var(--theme-color, #61b9e4);
    font-size: 1.05rem;
}

.megumino_customer_reservation_cart_modal_footer {
    flex: 0 0 auto;
    padding: 0.65rem 0.95rem calc(0.75rem + env(safe-area-inset-bottom));
    border-top: 1px solid #e5e7eb;
    background: #fafafa;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    justify-content: flex-end;
}

.megumino_modal_apply_error {
    flex: 1 1 100%;
    margin: 0 0 0.35rem;
    color: #c53030;
    font-size: 0.87rem;
    line-height: 1.35;
}

.megumino_customer_reservation_cart_modal_btn_cancel,
.megumino_customer_reservation_cart_modal_btn_apply {
    flex: 1 1 auto;
    min-width: 6.5rem;
    padding: 0.72rem 0.85rem;
    border-radius: 8px;
    font-size: 0.92rem;
    cursor: pointer;
    border: 2px solid #cbd5e1;
    background: #fff;
}

.megumino_customer_reservation_cart_modal_btn_apply {
    border-color: var(--theme-color, #61b9e4);
    background: var(--theme-color, #61b9e4);
    color: #fff;
    font-weight: bold;
}

.megumino_customer_reservation_cart_modal_btn_apply:hover {
    filter: brightness(0.96);
}

.megumino_customer_reservation_cart_modal_btn_cancel:hover {
    background: #f1f5f9;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .btn-print-customer {
        width: 100%;
        justify-content: center;
    }
}

