/*
Theme Name: SNchan Digital Store
Theme URI: https://shop.snchan.com/
Author: SNchan
Description: WooCommerce-compatible light-blue digital download storefront with styled My Account and registration pages.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: snchan-digital-store
License: GPL-2.0-or-later
*/
:root{--sn-bg:#f1f9fe;--sn-primary:#76b9df;--sn-ink:#244a64;--sn-muted:#66889d;--sn-border:#d3e7f3}*{box-sizing:border-box}body{margin:0;background:#fbfdff;color:var(--sn-ink);font-family:-apple-system,BlinkMacSystemFont,"Hiragino Kaku Gothic ProN","Noto Sans JP",Meiryo,sans-serif;line-height:1.8}a{color:#267aa8}a:hover{opacity:.8}.site-header{background:#fff;border-bottom:1px solid var(--sn-border)}.header-inner,.site-content,.footer-inner{max-width:1120px;margin:auto;padding:20px 24px}.header-inner{display:flex;align-items:center;justify-content:space-between;gap:20px;flex-wrap:wrap}.site-title{font-size:1.4rem;font-weight:800;text-decoration:none;color:var(--sn-ink)}.site-tagline{font-size:.75rem;color:var(--sn-muted);margin:0}.site-nav{display:flex;gap:20px;flex-wrap:wrap}.site-nav a{text-decoration:none;color:var(--sn-ink);font-weight:600}.site-content{min-height:65vh;padding-top:42px;padding-bottom:64px}.entry-title{font-size:clamp(1.6rem,3vw,2.3rem);line-height:1.4;margin:0 0 24px}.site-footer{background:var(--sn-bg);border-top:1px solid var(--sn-border)}.footer-inner{text-align:center;color:var(--sn-muted);font-size:.85rem}.sn-hero{padding:65px 28px;border-radius:24px;background:linear-gradient(135deg,#eaf8ff,#f8fcff);text-align:center;margin-bottom:36px}.sn-hero h1{font-size:clamp(1.8rem,4vw,3rem);line-height:1.4;margin:0 0 12px}.sn-hero p{color:var(--sn-muted)}.sn-button,.woocommerce a.button,.woocommerce button.button,.woocommerce input.button,.woocommerce #respond input#submit,.woocommerce a.button.alt,.woocommerce button.button.alt,.woocommerce input.button.alt{display:inline-block;border:0!important;border-radius:12px!important;background:var(--sn-primary)!important;color:#123d56!important;padding:12px 23px!important;font-weight:700!important;text-decoration:none!important;cursor:pointer}.sn-button:hover,.woocommerce a.button:hover,.woocommerce button.button:hover{background:#a0d4ee!important}.woocommerce ul.products li.product{background:#fff;border:1px solid var(--sn-border);border-radius:18px;padding:16px!important;box-shadow:0 7px 22px rgba(57,112,150,.06)}.woocommerce ul.products li.product img{border-radius:12px}.woocommerce .woocommerce-MyAccount-navigation ul{list-style:none;padding:0;margin:0}.woocommerce .woocommerce-MyAccount-navigation li{margin:0 0 8px}.woocommerce .woocommerce-MyAccount-navigation a{display:block;padding:12px 15px;background:#eef8fe;border-radius:10px;text-decoration:none;color:var(--sn-ink)}.woocommerce .woocommerce-MyAccount-navigation .is-active a{background:#cceafa;font-weight:700}.woocommerce-account .woocommerce,.woocommerce-account .woocommerce-MyAccount-content{color:var(--sn-ink)}.woocommerce-account .woocommerce h2{color:var(--sn-ink);font-size:1.5rem}.woocommerce-account .woocommerce form.login,.woocommerce-account .woocommerce form.register{border:1px solid var(--sn-border);border-radius:20px;background:#fff;box-shadow:0 12px 32px rgba(80,140,175,.07);padding:28px}.woocommerce form .form-row input.input-text,.woocommerce form .form-row textarea,.woocommerce form .form-row select,.woocommerce input.input-text{border:1px solid #c9dfe9;border-radius:10px;padding:12px 14px;background:#fff;width:100%;max-width:100%;font:inherit;color:var(--sn-ink)}.woocommerce form .form-row input.input-text:focus,.woocommerce input.input-text:focus{outline:2px solid #a0d4ee;outline-offset:1px}.woocommerce .woocommerce-form-login__rememberme{margin-left:10px}.woocommerce .woocommerce-message,.woocommerce .woocommerce-info{border-top-color:var(--sn-primary);background:#eff9ff}.woocommerce table.shop_table{border-color:var(--sn-border);border-radius:12px}.woocommerce a{overflow-wrap:anywhere}.wp-block-button__link{border-radius:12px}.screen-reader-text{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@media(max-width:768px){.header-inner{align-items:flex-start}.site-nav{gap:12px}.woocommerce-account .woocommerce form.login,.woocommerce-account .woocommerce form.register{padding:18px}.site-content{padding:24px 16px 48px}.woocommerce .woocommerce-MyAccount-navigation,.woocommerce .woocommerce-MyAccount-content{float:none;width:100%}}


/* SNchan Digital Store - Modern Product Cards */

.woocommerce ul.products li.product {
    border-radius: 6px !important;
    border: 1px solid #e7edf2 !important;
    box-shadow: 0 3px 12px rgba(35,75,105,0.04) !important;
}

.woocommerce ul.products li.product img {
    border-radius: 4px !important;
}

.sn-hero {
    margin-bottom: 56px !important;
}

body.home .entry-title,
body.home .page-title {
    display: none;
}

/* SNchan フッターメニュー */
.site-footer .snchan-footer-nav {
  width: 100%;
  margin: 28px auto;
}

.site-footer .snchan-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 14px 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer .snchan-footer-links li {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer .snchan-footer-links li::marker {
  content: "";
}

.site-footer .snchan-footer-links a {
  color: #286c94;
  font-size: 14px;
  text-decoration: none;
  transition: color .2s ease;
}

.site-footer .snchan-footer-links a:hover {
  color: #54a8d5;
  text-decoration: underline;
}

@media (max-width: 767px) {
  .site-footer .snchan-footer-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 12px;
  }

  .site-footer .snchan-footer-links a {
    font-size: 12px;
    line-height: 1.6;
  }
}


/* ヘッダーを画面上部に固定 */
.site-header,
header.site-header {
    position: sticky;
    top: 0;
    z-index: 9999;
    background-color: #ffffff;
}

/* WordPress管理バー表示時の位置調整 */
body.admin-bar .site-header {
    top: 32px;
}

/* スマートフォンでの管理バー位置調整 */
@media screen and (max-width: 782px) {
    body.admin-bar .site-header {
        top: 46px;
    }
}

/* ========================================
   SNchan Digital Store ヘッダーロゴ
======================================== */

.site-header .site-title {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    line-height: 1;
}

.site-header .site-logo {
    display: block;
    width: auto;
    height: auto;
    max-width: 240px;
    max-height: 64px;
    object-fit: contain;
}

/* スマートフォン */
@media screen and (max-width: 768px) {
    .site-header .site-logo {
        max-width: 180px;
        max-height: 52px;
    }
}

/* 空のカート：WooCommerce標準の悲しい顔を非表示 */
body.woocommerce-cart
.wp-block-woocommerce-empty-cart-block
.wp-block-woocommerce-empty-cart-block__icon,
body.woocommerce-cart
.wp-block-woocommerce-empty-cart-block
.wp-block-woocommerce-empty-cart-block__icon-container,
body.woocommerce-cart
.wp-block-woocommerce-empty-cart-block
.wc-block-cart__empty-cart__title::before {
    display: none !important;
}

/* WooCommerce標準の空カートアイコンを非表示 */
body.woocommerce-cart
.wp-block-woocommerce-empty-cart-block
> svg {
    display: none !important;
}


/* ==========================================
   SNchan Digital Store
   スマートフォン表示の調整
   ========================================== */

@media screen and (max-width: 767px) {

  /* 1. ヘッダーのサイズと配置 */
  .site-header {
    position: relative !important;
    top: auto !important;
    width: 100%;
    z-index: 100;
    background: #ffffff;
    box-shadow: 0 2px 12px rgba(36, 74, 100, 0.06);
  }

  .site-header .container,
  .site-header .header-inner,
  .site-header .site-header-inner {
    min-height: 0;
  }

  .site-header .custom-logo {
    max-width: 220px;
    width: 100%;
    height: auto;
    object-fit: contain;
  }

  /* 2. 商品カードのはみ出しを防止 */
  .woocommerce ul.products li.product,
  .woocommerce-page ul.products li.product,
  .wc-block-grid__product {
    position: relative;
    box-sizing: border-box;
    min-width: 0;
    max-width: 100%;
  }

  /* 3. セールバッジを水色に統一 */
  .woocommerce span.onsale,
  .woocommerce ul.products li.product .onsale,
  .wc-block-grid__product-onsale,
  .wc-block-components-product-sale-badge {
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    left: auto !important;
    bottom: auto !important;

    display: inline-flex !important;
    align-items: center;
    justify-content: center;

    width: auto !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 0 !important;

    margin: 0 !important;
    padding: 6px 12px !important;

    background: #76b9df !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 999px !important;

    font-size: 12px !important;
    font-weight: 700 !important;
    line-height: 1.4 !important;
    white-space: nowrap;

    transform: none !important;
    box-shadow: 0 3px 8px rgba(36, 74, 100, 0.12);
    z-index: 5;
  }

  /* 4. 商品画像をカード内に収める */
  .woocommerce ul.products li.product img,
  .wc-block-grid__product-image img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
  }

  /* 5. 横方向の画面はみ出しを防止 */
  html,
  body {
    max-width: 100%;
    overflow-x: clip;
  }
}


/* スマホ：カート追加ボタンのチェックマーク調整 */
@media screen and (max-width: 767px) {

  /* カート追加ボタンの文字を中央揃え */
  .woocommerce ul.products li.product a.button {
    text-align: center;
    line-height: 1.5;
  }

  /* 追加完了時のチェックマークを非表示 */
  .woocommerce ul.products li.product a.button.added::after,
  .woocommerce ul.products li.product a.added_to_cart::before {
    display: none !important;
    content: none !important;
  }

}


/* ==========================================
   SNchan Digital Store
   WooCommerce ボタンのカラー統一
========================================== */

/* 商品一覧：カートに追加ボタン */
.woocommerce ul.products li.product a.button,
.woocommerce ul.products li.product a.add_to_cart_button {
    background-color: #76b9df !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 12px !important;
    text-align: center;
    text-decoration: none !important;
    transition: background-color 0.3s ease;
}

/* カート：購入手続きに進むボタン */
.wc-block-cart__submit-button,
.wc-block-cart__submit-container a {
    background-color: #76b9df !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 12px !important;
    text-decoration: none !important;
    transition: background-color 0.3s ease;
}

/* ボタン内の文字も白色に統一 */
.wc-block-cart__submit-button .wc-block-components-button__text {
    color: #ffffff !important;
}

/* マウスを乗せた際は少し濃い水色に */
.woocommerce ul.products li.product a.button:hover,
.wc-block-cart__submit-button:hover,
.wc-block-cart__submit-container a:hover {
    background-color: #559fc9 !important;
    color: #ffffff !important;
}

/* スマートフォンでの表示調整 */
@media screen and (max-width: 767px) {
    .wc-block-cart__submit-button {
        width: 100%;
        min-height: 54px;
    }
}


/* ==========================================
   空のカート：おすすめ商品の追加ボタン
========================================== */

/* WooCommerceの商品ブロック内のボタン */
body.woocommerce-cart .wc-block-grid__product-add-to-cart a,
body.woocommerce-cart .wc-block-grid__product-add-to-cart button,
body.woocommerce-cart .wp-block-button__link,
body.woocommerce-cart .wc-block-components-product-button__button {
    background: #76b9df !important;
    background-color: #76b9df !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 12px !important;
    padding: 12px 24px !important;
    text-decoration: none !important;
    box-shadow: none !important;
}

/* ボタンにマウスを乗せたとき */
body.woocommerce-cart .wc-block-grid__product-add-to-cart a:hover,
body.woocommerce-cart .wc-block-grid__product-add-to-cart button:hover,
body.woocommerce-cart .wp-block-button__link:hover,
body.woocommerce-cart .wc-block-components-product-button__button:hover {
    background: #559fc9 !important;
    color: #ffffff !important;
}

/* ==========================================
   SNchan Digital Store
   WooCommerce PC・スマホ共通カラー調整
========================================== */

/* 1. セールバッジを水色に統一 */
.woocommerce span.onsale,
.woocommerce ul.products li.product .onsale,
.woocommerce div.product span.onsale,
.wc-block-grid__product-onsale,
.wc-block-components-product-sale-badge {
    background: #76b9df !important;
    background-color: #76b9df !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 999px !important;
    font-weight: 700 !important;
    box-shadow: none !important;
}

/* 2. 商品価格をネイビー系に統一 */
.woocommerce div.product p.price,
.woocommerce div.product span.price,
.woocommerce ul.products li.product .price,
.wc-block-components-product-price {
    color: #244a64 !important;
}

/* 3. 割引前の価格 */
.woocommerce div.product p.price del,
.woocommerce div.product span.price del,
.woocommerce ul.products li.product .price del {
    color: #7897a9 !important;
    opacity: 0.8 !important;
}

/* 4. 割引後の価格 */
.woocommerce div.product p.price ins,
.woocommerce div.product span.price ins,
.woocommerce ul.products li.product .price ins {
    color: #287ca8 !important;
    background: transparent !important;
    text-decoration: none !important;
    font-weight: 700 !important;
}

/* 5. カートに追加ボタン */
.woocommerce div.product form.cart .button,
.woocommerce div.product .single_add_to_cart_button,
.woocommerce ul.products li.product a.button {
    background: #76b9df !important;
    background-color: #76b9df !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 12px !important;
    box-shadow: none !important;
    transition: background-color 0.3s ease;
}

/* 6. ボタンのホバー */
.woocommerce div.product form.cart .button:hover,
.woocommerce div.product .single_add_to_cart_button:hover,
.woocommerce ul.products li.product a.button:hover {
    background: #559fc9 !important;
    color: #ffffff !important;
}

/* 7. 商品カテゴリーリンク */
.woocommerce div.product .product_meta a {
    color: #287ca8 !important;
}

.woocommerce div.product .product_meta a:hover {
    color: #244a64 !important;
}
