/*
Theme Name: Ezodeer Shop
Theme URI: https://ezodeer.com
Author: b19 KAZUYUKI IKUSHIMA
Author URI: https://ezodeer.com
Description: 株式会社上田精肉店のためのカスタムテーマ
Version: 1.0
License: GPL v2 or later
Text Domain: ezodeer
style.css
*/

/* ==========================================================================
   リセットCSS
   ========================================================================== */
   * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 62.5%; /* 1rem = 10px */
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 1.6rem;
    line-height: 1.8;
    color: #333;
    background-color: #fff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   基本要素
   ========================================================================== */

/* サイト全体のレイアウト調整 */
.site {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.site-main {
    flex: 1;
    margin-top: 0;
    padding-top: 20px;
}

/* カートページと商品詳細ページの特別な調整 */
body.page-cart,
body[class*="page-cart"],
body.page-product-detail,
body[class*="page-product-detail"],
body.single-product {
    padding-top: 120px !important;
}

.page-cart .site-main,
.page-product-detail .site-main,
.single-product .site-main {
    margin-top: 0;
    padding-top: 20px;
}

/* ヘッダーの高さを考慮した調整 */
.site-header {
    position: relative;
    z-index: 100;
}

.site-main {
    position: relative;
    z-index: 1;
}

@media (max-width: 768px) {
    body.page-cart,
    body[class*="page-cart"],
    body.page-product-detail,
    body[class*="page-product-detail"],
    body.single-product {
        padding-top: 100px !important;
    }
    
    .site-main {
        padding-top: 10px;
    }
    
    .page-cart .site-main,
    .page-product-detail .site-main,
    .single-product .site-main {
        padding-top: 10px;
    }
}

a {
    color: #8B4513;
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: #D2691E;
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ==========================================================================
   レイアウト
   ========================================================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.container-fluid {
    max-width: 100%;
    padding: 0 20px;
}

/* ==========================================================================
   フッター
   ========================================================================== */
.site-footer {
    background: rgba(14, 14, 14, 0.8);
    color: #fff;
    margin-top: 80px;
}

.footer-widgets {
    padding: 60px 0 40px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-widgets .container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.footer-widget h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: #fff;
}

.footer-widget ul {
    list-style: none;
}

.footer-widget ul li {
    margin-bottom: 10px;
}

.footer-widget a {
    color: rgba(255,255,255,0.7);
}

.footer-widget a:hover {
    color: #fff;
    text-decoration: none;
}

.footer-bottom {
    padding: 20px 0;
    text-align: center;
    font-size: 1.4rem;
    color: rgba(255,255,255,0.5);
}

/* ==========================================================================
   商品グリッド（ショートコード用）
   ========================================================================== */
.deer-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

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

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

.deer-product-item .product-image {
    aspect-ratio: 1;
    overflow: hidden;
    background-color: #f5f5f5;
}

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

.deer-product-item:hover .product-image img {
    transform: scale(1.05);
}

.deer-product-item .product-info {
    padding: 20px;
}

.deer-product-item h3 {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.deer-product-item h3 a {
    color: #333;
}

.deer-product-item .product-category {
    color: #666;
    font-size: 1.4rem;
    margin-bottom: 10px;
}

.deer-product-item .product-price {
    font-size: 2.2rem;
    font-weight: bold;
    color: #8B4513;
}

.deer-product-item .tax-info {
    font-size: 1.4rem;
    font-weight: normal;
    color: #666;
}

.deer-product-item .price-per-100g {
    font-size: 1.4rem;
    color: #666;
    margin-top: 5px;
}

/* ==========================================================================
   商品詳細（ショートコード用）
   ========================================================================== */
.deer-product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin: 40px 0;
}

.deer-product-detail .product-images {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.deer-product-detail .main-image {
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
}

.deer-product-detail .image-thumbnails {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.deer-product-detail .image-thumbnails img {
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.deer-product-detail .image-thumbnails img:hover {
    border-color: #8B4513;
}

.deer-product-detail h1 {
    font-size: 3.2rem;
    margin-bottom: 20px;
    color: #333;
}

.deer-product-detail .price-area {
    background-color: #FFF8DC;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.deer-product-detail .product-price {
    font-size: 3.6rem;
    font-weight: bold;
    color: #8B4513;
    margin-bottom: 10px;
}

.deer-product-detail .cart-form {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 30px;
}

.deer-product-detail .product-option {
    margin-bottom: 20px;
}

.deer-product-detail .product-option label {
    display: block;
    font-weight: bold;
    margin-bottom: 8px;
    color: #333;
}

.deer-product-detail select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1.6rem;
    background-color: #fff;
}

.deer-product-detail .cart-button {
    width: 100%;
    padding: 18px;
    background-color: #8B4513;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 1.8rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.deer-product-detail .cart-button:hover {
    background-color: #A0522D;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(139, 69, 19, 0.3);
}

.deer-product-detail .sold-out {
    background-color: #f5f5f5;
    padding: 40px;
    text-align: center;
    border-radius: 8px;
}

.deer-product-detail .sold-out p {
    font-size: 2.4rem;
    font-weight: bold;
    color: #999;
}

/* タブ */
.product-tabs {
    margin-top: 60px;
}

.tab-nav {
    list-style: none;
    display: flex;
    border-bottom: 2px solid #e0e0e0;
}

.tab-nav li {
    margin-right: 40px;
}

.tab-nav a {
    display: block;
    padding: 15px 0;
    font-weight: 500;
    color: #666;
    position: relative;
}

.tab-nav li.active a {
    color: #333;
}

.tab-nav li.active a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #8B4513;
}

.tab-content {
    padding: 30px 0;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

/* ==========================================================================
   ユーティリティクラス
   ========================================================================== */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mt-20 {
    margin-top: 20px;
}

.mt-40 {
    margin-top: 40px;
}

.mb-20 {
    margin-bottom: 20px;
}

.mb-40 {
    margin-bottom: 40px;
}

/* ==========================================================================
   レスポンシブ
   ========================================================================== */
@media (max-width: 768px) {
    html {
        font-size: 55%;
    }
    
    .deer-products-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .deer-product-detail {
        grid-template-columns: 1fr;
    }
    
    .deer-product-detail .product-images {
        position: static;
    }
    
    .footer-widgets .container {
        grid-template-columns: 1fr;
    }
}