/**
 * WAM Widget CSS
 * wam-sc-* クラスによるウィジェット表示スタイル
 * OrochiPress の sc-* クラスを wam-sc-* に変換
 */

/* ========================================
   共通リセット・ベース
======================================== */
.wam-sc-grid,
.wam-sc-card2,
.wam-sc-list,
.wam-sc-slider,
.wam-sc-ranking,
.wam-sc-magazine,
.wam-sc-compact,
.wam-sc-wide,
.wam-sc-tile,
.wam-sc-banner,
.wam-sc-minimal,
.wam-sc-table {
    box-sizing: border-box;
}

.wam-sc-grid *,
.wam-sc-card2 *,
.wam-sc-list *,
.wam-sc-ranking * {
    box-sizing: border-box;
}

.wam-no-data {
    color: #94a3b8;
    text-align: center;
    padding: 20px;
    font-size: 13px;
}

/* ========================================
   Grid（デフォルト）
======================================== */
.wam-sc-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.wam-sc-card {
    display: block;
    text-decoration: none !important;
    color: inherit !important;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
}

.wam-sc-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}

.wam-sc-card-img {
    aspect-ratio: 3/4;
    overflow: hidden;
    background: #f1f5f9;
}

.wam-sc-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}

.wam-sc-card:hover .wam-sc-card-img img {
    transform: scale(1.04);
}

.wam-sc-card-body {
    padding: 8px;
}

.wam-sc-card-title {
    font-size: 12px;
    font-weight: 600;
    line-height: 1.5;
    color: #1e293b;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.wam-sc-card-meta {
    font-size: 11px;
    color: #64748b;
    margin-top: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wam-sc-card-price {
    font-size: 12px;
    font-weight: 700;
    color: #e74c3c;
    margin-top: 4px;
}

/* ========================================
   Card2（縦2列）
======================================== */
.wam-sc-card2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.wam-sc-card2-item {
    display: flex;
    flex-direction: column;
    text-decoration: none !important;
    color: inherit !important;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.wam-sc-card2-item:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.wam-sc-card2-img {
    aspect-ratio: 3/4;
    overflow: hidden;
    background: #f1f5f9;
}

.wam-sc-card2-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.wam-sc-card2-body {
    padding: 10px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.wam-sc-card2-title {
    font-size: 12px;
    font-weight: 600;
    line-height: 1.5;
    flex: 1;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.wam-sc-card2-meta {
    font-size: 11px;
    color: #64748b;
    margin-top: 6px;
}

.wam-sc-card2-price {
    font-size: 13px;
    font-weight: 700;
    color: #e74c3c;
    margin-top: 4px;
}

.wam-sc-card2-btn {
    display: block;
    text-align: center;
    background: #7c3aed;
    color: #fff !important;
    padding: 6px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    margin-top: 8px;
    text-decoration: none !important;
}

/* ========================================
   List
======================================== */
.wam-sc-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.wam-sc-list-item {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}

.wam-sc-list-item a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    text-decoration: none !important;
    color: inherit !important;
    transition: background 0.2s;
}

.wam-sc-list-item a:hover {
    background: #f8fafc;
}

.wam-sc-list-item img {
    width: 60px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.wam-sc-list-content {
    flex: 1;
    min-width: 0;
}

.wam-sc-list-title {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
    color: #1e293b;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.wam-sc-list-meta {
    font-size: 11px;
    color: #64748b;
    margin-top: 4px;
}

.wam-sc-list-price {
    font-size: 12px;
    font-weight: 700;
    color: #e74c3c;
    margin-top: 4px;
}

/* ========================================
   Slider（横スクロール）
======================================== */
.wam-sc-slider {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
    scrollbar-width: thin;
}

.wam-sc-slider .wam-sc-card {
    flex: 0 0 160px;
    scroll-snap-align: start;
}

/* ========================================
   Featured
======================================== */
.wam-sc-featured-main {
    margin-bottom: 12px;
}

.wam-sc-featured-main a {
    display: block;
    text-decoration: none !important;
    color: inherit !important;
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    background: #000;
}

.wam-sc-featured-main img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    opacity: 0.85;
    display: block;
}

.wam-sc-featured-body {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: #fff;
}

.wam-sc-featured-title {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.5;
}

.wam-sc-featured-sub {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

/* ========================================
   Ranking（縦）
======================================== */
.wam-sc-ranking {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.wam-sc-ranking-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    text-decoration: none !important;
    color: inherit !important;
    transition: background 0.2s;
}

.wam-sc-ranking-item:hover {
    background: #f8fafc;
}

.wam-sc-ranking-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #94a3b8;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}

.wam-sc-ranking-num.rank-1 { background: #f59e0b; }
.wam-sc-ranking-num.rank-2 { background: #94a3b8; }
.wam-sc-ranking-num.rank-3 { background: #b87333; }

.wam-sc-ranking-thumb {
    width: 50px;
    height: 66px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.wam-sc-ranking-info {
    flex: 1;
    min-width: 0;
}

.wam-sc-ranking-title {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
    color: #1e293b;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.wam-sc-ranking-meta {
    font-size: 11px;
    color: #64748b;
    margin-top: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wam-sc-ranking-price {
    font-size: 12px;
    font-weight: 700;
    color: #e74c3c;
    margin-top: 3px;
}

/* ========================================
   Ranking Horizontal（横スクロール）
======================================== */
.wam-sc-ranking--h {
    flex-direction: row;
    overflow-x: auto;
    gap: 12px;
    padding-bottom: 8px;
    scrollbar-width: thin;
}

.wam-sc-ranking-h-card {
    display: flex;
    flex-direction: column;
    flex: 0 0 140px;
    text-decoration: none !important;
    color: inherit !important;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    transition: box-shadow 0.2s;
}

.wam-sc-ranking-h-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.wam-sc-ranking-h-card .wam-sc-ranking-num {
    position: absolute;
    top: 6px;
    left: 6px;
    z-index: 1;
    width: 24px;
    height: 24px;
    font-size: 11px;
}

.wam-sc-ranking-h-img {
    aspect-ratio: 3/4;
    overflow: hidden;
}

.wam-sc-ranking-h-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.wam-sc-ranking-h-body {
    padding: 8px;
}

/* ========================================
   Magazine
======================================== */
.wam-sc-magazine {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.wam-sc-magazine-item {
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.wam-sc-magazine-item a {
    display: block;
    text-decoration: none !important;
    color: inherit !important;
}

/* ========================================
   Compact
======================================== */
.wam-sc-compact {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

/* ========================================
   Table
======================================== */
.wam-sc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.wam-sc-table th {
    background: #f1f5f9;
    padding: 8px 10px;
    text-align: left;
    font-weight: 600;
    color: #475569;
    border-bottom: 2px solid #e2e8f0;
}

.wam-sc-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.wam-sc-table tr:hover td {
    background: #f8fafc;
}

.wam-sc-table-thumb {
    width: 44px;
    height: 58px;
    object-fit: cover;
    border-radius: 3px;
}

.wam-sc-table a {
    color: #1d4ed8;
    text-decoration: none;
    font-weight: 500;
}

/* ========================================
   Wide（横長カード）
======================================== */
.wam-sc-wide {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.wam-sc-wide-item {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
}

.wam-sc-wide-item a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px;
    text-decoration: none !important;
    color: inherit !important;
    transition: background 0.2s;
}

.wam-sc-wide-item a:hover {
    background: #f8fafc;
}

.wam-sc-wide-img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.wam-sc-wide-body {
    flex: 1;
    min-width: 0;
}

.wam-sc-wide-title {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
    color: #1e293b;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.wam-sc-wide-meta {
    font-size: 11px;
    color: #64748b;
    margin-top: 4px;
}

.wam-sc-wide-price {
    font-size: 13px;
    font-weight: 700;
    color: #e74c3c;
    margin-top: 4px;
}

.wam-sc-wide-btn {
    display: inline-block;
    background: #7c3aed;
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Wide 2列 */
.wam-sc-wide--2col {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
}

.wam-sc-wide--2col .wam-sc-wide-item a {
    flex-direction: column;
    align-items: flex-start;
}

.wam-sc-wide--2col .wam-sc-wide-img {
    width: 100%;
    height: auto;
    aspect-ratio: 3/4;
}

/* ========================================
   Tile（Pinterest風）
======================================== */
.wam-sc-tile {
    columns: 2;
    column-gap: 10px;
}

.wam-sc-tile .wam-sc-card {
    break-inside: avoid;
    margin-bottom: 10px;
    display: inline-block;
    width: 100%;
}

.wam-sc-tile .wam-sc-card-img {
    aspect-ratio: auto;
}

.wam-sc-tile .wam-sc-card-img img {
    height: auto;
}

/* ========================================
   Banner
======================================== */
.wam-sc-banner {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.wam-sc-banner-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
}

.wam-sc-banner-item a {
    display: block;
    text-decoration: none !important;
}

.wam-sc-banner-item img {
    width: 100%;
    aspect-ratio: 16/7;
    object-fit: cover;
    display: block;
}

.wam-sc-banner-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px 16px;
    background: linear-gradient(to top, rgba(0,0,0,0.75), transparent);
    color: #fff;
}

.wam-sc-banner-title {
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
}

.wam-sc-banner-price {
    font-size: 12px;
    color: #fcd34d;
    margin-top: 4px;
}

/* ========================================
   Minimal
======================================== */
.wam-sc-minimal {
    display: flex;
    flex-direction: column;
}

.wam-sc-minimal-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
    text-decoration: none !important;
    color: inherit !important;
    transition: color 0.2s;
}

.wam-sc-minimal-item:last-child {
    border-bottom: none;
}

.wam-sc-minimal-item:hover .wam-sc-minimal-title {
    color: #7c3aed;
}

.wam-sc-minimal-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
}

.wam-sc-minimal-title {
    font-size: 13px;
    font-weight: 500;
    line-height: 1.5;
    color: #1e293b;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* ========================================
   レスポンシブ
======================================== */
@media (max-width: 480px) {
    .wam-sc-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .wam-sc-compact {
        grid-template-columns: repeat(2, 1fr);
    }

    .wam-sc-magazine {
        grid-template-columns: 1fr;
    }

    .wam-sc-featured-sub {
        grid-template-columns: repeat(2, 1fr);
    }

    .wam-sc-wide--2col {
        grid-template-columns: 1fr;
    }

    .wam-sc-card-title {
        font-size: 11px;
    }

    .wam-sc-ranking-title {
        font-size: 12px;
    }
}

/* サンプル動画セクション */
.wam-product-video {
    padding: 0 !important;
}
.wam-product-video iframe {
    width: 100% !important;
    display: block !important;
    border: none !important;
}