﻿/* ============================================================
   Sinoich Theme - Main Stylesheet
   Chinese Intangible Cultural Heritage E-commerce
   ============================================================ */

/* === Tailwind-like utility classes === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; line-height: 1.6; -webkit-font-smoothing: antialiased; }

.bg-stone-50 { background-color: #fafaf9; }
.bg-stone-100 { background-color: #f5f5f4; }
.bg-stone-200 { background-color: #e7e5e4; }
.bg-stone-800 { background-color: #292524; }
.bg-stone-900 { background-color: #1c1917; }
.bg-white { background-color: #ffffff; }
.bg-amber-600 { background-color: #d97706; }
.bg-amber-700 { background-color: #b45309; }
.bg-amber-50 { background-color: #fffbeb; }

.text-white { color: #ffffff; }
.text-stone-300 { color: #d6d3d1; }
.text-stone-400 { color: #a8a29e; }
.text-stone-500 { color: #78716c; }
.text-stone-600 { color: #57534e; }
.text-stone-900 { color: #1c1917; }
.text-amber-400 { color: #fbbf24; }
.text-amber-700 { color: #b45309; }
.text-amber-800 { color: #92400e; }

.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }
.text-sm { font-size: 0.875rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.text-4xl { font-size: 2.25rem; }

.uppercase { text-transform: uppercase; }
.tracking-wider { letter-spacing: 0.05em; }
.tracking-widest { letter-spacing: 0.1em; }
.tracking-tight { letter-spacing: -0.025em; }
.leading-tight { line-height: 1.25; }
.leading-relaxed { line-height: 1.625; }
.text-center { text-align: center; }

.rounded { border-radius: 0.25rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-full { border-radius: 9999px; }

.transition-colors { transition: color 0.2s, background-color 0.2s; }
.transition-transform { transition: transform 0.3s; }

.inline-block { display: inline-block; }
.block { display: block; }
.flex { display: flex; }
.grid { display: grid; }
.hidden { display: none; }
.relative { position: relative; }
.absolute { position: absolute; }
.sticky { position: sticky; }
.top-0 { top: 0; }
.z-50 { z-index: 50; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.flex-col { flex-direction: column; }
.space-x-4 > * + * { margin-left: 1rem; }
.space-x-8 > * + * { margin-left: 2rem; }
.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-4 > * + * { margin-top: 1rem; }

.grid-cols-1 { grid-template-columns: repeat(1, 1fr); }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }

.max-w-7xl { max-width: 80rem; }
.max-w-2xl { max-width: 42rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-10 { margin-bottom: 2.5rem; }
.mb-12 { margin-bottom: 3rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }

.px-4 { padding-left: 1rem; padding-right: 1rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }
.py-20 { padding-top: 5rem; padding-bottom: 5rem; }
.pt-8 { padding-top: 2rem; }
.pt-16 { padding-top: 4rem; }
.pb-8 { padding-bottom: 2rem; }

.h-16 { height: 4rem; }
.h-5 { height: 1.25rem; }
.w-5 { width: 1.25rem; }
.h-48 { height: 12rem; }
.h-64 { height: 16rem; }
.w-full { width: 100%; }
.object-cover { object-fit: cover; }

.overflow-hidden { overflow: hidden; }


/* === Missing utilities for lang dropdown === */
.border { border: 1px solid; }
.border-stone-700 { border-color: #44403c; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.opacity-50 { opacity: 0.5; }
/* === Header === */
.site-header { box-shadow: 0 1px 3px rgba(0,0,0,0.3); }





/* === Hero Section === */
.sinoich-hero {
    background: linear-gradient(135deg, #1c1917 0%, #292524 50%, #1c1917 100%);
    position: relative;
    overflow: hidden;
}
.sinoich-hero::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(ellipse at 80% 20%, rgba(180,83,9,0.15) 0%, transparent 60%);
}
.sinoich-hero .hero-content { position: relative; z-index: 1; }

/* === Product Cards === */
.product-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 1.5rem;
}
@media (min-width: 640px) { .product-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .product-grid { grid-template-columns: repeat(4, 1fr); } }

.product-card {
    background: #fff;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    transition: box-shadow 0.3s, transform 0.3s;
}
.product-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}
.product-card a { text-decoration: none; color: inherit; display: block; }
.product-card .card-image {
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    background: #f5f5f4;
}
.product-card .card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}
.product-card:hover .card-image img { transform: scale(1.05); }
.product-card .card-body { padding: 1rem; }
.product-card .card-category {
    font-size: 0.75rem;
    color: #b45309;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}
.product-card .card-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #1c1917;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}
.product-card .card-price {
    font-size: 1.0625rem;
    font-weight: 700;
    color: #1c1917;
}
.product-card .add-to-cart-btn {
    display: inline-block;
    margin-top: 0.75rem;
    padding: 0.5rem 1rem;
    background: #b45309;
    color: #fff;
    border-radius: 0.375rem;
    font-size: 0.8125rem;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s;
}
.product-card .add-to-cart-btn:hover { background: #92400e; }

/* === Category Section === */
.category-section { padding: 4rem 0; }
.category-header { margin-bottom: 2rem; }
.category-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1c1917;
    margin-bottom: 0.25rem;
}
.category-subtitle { color: #78716c; font-size: 0.9375rem; }
.view-all-link {
    color: #b45309;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
}
.view-all-link:hover { color: #92400e; text-decoration: underline; }

/* === Product Detail === */
.single-product .product-main {
    padding: 3rem 0;
}
.single-product .product-gallery img {
    width: 100%;
    border-radius: 0.5rem;
}
.single-product .product-info h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}
.single-product .product-info .price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #b45309;
    margin-bottom: 1rem;
}
.single-product .product-info .description {
    color: #57534e;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

/* === Cart === */
.woocommerce-cart table { width: 100%; border-collapse: collapse; }
.woocommerce-cart th { text-align: left; padding: 0.75rem; border-bottom: 2px solid #e7e5e4; font-size: 0.875rem; text-transform: uppercase; }
.woocommerce-cart td { padding: 0.75rem; border-bottom: 1px solid #e7e5e4; }

/* === Buttons === */
.button, .woocommerce #respond input#submit, .woocommerce a.button, .woocommerce button.button, .woocommerce input.button {
    display: inline-block;
    padding: 0.625rem 1.5rem;
    background: #b45309;
    color: #fff;
    border: none;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s;
}
.button:hover, .woocommerce a.button:hover, .woocommerce button.button:hover { background: #92400e; color: #fff; }
.button--outline {
    background: transparent;
    border: 2px solid #b45309;
    color: #b45309;
}
.button--outline:hover { background: #b45309; color: #fff; }

/* === Notices === */
.woocommerce-message, .woocommerce-info, .woocommerce-error {
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
}
.woocommerce-message { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }
.woocommerce-info { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }
.woocommerce-error { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }

/* === Checkout === */
.woocommerce-checkout .col2-set { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.woocommerce-checkout h3 { font-size: 1.25rem; margin-bottom: 1rem; }

/* === Responsive === */
@media (min-width: 768px) {
    .md\:flex { display: flex; }
    .md\:block { display: block; }
    .md\:hidden { display: none; }
    .md\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
    .md\:grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
    .md\:col-span-1 { grid-column: span 1; }
    .md\:py-28 { padding-top: 7rem; padding-bottom: 7rem; }
}
@media (min-width: 640px) {
    .sm\:px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
}
@media (min-width: 1024px) {
    .lg\:text-5xl { font-size: 3rem; }
    .lg\:py-28 { padding-top: 7rem; padding-bottom: 7rem; }
}

/* === Hide WordPress admin bar on frontend === */
#wpadminbar { display: none; }

/* === Footer === */
footer a { text-decoration: none; }
footer a:hover { color: #fff; }

/* === Mobile menu === */
.mobile-menu.active { display: block; }

/* === Search form === */
.search-form { display: flex; gap: 0.5rem; }
.search-form input[type="search"] { flex: 1; padding: 0.5rem; border: 1px solid #d6d3d1; border-radius: 0.375rem; }

/* === Language Dropdown === */
.lang-dropdown { position: relative; }
#lang-menu { min-width: 10rem; }
.lang-option { cursor: pointer; text-align: left; background: none; border: none; font-family: inherit; }
.lang-option .lang-check { flex-shrink: 0; }
#lang-btn { cursor: pointer; }



/* ============================================================
   WooCommerce Overrides
   ============================================================ */

/* Shop loop */
.woocommerce ul.products {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 1.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
}
.woocommerce ul.products::before,
.woocommerce ul.products::after { display: none; }
.woocommerce ul.products li.product {
    float: none !important;
    width: auto !important;
    margin: 0 !important;
    background: #fff;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    transition: box-shadow 0.3s, transform 0.3s;
    position: relative;
}
.woocommerce ul.products li.product:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}
.woocommerce ul.products li.product a { text-decoration: none; }
.woocommerce ul.products li.product a img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    margin: 0;
    border-radius: 0;
}
.woocommerce ul.products li.product .woocommerce-loop-product__title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #1c1917;
    padding: 0.75rem 1rem 0.25rem;
    margin: 0;
}
.woocommerce ul.products li.product .price {
    font-size: 1.0625rem;
    font-weight: 700;
    color: #1c1917;
    padding: 0 1rem 0.5rem;
    margin: 0;
}
.woocommerce ul.products li.product .button {
    margin: 0 1rem 1rem;
    display: inline-block;
}
.woocommerce ul.products li.product .onsale {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    background: #b45309;
    color: #fff;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 1;
    min-height: auto;
    line-height: 1.4;
}

/* Single product */
.woocommerce div.product {
    position: relative;
}
.woocommerce div.product .product_title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1c1917;
    margin-bottom: 0.5rem;
}
.woocommerce div.product .price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #b45309;
    margin-bottom: 1rem;
}
.woocommerce div.product .woocommerce-product-details__short-description {
    color: #57534e;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}
.woocommerce div.product form.cart {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 1.5rem;
}
.woocommerce div.product form.cart .quantity input {
    width: 4rem;
    padding: 0.5rem;
    border: 1px solid #d6d3d1;
    border-radius: 0.375rem;
    text-align: center;
}
.woocommerce div.product .product_meta {
    font-size: 0.8125rem;
    color: #78716c;
}
.woocommerce div.product .product_meta > span {
    display: block;
    margin-bottom: 0.25rem;
}
.woocommerce div.product .woocommerce-tabs {
    margin-top: 2rem;
    border-top: 1px solid #e7e5e4;
    padding-top: 2rem;
}
.woocommerce div.product .woocommerce-tabs ul.tabs {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
    display: flex;
    gap: 0;
    border-bottom: 2px solid #e7e5e4;
}
.woocommerce div.product .woocommerce-tabs ul.tabs li {
    margin: 0;
    padding: 0;
}
.woocommerce div.product .woocommerce-tabs ul.tabs li a {
    display: block;
    padding: 0.75rem 1.5rem;
    color: #78716c;
    text-decoration: none;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}
.woocommerce div.product .woocommerce-tabs ul.tabs li.active a {
    color: #1c1917;
    border-bottom-color: #b45309;
}
.woocommerce div.product .woocommerce-tabs .panel {
    color: #57534e;
    line-height: 1.7;
}

/* Breadcrumbs */
.woocommerce .woocommerce-breadcrumb {
    font-size: 0.8125rem;
    color: #78716c;
    margin-bottom: 1.5rem;
}
.woocommerce .woocommerce-breadcrumb a {
    color: #b45309;
    text-decoration: none;
}
.woocommerce .woocommerce-breadcrumb a:hover {
    color: #92400e;
}

/* Pagination */
.woocommerce nav.woocommerce-pagination {
    margin-top: 2rem;
    text-align: center;
}
.woocommerce nav.woocommerce-pagination ul {
    display: inline-flex;
    gap: 0.25rem;
    list-style: none;
    padding: 0;
    margin: 0;
    border: none;
}
.woocommerce nav.woocommerce-pagination ul li {
    border: none;
    margin: 0;
}
.woocommerce nav.woocommerce-pagination ul li a,
.woocommerce nav.woocommerce-pagination ul li span {
    display: block;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    color: #57534e;
    text-decoration: none;
    font-size: 0.875rem;
}
.woocommerce nav.woocommerce-pagination ul li span.current {
    background: #b45309;
    color: #fff;
}
.woocommerce nav.woocommerce-pagination ul li a:hover {
    background: #f5f5f4;
}

/* Sorting / Results */
.woocommerce .woocommerce-result-count {
    float: left;
    color: #78716c;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}
.woocommerce .woocommerce-ordering {
    float: right;
    margin-bottom: 1rem;
}
.woocommerce .woocommerce-ordering select {
    padding: 0.5rem;
    border: 1px solid #d6d3d1;
    border-radius: 0.375rem;
    font-size: 0.875rem;
}

/* Clear floats */
.woocommerce .woocommerce-notices-wrapper + .woocommerce-result-count + .woocommerce-ordering,
.woocommerce .woocommerce-result-count + .woocommerce-ordering { margin-top: 0; }
.woocommerce .woocommerce-ordering + ul.products { clear: both; }

/* Responsive product grid */
@media (min-width: 640px) {
    .woocommerce ul.products { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
    .woocommerce ul.products { grid-template-columns: repeat(4, 1fr); }
    .woocommerce div.product .woocommerce-product-gallery { flex: 0 0 48%; }
    .woocommerce div.product .summary { flex: 0 0 48%; }
}

/* === WooCommerce Archive / Category Pages === */

/* Sorting dropdown */
.woocommerce-ordering select {
    padding: 0.5rem 2rem 0.5rem 0.75rem;
    border: 1px solid #d6d3d1;
    border-radius: 0.375rem;
    font-size: 0.8125rem;
    color: #57534e;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2357534e' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat right 0.5rem center;
    appearance: none;
    cursor: pointer;
}

/* Pagination */
.woocommerce-pagination {
    text-align: center;
}
.woocommerce-pagination ul {
    display: inline-flex;
    list-style: none;
    gap: 0.25rem;
    padding: 0;
}
.woocommerce-pagination ul li {
    display: inline-block;
}
.woocommerce-pagination ul li a,
.woocommerce-pagination ul li span {
    display: inline-block;
    padding: 0.5rem 0.875rem;
    border: 1px solid #e7e5e4;
    border-radius: 0.375rem;
    font-size: 0.8125rem;
    text-decoration: none;
    color: #57534e;
    transition: all 0.2s;
}
.woocommerce-pagination ul li a:hover {
    background: #f5f5f4;
    border-color: #d6d3d1;
}
.woocommerce-pagination ul li span.current {
    background: #b45309;
    border-color: #b45309;
    color: #fff;
}

/* Breadcrumb */
.woocommerce-breadcrumb {
    font-size: 0.8125rem;
    color: #78716c;
}
.woocommerce-breadcrumb a {
    color: #78716c;
    text-decoration: none;
}
.woocommerce-breadcrumb a:hover {
    color: #b45309;
}

/* Quantity input */
.woocommerce .quantity input[type="number"] {
    -moz-appearance: textfield;
}
.woocommerce .quantity input[type="number"]::-webkit-inner-spin-button,
.woocommerce .quantity input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Product gallery on single page */
.product-gallery img {
    width: 100%;
    height: auto;
    display: block;
}

/* WooCommerce notices on product pages */
.single-product .woocommerce-message,
.single-product .woocommerce-info,
.single-product .woocommerce-error {
    max-width: 80rem;
    margin: 1rem auto 0;
}

/* Category pills scroll */
.overflow-x-auto {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.overflow-x-auto::-webkit-scrollbar {
    height: 4px;
}
.overflow-x-auto::-webkit-scrollbar-thumb {
    background: #d6d3d1;
    border-radius: 2px;
}

.whitespace-nowrap {
    white-space: nowrap;
}

/* === Responsive sm breakpoint === */
@media (min-width: 640px) {
    .sm\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
    .lg\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1024px) {
    .lg\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
}

/* Polylang language switcher - dark header */
.lang-switcher select {
    background: #44403c;
    color: #e7e5e4;
    border: 1px solid #57534e;
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 12px;
    cursor: pointer;
}
.lang-switcher select:hover { background: #57534e; }