/*
Theme Name: BotKhwamTamNgern
Theme URI: https://botkhwamtamngern.com
Author: BotKhwamTamNgern Team
Author URI: https://botkhwamtamngern.com
Description: ธีม WordPress สำหรับขายบทความดิจิทัลและสินค้าดิจิทัล พร้อมระบบออเดอร์และ Token Download
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: botkhwamtamngern
Tags: digital-products, blog, custom-menu, featured-images, responsive-layout
*/

/* ============================================================
   CSS CUSTOM PROPERTIES
   ============================================================ */
:root {
    --gold:        #E4A830;
    --gold-light:  #F5BE50;
    --gold-dark:   #C4841A;
    --navy:        #1A2E6B;
    --navy-light:  #2541A8;
    --navy-dark:   #0F1B42;
    --green:       #1A2E6B;
    --green-light: #2541A8;
    --green-dark:  #0F1B42;
    --cream:       #F4F7FF;
    --cream-dark:  #E8EEF8;
    --white:       #FFFFFF;
    --black:       #111111;
    --gray-100:    #F8F8F8;
    --gray-200:    #EEEEEE;
    --gray-300:    #DDDDDD;
    --gray-400:    #AAAAAA;
    --gray-500:    #888888;
    --gray-700:    #444444;
    --gray-900:    #222222;

    --font-th:     'IBM Plex Sans Thai', 'Noto Sans Thai', sans-serif;
    --font-en:     'IBM Plex Serif', Georgia, serif;
    --font-body:   'IBM Plex Sans Thai', 'Noto Sans Thai', sans-serif;

    --radius-sm:   4px;
    --radius-md:   8px;
    --radius-lg:   16px;
    --radius-xl:   24px;
    --radius-full: 9999px;

    --shadow-sm:   0 1px 3px rgba(0,0,0,0.08);
    --shadow-md:   0 4px 16px rgba(0,0,0,0.10);
    --shadow-lg:   0 8px 32px rgba(0,0,0,0.14);
    --shadow-gold: 0 4px 20px rgba(228,168,48,0.28);

    --transition:  0.25s ease;
    --transition-slow: 0.4s ease;

    --container:   1200px;
    --container-narrow: 800px;

    --header-height: 80px;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 17px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.85;
    color: var(--gray-900);
    background-color: var(--cream);
    overflow-x: hidden;
}

img, video {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--gold);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--gold-dark);
}

ul, ol {
    list-style: none;
}

button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
}

h1, h2, h3, h4, h5, h6 {
    letter-spacing: -0.01em;
    font-family: var(--font-th);
    font-weight: 700;
    line-height: 1.35;
    color: var(--navy);
}

h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); }
h4 { font-size: 1.2rem; }
h5 { font-size: 1.05rem; }
h6 { font-size: 0.95rem; }

p { margin-bottom: 1rem; }

p:last-child { margin-bottom: 0; }

/* ============================================================
   LAYOUT UTILITIES
   ============================================================ */
.container {
    width: 100%;
    max-width: var(--container);
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

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

.section {
    padding: 5rem 0;
}

.section--sm {
    padding: 3rem 0;
}

.section--lg {
    padding: 8rem 0;
}

.text-center  { text-align: center; }
.text-left    { text-align: left; }
.text-right   { text-align: right; }

.flex         { display: flex; }
.flex-center  { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-wrap    { flex-wrap: wrap; }
.gap-1        { gap: 0.5rem; }
.gap-2        { gap: 1rem; }
.gap-3        { gap: 1.5rem; }
.gap-4        { gap: 2rem; }

.grid         { display: grid; }
.grid-2       { grid-template-columns: repeat(2, 1fr); }
.grid-3       { grid-template-columns: repeat(3, 1fr); }
.grid-4       { grid-template-columns: repeat(4, 1fr); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.75rem;
    border-radius: var(--radius-full);
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: all var(--transition);
    border: 2px solid transparent;
    white-space: nowrap;
    text-decoration: none;
}

.btn--primary {
    background-color: var(--gold);
    color: var(--white);
    border-color: var(--gold);
}

.btn--primary:hover {
    background-color: var(--gold-dark);
    border-color: var(--gold-dark);
    color: var(--white);
    box-shadow: var(--shadow-gold);
    transform: translateY(-1px);
}

.btn--secondary {
    background-color: transparent;
    color: var(--navy);
    border-color: var(--navy);
}

.btn--secondary:hover {
    background-color: var(--navy);
    color: var(--white);
    transform: translateY(-1px);
}

.btn--outline-gold {
    background-color: transparent;
    color: var(--gold);
    border-color: var(--gold);
}

.btn--outline-gold:hover {
    background-color: var(--gold);
    color: var(--white);
}

.btn--white {
    background-color: var(--white);
    color: var(--navy);
    border-color: var(--white);
}

.btn--white:hover {
    background-color: var(--cream);
    color: var(--navy);
}

.btn--lg {
    padding: 1rem 2.5rem;
    font-size: 1.05rem;
}

.btn--sm {
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
}

/* ============================================================
   BADGES & TAGS
   ============================================================ */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.badge--gold {
    background-color: rgba(228,168,48,0.12);
    color: var(--gold-dark);
}

.badge--green {
    background-color: rgba(26,46,107,0.10);
    color: var(--navy);
}

.badge--new {
    background-color: var(--gold);
    color: var(--white);
}

/* ============================================================
   SITE HEADER
   ============================================================ */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--header-height);
    background-color: var(--navy);
    border-bottom: 3px solid var(--gold);
    border-top: 3px solid rgba(228,168,48,0.25);
    box-shadow: var(--shadow-md);
    transition: background-color var(--transition-slow);
}

.site-header.scrolled {
    background-color: rgba(26,46,107,0.98);
    backdrop-filter: blur(10px);
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding-top: 4px;
    padding-bottom: 4px;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.site-logo__mark {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--white);
    font-weight: 900;
    font-family: var(--font-th);
    flex-shrink: 0;
}

.site-logo__text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.site-logo__name {
    font-family: var(--font-th);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--white);
    letter-spacing: 0.02em;
}

.site-logo__tagline {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.65);
    font-family: var(--font-body);
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.main-nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* WordPress wp_nav_menu wraps in <ul><li> — must be horizontal on desktop */
.main-nav ul {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-nav ul li {
    list-style: none;
    position: relative;
}

/* Sub-menu (dropdown) */
.main-nav ul li ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    flex-direction: column;
    background: var(--navy);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-md);
    padding: 0.5rem;
    min-width: 180px;
    box-shadow: var(--shadow-lg);
    z-index: 999;
}

.main-nav ul li:hover > ul {
    display: flex;
}

.main-nav ul li ul li a {
    white-space: nowrap;
    border-radius: var(--radius-sm);
    display: block;
}

.main-nav a {
    color: rgba(255,255,255,0.85);
    padding: 0.55rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all var(--transition);
    text-decoration: none;
}

.main-nav a:hover,
.main-nav .current-menu-item > a,
.main-nav .current-page-ancestor > a {
    color: var(--gold);
    background-color: rgba(255,255,255,0.07);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.cart-icon {
    position: relative;
    color: var(--white);
    font-size: 1.2rem;
    transition: color var(--transition);
    text-decoration: none;
}

.cart-icon:hover {
    color: var(--gold);
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: var(--gold);
    color: var(--white);
    font-size: 0.65rem;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    width: 32px;
}

.menu-toggle span {
    display: block;
    height: 2px;
    background-color: var(--white);
    border-radius: 2px;
    transition: all var(--transition);
}

.menu-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 60%, var(--navy-light) 100%);
    position: relative;
    overflow: hidden;
    padding-top: var(--header-height);
}

.hero::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(228,168,48,0.15) 0%, transparent 70%);
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -20%;
    left: -5%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(228,168,48,0.10) 0%, transparent 70%);
    pointer-events: none;
}

.hero__content {
    position: relative;
    z-index: 1;
    max-width: 680px;
}

.hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(228,168,48,0.2);
    border: 1px solid rgba(228,168,48,0.4);
    color: var(--gold-light);
    padding: 0.4rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    margin-bottom: 1.5rem;
}

.hero__title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    color: var(--white);
    margin-bottom: 1.25rem;
    line-height: 1.2;
}

.hero__title span {
    color: var(--gold);
}

.hero__subtitle {
    font-size: 1.15rem;
    color: rgba(255,255,255,0.75);
    margin-bottom: 2.5rem;
    line-height: 1.8;
    font-family: var(--font-body);
    font-weight: 400;
}

.hero__actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero__stats {
    display: flex;
    gap: 2.5rem;
    margin-top: 3.5rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    flex-wrap: wrap;
}

.hero__stat-num {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--gold);
    font-family: var(--font-th);
    line-height: 1;
}

.hero__stat-label {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.6);
    margin-top: 0.25rem;
}

/* ============================================================
   SECTION HEADERS
   ============================================================ */
.section-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.section-header__eyebrow {
    display: inline-block;
    color: var(--gold);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

.section-header__title {
    margin-bottom: 1rem;
    color: var(--navy);
}

.section-header__desc {
    color: var(--gray-500);
    max-width: 550px;
    margin-left: auto;
    margin-right: auto;
    font-size: 1.05rem;
}

/* ============================================================
   PRODUCT / ARTICLE CARDS
   ============================================================ */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.product-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-slow);
    display: flex;
    flex-direction: column;
    border: 1px solid var(--gray-200);
}

.product-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
    border-color: var(--gold);
}

.product-card__thumbnail {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: linear-gradient(135deg, var(--navy), var(--navy-light));
}

.product-card__thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

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

.product-card__thumbnail-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: rgba(255,255,255,0.3);
}

.product-card__badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
}

.product-card__body {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-card__category {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.5rem;
}

.product-card__title {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    color: var(--navy);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card__excerpt {
    font-size: 0.9rem;
    color: var(--gray-500);
    margin-bottom: 1.25rem;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.6;
}

.product-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-200);
    margin-top: auto;
}

.product-card__price {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--gold-dark);
    font-family: var(--font-th);
}

.product-card__price-currency {
    font-size: 0.85rem;
    vertical-align: super;
    font-weight: 600;
}

/* ============================================================
   SINGLE PRODUCT PAGE
   ============================================================ */
.single-product-layout {
    padding-top: calc(var(--header-height) + 3rem);
    padding-bottom: 5rem;
}

.single-product-grid {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 3rem;
    align-items: start;
}

.product-content__breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--gray-400);
    margin-bottom: 2rem;
}

.product-content__breadcrumb a {
    color: var(--gray-400);
}

.product-content__breadcrumb a:hover {
    color: var(--gold);
}

.product-content__header {
    margin-bottom: 2rem;
}

.product-content__title {
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    margin-bottom: 1rem;
}

.product-content__meta {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    color: var(--gray-400);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.product-content__meta span {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

/* Preview Content */
.preview-wrapper {
    position: relative;
    margin-bottom: 2rem;
}

.preview-content {
    font-size: 1rem;
    line-height: 1.9;
    color: var(--gray-700);
}

.preview-content p { margin-bottom: 1.25rem; }

.preview-content h2,
.preview-content h3,
.preview-content h4 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.content-blur {
    position: relative;
    overflow: hidden;
    max-height: 200px;
    pointer-events: none;
    user-select: none;
}

.content-blur::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 180px;
    background: linear-gradient(to bottom, transparent 0%, var(--cream) 80%);
}

.locked-overlay {
    text-align: center;
    padding: 3rem 2rem;
    background: linear-gradient(to bottom, transparent, var(--cream) 20%);
    position: relative;
    z-index: 1;
}

.locked-overlay__icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--gold);
}

.locked-overlay__title {
    font-size: 1.4rem;
    color: var(--navy);
    margin-bottom: 0.75rem;
}

.locked-overlay__text {
    color: var(--gray-500);
    margin-bottom: 2rem;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
}

/* Product Sidebar / Purchase Box */
.purchase-box {
    position: sticky;
    top: calc(var(--header-height) + 1.5rem);
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-200);
}

.purchase-box__image {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--navy), var(--navy-light));
}

.purchase-box__price {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--gold-dark);
    font-family: var(--font-th);
    margin-bottom: 0.25rem;
    line-height: 1;
}

.purchase-box__price-note {
    font-size: 0.85rem;
    color: var(--gray-400);
    margin-bottom: 1.5rem;
}

.purchase-box__btn {
    width: 100%;
    padding: 1rem;
    font-size: 1.05rem;
    margin-bottom: 1rem;
}

.purchase-box__features {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-200);
}

.purchase-box__feature {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    color: var(--gray-700);
    margin-bottom: 0.75rem;
}

.purchase-box__feature::before {
    content: '✓';
    color: var(--gold);
    font-weight: 700;
    flex-shrink: 0;
}

.purchase-box__guarantee {
    background: rgba(26,46,107,0.05);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-top: 1.25rem;
    text-align: center;
    font-size: 0.85rem;
    color: var(--gray-500);
}

/* ============================================================
   CATEGORIES BAR
   ============================================================ */
.categories-bar {
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    padding: 1rem 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.categories-bar__inner {
    display: flex;
    gap: 0.75rem;
    white-space: nowrap;
}

.category-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 1.2rem;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 500;
    background: var(--gray-100);
    color: var(--gray-700);
    border: 1px solid transparent;
    transition: all var(--transition);
    cursor: pointer;
    text-decoration: none;
}

.category-chip:hover,
.category-chip.active {
    background: var(--gold);
    color: var(--white);
    border-color: var(--gold);
}

/* ============================================================
   FEATURES / WHY US SECTION
   ============================================================ */
.features-section {
    background: var(--navy);
    color: var(--white);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 2rem;
}

.feature-card {
    text-align: center;
    padding: 2rem 1.5rem;
}

.feature-card__icon {
    width: 64px;
    height: 64px;
    background: rgba(228,168,48,0.2);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 1.75rem;
    color: var(--gold);
    transition: all var(--transition);
}

.feature-card:hover .feature-card__icon {
    background: var(--gold);
    color: var(--white);
    transform: scale(1.1);
}

.feature-card__title {
    font-size: 1.1rem;
    color: var(--white);
    margin-bottom: 0.75rem;
    font-family: var(--font-th);
}

.feature-card__text {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.65);
    line-height: 1.7;
}

/* ============================================================
   CTA SECTION
   ============================================================ */
.cta-section {
    background: linear-gradient(135deg, var(--gold-dark), var(--gold));
    text-align: center;
    padding: 6rem 0;
}

.cta-section h2 {
    color: var(--white);
    margin-bottom: 1.25rem;
}

.cta-section p {
    color: rgba(255,255,255,0.8);
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}

/* ============================================================
   TESTIMONIALS
   ============================================================ */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.testimonial-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    position: relative;
}

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 4rem;
    color: var(--gold);
    opacity: 0.2;
    font-family: var(--font-th);
    line-height: 1;
}

.testimonial-card__stars {
    color: var(--gold);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    letter-spacing: 2px;
}

.testimonial-card__text {
    font-size: 0.95rem;
    color: var(--gray-700);
    line-height: 1.8;
    margin-bottom: 1.25rem;
}

.testimonial-card__author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.testimonial-card__avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--navy), var(--gold));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.testimonial-card__name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--navy);
}

.testimonial-card__role {
    font-size: 0.8rem;
    color: var(--gray-400);
}

/* ============================================================
   ARCHIVE PAGE
   ============================================================ */
.archive-header {
    background: linear-gradient(135deg, var(--navy), var(--navy-light));
    padding: calc(var(--header-height) + 3rem) 0 3rem;
    text-align: center;
}

.archive-header h1 {
    color: var(--white);
    margin-bottom: 0.75rem;
}

.archive-header p {
    color: rgba(255,255,255,0.7);
    font-size: 1.05rem;
    max-width: 520px;
    margin: 0 auto;
}

.archive-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.archive-count {
    font-size: 0.9rem;
    color: var(--gray-500);
}

.archive-sort {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--gray-500);
}

.archive-sort select {
    padding: 0.35rem 0.75rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm);
    background: var(--white);
    color: var(--gray-700);
    cursor: pointer;
}

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.4rem;
    margin-top: 4rem;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 0.75rem;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 600;
    transition: all var(--transition);
    border: 1.5px solid var(--gray-200);
    color: var(--navy);
    background: var(--white);
    text-decoration: none;
    white-space: nowrap;
}

.pagination a:hover {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--white);
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(228,168,48,0.3);
}

.pagination .current {
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    border-color: var(--gold);
    color: var(--white);
    box-shadow: 0 3px 10px rgba(228,168,48,0.3);
}

.pagination .dots {
    border: none;
    color: var(--gray-400);
    background: transparent;
    cursor: default;
    min-width: 24px;
}

.pagination .prev,
.pagination .next {
    background: var(--cream);
    border-color: var(--gray-200);
    color: var(--navy);
    font-size: 0.85rem;
    padding: 0 1rem;
}

/* ============================================================
   SITE FOOTER
   ============================================================ */
.site-footer {
    background-color: var(--navy-dark);
    color: rgba(255,255,255,0.7);
}

.site-footer__top {
    padding: 4rem 0 3rem;
    display: grid;
    grid-template-columns: 1.5fr repeat(3, 1fr);
    gap: 3rem;
}

.footer-brand__logo {
    margin-bottom: 1rem;
}

.footer-brand__name {
    font-family: var(--font-th);
    font-size: 1.2rem;
    color: var(--white);
    font-weight: 700;
}

.footer-brand__desc {
    font-size: 0.9rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    color: rgba(255,255,255,0.55);
}

.footer-social {
    display: flex;
    gap: 0.75rem;
}

.footer-social a {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    background: rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.6);
    transition: all var(--transition);
    font-size: 0.9rem;
    text-decoration: none;
}

.footer-social a:hover {
    background: var(--gold);
    color: var(--white);
}

.footer-col__title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--white);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 1.25rem;
}

.footer-col__links {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.footer-col__links a {
    font-size: 0.875rem;
    color: rgba(255,255,255,0.55);
    transition: color var(--transition);
    text-decoration: none;
}

.footer-col__links a:hover {
    color: var(--gold);
}

.site-footer__bottom {
    padding: 1.5rem 0;
    border-top: 1px solid rgba(255,255,255,0.07);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-copyright {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.4);
}

.footer-legal {
    display: flex;
    gap: 1.5rem;
}

.footer-legal a {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.4);
    text-decoration: none;
}

.footer-legal a:hover {
    color: var(--gold);
}

/* ============================================================
   ORDER FORM STYLES
   ============================================================ */
.btm-order-form { max-width: 540px; margin: 0 auto; }
.btm-form-group { margin-bottom: 18px; }
.btm-form-group label { display: block; font-weight: 600; color: var(--navy); margin-bottom: 6px; font-size: 0.9rem; }
.btm-form-group input,
.btm-form-group select,
.btm-form-group textarea {
    width: 100%; padding: 10px 14px;
    border: 2px solid var(--gray-200); border-radius: var(--radius);
    font-size: 0.95rem; font-family: var(--font-main);
    transition: var(--transition); background: white;
}
.btm-form-group input:focus,
.btm-form-group select:focus,
.btm-form-group textarea:focus {
    outline: none; border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(228,168,48,0.12);
}
.btm-slip-upload {
    border: 2px dashed var(--gray-200); border-radius: var(--radius);
    padding: 24px; text-align: center; cursor: pointer; transition: var(--transition);
}
.btm-slip-upload:hover { border-color: var(--gold); background: rgba(228,168,48,0.04); }
.btm-slip-upload input[type=file] { display: none; }
.btm-slip-preview { max-width: 200px; border-radius: 8px; margin: 12px auto 0; display: none; }
.btm-order-success {
    background: rgba(39,103,73,0.08); border: 1px solid var(--navy);
    border-radius: var(--radius); padding: 20px 24px; text-align: center;
    display: none;
}
.btm-order-success h3 { color: var(--navy); margin-bottom: 8px; }
.btm-order-number {
    background: var(--navy); color: white;
    padding: 6px 16px; border-radius: 50px; font-family: monospace;
    font-size: 1rem; display: inline-block; margin-top: 8px;
}

/* ============================================================
   BLOG / INDEX
   ============================================================ */
.blog-layout {
    padding-top: calc(var(--header-height) + 3rem);
}

.blog-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 3rem;
    align-items: start;
}

.post-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-slow);
    display: flex;
    border: 1px solid var(--gray-200);
    margin-bottom: 1.5rem;
}

.post-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--gold);
}

.post-card__thumbnail {
    width: 200px;
    min-width: 200px;
    background: linear-gradient(135deg, var(--navy), var(--navy-light));
    overflow: hidden;
}

.post-card__thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-card__body {
    padding: 1.5rem;
    flex: 1;
}

.post-card__meta {
    font-size: 0.8rem;
    color: var(--gray-400);
    margin-bottom: 0.5rem;
    display: flex;
    gap: 1rem;
    align-items: center;
}

.post-card__title {
    font-size: 1.15rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.post-card__title a {
    color: var(--navy);
    text-decoration: none;
}

.post-card__title a:hover {
    color: var(--gold);
}

.post-card__excerpt {
    font-size: 0.9rem;
    color: var(--gray-500);
    line-height: 1.6;
}

/* Sidebar */
.sidebar-widget {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid var(--gray-200);
}

.sidebar-widget__title {
    font-size: 1rem;
    color: var(--navy);
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--gold);
    display: inline-block;
}

/* ============================================================
   GENERIC PAGE
   ============================================================ */
.page-layout {
    padding-top: calc(var(--header-height) + 3rem);
    padding-bottom: 5rem;
}

.page-content {
    max-width: var(--container-narrow);
    margin: 0 auto;
    font-size: 1.05rem;
    line-height: 1.9;
    color: var(--gray-700);
}

.page-content h2,
.page-content h3,
.page-content h4 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.page-content ul,
.page-content ol {
    list-style: disc;
    padding-left: 1.5rem;
    margin-bottom: 1.25rem;
}

.page-content ol {
    list-style: decimal;
}

.page-content blockquote {
    border-left: 4px solid var(--gold);
    padding: 1rem 1.5rem;
    margin: 2rem 0;
    background: rgba(228,168,48,0.05);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    color: var(--gray-700);
    font-style: italic;
}

/* ============================================================
   ALERTS & NOTICES
   ============================================================ */
.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.alert--success {
    background: rgba(25,135,84,0.08);
    border: 1px solid rgba(25,135,84,0.2);
    color: #155724;
}

.alert--warning {
    background: rgba(255,193,7,0.08);
    border: 1px solid rgba(255,193,7,0.3);
    color: #856404;
}

.alert--info {
    background: rgba(26,46,107,0.06);
    border: 1px solid rgba(26,46,107,0.15);
    color: var(--navy);
}

/* ============================================================
   LOADING / SKELETON
   ============================================================ */
@keyframes skeleton-pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.5; }
}

.skeleton {
    background: var(--gray-200);
    border-radius: var(--radius-sm);
    animation: skeleton-pulse 1.5s ease infinite;
}

/* ============================================================
   SCROLL TO TOP
   ============================================================ */
.scroll-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: var(--white);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transform: translateY(16px);
    transition: opacity 0.3s ease, transform 0.3s ease, background 0.2s ease;
    z-index: 9998;
    border: none;
    box-shadow: 0 4px 16px rgba(228,168,48,0.4);
    font-size: 1.1rem;
}

.scroll-top.visible {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
}

.scroll-top:hover {
    background: linear-gradient(135deg, var(--gold-dark), var(--gold));
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(228,168,48,0.5);
}

.scroll-top:active {
    transform: translateY(-1px);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
    .single-product-grid {
        grid-template-columns: 1fr;
    }

    .purchase-box {
        position: static;
    }

    .site-footer__top {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 68px;
    }

    .main-nav {
        display: none;
        position: absolute;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: var(--navy-dark);
        flex-direction: column;
        padding: 1rem;
        gap: 0.25rem;
        border-top: 1px solid rgba(255,255,255,0.1);
        box-shadow: var(--shadow-lg);
    }

    .main-nav.open {
        display: flex;
    }

    /* Mobile: ul items stack vertically */
    .main-nav ul {
        flex-direction: column;
        width: 100%;
        gap: 0.1rem;
    }

    .main-nav ul li ul {
        display: flex;
        position: static;
        box-shadow: none;
        border: none;
        background: rgba(255,255,255,0.05);
        margin-top: 0.25rem;
        padding-left: 1rem;
    }

    .main-nav a {
        padding: 0.75rem 1rem;
        font-size: 1rem;
        display: block;
    }

    .menu-toggle {
        display: flex;
    }

    .hero__stats {
        gap: 1.5rem;
    }

    .hero__actions {
        flex-direction: column;
    }

    .hero__actions .btn {
        width: 100%;
        justify-content: center;
    }

    .blog-grid {
        grid-template-columns: 1fr;
    }

    .post-card {
        flex-direction: column;
    }

    .post-card__thumbnail {
        width: 100%;
        min-width: unset;
        height: 180px;
    }

    .site-footer__top {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }

    .site-footer__bottom {
        flex-direction: column;
        text-align: center;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .archive-toolbar {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .site-footer__top {
        grid-template-columns: 1fr;
    }

    .hero__title {
        font-size: 1.8rem;
    }

    .section {
        padding: 3.5rem 0;
    }

    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .testimonials-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   PRINT
   ============================================================ */
@media print {
    .site-header,
    .site-footer,
    .scroll-top,
    .purchase-box,
    .hero__actions { display: none; }

    body { background: white; color: black; }
    .content-blur::after { display: none; }
    .locked-overlay { display: none; }
}

/* ============================================================
   CATEGORY CARDS GRID (new component)
   ============================================================ */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.5rem 1rem;
    background: var(--cream);
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: var(--gray-900);
    transition: all var(--transition);
    text-align: center;
}
.category-card:hover {
    border-color: var(--gold);
    background: #EEF2FF;
    transform: translateY(-3px);
    box-shadow: var(--shadow-gold);
    color: var(--navy);
}
.category-card__icon {
    font-size: 2rem;
    line-height: 1;
}
.category-card__name {
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.35;
    word-break: keep-all;
    overflow-wrap: break-word;
    width: 100%;
}
.category-card__count {
    font-size: 0.75rem;
    color: var(--gray-500);
}

/* section-header link */
.section-header {
    position: relative;
}
.section-header__link {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.85rem;
    color: var(--navy);
    font-weight: 600;
    text-decoration: none;
}
.section-header__link:hover {
    color: var(--gold);
}

/* ============================================================
   BLOG CONTENT — Single Post Typography
   ============================================================ */
.blog-content h2 {
    font-size: 1.35rem;
    color: var(--navy);
    margin: 2rem 0 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--gold);
}

.blog-content h3 {
    font-size: 1.1rem;
    color: var(--navy);
    margin: 1.5rem 0 0.5rem;
}

.blog-content p {
    margin-bottom: 1.25rem;
    line-height: 1.95;
}

.blog-content ul,
.blog-content ol {
    padding-left: 1.5rem;
    margin-bottom: 1.25rem;
    line-height: 2.1;
}

.blog-content li {
    margin-bottom: 0.25rem;
}

.blog-content strong {
    color: var(--navy);
    font-weight: 700;
}

.blog-content blockquote {
    border-left: 4px solid var(--gold);
    margin: 1.5rem 0;
    padding: 1rem 1.5rem;
    background: var(--cream);
    border-radius: 0 10px 10px 0;
    font-style: italic;
    color: var(--gray-600);
}

.blog-content img {
    max-width: 100%;
    border-radius: 10px;
    margin: 1.5rem 0;
}

.blog-content a {
    color: var(--gold-dark);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.blog-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.9rem;
}

.blog-content th {
    background: var(--navy);
    color: white;
    padding: 10px 14px;
    text-align: left;
}

.blog-content td {
    padding: 9px 14px;
    border-bottom: 1px solid var(--gray-200);
    color: var(--gray-700);
}

.blog-content tr:nth-child(even) td {
    background: var(--cream);
}

/* Post Card (Blog Listing) */
.post-card {
    background: white;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--gray-200);
    margin-bottom: 1.5rem;
    display: grid;
    grid-template-columns: 240px 1fr;
    transition: box-shadow 0.2s, transform 0.2s;
}

.post-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

.post-card__thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-card__body {
    padding: 1.5rem;
}

.post-card__meta {
    font-size: 0.78rem;
    color: var(--gray-400);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.post-card__meta a {
    color: var(--gold-dark);
    text-decoration: none;
    font-weight: 600;
}

.post-card__title {
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.post-card__title a {
    color: var(--navy);
    text-decoration: none;
}

.post-card__title a:hover {
    color: var(--gold-dark);
}

.post-card__excerpt {
    font-size: 0.88rem;
    color: var(--gray-500);
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (max-width: 640px) {
    .post-card {
        grid-template-columns: 1fr;
    }
    .post-card__thumbnail {
        height: 200px;
    }
}
