/*
Theme Name: St. poupee Renewal
Theme URI: https://st-poupee.jp/
Description: St. poupee リニューアル作業用テーマ。SWELL親テーマとWelcartの既存機能を維持します。
Author: Studio Poupee / Renewal Work
Author URI: https://st-poupee.jp/
Template: swell
Version: 0.2.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: welcart, e-commerce, responsive
Text Domain: st-poupee-renewal
*/

/*
==============================================
基本設定
==============================================
このスタイルシートでは、SWELL標準機能とWelcart機能を統合するための
カスタムスタイルを定義します。
*/

/* 
----------------------------------------------
1. Welcart商品ページ 基本レイアウト
----------------------------------------------
*/

/* 商品詳細ページ全体のコンテナ */
.single-item #primary {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* 商品ページのメインコンテンツエリア */
.welcart-single-item {
    background: #ffffff;
}

/* 商品コンテナ（画像と情報を横並び） */
.item-container {
    display: flex;
    gap: 40px;
    margin-bottom: 40px;
}

@media (max-width: 768px) {
    .item-container {
        flex-direction: column;
        gap: 20px;
    }
}

/* 
----------------------------------------------
2. 商品画像エリア
----------------------------------------------
*/

/* 商品画像エリア */
.item-images {
    flex: 1;
    max-width: 500px;
}

/* メイン商品画像 */
.item-images .itemimg {
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.item-images .itemimg img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.item-images .itemimg:hover img {
    transform: scale(1.05);
}

/* サブ画像 */
.item-images .itemsubimg {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.item-images .itemsubimg a {
    flex: 0 0 calc(25% - 10px);
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.item-images .itemsubimg a:hover {
    box-shadow: 0 3px 8px rgba(0,0,0,0.2);
    transform: translateY(-2px);
}

.item-images .itemsubimg img {
    width: 100%;
    height: auto;
    display: block;
}

/* 
----------------------------------------------
3. 商品情報エリア
----------------------------------------------
*/

/* 商品情報コンテナ */
.item-info {
    flex: 1;
}

/* 商品名 */
.item-info .item-title,
.item-info .item-name {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 20px;
    color: #333;
}

@media (max-width: 768px) {
    .item-info .item-title,
    .item-info .item-name {
        font-size: 22px;
    }
}

/* キャンペーンメッセージ */
.campaign_message {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 12px 16px;
    margin-bottom: 20px;
    border-radius: 4px;
    font-size: 14px;
    color: #856404;
}

/* 商品説明 */
.item-description {
    margin-bottom: 24px;
    line-height: 1.8;
    color: #666;
}

/* 
----------------------------------------------
4. 価格表示
----------------------------------------------
*/

/* 価格エリア */
.item-price,
.field_price {
    margin: 24px 0;
    font-size: 32px;
    font-weight: 700;
    color: #e53935;
}

@media (max-width: 768px) {
    .item-price,
    .field_price {
        font-size: 26px;
    }
}

/* 通常価格（取り消し線） */
.field_cprice {
    font-size: 20px;
    color: #999;
    text-decoration: line-through;
    margin-right: 12px;
    font-weight: 400;
}

/* 税表示 */
.item-price .taxincluded,
.field_price .taxincluded {
    font-size: 14px;
    color: #666;
    font-weight: 400;
    margin-left: 8px;
}

/* 
----------------------------------------------
5. SKUフォーム・オプション
----------------------------------------------
*/

/* SKUフォーム */
.skuform {
    background: #f8f9fa;
    padding: 24px;
    border-radius: 8px;
    margin-bottom: 20px;
}

/* SKU名表示 */
.skuname {
    font-weight: 600;
    margin-bottom: 16px;
    font-size: 16px;
    color: #333;
}

/* 商品オプション */
.item-option {
    margin: 20px 0;
}

.item-option dt {
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.item-option dd {
    margin-bottom: 16px;
}

.item-option select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background: white;
    transition: border-color 0.3s ease;
}

.item-option select:focus {
    outline: none;
    border-color: #1e73be;
    box-shadow: 0 0 0 3px rgba(30, 115, 190, 0.1);
}

/* 
----------------------------------------------
6. 在庫・数量・カートボタン
----------------------------------------------
*/

/* フィールド全体 */
.field {
    margin: 20px 0;
}

/* 在庫ステータス */
.zaikostatus {
    margin-bottom: 12px;
    font-size: 14px;
    padding: 8px 12px;
    border-radius: 4px;
    display: inline-block;
}

.zaikostatus .instock {
    color: #28a745;
    background: #d4edda;
}

.zaikostatus .outofstock {
    color: #dc3545;
    background: #f8d7da;
}

/* 売り切れメッセージ */
.itemsoldout {
    background: #f8d7da;
    color: #721c24;
    padding: 12px 16px;
    border-radius: 4px;
    border-left: 4px solid #dc3545;
    margin: 16px 0;
}

/* カートボックス（数量とボタン） */
.c-box {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 20px;
}

@media (max-width: 480px) {
    .c-box {
        flex-direction: column;
        align-items: stretch;
    }
}

/* 数量選択 */
.quantity {
    display: flex;
    align-items: center;
    gap: 8px;
}

.quantity input[type="text"],
.quantity input[type="number"] {
    width: 60px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
    font-size: 16px;
}

/* カートボタン */
.cart-button input[type="submit"],
.cart-button button {
    background: #1e73be;
    color: white;
    border: none;
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.cart-button input[type="submit"]:hover,
.cart-button button:hover {
    background: #155a8a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 115, 190, 0.3);
}

.cart-button input[type="submit"]:active,
.cart-button button:active {
    transform: translateY(0);
}

/* 
----------------------------------------------
7. 商品詳細・仕様
----------------------------------------------
*/

/* 商品本文エリア */
.prodact_box {
    background: white;
    padding: 40px 0;
    line-height: 1.8;
}

.prodact_box h2,
.prodact_box h3 {
    margin-top: 32px;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #f0f0f0;
}

/* 商品仕様 */
.item-specs {
    background: #f8f9fa;
    padding: 24px;
    border-radius: 8px;
    margin-top: 32px;
}

.item-specs h3 {
    font-size: 18px;
    margin-bottom: 16px;
    color: #333;
}

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

.item-specs th,
.item-specs td {
    padding: 12px;
    border-bottom: 1px solid #dee2e6;
    text-align: left;
}

.item-specs th {
    background: #e9ecef;
    font-weight: 600;
    width: 30%;
}

/* 
----------------------------------------------
8. 関連商品
----------------------------------------------
*/

.related-items {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 2px solid #f0f0f0;
}

.related-items h2 {
    font-size: 24px;
    margin-bottom: 24px;
    color: #333;
}

/* 
----------------------------------------------
9. エラーメッセージ
----------------------------------------------
*/

.error_message {
    color: #dc3545;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    padding: 12px 16px;
    border-radius: 4px;
    margin-top: 12px;
    font-size: 14px;
}

/* 
----------------------------------------------
10. ユーティリティクラス
----------------------------------------------
*/

.clear {
    clear: both;
}

.pc_mt100 {
    margin-top: 100px;
}

.smp_mt30 {
    margin-top: 30px;
}

@media (max-width: 768px) {
    .pc_mt100 {
        margin-top: 40px;
    }
}

/* 
----------------------------------------------
11. カートページ用スタイル（別途詳細CSSを読み込み）
----------------------------------------------
*/

/* カートページの基本スタイルはusces_cart.cssで定義 */

/* 
----------------------------------------------
12. レスポンシブ調整
----------------------------------------------
*/

@media (max-width: 1024px) {
    .single-item #primary {
        padding: 30px 15px;
    }
}

@media (max-width: 768px) {
    .item-images {
        max-width: 100%;
    }
    
    .item-images .itemsubimg a {
        flex: 0 0 calc(33.333% - 10px);
    }
}

@media (max-width: 480px) {
    .item-images .itemsubimg a {
        flex: 0 0 calc(50% - 10px);
    }
}

/* ==============================================
   商品一覧ページ
   ============================================== */

.welcart-archive-page {
    padding: 40px 0;
}

.welcart-item-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin: 30px 0;
}

.welcart-item {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.welcart-item .item-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.welcart-item .item-thumbnail {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f5f5f5;
}

.welcart-item .item-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.welcart-item .item-info {
    padding: 20px;
}

.welcart-item .item-title {
    font-size: 18px;
    font-weight: bold;
    margin: 0 0 10px;
    line-height: 1.4;
}

.welcart-item .item-price {
    font-size: 20px;
    font-weight: bold;
    color: #e74c3c;
    margin: 10px 0;
}

.welcart-item .item-excerpt {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin-top: 10px;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .welcart-item-list {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .welcart-item .item-info {
        padding: 15px;
    }
    
    .welcart-item .item-title {
        font-size: 16px;
    }
    
    .welcart-item .item-price {
        font-size: 18px;
    }
}
/* ==============================================
   Welcart商品一覧ページ
   ============================================== */

.welcart-archive-page {
    padding: 40px 0;
}

.welcart-archive-header {
    margin-bottom: 40px;
    text-align: center;
}

.welcart-archive-header .page-title {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 20px;
    color: #333;
}

/* 商品グリッド */
.welcart-item-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

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

.welcart-item-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    border-color: #d32f2f;
}

.welcart-item-card .item-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

/* 商品画像 */
.welcart-item-card .item-thumbnail {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f5f5f5;
    position: relative;
}

.welcart-item-card .item-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.welcart-item-card:hover .item-thumbnail img {
    transform: scale(1.05);
}

.welcart-item-card .item-thumbnail .no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
    color: #999;
    font-size: 14px;
}

/* 商品情報 */
.welcart-item-card .item-info {
    padding: 20px;
}

.welcart-item-card .item-title {
    font-size: 18px;
    font-weight: bold;
    margin: 0 0 12px;
    line-height: 1.4;
    color: #333;
    height: 2.8em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.welcart-item-card .item-price {
    font-size: 22px;
    font-weight: bold;
    color: #d32f2f;
    margin: 12px 0;
}

.welcart-item-card .item-excerpt {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin-top: 12px;
    height: 4.8em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

/* 商品がない場合 */
.no-items-found {
    text-align: center;
    padding: 60px 20px;
}

.no-items-found p {
    font-size: 18px;
    color: #999;
}

/* レスポンシブ対応 */
@media (max-width: 1024px) {
    .welcart-item-list {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .welcart-item-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .welcart-item-card .item-info {
        padding: 15px;
    }
    
    .welcart-item-card .item-title {
        font-size: 16px;
    }
    
    .welcart-item-card .item-price {
        font-size: 20px;
    }
    
    .welcart-archive-header .page-title {
        font-size: 28px;
    }
}

@media (max-width: 480px) {
    .welcart-item-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .welcart-item-card .item-info {
        padding: 10px;
    }
    
    .welcart-item-card .item-title {
        font-size: 14px;
        margin-bottom: 8px;
    }
    
    .welcart-item-card .item-price {
        font-size: 18px;
        margin: 8px 0;
    }
    
    .welcart-item-card .item-excerpt {
        display: none;
    }
}

/* 
==============================================
カスタマイズ終了
==============================================
追加のスタイルは、WordPress管理画面の
「外観」→「カスタマイズ」→「追加CSS」
から追加することを推奨します。
*/