/* ═══════════════════════════════════════════════════════
   TIENDA JAPONENESPANOL — Custom Styles
   Child theme de Twenty Twenty-Five
   ═══════════════════════════════════════════════════════ */

/* ── CSS Variables ── */
:root {
    --tj-ink: #1a1a1a;
    --tj-paper: #faf8f5;
    --tj-accent: #cc0000;
    --tj-accent-dark: #a30000;
    --tj-warm-gray: #8a8279;
    --tj-light-gray: #e8e4df;
    --tj-medium-gray: #d1ccc5;
    --tj-section-bg: #f2efe9;
    --tj-font-display: 'Shippori Mincho', 'Noto Serif JP', serif;
    --tj-font-body: 'Noto Sans JP', sans-serif;
    --tj-max-width: 1200px;
    --tj-gutter: 24px;
    --tj-radius: 4px;
}

/* ── Global Resets para override del parent ── */
body {
    background: var(--tj-paper) !important;
    font-family: var(--tj-font-body) !important;
    color: var(--tj-ink);
    -webkit-font-smoothing: antialiased;
}

/* ── Override Twenty Twenty-Five container widths ── */
.wp-site-blocks {
    max-width: 100%;
    padding: 0;
}

.wp-block-group.alignwide,
.alignwide {
    max-width: var(--tj-max-width);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--tj-gutter);
    padding-right: var(--tj-gutter);
}

/* ═══════ HEADER ═══════ */
.tj-header {
    border-bottom: 1px solid var(--tj-light-gray);
    background: var(--tj-paper);
    position: sticky;
    top: 0;
    z-index: 100;
}

.tj-header-inner {
    max-width: var(--tj-max-width);
    margin: 0 auto;
    padding: 20px var(--tj-gutter);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.tj-logo {
    font-family: var(--tj-font-display);
    font-size: 28px;
    font-weight: 900;
    letter-spacing: -0.02em;
    color: var(--tj-ink);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tj-logo .kanji {
    font-size: 20px;
    color: var(--tj-accent);
    font-weight: 700;
}

.tj-logo .dot {
    width: 8px;
    height: 8px;
    background: var(--tj-accent);
    border-radius: 50%;
    display: inline-block;
}

/* NAV */
.tj-nav {
    border-top: 1px solid var(--tj-light-gray);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.tj-nav::-webkit-scrollbar { display: none; }

.tj-nav ul {
    max-width: var(--tj-max-width);
    margin: 0 auto;
    padding: 0 var(--tj-gutter);
    display: flex;
    gap: 0;
    list-style: none;
    white-space: nowrap;
}

.tj-nav ul li a {
    display: block;
    padding: 12px 16px;
    font-size: 13px;
    font-weight: 500;
    color: var(--tj-warm-gray);
    text-decoration: none;
    transition: color 0.2s;
    position: relative;
}

.tj-nav ul li a:hover,
.tj-nav ul li.current-menu-item a,
.tj-nav ul li.current_page_item a {
    color: var(--tj-ink);
}

.tj-nav ul li.current-menu-item a::after,
.tj-nav ul li.current_page_item a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 16px;
    right: 16px;
    height: 2px;
    background: var(--tj-accent);
}

/* Override WP navigation block */
.wp-block-navigation {
    font-size: 13px !important;
}

.wp-block-navigation a {
    color: var(--tj-warm-gray) !important;
    text-decoration: none !important;
}

.wp-block-navigation a:hover {
    color: var(--tj-ink) !important;
}

/* ═══════ DISCLOSURE BAR ═══════ */
.tj-disclosure {
    background: #f5f3ee;
    border-bottom: 1px solid var(--tj-light-gray);
    padding: 10px var(--tj-gutter);
    text-align: center;
    font-size: 12px;
    color: var(--tj-warm-gray);
}

.tj-disclosure a {
    color: var(--tj-accent);
    font-weight: 500;
    text-decoration: none;
}

/* ═══════ HERO SECTION ═══════ */
.tj-hero {
    max-width: var(--tj-max-width);
    margin: 0 auto;
    padding: 40px var(--tj-gutter);
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
}

.tj-hero-image {
    position: relative;
    overflow: hidden;
    border-radius: var(--tj-radius);
    aspect-ratio: 3/2;
}

.tj-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.tj-hero-image:hover img {
    transform: scale(1.03);
}

.tj-hero-tag {
    display: inline-block;
    background: var(--tj-accent);
    color: white;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 4px 10px;
    border-radius: 2px;
    margin-top: 20px;
    margin-bottom: 10px;
    text-decoration: none;
}

.tj-hero-title {
    font-family: var(--tj-font-display);
    font-size: 32px;
    font-weight: 900;
    line-height: 1.25;
    margin-bottom: 10px;
}

.tj-hero-title a {
    color: inherit;
    text-decoration: none;
}

.tj-hero-title a:hover { color: var(--tj-accent-dark); }

.tj-hero-byline {
    font-size: 13px;
    color: var(--tj-warm-gray);
    margin-bottom: 12px;
}

.tj-hero-summary {
    font-size: 15px;
    line-height: 1.7;
    color: #444;
}

/* Hero related links */
.tj-hero-related {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--tj-light-gray);
}

.tj-hero-related h4 {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--tj-warm-gray);
    margin-bottom: 10px;
    font-weight: 700;
}

.tj-hero-related ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tj-hero-related li {
    margin-bottom: 8px;
}

.tj-hero-related a {
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    color: var(--tj-ink);
    transition: color 0.2s;
}

.tj-hero-related a:hover { color: var(--tj-accent); }

.tj-hero-related a::before {
    content: '›';
    color: var(--tj-accent);
    font-weight: 700;
    margin-right: 8px;
}

/* ═══════ SIDEBAR ═══════ */
.tj-sidebar-block {
    margin-bottom: 32px;
}

.tj-sidebar-title {
    font-family: var(--tj-font-display);
    font-size: 18px;
    font-weight: 700;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--tj-ink);
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.tj-sidebar-title a {
    font-size: 12px;
    font-family: var(--tj-font-body);
    color: var(--tj-accent);
    font-weight: 500;
    text-decoration: none;
}

/* Latest list */
.tj-latest-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tj-latest-list li {
    padding: 10px 0;
    border-bottom: 1px solid var(--tj-light-gray);
}

.tj-latest-list li:last-child { border-bottom: none; }

.tj-latest-list a {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.45;
    text-decoration: none;
    color: var(--tj-ink);
    display: block;
    transition: color 0.2s;
}

.tj-latest-list a:hover { color: var(--tj-accent); }

.tj-latest-list .meta {
    font-size: 11px;
    color: var(--tj-warm-gray);
    margin-top: 4px;
}

/* Deal cards */
.tj-deal-card {
    display: flex;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--tj-light-gray);
    align-items: flex-start;
}

.tj-deal-card:last-child { border-bottom: none; }

.tj-deal-img {
    width: 80px;
    height: 54px;
    border-radius: 3px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--tj-light-gray);
}

.tj-deal-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tj-deal-info h4 {
    font-size: 13px;
    font-weight: 500;
    line-height: 1.35;
    margin: 0 0 4px 0;
}

.tj-deal-info h4 a {
    color: var(--tj-ink);
    text-decoration: none;
}

.tj-deal-info h4 a:hover { color: var(--tj-accent); }

.tj-deal-prices {
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tj-deal-price {
    font-weight: 700;
    color: var(--tj-accent);
}

.tj-deal-original {
    text-decoration: line-through;
    color: var(--tj-warm-gray);
    font-size: 12px;
}

.tj-deal-merchant {
    font-size: 11px;
    color: var(--tj-warm-gray);
}

/* ═══════ CURATED SPLASH ═══════ */
.tj-curated {
    background: var(--tj-section-bg);
    padding: 48px 0;
}

.tj-curated-inner {
    max-width: var(--tj-max-width);
    margin: 0 auto;
    padding: 0 var(--tj-gutter);
}

.tj-curated-header {
    text-align: center;
    margin-bottom: 32px;
}

.tj-curated-header h3 {
    font-family: var(--tj-font-display);
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
}

.tj-curated-header p {
    font-size: 15px;
    color: var(--tj-warm-gray);
}

.tj-curated-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.tj-curated-card {
    background: white;
    border-radius: 6px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.tj-curated-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.08);
}

.tj-curated-card-img {
    aspect-ratio: 3/2;
    overflow: hidden;
    background: var(--tj-light-gray);
}

.tj-curated-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.tj-curated-card:hover .tj-curated-card-img img {
    transform: scale(1.05);
}

.tj-curated-card-body {
    padding: 16px;
}

.tj-curated-card-body h4 {
    font-family: var(--tj-font-display);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
    margin: 0;
}

/* ═══════ CATEGORY SECTIONS ═══════ */
.tj-category {
    max-width: var(--tj-max-width);
    margin: 0 auto;
    padding: 48px var(--tj-gutter);
    border-bottom: 1px solid var(--tj-light-gray);
}

.tj-category:last-of-type { border-bottom: none; }

.tj-category-header h3 {
    font-family: var(--tj-font-display);
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 4px;
}

.tj-category-header h3 a {
    color: var(--tj-ink);
    text-decoration: none;
}

.tj-category-header h3 a:hover { color: var(--tj-accent); }

.tj-category-subs {
    font-size: 13px;
    color: var(--tj-warm-gray);
    margin-bottom: 28px;
}

.tj-category-subs a {
    color: var(--tj-warm-gray);
    text-decoration: none;
    transition: color 0.2s;
}

.tj-category-subs a:hover { color: var(--tj-accent); }

/* ── Layout: Deck (hero left + list right) ── */
.tj-layout-deck {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
}

.tj-deck-hero .card-img {
    aspect-ratio: 3/2;
    border-radius: var(--tj-radius);
    overflow: hidden;
    background: var(--tj-light-gray);
    margin-bottom: 16px;
}

.tj-deck-hero .card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.tj-deck-hero:hover .card-img img { transform: scale(1.03); }

.tj-deck-hero .card-title {
    font-family: var(--tj-font-display);
    font-size: 22px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 8px;
}

.tj-deck-hero .card-title a {
    color: var(--tj-ink);
    text-decoration: none;
}

.tj-deck-hero .card-title a:hover { color: var(--tj-accent); }

.tj-deck-hero .card-byline {
    font-size: 13px;
    color: var(--tj-warm-gray);
    margin-bottom: 8px;
}

.tj-deck-hero .card-summary {
    font-size: 14px;
    color: #555;
    line-height: 1.65;
}

.tj-deck-hero .card-date {
    font-size: 11px;
    color: var(--tj-warm-gray);
    margin-top: 8px;
}

/* Deck list items */
.tj-deck-list-item {
    display: flex;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--tj-light-gray);
    align-items: flex-start;
}

.tj-deck-list-item:first-child { padding-top: 0; }
.tj-deck-list-item:last-child { border-bottom: none; }

.tj-deck-list-item .thumb {
    width: 140px;
    height: 93px;
    border-radius: var(--tj-radius);
    overflow: hidden;
    flex-shrink: 0;
    background: var(--tj-light-gray);
}

.tj-deck-list-item .thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tj-deck-list-item .info h4 {
    font-family: var(--tj-font-display);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
    margin: 0 0 6px 0;
}

.tj-deck-list-item .info h4 a {
    color: var(--tj-ink);
    text-decoration: none;
}

.tj-deck-list-item .info h4 a:hover { color: var(--tj-accent); }

.tj-deck-list-item .info .card-summary {
    font-size: 13px;
    color: #666;
    line-height: 1.55;
}

.tj-deck-list-item .info .card-date {
    font-size: 11px;
    color: var(--tj-warm-gray);
    margin-top: 6px;
}

/* ── Layout: 1x3 Grid ── */
.tj-layout-grid3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.tj-grid3-card .card-img {
    aspect-ratio: 3/2;
    border-radius: var(--tj-radius);
    overflow: hidden;
    background: var(--tj-light-gray);
    margin-bottom: 14px;
}

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

.tj-grid3-card:hover .card-img img { transform: scale(1.03); }

.tj-grid3-card .card-title {
    font-family: var(--tj-font-display);
    font-size: 17px;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 6px;
}

.tj-grid3-card .card-title a {
    color: var(--tj-ink);
    text-decoration: none;
}

.tj-grid3-card .card-title a:hover { color: var(--tj-accent); }

.tj-grid3-card .card-summary {
    font-size: 13px;
    color: #666;
    line-height: 1.55;
}

.tj-grid3-card .card-date {
    font-size: 11px;
    color: var(--tj-warm-gray);
    margin-top: 8px;
}

/* ═══════ FOOTER ═══════ */
.tj-footer {
    background: var(--tj-ink);
    color: #ccc;
    padding: 48px var(--tj-gutter);
    margin-top: 48px;
}

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

.tj-footer-logo {
    font-family: var(--tj-font-display);
    font-size: 22px;
    font-weight: 900;
    color: white;
    margin-bottom: 12px;
}

.tj-footer p {
    font-size: 13px;
    line-height: 1.7;
    color: #999;
}

.tj-footer h4 {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: white;
    margin-bottom: 16px;
    font-weight: 700;
}

.tj-footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tj-footer ul li {
    margin-bottom: 8px;
}

.tj-footer a {
    font-size: 13px;
    color: #999;
    text-decoration: none;
    transition: color 0.2s;
}

.tj-footer a:hover { color: white; }

.tj-footer-bottom {
    max-width: var(--tj-max-width);
    margin: 32px auto 0;
    padding-top: 24px;
    border-top: 1px solid #333;
    font-size: 12px;
    color: #666;
    display: flex;
    justify-content: space-between;
}

/* ═══════ WP BLOCK OVERRIDES ═══════ */

/* Query loop cards */
.wp-block-post-template {
    gap: 28px;
}

.wp-block-post-featured-image {
    border-radius: var(--tj-radius);
    overflow: hidden;
    aspect-ratio: 3/2;
}

.wp-block-post-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.wp-block-post-featured-image:hover img {
    transform: scale(1.03);
}

.wp-block-post-title {
    font-family: var(--tj-font-display) !important;
    font-weight: 700;
}

.wp-block-post-title a {
    text-decoration: none;
    color: var(--tj-ink);
}

.wp-block-post-title a:hover {
    color: var(--tj-accent);
}

.wp-block-post-excerpt {
    color: #555;
    font-size: 14px;
    line-height: 1.65;
}

.wp-block-post-date {
    font-size: 11px;
    color: var(--tj-warm-gray);
}

/* Category term tag */
.wp-block-post-terms a {
    display: inline-block;
    background: var(--tj-accent);
    color: white !important;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 3px 8px;
    border-radius: 2px;
    text-decoration: none;
}

/* ═══════ RESPONSIVE ═══════ */
@media (max-width: 900px) {
    .tj-hero {
        grid-template-columns: 1fr;
    }
    .tj-curated-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .tj-layout-deck {
        grid-template-columns: 1fr;
    }
    .tj-layout-grid3 {
        grid-template-columns: 1fr;
    }
    .tj-footer-inner {
        grid-template-columns: 1fr 1fr;
    }
    .tj-hero-title {
        font-size: 26px;
    }
}

@media (max-width: 600px) {
    .tj-hero-title {
        font-size: 22px;
    }
    .tj-curated-grid {
        grid-template-columns: 1fr;
    }
    .tj-footer-inner {
        grid-template-columns: 1fr;
    }
    .tj-deck-list-item .thumb {
        width: 100px;
        height: 66px;
    }
    .tj-hero {
        padding: 24px var(--tj-gutter);
    }
    .tj-category {
        padding: 32px var(--tj-gutter);
    }
}

/* ═══════ ANIMATIONS ═══════ */
@keyframes tjFadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

.tj-category {
    animation: tjFadeUp 0.5s ease both;
}
