/**
 * Jidanwawa Theme Styles - 迁移到 Astra 主题
 * 支持响应式设计
 *
 * @package Astra
 * @version 1.0.0
 */

/* CSS 变量定义 */
:root {
    --jidanwawa-primary: #2d3748;
    --jidanwawa-secondary: #4a5568;
    --jidanwawa-bg: #ffffff;
    --jidanwawa-accent-pink: #fdf5f5;
    --jidanwawa-text-muted: #718096;
    --jidanwawa-border: #edf2f7;
    --jidanwawa-red: #cf2e2e;
    --jidanwawa-rust: #b82105;
    --jidanwawa-cream: #e8dcd4;
    --jidanwawa-amber: #f5a524;
    --jidanwawa-navy: #215387;
    --jidanwawa-hero-scrim: rgba(158, 128, 96, 0.3);
    --jidanwawa-font-serif: 'Crimson Pro', 'Cormorant Garamond', Georgia, serif;
    --jidanwawa-font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* 首页主容器 */
.jidanwawa-home {
    overflow-x: hidden;
}

/* Hero 区域 - 响应式 */
.jidanwawa-hero {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #ccc;
}

.jidanwawa-hero__media {
    position: absolute;
    inset: 0;
}

.jidanwawa-hero__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 47% 38%;
    display: block;
}

.jidanwawa-hero__scrim {
    position: absolute;
    inset: 0;
    background: #9e8060;
    opacity: 0.3;
}

.jidanwawa-hero__inner {
    position: relative;
    z-index: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
    text-align: center;
    color: #fff;
    text-transform: capitalize;
}

.jidanwawa-hero__lead {
    margin: 0 0 1rem;
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    line-height: 1.7;
}

.jidanwawa-hero__cta-wrap {
    margin-top: 0.5rem;
}

.jidanwawa-hero__cta {
    display: inline-block;
    padding: 0.85rem 2.5rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #0693e3 0%, #9b51e0 100%);
    color: #f5a524;
    text-decoration: none;
    line-height: 1.5;
    font-size: clamp(0.95rem, 2vw, 1.1rem);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.jidanwawa-hero__cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(6, 147, 227, 0.4);
    color: #f5a524;
}

/* 标语条 */
.jidanwawa-tagline-strip {
    margin: 0;
    padding: 1.5rem 1rem;
    text-align: center;
    background: var(--jidanwawa-red);
    color: #fff;
    letter-spacing: 2px;
    line-height: 1.8;
    font-size: clamp(0.9rem, 2vw, 1rem);
    text-transform: capitalize;
}

/* 礼物标语 */
.jidanwawa-gift-line {
    margin: 0;
    padding: 2rem 1.5rem;
    text-align: center;
    background: #fff;
}

.jidanwawa-gift-line p {
    margin: 0;
    font-size: clamp(1.1rem, 2.5vw, 1.35rem);
    color: var(--jidanwawa-primary);
    text-transform: capitalize;
}

/* 内容容器 */
.jidanwawa-content-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.25rem 4rem;
}

/* 产品行 - 响应式网格 */
.jidanwawa-product-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    margin: 0 0 2rem;
    background: #fff;
}

.jidanwawa-product-card {
    margin: 0;
    padding: 1.5rem 0.5rem;
    text-align: center;
}

.jidanwawa-product-card a {
    display: block;
    text-decoration: none;
}

.jidanwawa-product-card img {
    width: 260px;
    max-width: 100%;
    height: auto;
    display: inline-block;
    vertical-align: middle;
    transition: transform 0.3s ease;
}

.jidanwawa-product-card a:hover img {
    transform: scale(1.05);
}

.jidanwawa-product-card figcaption {
    margin-top: 1rem;
    font-family: var(--jidanwawa-font-serif);
    font-size: clamp(1rem, 2vw, 1.1rem);
    line-height: 1.4;
}

.jidanwawa-product-card figcaption em {
    font-style: italic;
    color: var(--jidanwawa-secondary);
}

/* 故事标题 */
.jidanwawa-story-heading {
    margin: 0;
    padding: 1.5rem 0.5rem;
    text-align: center;
    font-family: var(--jidanwawa-font-serif);
    font-size: clamp(1rem, 2vw, 1.15rem);
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: capitalize;
    background: #d4e8f0;
    color: var(--jidanwawa-primary);
}

/* 故事马赛克 - 响应式网格 */
.jidanwawa-story-mosaic {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    margin: 0 0 3rem;
}

.jidanwawa-story-col {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.jidanwawa-story-panel {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1.25rem;
}

.jidanwawa-story-panel--solid p {
    margin: 0;
    font-size: clamp(0.85rem, 1.5vw, 0.95rem);
    line-height: 1.5;
}

.jidanwawa-story-panel--rust {
    background: var(--jidanwawa-rust);
    color: #f1e3cb;
}

.jidanwawa-story-panel--cream {
    background: var(--jidanwawa-cream);
    color: var(--jidanwawa-primary);
}

.jidanwawa-story-panel--amber {
    background: var(--jidanwawa-amber);
    color: var(--jidanwawa-navy);
}

.jidanwawa-story-panel--cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.jidanwawa-story-panel__scrim {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.jidanwawa-story-panel__scrim--zodiac {
    background: #947f7a;
    opacity: 0.3;
}

.jidanwawa-story-panel__scrim--bears {
    background: #944e2b;
    opacity: 0.3;
}

.jidanwawa-story-panel__scrim--mini {
    background: #627b83;
    opacity: 0.3;
}

.jidanwawa-story-panel__label {
    position: relative;
    z-index: 1;
    color: #fff;
    font-size: clamp(1.1rem, 2vw, 1.35rem);
    line-height: 1.4;
}

.jidanwawa-story-panel__label--light {
    color: #fff;
}

.jidanwawa-story-panel__label em {
    font-style: italic;
}

/* 故事正文 */
.jidanwawa-story-body {
    max-width: 842px;
    margin: 0 auto;
    text-align: justify;
    background: #f7fafc;
    padding: 2rem 1.5rem;
    border-radius: 4px;
}

.jidanwawa-story-body p {
    margin: 0 0 1.25rem;
    font-size: clamp(0.9rem, 1.5vw, 1rem);
    color: #444;
    line-height: 1.8;
}

.jidanwawa-story-body p:last-child {
    margin-bottom: 0;
}

/* ================================
   响应式设计 - 媒体查询
   ================================ */

/* 大平板和小桌面 (1024px - 1200px) */
@media (max-width: 1200px) {
    .jidanwawa-content-container {
        max-width: 960px;
    }
    
    .jidanwawa-product-card img {
        width: 220px;
    }
}

/* 平板 (768px - 1024px) */
@media (max-width: 1024px) {
    .jidanwawa-hero {
        aspect-ratio: 16 / 10;
    }
    
    .jidanwawa-product-row {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }
    
    .jidanwawa-product-card {
        padding: 1rem;
    }
    
    .jidanwawa-product-card img {
        width: 100%;
        max-width: 200px;
    }
    
    .jidanwawa-story-mosaic {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
    }
    
    .jidanwawa-story-panel {
        padding: 1rem;
    }
}

/* 大手机和小平板 (600px - 768px) */
@media (max-width: 768px) {
    .jidanwawa-hero {
        aspect-ratio: 4 / 3;
    }
    
    .jidanwawa-hero__inner {
        padding: 1.5rem 1rem;
    }
    
    .jidanwawa-hero__cta {
        padding: 0.75rem 1.5rem;
    }
    
    .jidanwawa-tagline-strip {
        padding: 1.25rem 1rem;
        letter-spacing: 1px;
    }
    
    .jidanwawa-gift-line {
        padding: 1.5rem 1rem;
    }
    
    .jidanwawa-content-container {
        padding: 0 1rem 3rem;
    }
    
    /* 产品行改为2列 */
    .jidanwawa-product-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .jidanwawa-product-card:last-child {
        grid-column: 1 / -1;
    }
    
    .jidanwawa-product-card img {
        max-width: 180px;
    }
    
    /* 故事马赛克改为单列 */
    .jidanwawa-story-mosaic {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .jidanwawa-story-col {
        flex-direction: row;
    }
    
    .jidanwawa-story-panel {
        aspect-ratio: 4 / 3;
        flex: 1;
    }
    
    .jidanwawa-story-body {
        padding: 1.5rem 1rem;
    }
}

/* 手机 (480px - 600px) */
@media (max-width: 600px) {
    .jidanwawa-hero {
        aspect-ratio: 1 / 1;
    }
    
    .jidanwawa-hero__lead {
        font-size: 1rem;
    }
    
    .jidanwawa-hero__cta {
        padding: 0.65rem 1.25rem;
        font-size: 0.85rem;
    }
    
    .jidanwawa-tagline-strip {
        padding: 1rem;
        font-size: 0.85rem;
    }
    
    .jidanwawa-gift-line {
        padding: 1.25rem 1rem;
    }
    
    .jidanwawa-gift-line p {
        font-size: 1rem;
    }
    
    .jidanwawa-content-container {
        padding: 0 0.75rem 2rem;
    }
    
    /* 产品行改为单列 */
    .jidanwawa-product-row {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .jidanwawa-product-card:last-child {
        grid-column: auto;
    }
    
    .jidanwawa-product-card {
        padding: 1rem 0;
    }
    
    .jidanwawa-product-card img {
        max-width: 200px;
    }
    
    .jidanwawa-story-heading {
        padding: 1rem 0.5rem;
        font-size: 0.95rem;
    }
    
    /* 故事马赛克 - 小屏幕垂直堆叠 */
    .jidanwawa-story-col {
        flex-direction: column;
    }
    
    .jidanwawa-story-panel {
        aspect-ratio: 1 / 1;
    }
    
    .jidanwawa-story-panel--solid p {
        font-size: 0.85rem;
    }
    
    .jidanwawa-story-panel__label {
        font-size: 1rem;
    }
    
    .jidanwawa-story-body {
        padding: 1.25rem 1rem;
        text-align: left;
    }
    
    .jidanwawa-story-body p {
        font-size: 0.9rem;
        line-height: 1.7;
    }
}

/* 小手机 (< 480px) */
@media (max-width: 480px) {
    .jidanwawa-hero {
        aspect-ratio: 3 / 4;
    }
    
    .jidanwawa-hero__inner {
        padding: 1rem;
    }
    
    .jidanwawa-hero__lead {
        font-size: 0.9rem;
        margin-bottom: 0.75rem;
    }
    
    .jidanwawa-hero__cta {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
    
    .jidanwawa-tagline-strip {
        padding: 0.75rem;
        font-size: 0.8rem;
        letter-spacing: 0.5px;
    }
    
    .jidanwawa-gift-line {
        padding: 1rem;
    }
    
    .jidanwawa-gift-line p {
        font-size: 0.9rem;
    }
    
    .jidanwawa-product-card img {
        max-width: 160px;
    }
    
    .jidanwawa-product-card figcaption {
        font-size: 0.95rem;
    }
    
    .jidanwawa-story-heading {
        font-size: 0.9rem;
        letter-spacing: 1px;
    }
    
    .jidanwawa-story-panel {
        padding: 0.75rem;
    }
    
    .jidanwawa-story-panel--solid p {
        font-size: 0.8rem;
    }
    
    .jidanwawa-story-panel__label {
        font-size: 0.9rem;
    }
    
    .jidanwawa-story-body {
        padding: 1rem;
    }
    
    .jidanwawa-story-body p {
        font-size: 0.85rem;
        margin-bottom: 1rem;
    }
}

/* 横屏手机优化 */
@media (max-height: 500px) and (orientation: landscape) {
    .jidanwawa-hero {
        aspect-ratio: 21 / 9;
        min-height: 300px;
    }
    
    .jidanwawa-hero__lead {
        font-size: 0.9rem;
    }
    
    .jidanwawa-hero__cta {
        padding: 0.5rem 1.5rem;
    }
}

/* 高分辨率屏幕优化 */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .jidanwawa-hero__img,
    .jidanwawa-product-card img,
    .jidanwawa-story-panel--cover img {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* 打印样式 */
@media print {
    .jidanwawa-hero {
        aspect-ratio: auto;
        height: auto;
    }
    
    .jidanwawa-hero__scrim {
        display: none;
    }
    
    .jidanwawa-product-row,
    .jidanwawa-story-mosaic {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .jidanwawa-story-col {
        flex-direction: column;
    }
}
