/*
Theme Name: NookPack v7
Theme URI: https://nookpack.com
Description: Lofi治愈系宠物用品跨境独立站主题
Author: NookPack
Version: 7.0
Text Domain: nookpack-v7
*/

/* ========== CSS Variables ========== */
:root {
    /* Core Palette */
    --cream: #FFF8EC;
    --sage: #B8C5B2;
    --fog-blue: #A8BFCC;
    --cocoa: #5C4B3A;
    --midnight: #2C3639;
    
    /* Tints */
    --sage-light: #D4DED0;
    --sage-dark: #8FA88B;
    --fog-light: #CDDAE2;
    --cocoa-light: #8B7B6A;
    --midnight-light: #4A5558;
    
    /* Functional */
    --bg-primary: var(--cream);
    --bg-secondary: #F5F0E8;
    --bg-card: #FFFFFF;
    --text-primary: var(--cocoa);
    --text-secondary: var(--cocoa-light);
    --text-heading: var(--midnight);
    --text-on-dark: var(--cream);
    --accent: var(--sage);
    --accent-hover: var(--sage-dark);
    --link: var(--fog-blue);
    --link-hover: var(--sage-dark);
    --border: #E8E2D8;
    --border-light: #F0ECE4;
    --shadow-sm: 0 2px 8px rgba(44, 54, 57, 0.06);
    --shadow-md: 0 4px 16px rgba(44, 54, 57, 0.08);
    --shadow-lg: 0 8px 32px rgba(44, 54, 57, 0.10);
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    
    /* Typography */
    --font-heading: 'Fraunces', Georgia, serif;
    --font-body: 'DM Sans', -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    
    /* Spacing */
    --section-pad: 100px;
    --section-pad-mobile: 60px;
    --content-width: 1240px;
    --content-narrow: 800px;
}

/* ========== Reset & Base ========== */
* { margin: 0; padding: 0; box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    color: var(--text-primary);
    background: var(--bg-primary);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--text-heading);
    font-weight: 400;
    line-height: 1.25;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); }
h4 { font-size: 1.25rem; }

p { margin-bottom: 1.2rem; }
a { color: var(--link); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--link-hover); }
img { max-width: 100%; height: auto; display: block; }

.container {
    width: 100%;
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 0 24px;
}

.container-narrow {
    max-width: var(--content-narrow);
}

section {
    padding: var(--section-pad) 24px;
}

/* ========== Header ========== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 248, 236, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-light);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 0 24px;
}

.site-logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--midnight);
    letter-spacing: -0.5px;
}

.site-logo span { color: var(--sage); }

.main-nav {
    display: flex;
    gap: 32px;
    list-style: none;
}

.main-nav a {
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 8px 0;
    position: relative;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--sage);
    transition: width 0.25s;
}

.main-nav a:hover { color: var(--sage-dark); }
.main-nav a:hover::after { width: 100%; }

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-actions a {
    color: var(--text-primary);
    font-size: 1.1rem;
}

.cart-count {
    background: var(--sage);
    color: var(--cream);
    font-size: 0.65rem;
    width: 18px; height: 18px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: -4px;
    font-weight: 700;
}

/* ========== Buttons ========== */
.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s;
    border: none;
    text-align: center;
}

.btn-primary {
    background: var(--sage);
    color: var(--cream);
}

.btn-primary:hover {
    background: var(--sage-dark);
    color: var(--cream);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background: transparent;
    color: var(--text-heading);
    border: 2px solid var(--border);
}

.btn-outline:hover {
    border-color: var(--sage);
    color: var(--sage-dark);
}

.btn-ghost {
    background: transparent;
    color: var(--text-primary);
    padding: 8px 20px;
}

.btn-ghost:hover {
    background: var(--bg-secondary);
}

/* ========== Section 1: Hero ========== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: 72px;
    background: linear-gradient(135deg, var(--cream) 0%, #F0EBE0 50%, var(--sage-light) 100%);
}

.hero-bg {
    position: absolute;
    inset: 0;
    opacity: 0.4;
    background: 
        radial-gradient(ellipse at 20% 50%, rgba(168,191,204,0.3) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 30%, rgba(184,197,178,0.3) 0%, transparent 50%);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
}

.hero-tag {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--sage-dark);
    margin-bottom: 24px;
    padding: 6px 16px;
    background: rgba(184, 197, 178, 0.2);
    border-radius: 100px;
}

.hero h1 {
    margin-bottom: 24px;
}

.hero h1 em {
    font-style: italic;
    color: var(--sage);
}

.hero p {
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin-bottom: 36px;
    max-width: 540px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.hero-visual {
    position: absolute;
    right: -60px;
    top: 50%;
    transform: translateY(-50%);
    width: 50%;
    max-width: 700px;
}

.hero-visual img {
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
}

/* Floating decorative elements */
.hero-float {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.hero-float-1 {
    width: 120px; height: 120px;
    background: rgba(184,197,178,0.2);
    top: 20%; left: 8%;
    animation: float 8s ease-in-out infinite;
}

.hero-float-2 {
    width: 80px; height: 80px;
    background: rgba(168,191,204,0.2);
    bottom: 25%; right: 15%;
    animation: float 6s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

/* ========== Section 2: Lofi Radio ========== */
.lofi-section {
    background: var(--midnight);
    color: var(--text-on-dark);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.lofi-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, rgba(184,197,178,0.08) 0%, transparent 70%);
}

.lofi-section h2,
.lofi-section h3 { color: var(--cream); }

.lofi-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    letter-spacing: 3px;
    color: var(--sage-light);
    margin-bottom: 20px;
}

.lofi-dot {
    width: 8px; height: 8px;
    background: var(--sage);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(1.5); }
}

.lofi-section h2 {
    font-size: clamp(2rem, 4vw, 2.8rem);
    margin-bottom: 16px;
}

.lofi-subtitle {
    color: var(--fog-light);
    font-size: 1.1rem;
    margin-bottom: 48px;
}

.lofi-player {
    max-width: 720px;
    margin: 0 auto;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    background: #1a1f21;
}

.lofi-player iframe {
    display: block;
    width: 100%;
    aspect-ratio: 16/9;
    border: none;
}

.lofi-platforms {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 36px;
    flex-wrap: wrap;
}

.lofi-platform {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: rgba(255,255,255,0.08);
    border-radius: var(--radius-md);
    color: var(--fog-light);
    font-size: 0.85rem;
    transition: all 0.2s;
}

.lofi-platform:hover {
    background: rgba(255,255,255,0.15);
    color: var(--cream);
    transform: translateY(-2px);
}

/* ========== Section 3: Philosophy ========== */
.philosophy {
    text-align: center;
    background: var(--cream);
}

.philosophy-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-top: 60px;
    max-width: var(--content-width);
    margin-left: auto;
    margin-right: auto;
}

.phil-card {
    padding: 48px 32px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
}

.phil-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.phil-icon {
    font-size: 2.5rem;
    margin-bottom: 24px;
    display: block;
    filter: grayscale(0.3);
}

.phil-card h3 {
    margin-bottom: 12px;
}

.phil-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 0;
}

/* ========== Section 4: Best Sellers ========== */
.products-section {
    background: var(--bg-secondary);
    text-align: center;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 32px;
    margin-top: 60px;
    max-width: var(--content-width);
    margin-left: auto;
    margin-right: auto;
}

.product-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
    text-align: left;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.product-card .product-image {
    aspect-ratio: 1;
    background: var(--bg-secondary);
    overflow: hidden;
    position: relative;
}

.product-card .product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

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

.product-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    background: var(--sage);
    color: var(--cream);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 100px;
    letter-spacing: 1px;
}

.product-info {
    padding: 24px;
}

.product-category {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--sage-dark);
    margin-bottom: 8px;
}

.product-info h4 {
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.product-price {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--midnight);
}

.product-price del {
    color: var(--text-secondary);
    font-weight: 400;
    margin-right: 8px;
}

/* ========== Section 5: Shop by Mood ========== */
.mood-section {
    text-align: center;
    background: var(--cream);
}

.mood-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 60px;
    max-width: var(--content-width);
    margin-left: auto;
    margin-right: auto;
}

.mood-card {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    aspect-ratio: 4/5;
    cursor: pointer;
    transition: all 0.4s;
}

.mood-card:hover {
    transform: scale(1.02);
}

.mood-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s;
}

.mood-card:hover img {
    transform: scale(1.08);
}

.mood-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(44,54,57,0.7) 0%, transparent 50%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 32px;
    text-align: left;
}

.mood-overlay h3 {
    color: var(--cream);
    font-size: 1.5rem;
    margin-bottom: 4px;
}

.mood-overlay span {
    color: var(--sage-light);
    font-size: 0.85rem;
}

/* ========== Section 6: Journal ========== */
.journal-section {
    background: var(--bg-secondary);
    text-align: center;
}

.journal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 32px;
    margin-top: 60px;
    max-width: var(--content-width);
    margin-left: auto;
    margin-right: auto;
}

.journal-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    text-align: left;
    transition: all 0.3s;
}

.journal-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.journal-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.journal-body {
    padding: 24px;
}

.journal-date {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.journal-body h4 {
    margin-bottom: 8px;
    line-height: 1.4;
}

.journal-body p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.read-more {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--sage-dark);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.read-more::after {
    content: '→';
    transition: transform 0.2s;
}

.read-more:hover::after {
    transform: translateX(4px);
}

/* ========== Section 7: Community UGC ========== */
.community-section {
    background: var(--cream);
    text-align: center;
}

.ugc-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: 60px;
    max-width: var(--content-width);
    margin-left: auto;
    margin-right: auto;
}

.ugc-item {
    aspect-ratio: 1;
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
    cursor: pointer;
}

.ugc-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}

.ugc-item:hover img {
    transform: scale(1.08);
}

.ugc-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(44,54,57,0);
    transition: background 0.3s;
    border-radius: var(--radius-md);
}

.ugc-item:hover::after {
    background: rgba(44,54,57,0.3);
}

.ugc-item:hover::before {
    content: '♡';
    position: absolute;
    z-index: 1;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    color: white;
}

/* ========== Section 8: FAQ ========== */
.faq-section {
    background: var(--bg-secondary);
}

.faq-section h2 {
    text-align: center;
    margin-bottom: 60px;
}

.faq-list {
    max-width: var(--content-narrow);
    margin: 0 auto;
}

.faq-item {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.faq-question {
    padding: 20px 24px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: var(--text-heading);
    font-size: 1rem;
}

.faq-question::after {
    content: '+';
    font-size: 1.4rem;
    color: var(--sage);
    transition: transform 0.3s;
}

.faq-item.open .faq-question::after {
    content: '−';
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 24px 24px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    display: none;
}

.faq-item.open .faq-answer {
    display: block;
}

/* ========== Section 9: Newsletter ========== */
.newsletter-section {
    text-align: center;
    background: linear-gradient(135deg, var(--sage-light) 0%, var(--fog-light) 100%);
}

.newsletter-section h2 {
    margin-bottom: 12px;
}

.newsletter-section p {
    color: var(--cocoa-light);
    margin-bottom: 32px;
}

.newsletter-form {
    display: flex;
    max-width: 480px;
    margin: 0 auto;
    gap: 12px;
}

.newsletter-form input {
    flex: 1;
    padding: 16px 20px;
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 0.95rem;
    background: var(--bg-card);
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.2s;
}

.newsletter-form input:focus {
    border-color: var(--sage);
}

.newsletter-form button {
    white-space: nowrap;
}

/* ========== Section 10: Footer ========== */
.site-footer {
    background: var(--midnight);
    color: var(--fog-light);
    padding: 80px 24px 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    max-width: var(--content-width);
    margin: 0 auto 60px;
}

.footer-brand h3 {
    font-family: var(--font-heading);
    color: var(--cream);
    font-size: 1.3rem;
    margin-bottom: 16px;
}

.footer-brand h3 span { color: var(--sage); }
.footer-brand p {
    font-size: 0.9rem;
    line-height: 1.7;
}

.footer-col h4 {
    color: var(--cream);
    font-family: var(--font-body);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 20px;
    font-weight: 700;
}

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

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

.footer-col a {
    color: var(--fog-light);
    font-size: 0.9rem;
    transition: color 0.2s;
}

.footer-col a:hover {
    color: var(--cream);
}

.footer-bottom {
    max-width: var(--content-width);
    margin: 0 auto;
    padding-top: 32px;
    border-top: 1px solid rgba(255,255,255,0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-bottom a { color: var(--fog-light); }
.footer-bottom a:hover { color: var(--cream); }

/* ========== Responsive ========== */
@media (max-width: 1024px) {
    .philosophy-grid { grid-template-columns: 1fr; gap: 24px; }
    .mood-grid { grid-template-columns: 1fr; }
    .ugc-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .hero-visual { display: none; }
    .hero { text-align: center; }
    .hero-content { margin: 0 auto; }
    .hero p { margin-left: auto; margin-right: auto; }
    :root {
        --section-pad: 70px;
    }
}

@media (max-width: 768px) {
    .main-nav { display: none; }
    .newsletter-form { flex-direction: column; }
    .footer-grid { grid-template-columns: 1fr; gap: 32px; }
    .footer-bottom { flex-direction: column; text-align: center; }
    .journal-grid { grid-template-columns: 1fr; }
    :root {
        --section-pad: 50px;
    }
}

/* ========== WordPress Integration ========== */
/* Kadence overrides */
.site-main { margin-top: 72px; }
.has-global-padding { padding: 0; }
.entry-content { max-width: 100%; }
.wp-block-cover__inner-container { max-width: var(--content-width); }

/* WooCommerce */
.woocommerce-products-header { display: none; }
.woocommerce ul.products { margin: 0; }
.woocommerce .products .product {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
    border: none;
}
.woocommerce .products .product:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}
.woocommerce div.product .product_title { font-family: var(--font-heading); }
.woocommerce #respond input#submit.alt, 
.woocommerce a.button.alt, 
.woocommerce button.button.alt, 
.woocommerce input.button.alt {
    background: var(--sage);
    border-radius: var(--radius-md);
}
.woocommerce #respond input#submit.alt:hover,
.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover,
.woocommerce input.button.alt:hover {
    background: var(--sage-dark);
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s, transform 0.6s;
}
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}
