:root {
    --tth-orange: #ff8a00;
    --tth-orange-dark: #f57c00;
    --tth-text: #101828;
    --tth-muted: #667085;
    --tth-border: #e5e7eb;
    --tth-bg: #f7f7f8;
    --tth-white: #ffffff;
    --tth-radius: 16px;
    --tth-shadow: 0 8px 24px rgba(16, 24, 40, 0.06);
    --tth-container: 1440px;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    background: var(--tth-bg);
    color: var(--tth-text);
    font-family: Arial, Helvetica, sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

b {
  font-family: verdana;
  color: #ffffff;
}

.tth-container {
    width: min(var(--tth-container), calc(100% - 32px));
    margin: 0 auto;
}

.tth-site-header {
    background: #171717;
    border-bottom: 1px solid var(--tth-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.tth-header-inner {
    display: grid;
    grid-template-columns: 250px 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 16px 0 12px;
}

.tth-logo-link {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tth-logo-badge {
    width: 40px;
    height: 40px;
    background: var(--tth-orange);
    color: #fff;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-weight: 700;
}

.tth-logo-title {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.05;
}

.tth-logo-subtitle {
    font-size: 14px;
    color: #ffffff;
}

####################################################
.tth-logo-media {
    display: flex;
    align-items: center;
    justify-content: center;
}

.tth-logo-media .custom-logo-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}

.tth-logo-media .custom-logo {
    width: 200px;
    height: 66px;
    object-fit: contain;
    display: block;
}

.tth-logo-badge {
    width: 40px;
    height: 40px;
    background: var(--tth-orange);
    color: #fff;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-weight: 700;
}
####################################################
.tth-search-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tth-all-categories-btn {
    border: 1px solid #f2c5a0;
    background: #f37421;
    border-radius: 999px;
    padding: 14px 18px;
    font-weight: 600;
    cursor: pointer;
}

.tth-search-form {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 2px solid #ffd7b3;
    background: #fff;
    border-radius: 999px;
    padding: 8px 10px;
}

.tth-search-input {
    flex: 1;
    border: 0;
    outline: none;
    font-size: 15px;
    background: transparent;
    min-width: 120px;
}

.tth-search-type-switch {
    display: flex;
    gap: 8px;
}

.tth-chip {
    border: 1px solid var(--tth-border);
    background: #fff;
    border-radius: 999px;
    padding: 8px 12px;
    cursor: pointer;
}

.tth-search-submit {
    border: 0;
    background: var(--tth-orange);
    color: #fff;
    border-radius: 999px;
    padding: 12px 22px;
    font-weight: 700;
    cursor: pointer;
}

.tth-header-actions {
    display: flex;
    gap: 10px;
}

.tth-action-btn {
    border: 1px solid var(--tth-border);
    background: #fff;
    border-radius: 12px;
    padding: 12px 14px;
    white-space: nowrap;
}

.tth-subnav {
    border-top: 1px solid #f3f4f6;
    background: #f37421;
}

.tth-subnav-inner {
    display: flex;
    gap: 24px;
    padding: 12px 0;
    font-size: 14px;
    color: #475467;
    overflow-x: auto;
}

.tth-site-main {
    padding: 28px 0 60px;
}

.tth-hero-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 16px;
}

.tth-hero-main-card {
    grid-row: span 2;
    background: #fff;
    border: 1px solid var(--tth-border);
    border-radius: 24px;
    box-shadow: var(--tth-shadow);
    padding: 32px;
}

.tth-hero-main-card h1 {
    margin: 0 0 16px;
    font-size: 56px;
    line-height: 1.05;
}

.tth-hero-main-card p {
    margin: 0 0 24px;
    color: var(--tth-muted);
    font-size: 18px;
    line-height: 1.65;
}

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

.tth-primary-btn,
.tth-secondary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 18px;
    border-radius: 999px;
    font-weight: 700;
}

.tth-primary-btn {
    background: var(--tth-orange);
    color: #fff;
}

.tth-secondary-btn {
    background: #fde2c5;
    color: var(--tth-text);
    border: 1px solid var(--tth-border);
}

.tth-hero-side-card {
    background: #fff;
    border: 1px solid var(--tth-border);
    border-radius: 20px;
    box-shadow: var(--tth-shadow);
    padding: 24px;
    min-height: 132px;
    font-size: 22px;
    color: #000;
    font-weight: 700;
}

.tth-default-page {
    background: #fff;
    border-radius: 20px;
    padding: 24px;
    border: 1px solid var(--tth-border);
}

.tth-site-footer {
    background: #fff;
    border-top: 1px solid var(--tth-border);
    padding: 20px 0;
    color: var(--tth-muted);
}

@media (max-width: 1200px) {
    .tth-header-inner {
        grid-template-columns: 1fr;
    }

    .tth-header-actions {
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .tth-hero-grid {
        grid-template-columns: 1fr 1fr;
    }

    .tth-hero-main-card {
        grid-column: 1 / -1;
        grid-row: auto;
    }

    .tth-hero-main-card h1 {
        font-size: 42px;
    }
}

@media (max-width: 768px) {
    .tth-search-wrap {
        flex-direction: column;
        align-items: stretch;
    }

    .tth-search-form {
        border-radius: 24px;
        flex-wrap: wrap;
    }

    .tth-search-type-switch {
        width: 100%;
    }

    .tth-hero-grid {
        grid-template-columns: 1fr;
    }

    .tth-hero-main-card h1 {
        font-size: 34px;
    }
}

.tth-categories-wrap {
    position: relative;
}

.tth-mega-menu {
    position: absolute;
    top: calc(100% + 14px);
    left: 0;
    width: 1120px;
    max-width: min(1120px, calc(100vw - 32px));
    background: #fff;
    border: 1px solid var(--tth-border);
    border-radius: 24px;
    box-shadow: 0 18px 48px rgba(16, 24, 40, 0.16);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
    z-index: 999;
}

.tth-categories-wrap.is-open .tth-mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.tth-mega-menu-inner {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 420px;
}

.tth-mega-sidebar {
    background: #fcfcfd;
    border-right: 1px solid var(--tth-border);
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tth-mega-sidebar-item {
    border: 1px solid transparent;
    background: #fff;
    border-radius: 14px;
    padding: 16px 18px;
    text-align: left;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tth-mega-sidebar-item:hover,
.tth-mega-sidebar-item.is-active {
    background: #fff7f0;
    border-color: #ffd7b3;
    color: var(--tth-orange-dark);
}

.tth-mega-content {
    padding: 22px;
}

.tth-mega-panel {
    display: none;
}

.tth-mega-panel.is-active {
    display: block;
}

.tth-mega-heading-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.tth-mega-heading-row h3 {
    margin: 0;
    font-size: 30px;
    line-height: 1.15;
}

.tth-mega-heading-row a {
    color: var(--tth-orange-dark);
    font-weight: 700;
}

.tth-mega-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    gap: 14px;
}

.tth-mega-card {
    border: 1px solid var(--tth-border);
    border-radius: 18px;
    padding: 18px 20px;
    background: #fff;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.tth-mega-card:hover {
    transform: translateY(-2px);
    border-color: #ffd7b3;
    box-shadow: 0 10px 22px rgba(16, 24, 40, 0.08);
}

.tth-mega-card strong {
    display: block;
    font-size: 20px;
    margin-bottom: 6px;
}

.tth-mega-card span {
    display: block;
    color: var(--tth-muted);
    font-size: 15px;
    line-height: 1.5;
}

@media (max-width: 1200px) {
    .tth-mega-menu {
        width: min(1000px, calc(100vw - 32px));
    }
}

@media (max-width: 992px) {
    .tth-mega-menu {
        position: static;
        width: 100%;
        max-width: 100%;
        margin-top: 12px;
    }

    .tth-mega-menu-inner {
        grid-template-columns: 1fr;
    }

    .tth-mega-sidebar {
        border-right: 0;
        border-bottom: 1px solid var(--tth-border);
    }

    .tth-mega-grid {
        grid-template-columns: 1fr;
    }
}

###############################
.tth-home-products-section {
    padding: 8px 0 40px;
}

.tth-section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.tth-section-heading h2 {
    margin: 0 0 8px;
    font-size: 34px;
    line-height: 1.1;
}

.tth-section-heading p {
    margin: 0;
    color: var(--tth-muted);
    font-size: 16px;
}

.tth-product-grid {
    display: grid;
    gap: 18px;
}

.tth-product-grid.columns-1 {
    grid-template-columns: 1fr;
}

.tth-product-grid.columns-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tth-product-grid.columns-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tth-product-grid.columns-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.tth-product-grid.columns-5 {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.tth-product-card {
    background: #fff;
    border: 1px solid var(--tth-border);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--tth-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tth-product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 28px rgba(16, 24, 40, 0.10);
}

.tth-product-image-wrap {
    display: block;
    aspect-ratio: 1 / 1;
    background: #f8fafc;
    overflow: hidden;
}

.tth-product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.tth-product-content {
    padding: 16px;
}

.tth-product-title {
    margin: 0 0 10px;
    font-size: 18px;
    line-height: 1.4;
}

.tth-product-title a {
    color: var(--tth-text);
}

.tth-product-price {
    margin-bottom: 14px;
    color: var(--tth-orange-dark);
    font-weight: 700;
    font-size: 17px;
}

.tth-product-actions {
    display: flex;
}

.tth-product-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 999px;
    background: var(--tth-orange);
    color: #fff;
    font-weight: 700;
    transition: background 0.2s ease;
}

.tth-product-btn:hover {
    background: var(--tth-orange-dark);
}

.tth-empty-products {
    background: #fff;
    border: 1px dashed var(--tth-border);
    border-radius: 18px;
    padding: 28px;
    color: var(--tth-muted);
    text-align: center;
}

@media (max-width: 1200px) {
    .tth-product-grid.columns-4,
    .tth-product-grid.columns-5 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 992px) {
    .tth-product-grid.columns-3,
    .tth-product-grid.columns-4,
    .tth-product-grid.columns-5 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .tth-product-grid.columns-2,
    .tth-product-grid.columns-3,
    .tth-product-grid.columns-4,
    .tth-product-grid.columns-5 {
        grid-template-columns: 1fr;
    }

    .tth-section-heading h2 {
        font-size: 28px;
    }
}
##############################################
/* =========================
   Generic container
========================= */
.tth-container {
    width: min(1200px, calc(100% - 48px));
    margin: 0 auto;
}

/* =========================
   Page content layout
========================= */
.tth-page {
    padding: 40px 0 64px;
}

.tth-page-article {
    background: #fff;
}

.tth-page-header {
    margin-bottom: 24px;
}

.tth-page-title {
    margin: 0;
    font-size: 44px;
    line-height: 1.15;
    font-weight: 700;
    color: #0f172a;
}

/* จำกัดความกว้างให้อ่านง่าย คล้าย editor */
.tth-page-content {
    max-width: 860px;
    color: #1f2937;
    font-size: 18px;
    line-height: 1.8;
}

/* spacing ของ block content */
.tth-page-content > * + * {
    margin-top: 1.2em;
}

.tth-page-content p {
    margin: 0;
}

.tth-page-content h1,
.tth-page-content h2,
.tth-page-content h3,
.tth-page-content h4,
.tth-page-content h5,
.tth-page-content h6 {
    color: #0f172a;
    line-height: 1.25;
    margin-bottom: 0.5em;
}

.tth-page-content h2 {
    font-size: 34px;
}

.tth-page-content h3 {
    font-size: 28px;
}

.tth-page-content ul,
.tth-page-content ol {
    padding-left: 1.4em;
}

.tth-page-content img {
    max-width: 100%;
    height: auto;
    display: block;
}

.tth-page-content a {
    color: #0b57d0;
    text-decoration: none;
}

.tth-page-content a:hover {
    text-decoration: underline;
}

/* Gutenberg block spacing พื้นฐาน */
.tth-page-content .wp-block-image,
.tth-page-content .wp-block-gallery,
.tth-page-content .wp-block-cover,
.tth-page-content .wp-block-group,
.tth-page-content .wp-block-columns,
.tth-page-content .wp-block-media-text,
.tth-page-content .wp-block-quote,
.tth-page-content .wp-block-table,
.tth-page-content .wp-block-embed {
    margin-top: 1.5em;
    margin-bottom: 1.5em;
}

/* mobile */
@media (max-width: 767px) {
    .tth-container {
        width: min(100%, calc(100% - 24px));
    }

    .tth-page {
        padding: 24px 0 40px;
    }

    .tth-page-title {
        font-size: 32px;
    }

    .tth-page-content {
        max-width: 100%;
        font-size: 16px;
        line-height: 1.75;
    }

    .tth-page-content h2 {
        font-size: 26px;
    }

    .tth-page-content h3 {
        font-size: 22px;
    }
}

/* =========================================================
   Circle Category Grid
   ========================================================= */

.home-circle-categories {
    padding: 36px 0 20px;
}

.home-circle-categories .section-head {
    margin-bottom: 22px;
}

.home-circle-categories .section-head h3 {
    margin: 0 0 6px;
    font-size: 38px;
    line-height: 1.15;
    font-weight: 800;
    color: #0f172a;
}

.home-circle-categories .section-head p {
    margin: 0;
    font-size: 16px;
    color: #64748b;
}

.circle-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px 10px;
}

.circle-card {
    display: block;
    text-align: center;
    text-decoration: none;
}

.circle-card__image {
    width: 100%;
    aspect-ratio: 1 / 1;
    max-width: 220px;
    margin: 0 auto 14px;
    border-radius: 999px;
    overflow: hidden;
    background: #f3f4f6;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.circle-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.circle-card:hover .circle-card__image {
    transform: translateY(-20px);
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.12);
}

.circle-card__text h3 {
    margin: 0 0 6px;
    font-size: 16px;
    line-height: 1.25;
    font-weight: 800;
    color: #111827;
}

.circle-card__text p {
    margin: 0;
    font-size: 14px;
    line-height: 1.45;
    color: #6b7280;
}

/* Responsive */
@media (max-width: 1200px) {
    .circle-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .circle-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 22px 14px;
    }

    .home-circle-categories .section-head h2 {
        font-size: 28px;
    }

    .circle-card__image {
        max-width: 160px;
    }
}

/* ให้ตัวหนังสือมี animation */
.circle-card__text {
    transition: transform 0.25s ease, color 0.25s ease;
}

/* ตอน hover ให้เด้ง */
.circle-card:hover .circle-card__text {
    transform: translateY(-10px);
}

/* =========================================================
   Dual Hero Slider - Left / Right
   Fade + Soft Zoom + Text Fade In
   ========================================================= */

.tth-dual-hero {
    padding: 24px 0;
}

.tth-dual-hero__row {
    display: flex;
    gap: 24px;
    align-items: stretch;
    width: 100%;
}

.tth-dual-hero__col {
    flex: 1 1 0;
    min-width: 0;
}

/* พื้นฐาน slider */
.tth-hero-slider {
    position: relative;
    width: 100%;
    min-height: 520px;
    overflow: hidden;
    border-radius: 24px;
    background: #0f172a;
}

.tth-hero-slider--split {
    min-height: 520px;
}

.tth-hero-slider__track {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: inherit;
}

.tth-hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 1s ease, visibility 1s ease;
}

.tth-hero-slide.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    z-index: 2;
}

.tth-hero-slide__bg,
.tth-hero-slide__overlay,
.tth-hero-slide__content {
    position: absolute;
    inset: 0;
}

.tth-hero-slide__bg {
    overflow: hidden;
}

.tth-hero-slide__bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform: scale(1);
    transition: transform 7s ease;
}

.tth-hero-slide.is-active .tth-hero-slide__bg img {
    transform: scale(1.06);
}

/* ถ้าพี่ไม่อยากให้มืดทับภาพ ใช้ transparent */
.tth-hero-slide__overlay {
    background: transparent;
    z-index: 1;
}

.tth-hero-slide__content {
    z-index: 2;
    display: flex;
    align-items: center;
    padding: 44px;
}

.tth-hero-slide__content-inner {
    max-width: 540px;
    color: #ffffff;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.9s ease 0.25s, transform 0.9s ease 0.25s;
}

.tth-hero-slide.is-active .tth-hero-slide__content-inner {
    opacity: 1;
    transform: translateY(0);
}

.tth-hero-slide__content h2 {
    margin: 0 0 16px;
    font-size: clamp(34px, 4vw, 60px);
    line-height: 1.03;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #ffffff;
    text-shadow: 2px 2px 6px #4d4d4d;
}

.tth-hero-slide__content p {
    margin: 0 0 22px;
    max-width: 500px;
    font-size: 17px;
    line-height: 1.65;
    color: #e7cf05;
    text-shadow: 2px 2px 6px #4d4d4d;
}

.tth-hero-slide__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 0 22px;
    border-radius: 999px;
    background: #f59e0b;
    color: #111827;
    font-size: 15px;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 14px 30px rgba(245, 158, 11, 0.28);
    transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.tth-hero-slide__btn:hover {
    transform: translateY(-2px);
    background: #fbbf24;
    box-shadow: 0 18px 38px rgba(245, 158, 11, 0.34);
}

.tth-hero-slider__dots {
    position: absolute;
    left: 28px;
    bottom: 22px;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tth-hero-slider__dot {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.55);
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}

.tth-hero-slider__dot.is-active {
    background: #ffffff;
    transform: scale(1.15);
}

/* ถ้าพี่อยากให้ฝั่งซ้ายใหญ่กว่าขวา ค่อยเปิดอันนี้
.tth-dual-hero__col--left { flex: 1.3; }
.tth-dual-hero__col--right { flex: 1; }
*/

/* Responsive */
@media (max-width: 1200px) {
    .tth-hero-slider,
    .tth-hero-slider--split {
        min-height: 470px;
    }

    .tth-hero-slide__content {
        padding: 34px;
    }
}

@media (max-width: 900px) {
    .tth-dual-hero__row {
        flex-direction: column;
    }

    .tth-hero-slider,
    .tth-hero-slider--split {
        min-height: 430px;
    }
}

@media (max-width: 640px) {
    .tth-hero-slider,
    .tth-hero-slider--split {
        min-height: 380px;
        border-radius: 18px;
    }

    .tth-hero-slide__content {
        padding: 24px 20px;
    }

    .tth-hero-slide__content h2 {
        font-size: 30px;
    }

    .tth-hero-slide__content p {
        font-size: 15px;
        line-height: 1.55;
    }

    .tth-hero-slider__dots {
        left: 20px;
        bottom: 16px;
        gap: 8px;
    }

    .tth-hero-slider__dot {
        width: 10px;
        height: 10px;
    }
}