/*
Theme Name: Yecobag
Theme URI: https://www.yecobag.com
Author: Y SIGNS
Author URI: https://www.yecobag.com
Description: Custom WordPress theme for Yecobag.com — eco-friendly wholesale bags.
Version: 1.0.2
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GPL-2.0-or-later
Text Domain: yecobag
*/

/* ============================================================
   Original Design System from Static Site
   ============================================================ */

/* ============================================================
   Eco-Friendly Bag Showcase — Design System
   环保袋展示网站 — 全局样式系统
   ============================================================
   Color Palette:
   --primary:    #2D6A4F  Forest Green (品牌主色)
   --secondary:  #52B788  Fresh Green (辅助色)
   --accent:     #D4A373  Warm Sand (强调/CTA)
   --dark:       #1B4332  Deep Green (深色文字)
   --light:      #F0F4EF  Off-white green (浅色背景)
   --white:      #FFFFFF
   --gray-100:   #F7F7F7
   --gray-200:   #E9E9E9
   --gray-600:   #6B7280
   --gray-800:   #374151
   ============================================================ */

/* --- CSS Variables --- */
:root {
    --primary: #2D6A4F;
    --primary-light: #40916C;
    --primary-dark: #1B4332;
    --secondary: #52B788;
    --secondary-light: #95D5B2;
    --accent: #D4A373;
    --accent-light: #FAEDCD;
    --light: #F0F4EF;
    --white: #FFFFFF;
    --gray-50: #FAFAF9;
    --gray-100: #F5F5F4;
    --gray-200: #E7E5E4;
    --gray-300: #D6D3D1;
    --gray-400: #A8A29E;
    --gray-500: #78716C;
    --gray-600: #57534E;
    --gray-700: #44403C;
    --gray-800: #292524;
    --gray-900: #1C1917;
    --danger: #DC2626;
    --success: #16A34A;
    --warning: #F59E0B;
    --info: #0EA5E9;

    --font-sans: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', system-ui, -apple-system, sans-serif;
    --font-heading: 'Georgia', 'Noto Serif SC', 'Times New Roman', serif;

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    --max-width: 1200px;
    --header-height: 72px;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: var(--font-sans);
    color: var(--gray-800);
    background: var(--white);
    line-height: 1.7;
    overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary-light); }
ul { list-style: none; }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--gray-900);
    line-height: 1.3;
    font-weight: 700;
}
h1 { font-size: 2.5rem; letter-spacing: -0.02em; }
h2 { font-size: 2rem; letter-spacing: -0.01em; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

/* --- Container --- */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* --- Header / Navigation --- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--gray-200);
    height: var(--header-height);
}
.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}
.logo {
    display: flex;
    align-items: center;
}
.logo img {
    height: 40px;
    width: auto;
}
.nav-links {
    position: relative;
}

/* Primary menu — flex row */
.primary-menu {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.primary-menu > li {
    position: relative;
    margin: 0;
}

.primary-menu > li > a {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--gray-600);
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
    text-decoration: none;
}

.primary-menu > li > a:hover,
.primary-menu > li.current-menu-item > a,
.primary-menu > li.current_page_item > a {
    color: var(--primary);
    background: var(--light);
}

/* "▾" arrow on parent items */
.primary-menu .menu-item-has-children > a::after {
    content: ' ▾';
    font-size: 0.8em;
}

/* Sub-menu dropdown */
.primary-menu .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    min-width: 240px;
    padding: 0.5rem;
    z-index: 100;
    list-style: none;
    margin: 0;
}

.primary-menu .menu-item-has-children:hover > .sub-menu {
    display: block;
}

.primary-menu .sub-menu li {
    margin: 0;
}

.primary-menu .sub-menu a {
    display: block;
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    color: var(--gray-600);
    text-decoration: none;
}

.primary-menu .sub-menu a:hover {
    color: var(--primary);
    background: var(--light);
}

/* Get Quote button */
.primary-menu .nav-btn > a {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.55rem 1.25rem;
    background: var(--primary);
    color: var(--white) !important;
    border-radius: var(--radius-sm);
    font-weight: 600;
    margin-left: 0.5rem;
}

.primary-menu .nav-btn > a:hover {
    background: var(--primary-dark);
    color: var(--white) !important;
}

/* Mobile nav toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 8px;
    background: none;
    border: none;
}
.nav-toggle span {
    display: block;
    width: 24px;
    height: 2.5px;
    background: var(--gray-700);
    border-radius: 2px;
    transition: 0.3s;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.7rem 1.75rem;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.25s;
    text-align: center;
}
.btn-primary {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}
.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: var(--white);
}
.btn-outline {
    background: transparent;
    color: var(--primary);
    border-color: var(--primary);
}
.btn-outline:hover {
    background: var(--primary);
    color: var(--white);
}
.btn-accent {
    background: var(--accent);
    color: var(--white);
    border-color: var(--accent);
}
.btn-accent:hover {
    background: #BC8A5F;
    border-color: #BC8A5F;
    color: var(--white);
}
.btn-lg { padding: 0.9rem 2.5rem; font-size: 1.1rem; border-radius: var(--radius-md); }
.btn-sm { padding: 0.45rem 1.1rem; font-size: 0.875rem; }

/* --- Hero Section --- */
.hero {
    background: linear-gradient(170deg, #F0F4EF 0%, #E8F0E4 40%, #DDE8D8 100%);
    padding: 5rem 0 4rem;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: -80px;
    right: -120px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(82,183,136,0.15) 0%, transparent 70%);
    border-radius: 50%;
}
.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    position: relative;
    z-index: 1;
}
.hero-content h1 {
    font-size: 3rem;
    line-height: 1.15;
    margin-bottom: 1.25rem;
    color: var(--gray-900);
}
.hero-content h1 .highlight {
    color: var(--primary);
    position: relative;
}
.hero-content .subtitle {
    font-size: 1.2rem;
    color: var(--gray-600);
    margin-bottom: 2rem;
    max-width: 480px;
}
.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}
.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
}

/* --- Hero Carousel --- */
.hero-carousel {
    width: 100%;
    aspect-ratio: 4/3;
    border-radius: var(--radius-xl);
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow-xl);
    background: var(--white);
}
.carousel-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.carousel-slide {
    min-width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    background: var(--light);
}
.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.slide-label {
    position: absolute;
    bottom: 12px;
    background: rgba(27,67,50,0.85);
    color: #fff;
    padding: 0.3rem 1rem;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.03em;
}
.carousel-dots {
    position: absolute;
    bottom: 45px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 2;
}
.carousel-dots .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid rgba(27,67,50,0.5);
    background: rgba(255,255,255,0.7);
    cursor: pointer;
    padding: 0;
    transition: all 0.3s;
}
.carousel-dots .dot.active {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: scale(1.2);
}

/* --- Trust Bar --- */
.trust-bar {
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    padding: 1.5rem 0;
}
.trust-bar .container {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}
.trust-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray-600);
    font-size: 0.95rem;
    font-weight: 500;
}
.trust-item .icon {
    font-size: 1.3rem;
    color: var(--primary);
}

/* --- Section Common --- */
.section {
    padding: 4.5rem 0;
}
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}
.section-header h2 {
    margin-bottom: 0.75rem;
}
.section-header .section-desc {
    color: var(--gray-500);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}
.section-light { background: var(--gray-50); }
.section-green { background: var(--light); }

/* --- Category Grid --- */
.category-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}
.category-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 0.75rem;
    text-align: center;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}
.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--secondary-light);
}
.category-card .cat-bg {
    width: 100%;
    aspect-ratio: 16/10;
    background-size: cover;
    background-position: center;
    border-radius: var(--radius-sm);
    margin-bottom: 0.85rem;
}
.category-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    font-family: var(--font-sans);
}
.category-card .cat-desc {
    font-size: 0.85rem;
    color: var(--gray-500);
    margin-bottom: 1rem;
}
.category-card .cat-link {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary);
}

/* --- Product Grid (Archive / Listing) --- */
.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.page-title {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    color: var(--gray-900);
}

.product-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
    transform: translateY(-6px);
    border-color: var(--secondary-light);
}

.product-card__link {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.product-card__image {
    width: 100%;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: var(--light);
    position: relative;
}

.product-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: block;
}

.product-card:hover .product-card__image img {
    transform: scale(1.06);
}

.product-card__placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-400);
    font-size: 0.85rem;
    padding: 1rem;
    text-align: center;
}

.product-card__image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 60%, rgba(0,0,0,0.04));
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.product-card:hover .product-card__image::after {
    opacity: 1;
}

.product-card__body {
    padding: 1rem 1.1rem 1.1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.product-card__title {
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--gray-900);
    margin: 0;
    line-height: 1.4;
}

.product-card__cta {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--primary);
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    transition: gap 0.25s;
}

.product-card:hover .product-card__cta {
    gap: 0.55rem;
}



.product-card:hover {
    transform: translateX(3px);
}

/* ---- Home page featured card extras ---- */
.product-card__tag {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--primary);
    background: rgba(45,106,79,0.08);
    padding: 0.2rem 0.55rem;
    border-radius: 20px;
    align-self: flex-start;
}

.product-card__meta {
    font-size: 0.82rem;
    color: var(--gray-600);
    margin: 0;
    line-height: 1.5;
}

/* Hide tag + meta on taxonomy grid (only for home page) */
.product-card--featured .product-card__body {
    gap: 0.35rem;
}

/* --- Guide Cards --- */
.guide-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}
.guide-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 2rem;
    display: flex;
    gap: 1.5rem;
    transition: all 0.3s;
    align-items: flex-start;
}
.guide-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--secondary-light);
}
.guide-card .guide-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
}
.guide-card h3 {
    font-size: 1.15rem;
    margin-bottom: 0.4rem;
    font-family: var(--font-sans);
}
.guide-card .guide-desc {
    font-size: 0.9rem;
    color: var(--gray-500);
    margin-bottom: 0.75rem;
}

/* --- CTA Section --- */
.cta-section {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    color: var(--white);
    padding: 4rem 0;
    text-align: center;
}
.cta-section h2 {
    color: var(--white);
    margin-bottom: 1rem;
}
.cta-section .cta-desc {
    font-size: 1.1rem;
    opacity: 0.85;
    max-width: 600px;
    margin: 0 auto 2rem;
}

/* --- Newsletter --- */
.newsletter-box {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    text-align: center;
    max-width: 560px;
    margin: 0 auto;
}
.newsletter-box h3 { margin-bottom: 0.5rem; }
.newsletter-box .nl-desc {
    font-size: 0.95rem;
    color: var(--gray-500);
    margin-bottom: 1.25rem;
}
.newsletter-form {
    display: flex;
    gap: 0.5rem;
}
.newsletter-form input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s;
}
.newsletter-form input:focus { border-color: var(--primary); }
.newsletter-form button { white-space: nowrap; }
.newsletter-msg { margin-top: 0.75rem; font-size: 0.85rem; font-weight: 500; }

/* --- Footer --- */
.site-footer {
    background: var(--gray-900);
    color: var(--gray-300);
    padding: 3.5rem 0 2rem;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2.5rem;
}
.footer-brand .logo {
    margin-bottom: 0.75rem;
}
.footer-brand .footer-desc {
    font-size: 0.9rem;
    line-height: 1.7;
    opacity: 0.75;
}
.footer-col h4 {
    color: var(--white);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.footer-col a {
    display: block;
    color: var(--gray-400);
    padding: 0.3rem 0;
    font-size: 0.9rem;
    transition: color 0.2s;
}
.footer-col a:hover { color: var(--secondary); }
.footer-bottom {
    border-top: 1px solid var(--gray-700);
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.85rem;
    opacity: 0.65;
}

/* --- Page Banner (inner pages) --- */
.page-banner {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    padding: 3rem 0;
    color: var(--white);
    text-align: center;
}
.page-banner h1 {
    color: var(--white);
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}
.page-banner .breadcrumb {
    font-size: 0.9rem;
    opacity: 0.85;
}
.page-banner .breadcrumb a {
    color: var(--secondary-light);
}
.page-banner .breadcrumb a:hover { color: var(--white); }

/* --- Content Layout (inner pages) --- */
.content-section { padding: 3.5rem 0; }
.content-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2.5rem;
}
.sidebar {
    position: sticky;
    top: calc(var(--header-height) + 2rem);
    align-self: start;
}
.sidebar-box {
    background: var(--light);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}
.sidebar-box h4 {
    font-family: var(--font-sans);
    font-size: 0.95rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--gray-700);
}
.sidebar-box a {
    display: block;
    padding: 0.4rem 0;
    font-size: 0.9rem;
    color: var(--gray-600);
    border-bottom: 1px solid var(--gray-200);
}
.sidebar-box a:last-child { border-bottom: none; }
.sidebar-box a:hover { color: var(--primary); }

/* --- Content Typography --- */
.content-body h2 {
    font-size: 1.75rem;
    margin: 2rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--light);
}
.content-body h2:first-child { margin-top: 0; }
.content-body h3 {
    font-size: 1.3rem;
    margin: 1.5rem 0 0.75rem;
}
.content-body p {
    margin-bottom: 1rem;
    color: var(--gray-700);
    line-height: 1.8;
}
.content-body ul, .content-body ol {
    margin: 1rem 0 1rem 1.5rem;
    color: var(--gray-700);
}
.content-body li {
    margin-bottom: 0.5rem;
    list-style: disc;
}
.content-body ol li { list-style: decimal; }

/* --- Comparison Table --- */
.compare-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.95rem;
}
.compare-table th,
.compare-table td {
    padding: 0.85rem 1rem;
    border: 1px solid var(--gray-200);
    text-align: left;
}
.compare-table th {
    background: var(--primary);
    color: var(--white);
    font-weight: 600;
    font-size: 0.9rem;
}
.compare-table tr:nth-child(even) td {
    background: var(--gray-50);
}

/* --- Info Cards --- */
.info-card {
    background: var(--light);
    border-left: 4px solid var(--primary);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
}
.info-card.tip { border-color: var(--success); background: #F0FDF4; }
.info-card.warn { border-color: var(--warning); background: #FFFBEB; }

/* --- Forms --- */
.form-group {
    margin-bottom: 1.25rem;
}
.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.35rem;
    font-size: 0.9rem;
    color: var(--gray-700);
}
.form-group label .required {
    color: var(--danger);
}
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-family: var(--font-sans);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(45,106,79,0.1);
}
.form-group textarea { resize: vertical; min-height: 120px; }
.form-hint { font-size: 0.8rem; color: var(--gray-500); margin-top: 0.25rem; }
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
.form-success {
    background: #F0FDF4;
    border: 1px solid #86EFAC;
    border-radius: var(--radius-md);
    padding: 2rem;
    text-align: center;
    color: var(--success);
    font-weight: 600;
}
.form-error {
    background: #FEF2F2;
    border: 1px solid #FECACA;
    border-radius: var(--radius-md);
    padding: 1rem;
    color: var(--danger);
    font-weight: 500;
    margin-bottom: 1rem;
}

/* --- B2B Features Grid --- */
.b2b-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin: 2rem 0;
}
.b2b-item {
    text-align: center;
    padding: 2rem 1.5rem;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    transition: all 0.3s;
}
.b2b-item:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--secondary-light);
}
.b2b-item .b2b-icon { font-size: 2.5rem; margin-bottom: 1rem; }
.b2b-item h4 {
    font-family: var(--font-sans);
    margin-bottom: 0.5rem;
}
.b2b-item p {
    font-size: 0.9rem;
    color: var(--gray-500);
}

/* --- Contact Methods --- */
.contact-methods {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}
.contact-method {
    text-align: center;
    padding: 2rem 1rem;
    background: var(--light);
    border-radius: var(--radius-md);
}
.contact-method .cm-icon { font-size: 2rem; margin-bottom: 0.75rem; }
.contact-method h4 { font-family: var(--font-sans); margin-bottom: 0.25rem; }
.contact-method p { font-size: 0.9rem; color: var(--gray-500); }

/* --- Product Detail Page --- */
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}
.product-gallery .main-img {
    width: 100%;
    aspect-ratio: 4/3;
    background-size: cover;
    background-position: center;
    border-radius: var(--radius-lg);
    background-color: var(--light);
    margin-bottom: 0.75rem;
}
.product-gallery .thumb-row {
    display: flex;
    gap: 0.5rem;
}
.product-gallery .thumb {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-sm);
    background-size: cover;
    background-position: center;
    background-color: var(--light);
    border: 2px solid transparent;
    cursor: pointer;
    transition: border-color 0.2s;
}
.product-gallery .thumb.active { border-color: var(--primary); }

.product-info h1 { font-size: 2rem; margin-bottom: 0.35rem; }
.product-info .product-category { color: var(--primary); font-size: 0.9rem; font-weight: 600; margin-bottom: 0.5rem; }
.product-info .product-category a { color: var(--primary); }
.product-info .product-short-desc { font-size: 1.05rem; color: var(--gray-600); margin-bottom: 1.5rem; line-height: 1.6; }
.product-info .product-specs { margin: 1.5rem 0; }
.product-info .product-specs h3 { font-size: 1.15rem; margin-bottom: 0.75rem; font-family: var(--font-sans); }
.product-info .spec-table { width: 100%; }
.product-info .spec-table td { padding: 0.5rem 0; border-bottom: 1px solid var(--gray-200); font-size: 0.9rem; }
.product-info .spec-table td:first-child { color: var(--gray-500); width: 140px; }
.product-info .spec-table tr:last-child td { border-bottom: none; }

.product-desc-section { margin-top: 3rem; }
.product-desc-section h2 { margin-bottom: 1rem; }

.product-related { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--gray-200); }

/* --- Product Detail Mobile --- */
@media (max-width: 768px) {
    .product-detail { grid-template-columns: 1fr; gap: 1.25rem; }
    .product-info h1 { font-size: 1.4rem; }
    .product-info .product-short-desc { font-size: 0.9rem; margin-bottom: 0.75rem; }
    .product-info .spec-table td { font-size: 0.82rem; }
    .product-info .spec-table td:first-child { width: 110px; }
    .product-desc-section { margin-top: 1.5rem; }
    .product-related { margin-top: 1.5rem; padding-top: 1rem; }
    .product-gallery .thumb { width: 48px; height: 48px; }
}

/* --- Toasts / Alerts --- */
.toast {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-sm);
    color: var(--white);
    font-weight: 600;
    font-size: 0.95rem;
    box-shadow: var(--shadow-lg);
    animation: slideIn 0.3s ease;
    max-width: 400px;
}
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* --- Back to Top --- */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 44px;
    height: 44px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: all 0.3s;
    display: none;
    z-index: 999;
}
.back-to-top.visible { display: flex; align-items: center; justify-content: center; }
.back-to-top:hover { background: var(--primary-dark); transform: translateY(-2px); }

/* --- WhatsApp Float --- */
.whatsapp-float {
    position: fixed;
    bottom: 5rem;
    right: 2rem;
    width: 44px;
    height: 44px;
    background: #25D366;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    z-index: 999;
    transition: all 0.3s;
    text-decoration: none;
}
.whatsapp-float:hover {
    background: #128C7E;
    transform: translateY(-3px);
    color: #fff;
}

/* --- Responsive */
@media (max-width: 1024px) {
    .category-grid { grid-template-columns: repeat(3, 1fr); }
    .product-grid { grid-template-columns: repeat(3, 1fr); }
    .b2b-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .hero .container { grid-template-columns: 1fr; }
    .hero-image { order: -1; width: 100%; }
    .hero-content h1 { font-size: 2.2rem; }
    .content-layout { grid-template-columns: 1fr; }
    .sidebar { position: static; }
}

@media (max-width: 768px) {
    /* ---- Global ---- */
    :root { --header-height: 56px; }
    html { font-size: 14px; }
    .container { padding: 0 0.85rem; }

    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.25rem; }
    h3 { font-size: 1.05rem; }
    h4 { font-size: 0.95rem; }

    /* ---- Header ---- */
    .logo img { height: 32px; }
    .nav-toggle { padding: 6px; }
    .nav-links {
        display: none;
        position: absolute;
        top: var(--header-height);
        left: 0; right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 0.5rem 0.75rem;
        border-bottom: 1px solid var(--gray-200);
        box-shadow: var(--shadow-lg);
        gap: 0;
    }
    .nav-links.open { display: flex; }
    .nav-toggle { display: flex; }
    .primary-menu {
        flex-direction: column;
        width: 100%;
        gap: 0;
    }
    .primary-menu > li > a {
        padding: 0.55rem 0.75rem;
        font-size: 0.9rem;
    }
    .primary-menu .sub-menu {
        position: static;
        box-shadow: none;
        border: none;
        padding-left: 0.75rem;
    }
    .primary-menu .nav-btn > a {
        margin-left: 0;
        margin-top: 0.3rem;
        padding: 0.45rem 1rem;
        font-size: 0.85rem;
    }

    /* ---- Hero ---- */
    .hero {
        padding: 1.8rem 0 1.5rem;
    }
    .hero .container { gap: 0.8rem; }
    .hero-image { order: -1; width: 100%; }
    .hero-carousel .carousel-dots { bottom: 38px; gap: 6px; }
    .hero-carousel .carousel-dots .dot { width: 8px; height: 8px; }
    .slide-label { bottom: 8px; font-size: 0.7rem; padding: 0.2rem 0.7rem; }
    .hero-content h1 { font-size: 1.5rem; margin-bottom: 0.5rem; }
    .hero-content .subtitle { font-size: 0.9rem; margin-bottom: 0.75rem; }
    .hero-actions { gap: 0.5rem; flex-direction: row; }
    .hero-actions .btn { flex: 1; padding: 0.55rem 0.75rem; font-size: 0.82rem; white-space: nowrap; }
    .btn-lg { padding: 0.6rem 1.25rem; font-size: 0.9rem; }

    /* ---- Trust Bar ---- */
    .trust-bar { padding: 0.6rem 0; }
    .trust-bar .container { gap: 0.5rem 1rem; justify-content: center; }
    .trust-item { font-size: 0.72rem; gap: 0.25rem; }
    .trust-item .icon { font-size: 0.9rem; }

    /* ---- Section ---- */
    .section { padding: 1.5rem 0; }
    .section-header { margin-bottom: 1rem; }
    .section-header h2 { margin-bottom: 0.25rem; }
    .section-header .section-desc { font-size: 0.85rem; }

    /* ---- Category Grid ---- */
    .category-grid { grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
    .category-card { padding: 0.75rem 0.6rem; border-radius: var(--radius-md); }
    .category-card .cat-bg { aspect-ratio: 16/9; margin-bottom: 0.35rem; }
    .category-card h3 { font-size: 0.82rem; margin-bottom: 0.15rem; }
    .category-card .cat-desc { font-size: 0.7rem; margin-bottom: 0.35rem; line-height: 1.3; }
    .category-card .cat-link { font-size: 0.72rem; }

    /* ---- Products ---- */
    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
    .product-card__body { padding: 0.65rem 0.75rem 0.75rem; gap: 0.35rem; }
    .product-card__title { font-size: 0.85rem; }
    .product-card__cta { font-size: 0.75rem; }
    .product-card__image { aspect-ratio: 1/1; }

    /* ---- Guide Cards ---- */
    .guide-grid { grid-template-columns: 1fr; gap: 0.5rem; }
    .guide-card { padding: 0.85rem; gap: 0.75rem; border-radius: var(--radius-md); }
    .guide-card .guide-icon { font-size: 1.5rem; }
    .guide-card h3 { font-size: 0.9rem; margin-bottom: 0.15rem; }
    .guide-card .guide-desc { font-size: 0.75rem; margin-bottom: 0.3rem; line-height: 1.4; }

    /* ---- CTA ---- */
    .cta-section { padding: 1.5rem 0; }
    .cta-section h2 { font-size: 1.15rem; margin-bottom: 0.4rem; }
    .cta-section .cta-desc { font-size: 0.85rem; margin-bottom: 1rem; }

    /* ---- Newsletter ---- */
    .newsletter-box { padding: 1.25rem 1rem; border-radius: var(--radius-md); }
    .newsletter-box h3 { font-size: 1rem; }
    .newsletter-box .nl-desc { font-size: 0.8rem; margin-bottom: 0.75rem; }
    .newsletter-form { flex-direction: column; gap: 0.4rem; }
    .newsletter-form input { padding: 0.55rem 0.75rem; font-size: 0.85rem; }
    .newsletter-form button { padding: 0.55rem 1rem; font-size: 0.85rem; }

    /* ---- Footer ---- */
    .site-footer { padding: 1.5rem 0 1rem; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 1rem; }
    .footer-brand { grid-column: 1 / -1; }
    .footer-brand .footer-desc { font-size: 0.78rem; }
    .footer-col h4 { font-size: 0.78rem; margin-bottom: 0.4rem; }
    .footer-col a { font-size: 0.75rem; padding: 0.15rem 0; }
    .footer-bottom { margin-top: 1rem; padding-top: 0.75rem; flex-direction: column; text-align: center; gap: 0.3rem; font-size: 0.72rem; }

    /* ---- Inner pages ---- */
    .page-banner { padding: 1.5rem 0; }
    .page-banner h1 { font-size: 1.4rem; margin-bottom: 0.2rem; }
    .page-banner .breadcrumb { font-size: 0.75rem; }
    .content-section { padding: 1.25rem 0; }
    .content-layout { gap: 1rem; }
    .content-body h2 { font-size: 1.2rem; margin: 1rem 0 0.5rem; }
    .content-body h3 { font-size: 1rem; margin: 0.75rem 0 0.35rem; }
    .content-body p { font-size: 0.85rem; margin-bottom: 0.6rem; line-height: 1.6; }
    .content-body ul, .content-body ol { margin: 0.5rem 0 0.5rem 1.2rem; }
    .content-body li { font-size: 0.85rem; margin-bottom: 0.25rem; }
    .compare-table { font-size: 0.75rem; }
    .compare-table th, .compare-table td { padding: 0.45rem 0.5rem; }
    .info-card { padding: 0.75rem 0.85rem; margin: 0.75rem 0; font-size: 0.82rem; }
    .sidebar-box { padding: 0.75rem; margin-bottom: 0.6rem; font-size: 0.8rem; }

    /* ---- B2B / Contact ---- */
    .b2b-grid { grid-template-columns: 1fr; gap: 0.5rem; }
    .b2b-item { padding: 1rem; }
    .b2b-item .b2b-icon { font-size: 1.6rem; margin-bottom: 0.35rem; }
    .b2b-item h4 { font-size: 0.9rem; }
    .b2b-item p { font-size: 0.78rem; }
    .contact-methods { grid-template-columns: 1fr; gap: 0.5rem; }
    .contact-method { padding: 1rem; }
    .contact-method .cm-icon { font-size: 1.4rem; margin-bottom: 0.3rem; }
    .form-group { margin-bottom: 0.6rem; }
    .form-group label { font-size: 0.78rem; }
    .form-group input, .form-group select, .form-group textarea { padding: 0.5rem 0.7rem; font-size: 0.85rem; }
    .form-row { grid-template-columns: 1fr; gap: 0; }

    /* ---- Back to top + WhatsApp ---- */
    .back-to-top { width: 36px; height: 36px; bottom: 1rem; right: 0.75rem; font-size: 1rem; }
    .whatsapp-float { width: 36px; height: 36px; bottom: 4rem; right: 0.75rem; }
    .whatsapp-float svg { width: 20px; height: 20px; }
}

/* ---- Extra small screens ---- */
@media (max-width: 480px) {
    .product-grid { grid-template-columns: 1fr; gap: 0.75rem; }
    .product-card__image { aspect-ratio: 4/3; }
}
