/*
Theme Name:   Astra Child
Theme URI:    https://wpastra.com/
Description:  Astra用の子テーマ
Author:       あなたの名前
Author URI:   https://yourwebsite.com/
Template:     astra
Version:      1.0.0
License:      GNU General Public License v2 or later
License URI:  http://www.gnu.org/licenses/gpl-2.0.html
Text Domain:  astra-child
*/

/* 
===========================================
ラーメン商品データベース用カスタムCSS
===========================================
*/

/* ========================================
   1. 検索フォームのスタイル
======================================== */

.ramen-advanced-search {
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    margin-bottom: 40px;
}

.search-results-count {
    text-align: center;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.count-text {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.count-text.no-results {
    color: #e74c3c;
}

.count-text.error {
    color: #e74c3c;
    background: #fee;
    padding: 10px;
    border-radius: 5px;
}

.search-main-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.search-options-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

.search-field {
    display: flex;
    flex-direction: column;
}

.search-field label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #555;
    font-size: 14px;
}

.search-input,
.search-select {
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
}

.search-input:focus,
.search-select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.search-text {
    position: relative;
}

.clear-search {
    position: absolute;
    right: 10px;
    top: 38px;
    background: #e0e0e0;
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    color: #666;
    transition: all 0.3s ease;
}

.clear-search:hover {
    background: #c0c0c0;
    color: #333;
}

.search-buttons {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.search-submit,
.search-reset {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-submit {
    background: #3498db;
    color: white;
    flex: 1;
}

.search-submit:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(52, 152, 219, 0.3);
}

.search-reset {
    background: #ecf0f1;
    color: #555;
}

.search-reset:hover {
    background: #bdc3c7;
}

/* ========================================
   2. 検索結果のスタイル
======================================== */

.search-results-wrapper {
    margin-top: 30px;
}

.search-loading {
    text-align: center;
    padding: 40px;
    font-size: 18px;
    color: #3498db;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.search-results-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 30px;
}

.search-result-item {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.search-result-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.result-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
}

.result-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.search-result-item:hover .result-image img {
    transform: scale(1.05);
}

.result-content {
    padding: 20px;
}

.result-title {
    margin: 0 0 15px 0;
    font-size: 18px;
}

.result-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.result-title a:hover {
    color: #3498db;
}

.result-link {
    margin-top: 15px;
}

.view-details {
    display: inline-block;
    padding: 10px 20px;
    background: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.view-details:hover {
    background: #2980b9;
    transform: translateX(5px);
}

.no-search-results {
    text-align: center;
    padding: 60px 20px;
    background: #f8f9fa;
    border-radius: 10px;
    margin-top: 30px;
}

.no-search-results p {
    font-size: 16px;
    color: #666;
    margin: 10px 0;
}

/* ========================================
   3. 再販希望・いいねボタンのスタイル
======================================== */

.ramen-stats {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 20px 0;
}

.stats-display {
    display: flex;
    gap: 15px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    background: #f8f9fa;
    border-radius: 20px;
}

.stat-number {
    font-weight: 600;
    color: #333;
    font-size: 16px;
}

.request-stat::before {
    content: "🔄";
    font-size: 18px;
}

.vote-stat::before {
    content: "❤️";
    font-size: 18px;
}

.stats-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.request-resale,
.request-resale-single,
.vote-product,
.vote-product-single {
    padding: 10px 20px;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.request-resale,
.request-resale-single {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    box-shadow: 0 2px 10px rgba(231, 76, 60, 0.3);
}

.request-resale:hover,
.request-resale-single:hover {
    background: linear-gradient(135deg, #c0392b 0%, #a93226 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.4);
}

.vote-product,
.vote-product-single {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    box-shadow: 0 2px 10px rgba(52, 152, 219, 0.3);
}

.vote-product:hover,
.vote-product-single:hover {
    background: linear-gradient(135deg, #2980b9 0%, #21618c 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.4);
}

.request-resale:disabled,
.request-resale-single:disabled,
.vote-product:disabled,
.vote-product-single:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.request-resale .count,
.vote-product .count {
    background: rgba(255,255,255,0.2);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
}

/* アニメーション */
.success-animation {
    animation: successPulse 0.5s ease;
}

@keyframes successPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.vote-success {
    animation: heartBeat 0.6s ease;
}

@keyframes heartBeat {
    0%, 100% { transform: scale(1); }
    20%, 40% { transform: scale(1.1); }
    30% { transform: scale(0.95); }
}

.heart-beat {
    animation: heartBeatContinuous 1s infinite;
}

@keyframes heartBeatContinuous {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.hover-effect {
    filter: brightness(1.1);
}

/* メッセージ表示 */
.success-message,
.error-message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 8px;
    font-weight: 600;
    z-index: 10000;
    animation: slideIn 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.success-message {
    background: #2ecc71;
    color: white;
}

.error-message {
    background: #e74c3c;
    color: white;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ========================================
   4. 商品情報表示のスタイル
======================================== */

.ramen-comprehensive-info {
    margin: 20px 0;
}

.info-section {
    background: #fff;
    padding: 25px;
    margin-bottom: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    margin: 0 0 20px 0;
    color: #333;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

.section-title .icon {
    font-size: 24px;
}

.info-row {
    display: flex;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

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

.info-row .label {
    font-weight: 600;
    color: #555;
    min-width: 150px;
}

.info-row .value {
    color: #333;
}

.ingredients-grid,
.sales-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.ingredient-item,
.sales-item {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.ingredient-title {
    font-weight: 600;
    margin: 0 0 10px 0;
    color: #3498db;
}

.sales-label {
    display: block;
    font-size: 13px;
    color: #888;
    margin-bottom: 5px;
}

.sales-value {
    display: block;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.price-value {
    color: #e74c3c;
    font-size: 24px;
}

/* ========================================
   5. レスポンシブ対応
======================================== */

@media (max-width: 1024px) {
    .search-results-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .search-main-row,
    .search-options-row {
        grid-template-columns: 1fr;
    }
    
    .search-results-grid {
        grid-template-columns: 1fr;
    }
    
    .ingredients-grid,
    .sales-grid {
        grid-template-columns: 1fr;
    }
    
    .ramen-stats {
        flex-direction: column;
        align-items: stretch;
    }
    
    .stats-display {
        justify-content: space-between;
    }
    
    .stats-buttons {
        width: 100%;
    }
    
    .request-resale,
    .request-resale-single,
    .vote-product,
    .vote-product-single {
        flex: 1;
        justify-content: center;
    }
}

/* ========================================
   6. デバッグ用スタイル
======================================== */

.debug-info {
    background: #fff3cd;
    border: 2px solid #ffeaa7;
    padding: 20px;
    margin: 20px 0;
    border-radius: 8px;
}

.debug-info h4 {
    margin-top: 0;
    color: #856404;
}

/* ========================================
   7. ローディング表示
======================================== */

.loading {
    display: inline-block;
    animation: dots 1.5s infinite;
}

@keyframes dots {
    0%, 20% { content: '処理中'; }
    40% { content: '処理中.'; }
    60% { content: '処理中..'; }
    80%, 100% { content: '処理中...'; }
}