/* ============================================================
   PosterShop — Site CSS
   ============================================================ */

:root {
    --ink:    #1a1a1a;
    --ink2:   #555555;
    --ink3:   #999999;
    --bg:     #faf9f7;
    --bg2:    #f2f0ec;
    --bg3:    #e8e4de;
    --accent: #c0392b;
    --accent2:#e74c3c;
    --white:  #ffffff;
    --green:  #27ae60;
    --blue:   #2980b9;
    --orange: #e67e22;
    --serif:  'Playfair Display', serif;
    --sans:   'Sarabun', sans-serif;
    --r:      10px;
    --shadow: 0 2px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
    --nav-h:  64px;
}

/* ─── Reset ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
    font-family: var(--sans);
    color: var(--ink);
    background: var(--bg);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
main { flex: 1; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: var(--sans); }
ul { list-style: none; }

/* ─── Typography ─── */
h1, h2, h3 { line-height: 1.3; }
.font-serif { font-family: var(--serif); }

/* ─── Navbar ─── */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--white);
    border-bottom: 1px solid var(--bg3);
    height: var(--nav-h);
    box-shadow: 0 1px 8px rgba(0,0,0,0.06);
}
.nav-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 24px;
}
.nav-logo {
    font-size: 1.4rem;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
}
.logo-serif { font-family: var(--serif); color: var(--ink); }
.logo-accent { color: var(--accent); font-family: var(--serif); }
.nav-links {
    display: flex;
    gap: 4px;
    align-items: center;
    flex-shrink: 0;
}
.nav-link {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.9rem;
    color: var(--ink2);
    transition: all 0.15s;
    white-space: nowrap;
}
.nav-link:hover { color: var(--accent); background: var(--bg2); }

.nav-dropdown { position: relative; }
.nav-dropdown-menu {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--white);
    border-top: 1px solid var(--bg3);
    border-bottom: 1px solid var(--bg3);
    box-shadow: 0 8px 32px rgba(0,0,0,0.10);
    padding: 20px 24px 24px;
    display: none;
    z-index: 999;
}
.nav-dropdown-menu.open { display: block; }

/* Mega menu header */
.mega-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--bg3);
}
.mega-header a { font-size: 0.82rem; color: var(--accent); text-decoration: none; }
.mega-header a:hover { text-decoration: underline; }
.mega-header span { font-size: 0.78rem; color: var(--ink3); }

/* Auto-fill grid */
.mega-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 4px 24px;
}
.mega-group { margin-bottom: 8px; }
.mega-group-title {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--ink);
    padding: 5px 8px;
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mega-group-title:hover { background: var(--bg2); color: var(--accent); }
.mega-group a {
    display: block;
    padding: 4px 8px 4px 14px;
    border-radius: 6px;
    font-size: 0.84rem;
    color: var(--ink2);
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mega-group a:hover { background: var(--bg2); color: var(--accent); }

/* Search */
.nav-search { flex: 1; max-width: 400px; }
.search-wrap { position: relative; }
.search-wrap input {
    width: 100%;
    padding: 8px 16px 8px 36px;
    border: 1.5px solid var(--bg3);
    border-radius: 99px;
    font-family: var(--sans);
    font-size: 0.9rem;
    background: var(--bg2);
    color: var(--ink);
    transition: all 0.2s;
    outline: none;
}
.search-wrap input:focus {
    border-color: var(--accent);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(192,57,43,0.1);
}
.search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.85rem;
    pointer-events: none;
}
.search-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--white);
    border: 1px solid var(--bg3);
    border-radius: var(--r);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    display: none;
    z-index: 200;
}
.search-dropdown.open { display: block; }
.search-result-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    cursor: pointer;
    transition: background 0.1s;
}
.search-result-item:hover { background: var(--bg2); }
.search-result-img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
    background: var(--bg2);
}
.search-result-info { flex: 1; min-width: 0; }
.search-result-name { font-size: 0.875rem; font-weight: 500; }
.search-result-name mark { background: #fff3cd; border-radius: 2px; padding: 0 1px; }
.search-result-cat { font-size: 0.75rem; color: var(--ink3); }
.search-see-all {
    display: block;
    text-align: center;
    padding: 10px;
    background: var(--bg2);
    font-size: 0.85rem;
    color: var(--accent);
    font-weight: 500;
}
.search-see-all:hover { background: var(--bg3); }
.search-no-result { padding: 16px; text-align: center; color: var(--ink3); font-size: 0.875rem; }

/* Cart Badge */
.nav-cart {
    position: relative;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    flex-shrink: 0;
    transition: background 0.15s;
}
.nav-cart:hover { background: var(--bg2); }
.cart-icon { font-size: 1.1rem; }
.cart-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: var(--accent);
    color: var(--white);
    border-radius: 99px;
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

/* Mobile toggle */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.3rem;
    padding: 4px;
    margin-left: auto;
}
.nav-mobile {
    display: none;
    flex-direction: column;
    padding: 8px 16px;
    border-top: 1px solid var(--bg3);
}
.nav-mobile a {
    padding: 10px 0;
    border-bottom: 1px solid var(--bg2);
    color: var(--ink2);
}
.nav-mobile.open { display: flex; }

/* ─── Buttons ─── */
.btn-primary, .btn-outline, .btn-sm, .btn-green, .btn-blue, .btn-orange {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 22px;
    border-radius: 8px;
    font-family: var(--sans);
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    text-decoration: none;
    white-space: nowrap;
}
.btn-primary {
    background: var(--accent);
    color: var(--white);
}
.btn-primary:hover { background: var(--accent2); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(192,57,43,0.3); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-primary.full { width: 100%; }

.btn-outline {
    background: transparent;
    color: var(--ink);
    border: 1.5px solid var(--bg3);
}
.btn-outline:hover { border-color: var(--ink2); background: var(--bg2); }
.btn-outline.full { width: 100%; }

.btn-outline-sm {
    padding: 4px 10px;
    font-size: 0.8rem;
    border-radius: 6px;
    border: 1px solid var(--bg3);
    background: var(--white);
    cursor: pointer;
}

.btn-sm { padding: 6px 12px; font-size: 0.8rem; border-radius: 6px; border: none; font-weight: 500; }
.btn-green { background: var(--green); color: var(--white); }
.btn-green:hover { opacity: 0.88; }
.btn-blue { background: var(--blue); color: var(--white); }
.btn-blue:hover { opacity: 0.88; }
.btn-orange { background: var(--orange); color: var(--white); }
.btn-orange:hover { opacity: 0.88; }
.btn-copy { padding: 3px 8px; font-size: 0.75rem; background: var(--bg3); border: none; border-radius: 4px; cursor: pointer; }
.btn-copy:hover { background: var(--bg2); }

.btn-lightbox {
    margin: 8px auto 0;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--bg2);
    border: 1px solid var(--bg3);
    border-radius: 8px;
    font-size: 0.875rem;
    color: var(--ink2);
    cursor: pointer;
    transition: all 0.15s;
}
.btn-lightbox:hover { background: var(--bg3); }

.btn-add-cart {
    width: 100%;
    padding: 14px;
    background: var(--accent);
    color: var(--white);
    border: none;
    border-radius: var(--r);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--sans);
}
.btn-add-cart:hover:not(:disabled) { background: var(--accent2); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(192,57,43,0.3); }
.btn-add-cart:disabled { opacity: 0.5; cursor: not-allowed; }

/* ─── Layout Helpers ─── */
.section-inner, .hero-inner, .footer-inner, .size-bar-inner, .trust-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}
.section-title {
    font-family: var(--serif);
    font-size: 1.75rem;
    color: var(--ink);
    margin-bottom: 24px;
}
.section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 24px;
}
.section-header .section-title { margin-bottom: 0; }
.see-all { color: var(--accent); font-size: 0.9rem; }
.see-all:hover { text-decoration: underline; }

/* ─── Hero ─── */
.hero {
    background: linear-gradient(135deg, var(--bg) 0%, var(--bg2) 100%);
    padding: 64px 0;
    overflow: hidden;
}
.hero-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}
.hero-tag {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 16px;
}
.hero-title {
    font-family: var(--serif);
    font-size: clamp(2.5rem, 5vw, 4rem);
    line-height: 1.1;
    color: var(--ink);
    margin-bottom: 20px;
}
.hero-title .accent { color: var(--accent); }
.hero-desc { color: var(--ink2); font-size: 1.05rem; margin-bottom: 32px; line-height: 1.7; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 12px;
}
.hero-poster {
    border-radius: var(--r);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transition: transform 0.3s;
}
.hero-poster:hover { transform: translateY(-4px); }
.hero-poster.portrait { aspect-ratio: 3/4; }
.hero-poster.landscape { aspect-ratio: 4/3; grid-column: span 2; }
.hero-poster img { width: 100%; height: 100%; object-fit: cover; }
.hero-poster:first-child { grid-row: span 2; }

.poster-placeholder {
    width: 100%;
    height: 100%;
    min-height: 120px;
    background: linear-gradient(135deg, var(--bg3), var(--bg2));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ink3);
    font-size: 2rem;
}

/* ─── Size Bar ─── */
.size-bar {
    background: var(--ink);
    color: var(--white);
    padding: 20px 0;
}
.size-bar-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}
.size-bar-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ink3);
    white-space: nowrap;
}
.size-items {
    display: flex;
    gap: 0;
    flex: 1;
    flex-wrap: wrap;
}
.size-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 20px;
    border-right: 1px solid rgba(255,255,255,0.1);
    gap: 2px;
}
.size-item:last-child { border-right: none; }
.size-name { font-family: var(--serif); font-size: 1.1rem; font-weight: 700; }
.size-dim { font-size: 0.7rem; color: var(--ink3); }
.size-price { font-size: 0.85rem; color: var(--accent2); font-weight: 600; }

/* ─── Categories ─── */
.categories-section { padding: 48px 0; }
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
    padding: 0 24px;
}
.category-card {
    position: relative;
    display: block;
    aspect-ratio: 3/4;
    border-radius: var(--r);
    overflow: hidden;
    text-decoration: none;
    background: var(--bg3);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}
.category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}
.category-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}
.category-card:hover .category-card-img { transform: scale(1.05); }
.category-card-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--bg2) 0%, var(--bg3) 100%);
}
.category-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 32px 12px 14px;
    background: linear-gradient(to top, rgba(0,0,0,0.72) 0%, transparent 100%);
    display: flex;
    align-items: flex-end;
}
.category-card-name {
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ─── Featured Products ─── */
.featured-section { padding: 48px 0; }

/* ─── Product Card ─── */
.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
.product-card {
    display: flex;
    flex-direction: column;
    background: var(--white);
    border-radius: var(--r);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.25s;
    cursor: pointer;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.product-img-wrap {
    position: relative;
    overflow: hidden;
    background: var(--bg2);
}
.product-img-wrap.portrait { aspect-ratio: 3/4; }
.product-img-wrap.landscape { aspect-ratio: 4/3; }
.product-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}
.product-card:hover .product-img-wrap img { transform: scale(1.04); }
.product-img-placeholder {
    width: 100%;
    height: 100%;
    min-height: 200px;
    background: linear-gradient(135deg, var(--bg3), var(--bg2));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ink3);
    font-size: 3rem;
}

.badge-featured {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--accent);
    color: var(--white);
    font-size: 0.65rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 99px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    z-index: 2;
}
.badge-orientation {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 99px;
    z-index: 2;
}
.badge-orientation.portrait { background: #1a3a5c; color: var(--white); }
.badge-orientation.landscape { background: #7d3c00; color: var(--white); }

.product-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s;
}
.product-overlay span {
    color: var(--white);
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.4);
    padding: 8px 20px;
    border-radius: 99px;
    font-size: 0.85rem;
    backdrop-filter: blur(4px);
}
.product-card:hover .product-overlay { opacity: 1; }

.product-info { padding: 14px; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.product-category {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ink3);
    font-weight: 600;
}
.product-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--ink);
    line-height: 1.4;
    flex: 1;
}
.product-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
}
.product-price { font-weight: 700; color: var(--accent); font-size: 0.9rem; }
.product-maxsize {
    font-size: 0.7rem;
    color: var(--ink3);
    background: var(--bg2);
    padding: 2px 6px;
    border-radius: 4px;
}

/* List view */
.product-grid.list-view { grid-template-columns: 1fr; }
.product-grid.list-view .product-card { flex-direction: row; }
.product-grid.list-view .product-img-wrap { width: 120px; flex-shrink: 0; aspect-ratio: auto; min-height: 120px; }
.product-grid.list-view .product-img-wrap.portrait { aspect-ratio: auto; }
.product-grid.list-view .product-img-wrap.landscape { aspect-ratio: auto; }
.product-grid.list-view .product-img-wrap img { height: 120px; width: 120px; }

/* ─── Trust Bar ─── */
.trust-bar { background: var(--ink); padding: 48px 0; margin-top: 48px; }
.trust-inner {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
}
.trust-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    color: var(--white);
}
.trust-icon { font-size: 1.8rem; flex-shrink: 0; }
.trust-item strong { display: block; font-size: 0.95rem; margin-bottom: 4px; }
.trust-item p { font-size: 0.8rem; color: var(--ink3); }

/* ─── Footer ─── */
.site-footer { background: #111; color: var(--white); padding: 48px 0 0; margin-top: auto; }
.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px 32px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
}
.footer-logo { font-size: 1.3rem; font-weight: 700; margin-bottom: 8px; }
.footer-brand p { font-size: 0.85rem; color: var(--ink3); line-height: 1.7; }
.footer-links h4, .footer-contact h4 {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ink3);
    margin-bottom: 16px;
}
.footer-links ul { display: flex; flex-direction: column; gap: 8px; }
.footer-links a { font-size: 0.875rem; color: rgba(255,255,255,0.7); }
.footer-links a:hover { color: var(--white); }
.footer-contact p { font-size: 0.875rem; color: rgba(255,255,255,0.7); margin-bottom: 6px; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 16px 24px;
    text-align: center;
    font-size: 0.8rem;
    color: var(--ink3);
}

/* ─── Page Header ─── */
.page-header {
    background: var(--bg2);
    border-bottom: 1px solid var(--bg3);
    padding: 32px 0;
}
.page-header-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}
.page-header h1 { font-family: var(--serif); font-size: 2rem; }
.page-header p { color: var(--ink2); margin-top: 4px; }

/* ─── Category Hero ─── */
.category-hero {
    position: relative;
    overflow: hidden;
    background: var(--bg2);
    min-height: 200px;
}
.category-hero-inner { position: relative; z-index: 1; }
.category-hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.3;
}
.category-hero-content {
    max-width: 1280px;
    margin: 0 auto;
    padding: 40px 24px;
}
.category-hero-content h1 { font-family: var(--serif); font-size: 2rem; margin-bottom: 8px; }

.breadcrumb { font-size: 0.8rem; color: var(--ink3); margin-bottom: 8px; }
.breadcrumb a { color: var(--ink3); }
.breadcrumb a:hover { color: var(--ink); }

/* ─── Subcategory Tabs ─── */
.subcategory-tabs {
    background: var(--white);
    border-bottom: 1px solid var(--bg3);
}
.subcategory-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 12px 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.subcat-tab {
    display: inline-block;
    padding: 6px 16px;
    font-size: 0.88rem;
    color: var(--ink2);
    background: var(--bg2);
    border-radius: 99px;
    border: 1px solid var(--bg3);
    text-decoration: none;
    transition: all 0.15s;
    white-space: nowrap;
}
.subcat-tab:hover { background: var(--bg3); color: var(--ink); }
.subcat-tab.active {
    background: var(--accent);
    color: var(--white);
    border-color: var(--accent);
}

/* ─── Products Page Layout ─── */
.products-page {
    max-width: 1280px;
    margin: 0 auto;
    padding: 32px 24px;
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 32px;
    align-items: start;
}
.filter-sidebar {
    background: var(--white);
    border-radius: var(--r);
    padding: 20px;
    border: 1px solid var(--bg3);
    position: sticky;
    top: calc(var(--nav-h) + 16px);
}
.filter-sidebar h3 { font-size: 1rem; margin-bottom: 16px; border-bottom: 1px solid var(--bg3); padding-bottom: 12px; }
.filter-group { margin-bottom: 20px; }
.filter-label { font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink2); display: block; margin-bottom: 10px; }
.filter-options { display: flex; flex-direction: column; gap: 6px; }
.filter-option { display: flex; align-items: center; gap: 8px; font-size: 0.875rem; cursor: pointer; color: var(--ink2); }
.filter-option input { accent-color: var(--accent); }
.filter-select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--bg3);
    border-radius: 6px;
    font-family: var(--sans);
    font-size: 0.875rem;
    background: var(--white);
    color: var(--ink);
    cursor: pointer;
}

/* Toolbar */
.products-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}
.filter-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: 99px;
    font-size: 0.8rem;
    border: 1.5px solid var(--bg3);
    color: var(--ink2);
}
.chip.active { background: var(--accent); color: var(--white); border-color: var(--accent); }
.toolbar-right { display: flex; align-items: center; gap: 12px; }
.result-count { font-size: 0.85rem; color: var(--ink3); }
.view-toggle { display: flex; border: 1px solid var(--bg3); border-radius: 6px; overflow: hidden; }
.view-btn {
    padding: 6px 10px;
    font-size: 0.9rem;
    color: var(--ink3);
    background: none;
    transition: all 0.15s;
}
.view-btn:hover { background: var(--bg2); }
.view-btn.active { background: var(--accent); color: var(--white); }

/* Pagination */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 40px; flex-wrap: wrap; }
.page-btn {
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 0.875rem;
    border: 1px solid var(--bg3);
    color: var(--ink2);
    background: var(--white);
    transition: all 0.15s;
}
.page-btn:hover { border-color: var(--accent); color: var(--accent); }
.page-btn.active { background: var(--accent); color: var(--white); border-color: var(--accent); }

/* ─── Product Detail ─── */
.breadcrumb-bar {
    max-width: 1280px;
    margin: 0 auto;
    padding: 16px 24px;
    font-size: 0.8rem;
    color: var(--ink3);
}
.breadcrumb-bar a { color: var(--ink3); }
.breadcrumb-bar a:hover { color: var(--ink); }

.detail-layout {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px 48px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
}
.detail-image-col { position: sticky; top: calc(var(--nav-h) + 16px); }
.detail-img-wrap {
    border-radius: var(--r);
    overflow: hidden;
    background: var(--bg2);
    box-shadow: var(--shadow-lg);
}
.detail-img-wrap.portrait { aspect-ratio: 3/4; }
.detail-img-wrap.landscape { aspect-ratio: 4/3; }
.detail-main-img { width: 100%; height: 100%; object-fit: cover; }
.detail-placeholder { min-height: 300px; }

.detail-category {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 8px;
}
.detail-title { font-family: var(--serif); font-size: 2rem; margin-bottom: 12px; }
.detail-desc { color: var(--ink2); line-height: 1.8; margin-bottom: 24px; }

/* Size Selector */
.size-section { margin-bottom: 24px; }
.size-header { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.size-label { font-weight: 600; font-size: 0.9rem; }
.size-hint { font-size: 0.8rem; color: var(--ink3); }
.size-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.size-btn {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 6px;
    border: 2px solid var(--bg3);
    border-radius: 8px;
    background: var(--white);
    cursor: pointer;
    transition: all 0.15s;
    gap: 3px;
    font-family: var(--sans);
}
.size-btn:hover:not(.disabled) { border-color: var(--accent); background: #fef5f5; }
.size-btn.selected { border-color: var(--accent); background: #fef5f5; }
.size-btn.disabled {
    opacity: 0.45;
    background: var(--bg2);
    cursor: not-allowed;
    position: relative;
    overflow: hidden;
}
.size-btn.disabled::after {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        45deg, transparent, transparent 4px,
        rgba(0,0,0,0.07) 4px, rgba(0,0,0,0.07) 5px
    );
}
.size-max-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: var(--ink);
    color: var(--white);
    font-size: 0.55rem;
    padding: 2px 5px;
    border-radius: 4px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.04em;
    z-index: 2;
}
.size-btn-name { font-weight: 700; font-size: 0.9rem; }
.size-btn-dim { font-size: 0.6rem; color: var(--ink3); }
.size-btn-price { font-size: 0.75rem; font-weight: 600; color: var(--accent); }
.size-btn.disabled .size-btn-price { color: var(--ink3); }

.size-note {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    margin-top: 12px;
    padding: 10px 14px;
    background: #fff8e1;
    border-radius: 8px;
    border: 1px solid #ffe082;
    font-size: 0.8rem;
    color: var(--ink2);
    line-height: 1.5;
}

/* Quantity */
.qty-section {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}
.qty-label { font-weight: 600; font-size: 0.9rem; }
.qty-control { display: flex; align-items: center; border: 1.5px solid var(--bg3); border-radius: 8px; overflow: hidden; }
.qty-btn {
    background: var(--bg2);
    border: none;
    width: 36px;
    height: 36px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.qty-btn:hover { background: var(--bg3); }
.qty-input, .qty-display {
    width: 48px;
    height: 36px;
    text-align: center;
    border: none;
    font-family: var(--sans);
    font-size: 0.95rem;
    font-weight: 500;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
}
.qty-input { outline: none; }
input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; }

/* Price Box */
.price-box {
    background: var(--bg2);
    border-radius: var(--r);
    padding: 16px;
    margin-bottom: 20px;
}
.price-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    padding: 6px 0;
    color: var(--ink2);
    border-bottom: 1px solid var(--bg3);
}
.price-row:last-child { border-bottom: none; }
.price-row.total { font-size: 1.1rem; font-weight: 700; color: var(--ink); margin-top: 4px; padding-top: 10px; }

.shipping-note { font-size: 0.8rem; color: var(--ink3); text-align: center; margin-top: 10px; }
.cart-message {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.875rem;
    margin-top: 12px;
}
.cart-message.success { background: #d4edda; color: #155724; }
.cart-message.error { background: #f8d7da; color: #721c24; }

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.lightbox-inner {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}
.lightbox-inner img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
}
.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: rgba(255,255,255,0.2);
    border: none;
    color: var(--white);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
}

/* ─── Cart Page ─── */
.cart-page {
    max-width: 1280px;
    margin: 0 auto;
    padding: 32px 24px;
}

/* Step Bar */
.step-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 40px;
}
.step {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--ink3);
    font-size: 0.875rem;
}
.step-num {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--bg3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    background: var(--white);
}
.step.active { color: var(--accent); }
.step.active .step-num { border-color: var(--accent); background: var(--accent); color: var(--white); }
.step.completed { color: var(--green); }
.step.completed .step-num { border-color: var(--green); background: var(--green); color: var(--white); }
.step-line { flex: 1; max-width: 80px; height: 2px; background: var(--bg3); margin: 0 8px; }
.step-line.completed { background: var(--green); }

.cart-layout { display: grid; grid-template-columns: 1fr 340px; gap: 32px; align-items: start; }
.cart-section-title { font-size: 1.25rem; font-weight: 600; margin-bottom: 20px; }

/* Cart Items */
.cart-list { display: flex; flex-direction: column; gap: 0; }
.cart-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--bg3);
}
.cart-item-img {
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
    background: var(--bg2);
}
.cart-item-img.portrait { width: 60px; height: 80px; }
.cart-item-img.landscape { width: 80px; height: 60px; }
.cart-item-img img { width: 100%; height: 100%; object-fit: cover; }
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-category { font-size: 0.7rem; color: var(--ink3); text-transform: uppercase; letter-spacing: 0.04em; }
.cart-item-name { font-weight: 600; font-size: 0.95rem; }
.cart-item-size { font-size: 0.8rem; color: var(--ink3); }
.cart-item-unit-price { font-size: 0.8rem; color: var(--ink2); }
.cart-item-qty { flex-shrink: 0; }
.cart-item-price { font-weight: 700; color: var(--accent); min-width: 60px; text-align: right; }
.cart-item-remove {
    background: none;
    border: none;
    color: var(--ink3);
    font-size: 1rem;
    padding: 4px;
    cursor: pointer;
    transition: color 0.15s;
}
.cart-item-remove:hover { color: var(--accent); }
.cart-actions { margin-top: 20px; }

/* Order Summary */
.order-summary {
    background: var(--white);
    border: 1px solid var(--bg3);
    border-radius: var(--r);
    padding: 20px;
}
.order-summary.sticky { position: sticky; top: calc(var(--nav-h) + 16px); }
.order-summary h3 { font-size: 1rem; font-weight: 600; margin-bottom: 16px; border-bottom: 1px solid var(--bg3); padding-bottom: 12px; }
.summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    padding: 6px 0;
    color: var(--ink2);
}
.summary-row.total { font-size: 1.1rem; font-weight: 700; color: var(--ink); border-top: 1.5px solid var(--bg3); margin-top: 8px; padding-top: 12px; }
.summary-item { display: flex; justify-content: space-between; font-size: 0.8rem; padding: 4px 0; color: var(--ink2); }
.summary-divider { border: none; border-top: 1px solid var(--bg3); margin: 12px 0; }
.summary-customer { font-size: 0.8rem; color: var(--ink3); line-height: 1.7; }
.summary-order-num { display: flex; justify-content: space-between; font-size: 0.8rem; padding: 8px 0; border-bottom: 1px solid var(--bg3); margin-bottom: 12px; }

/* Shipping Form */
.shipping-layout { display: grid; grid-template-columns: 1fr 340px; gap: 32px; align-items: start; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 24px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.full-width { grid-column: span 2; }
.form-group label { font-size: 0.85rem; font-weight: 500; color: var(--ink2); }
.form-group input, .form-group textarea, .form-group select {
    padding: 10px 12px;
    border: 1.5px solid var(--bg3);
    border-radius: 8px;
    font-family: var(--sans);
    font-size: 0.9rem;
    color: var(--ink);
    background: var(--white);
    outline: none;
    transition: border-color 0.15s;
}
.form-group input:focus, .form-group textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(192,57,43,0.1); }
.form-group textarea { resize: vertical; min-height: 80px; }

.payment-method-section { margin-top: 24px; }
.payment-method-section h3 { font-size: 1rem; font-weight: 600; margin-bottom: 12px; }
.payment-options { display: flex; flex-direction: column; gap: 10px; }
.payment-option { cursor: pointer; }
.payment-option input[type=radio] { display: none; }
.payment-option-content {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: 2px solid var(--bg3);
    border-radius: 10px;
    transition: all 0.15s;
}
.payment-option input:checked + .payment-option-content { border-color: var(--accent); background: #fef5f5; }
.payment-icon { font-size: 1.5rem; flex-shrink: 0; }
.payment-option-content strong { display: block; font-size: 0.9rem; }
.payment-option-content p { font-size: 0.8rem; color: var(--ink3); }
.shipping-btn-group { display: flex; gap: 10px; margin-top: 16px; }
.shipping-btn-group .btn-primary { flex: 1; }

/* Empty Cart */
.empty-cart { text-align: center; padding: 48px 0; }
.empty-cart p { font-size: 1.1rem; color: var(--ink2); margin-bottom: 16px; }

/* ─── Payment Page ─── */
.payment-success-banner {
    display: flex;
    align-items: center;
    gap: 20px;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: var(--r);
    padding: 20px 24px;
    margin: 0 auto 32px;
    max-width: 1280px;
    margin-left: 24px;
    margin-right: 24px;
}
.success-icon {
    width: 48px;
    height: 48px;
    background: var(--green);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: 700;
    flex-shrink: 0;
}
.payment-success-banner h2 { font-size: 1.2rem; margin-bottom: 4px; color: #155724; }
.payment-success-banner p { font-size: 0.9rem; color: #155724; }
.order-number-badge {
    background: var(--white);
    border: 1px solid #c3e6cb;
    padding: 2px 10px;
    border-radius: 6px;
    font-family: monospace;
    font-size: 1rem;
}

.payment-layout {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px 48px;
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 32px;
    align-items: start;
}

.payment-tabs { display: flex; border-bottom: 2px solid var(--bg3); margin-bottom: 24px; }
.payment-tab-btn {
    padding: 12px 24px;
    border: none;
    background: none;
    font-size: 0.9rem;
    font-family: var(--sans);
    color: var(--ink2);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.15s;
}
.payment-tab-btn:hover { color: var(--accent); }
.payment-tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }

.payment-tab-content { display: block; }
.payment-tab-content.hidden { display: none; }

.promptpay-box, .bank-box {
    display: flex;
    gap: 24px;
    background: var(--white);
    border: 1px solid var(--bg3);
    border-radius: var(--r);
    padding: 24px;
    margin-bottom: 16px;
    align-items: flex-start;
}
.qr-placeholder {
    width: 160px;
    height: 160px;
    background: var(--bg2);
    border: 2px dashed var(--bg3);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.qr-inner { text-align: center; }
.qr-mock {
    width: 100px;
    height: 100px;
    background: var(--ink);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    border-radius: 4px;
    margin: 0 auto 8px;
}
.bank-logo { font-size: 3rem; flex-shrink: 0; }
.promptpay-details, .bank-details { flex: 1; }
.payment-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--bg3);
    font-size: 0.875rem;
}
.payment-detail-row:last-child { border-bottom: none; }
.payment-detail-row.highlight { font-size: 1rem; }
.payment-detail-row span:first-child { color: var(--ink3); }
.payment-detail-row .amount { font-size: 1.3rem; color: var(--accent); }
.copy-row { display: flex; align-items: center; gap: 8px; }

.countdown-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #fff8e1;
    border-radius: 8px;
    border: 1px solid #ffe082;
    font-size: 0.875rem;
    margin-bottom: 24px;
}
.countdown { font-size: 1.2rem; font-weight: 700; color: var(--accent); font-family: monospace; }

/* Upload Slip */
.upload-section { background: var(--white); border: 1px solid var(--bg3); border-radius: var(--r); padding: 24px; }
.upload-section h3 { font-size: 1rem; font-weight: 600; margin-bottom: 4px; }
.upload-hint { font-size: 0.8rem; color: var(--ink3); margin-bottom: 16px; }
.drop-zone {
    border: 2px dashed var(--bg3);
    border-radius: var(--r);
    padding: 32px;
    text-align: center;
    margin-bottom: 16px;
    transition: all 0.2s;
    cursor: pointer;
}
.drop-zone.drag-over { border-color: var(--accent); background: #fef5f5; }
.drop-zone-content { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.drop-icon { font-size: 2rem; }
.drop-zone p { font-size: 0.875rem; color: var(--ink2); }
.preview-name { font-size: 0.8rem; color: var(--ink2); margin-top: 8px; }

/* ─── Admin ─── */
.admin-page { max-width: 1280px; margin: 0 auto; padding: 32px 24px; }
.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}
.admin-header h1 { font-family: var(--serif); font-size: 1.75rem; }
.admin-login-box {
    max-width: 400px;
    margin: 64px auto;
    background: var(--white);
    border: 1px solid var(--bg3);
    border-radius: var(--r);
    padding: 32px;
}
.admin-login-box h2 { font-size: 1.25rem; margin-bottom: 20px; }
.admin-filter-bar {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--bg3);
    padding-bottom: 0;
}
.filter-tab {
    padding: 10px 16px;
    font-size: 0.875rem;
    color: var(--ink2);
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: all 0.15s;
    white-space: nowrap;
}
.filter-tab:hover { color: var(--accent); }
.filter-tab.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }

.admin-table-wrap { overflow-x: auto; border: 1px solid var(--bg3); border-radius: var(--r); }
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.admin-table th {
    background: var(--bg2);
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--ink2);
    white-space: nowrap;
    border-bottom: 1px solid var(--bg3);
}
.admin-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--bg3);
    vertical-align: middle;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: var(--bg); }
.row-inactive td { opacity: 0.5; }

.admin-thumb { border-radius: 4px; object-fit: cover; }
.admin-thumb.portrait { width: 40px; height: 53px; }
.admin-thumb.landscape { width: 53px; height: 40px; }

.admin-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.slip-link { color: var(--blue); font-size: 0.8rem; }
.slip-link:hover { text-decoration: underline; }

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 99px;
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
}
.status-pending { background: #fff3cd; color: #856404; }
.status-waitingverify { background: #cce5ff; color: #004085; }
.status-confirmed { background: #d4edda; color: #155724; }
.status-shipped { background: #d1ecf1; color: #0c5460; }
.status-delivered { background: #d4edda; color: #155724; }
.status-completed { background: var(--bg2); color: var(--ink2); }
.badge-featured-sm { color: var(--orange); font-weight: 600; font-size: 0.875rem; }

/* ─── Misc ─── */
.empty-state { text-align: center; padding: 64px 24px; }
.empty-state p { font-size: 1.1rem; color: var(--ink2); margin-bottom: 20px; }
.alert-error {
    background: #f8d7da;
    color: #721c24;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.875rem;
}
.text-muted { color: var(--ink3); font-size: 0.85rem; }
.dropdown-loading { padding: 12px; color: var(--ink3); font-size: 0.85rem; }

/* ─── Responsive ─── */
@media (max-width: 1024px) {
    .product-grid { grid-template-columns: repeat(3, 1fr); }
    .trust-inner { grid-template-columns: repeat(2, 1fr); }
    .footer-inner { grid-template-columns: 1fr 1fr; gap: 24px; }
    .hero-inner { gap: 32px; }
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .nav-toggle { display: flex; }
    .nav-search { max-width: 180px; }

    .hero-inner { grid-template-columns: 1fr; }
    .hero-images { display: none; }
    .hero { padding: 40px 0; }

    .product-grid { grid-template-columns: repeat(2, 1fr); }
    .products-page { grid-template-columns: 1fr; }
    .filter-sidebar { position: static; }

    .detail-layout { grid-template-columns: 1fr; }
    .detail-image-col { position: static; }

    .cart-layout { grid-template-columns: 1fr; }
    .shipping-layout { grid-template-columns: 1fr; }
    .payment-layout { grid-template-columns: 1fr; }
    .form-grid { grid-template-columns: 1fr; }
    .form-group.full-width { grid-column: 1; }

    .trust-inner { grid-template-columns: 1fr; gap: 20px; }
    .footer-inner { grid-template-columns: 1fr; }
    .size-grid { grid-template-columns: repeat(3, 1fr); }
    .promptpay-box { flex-direction: column; align-items: center; }

    .step-bar { gap: 0; }
    .step-label { display: none; }

    .admin-table { font-size: 0.8rem; }
    .admin-table th, .admin-table td { padding: 8px 10px; }
}

@media (max-width: 480px) {
    .product-grid { grid-template-columns: 1fr; }
    .hero-title { font-size: 2rem; }
    .size-grid { grid-template-columns: repeat(3, 1fr); }
}
