/* ============================================
   AQM BD - Catalog Index Page Styles
   Extracted from index.php
   ============================================ */

:root {
    --primary: #1a237e;
    --primary-light: #3949ab;
    --primary-dark: #0d1452;
    --accent: #ff6f00;
    --accent-light: #ff8f00;
    --success: #2e7d32;
    --bg: #f0f2f8;
    --card-bg: #ffffff;
    --text: #1a1a2e;
    --text-light: #6b7280;
    --border: #e5e7eb;
    --radius: 10px;
    --shadow: 0 2px 12px rgba(0,0,0,0.08);
    --shadow-hover: 0 8px 30px rgba(0,0,0,0.15);
    /* Extended palette */
    --coral: #ff6b6b;
    --coral-light: #fff0f0;
    --teal: #0d9488;
    --teal-light: #ccfbf1;
    --purple: #7c3aed;
    --purple-light: #ede9fe;
    --sky: #0284c7;
    --sky-light: #e0f2fe;
    --amber: #d97706;
    --amber-light: #fef3c7;
    --rose: #e11d48;
    --rose-light: #ffe4e6;
    --emerald: #059669;
    --emerald-light: #d1fae5;
    --indigo: #4f46e5;
    --indigo-light: #eef2ff;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif; font-size: 14px; line-height: 1.6; color: var(--text); background: linear-gradient(180deg, #eef1f8 0%, #f0f2f8 30%, #f5f0f0 60%, #eef5f0 100%); background-attachment: fixed; }

/* TOP BAR */
.top-bar { background: var(--primary-dark); padding: 8px 30px; display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: rgba(255,255,255,0.8); }
.top-bar a { color: #ffd54f; text-decoration: none; font-weight: 600; }
.lang-switch { display: flex; gap: 2px; }
.lang-btn { padding: 4px 10px; border: none; background: transparent; color: rgba(255,255,255,0.7); font-weight: 600; font-size: 11px; cursor: pointer; border-radius: 4px; text-decoration: none; }
.lang-btn:hover { background: rgba(255,255,255,0.1); color: #fff; }
.lang-btn.active { background: var(--accent); color: #fff; }

/* HEADER */
.header { background: var(--primary); padding: 18px 30px; }
.header-inner { max-width: 1600px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.logo { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.logo img { height: 50px; border-radius: 8px; }
.logo-text { color: #fff; }
.logo-title { font-size: 24px; font-weight: 800; letter-spacing: 3px; }
.logo-sub { font-size: 11px; color: rgba(255,255,255,0.7); letter-spacing: 1px; }
.header-right { display: flex; align-items: center; gap: 16px; }
.search-box { position: relative; }
.search-input { width: 300px; padding: 10px 42px 10px 16px; border: 2px solid rgba(255,255,255,0.2); border-radius: 8px; background: rgba(255,255,255,0.1); color: #fff; font-size: 13px; }
.search-input::placeholder { color: rgba(255,255,255,0.5); }
.search-input:focus { outline: none; border-color: var(--accent); background: rgba(255,255,255,0.15); }
.search-btn { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; border: none; background: var(--accent); border-radius: 6px; color: #fff; cursor: pointer; font-weight: 700; font-size: 12px; }
.container-link { display: flex; align-items: center; gap: 8px; padding: 10px 20px; background: var(--accent); border-radius: 8px; color: #fff; text-decoration: none; font-weight: 700; font-size: 13px; position: relative; }
.container-link:hover { background: var(--accent-light); }
.container-badge { position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; background: #f44336; color: #fff; border-radius: 50%; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; }

/* NAV */
.nav { background: #fff; border-bottom: 2px solid var(--border); padding: 0 30px; display: flex; align-items: center; gap: 0; max-width: 100%; overflow-x: auto; }
.nav-link { padding: 14px 24px; color: var(--text-light); text-decoration: none; font-weight: 600; font-size: 13px; border-bottom: 3px solid transparent; white-space: nowrap; transition: all 0.2s; }
.nav-link:hover { color: var(--primary); background: #f8f9ff; }
.nav-link.active { color: var(--primary); border-bottom-color: var(--accent); font-weight: 700; }
.nav-count { font-size: 11px; color: var(--accent); margin-left: 4px; font-weight: 700; }
.nav-separator { flex: 1; }
.nav-info { padding: 14px 0; font-size: 12px; color: var(--text-light); }

/* MAIN LAYOUT */
.main { max-width: 1600px; margin: 0 auto; padding: 24px 30px; }

/* ORIGIN FILTERS */
.origin-filters { display: flex; gap: 8px; margin-bottom: 24px; flex-wrap: wrap; align-items: center; }
.origin-label { font-size: 12px; font-weight: 700; color: var(--text-light); text-transform: uppercase; letter-spacing: 1px; margin-right: 8px; }
.origin-chip { padding: 6px 14px; border: 2px solid var(--border); border-radius: 20px; background: #fff; color: var(--text); font-size: 12px; font-weight: 600; text-decoration: none; transition: all 0.2s; }
.origin-chip:hover { border-color: var(--primary); color: var(--primary); }
.origin-chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* CATEGORY SECTION */
.category-section { margin-bottom: 40px; }
.category-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; padding-bottom: 12px; border-bottom: 3px solid var(--primary); }
.category-title { font-size: 20px; font-weight: 800; color: var(--primary); display: flex; align-items: center; gap: 10px; }
.category-count { font-size: 12px; color: #fff; padding: 4px 12px; border-radius: 12px; font-weight: 700; background: var(--primary); }
.category-section[data-category="Workwear"] .category-count { background: var(--coral); }
.category-section[data-category="Bags"] .category-count { background: var(--teal); }
.category-section[data-category="Labels"] .category-count { background: var(--purple); }
.category-section[data-category="Films"] .category-count { background: var(--sky); }
.category-section[data-category="Packaging"] .category-count { background: var(--amber); }

/* PRODUCT GRID */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 24px; }

/* PRODUCT CARD */
.product-card { background: var(--card-bg); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: all 0.3s; border: 1px solid var(--border); }
.product-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-3px); }

.card-top { display: flex; gap: 0; }
.card-image { width: 160px; min-height: 160px; background: #f5f5f5; display: flex; align-items: center; justify-content: center; overflow: hidden; flex-shrink: 0; position: relative; }
.card-image img { width: 100%; height: 100%; object-fit: cover; }
.card-image .placeholder { font-size: 40px; color: #ccc; }
.origin-badge { position: absolute; top: 8px; left: 8px; font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 4px; color: #fff; }
.origin-badge.pt { background: #006600; }
.origin-badge.cn { background: #de2910; }
.origin-badge.vn { background: #da251d; }
.origin-badge.bd { background: #006a4e; }
.origin-badge.multi { background: #455a64; }
.eco-badge { position: absolute; top: 8px; right: 8px; font-size: 9px; font-weight: 700; padding: 3px 6px; border-radius: 4px; background: #2e7d32; color: #fff; }

.card-info { flex: 1; padding: 14px 16px; display: flex; flex-direction: column; }
.card-material { font-size: 10px; text-transform: uppercase; letter-spacing: 1px; font-weight: 700; margin-bottom: 4px; padding: 2px 8px; border-radius: 4px; display: inline-block; }
.category-section[data-category="Workwear"] .card-material { background: var(--coral-light); color: var(--coral); }
.category-section[data-category="Bags"] .card-material { background: var(--teal-light); color: var(--teal); }
.category-section[data-category="Labels"] .card-material { background: var(--purple-light); color: var(--purple); }
.category-section[data-category="Films"] .card-material { background: var(--sky-light); color: var(--sky); }
.category-section[data-category="Packaging"] .card-material { background: var(--amber-light); color: var(--amber); }
.card-name { font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 4px; line-height: 1.3; }
.card-desc { font-size: 11px; color: var(--text-light); line-height: 1.5; margin-bottom: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-certs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 8px; }
.cert-tag { font-size: 9px; font-weight: 600; padding: 2px 6px; border-radius: 3px; background: #e8f5e9; color: #2e7d32; }
.card-supplier { font-size: 10px; color: var(--text-light); margin-top: auto; }

/* VARIANT SELECTOR */
.variant-section { border-top: 1px solid var(--border); padding: 12px 16px; background: #fafbfc; }
.variant-label { font-size: 11px; font-weight: 700; color: var(--text-light); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px; }
.variant-select { width: 100%; padding: 8px 12px; border: 2px solid var(--border); border-radius: 6px; font-size: 12px; font-weight: 600; color: var(--text); background: #fff; cursor: pointer; }
.variant-select:focus { outline: none; border-color: var(--primary); }

/* PRICING SECTION */
.pricing-section { border-top: 1px solid var(--border); padding: 14px 16px; background: #fff; }
.price-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.price-label { font-size: 11px; color: var(--text-light); }
.price-value { font-size: 13px; font-weight: 700; }
.price-value.fob { color: var(--text); }
.price-value.landed { color: var(--accent); }
.price-value.total { color: var(--primary); font-size: 18px; }
.price-breakdown { font-size: 10px; color: var(--text-light); margin-top: 2px; }
.price-divider { height: 1px; background: var(--border); margin: 8px 0; }
.moq-info { font-size: 10px; color: var(--text-light); display: flex; justify-content: space-between; margin-top: 4px; }

/* EU PRICE COMPARISON */
.eu-compare { background: linear-gradient(135deg, #fffde7, #fff8e1); border: 2px solid #ffe082; border-radius: 8px; padding: 10px 14px; margin-top: 10px; }
.eu-compare-row { display: flex; justify-content: space-between; align-items: center; font-size: 12px; }
.eu-compare-label { color: #f57f17; font-weight: 700; font-size: 11px; }
.eu-compare-price { color: #e65100; font-weight: 700; }
.savings-badge { display: inline-block; background: #2e7d32; color: #fff; font-size: 10px; font-weight: 700; padding: 3px 10px; border-radius: 10px; }

/* COST BREAKDOWN (expandable) */
.cost-toggle { font-size: 11px; color: var(--primary); cursor: pointer; font-weight: 600; border: none; background: none; padding: 4px 0; }
.cost-toggle:hover { text-decoration: underline; }
.cost-details { display: none; margin-top: 8px; padding: 10px; background: #f8f9ff; border-radius: 6px; border: 1px solid #e8eaf6; }
.cost-details.open { display: block; }
.cost-line { display: flex; justify-content: space-between; padding: 3px 0; font-size: 11px; }
.cost-line .cl-label { color: var(--text-light); }
.cost-line .cl-value { font-weight: 600; color: var(--text); }
.cost-line.total { border-top: 1px solid var(--border); margin-top: 4px; padding-top: 6px; }
.cost-line.total .cl-label { font-weight: 700; color: var(--text); }
.cost-line.total .cl-value { font-weight: 800; color: var(--primary); }

/* ACTIONS */
.card-actions { border-top: 1px solid var(--border); padding: 12px 16px; display: flex; gap: 8px; align-items: center; }
.qty-control { display: flex; align-items: center; background: #f5f5f5; border-radius: 6px; overflow: hidden; border: 1px solid var(--border); }
.qty-btn { width: 30px; height: 32px; border: none; background: transparent; font-size: 16px; font-weight: 600; cursor: pointer; color: var(--text); }
.qty-btn:hover { background: #e0e0e0; }
.qty-input { width: 50px; height: 32px; border: none; text-align: center; font-size: 12px; font-weight: 600; background: #fff; }
.btn-add { flex: 1; padding: 10px 14px; background: linear-gradient(135deg, var(--primary), var(--primary-light)); color: #fff; border: none; border-radius: 6px; font-size: 12px; font-weight: 700; cursor: pointer; transition: all 0.2s; }
.btn-add:hover { background: linear-gradient(135deg, var(--primary-light), var(--indigo)); transform: translateY(-1px); }
.btn-add.added { background: linear-gradient(135deg, var(--success), var(--emerald)); }
.category-section[data-category="Workwear"] .btn-add { background: linear-gradient(135deg, var(--coral), #f97316); }
.category-section[data-category="Workwear"] .btn-add:hover { background: linear-gradient(135deg, #f97316, var(--coral)); }
.category-section[data-category="Bags"] .btn-add { background: linear-gradient(135deg, var(--teal), #06b6d4); }
.category-section[data-category="Labels"] .btn-add { background: linear-gradient(135deg, var(--purple), var(--indigo)); }
.btn-detail { padding: 10px 14px; background: #fff; color: var(--primary); border: 2px solid var(--primary); border-radius: 6px; font-size: 12px; font-weight: 700; text-decoration: none; transition: all 0.2s; }
.btn-detail:hover { background: var(--primary); color: #fff; }

/* LOGISTICS SUMMARY BAR */
.logistics-bar { background: #fff; border: 2px solid var(--primary); border-radius: var(--radius); padding: 16px 24px; margin-bottom: 24px; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.logistics-stat { text-align: center; }
.logistics-stat-value { font-size: 22px; font-weight: 800; color: var(--primary); }
.logistics-stat-label { font-size: 11px; color: var(--text-light); text-transform: uppercase; letter-spacing: 0.5px; }

/* MARKET INTELLIGENCE DASHBOARD */
.intel-dash { background: #fff; border: 2px solid var(--primary); border-radius: var(--radius); margin-bottom: 24px; overflow: hidden; }
.intel-dash-header { background: linear-gradient(135deg, var(--primary), var(--primary-light)); padding: 14px 20px; color: #fff; display: flex; justify-content: space-between; align-items: center; }
.intel-dash-title { font-size: 14px; font-weight: 700; letter-spacing: 1px; }
.intel-dash-link { color: #ffd54f; font-size: 12px; text-decoration: none; font-weight: 600; }
.intel-dash-link:hover { text-decoration: underline; }
.intel-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0; }
.intel-cell { padding: 12px 16px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.intel-cell:last-child { border-right: none; }
.intel-cell-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-light); font-weight: 700; margin-bottom: 4px; }
.intel-cell-value { font-size: 14px; font-weight: 700; color: var(--text); }
.intel-cell-detail { font-size: 10px; color: var(--text-light); margin-top: 2px; }
.intel-cell-value.green { color: var(--success); }
.intel-cell-value.orange { color: var(--accent); }

/* EU MARGIN BAR */
.margin-bar { height: 4px; border-radius: 2px; background: #e0e0e0; margin-top: 6px; overflow: hidden; }
.margin-bar-fill { height: 100%; border-radius: 2px; }
.margin-bar-fill.high { background: var(--success); }
.margin-bar-fill.medium { background: var(--accent); }
.margin-bar-fill.low { background: #ff5722; }

/* TOAST */
.toast { position: fixed; bottom: 25px; right: 25px; padding: 14px 24px; background: var(--success); color: #fff; border-radius: 8px; box-shadow: 0 4px 20px rgba(0,0,0,0.2); font-weight: 600; z-index: 10001; font-size: 13px; transform: translateY(100px); opacity: 0; transition: all 0.3s; }
.toast.show { transform: translateY(0); opacity: 1; }

/* FOOTER */
.footer { background: var(--primary-dark); color: rgba(255,255,255,0.7); padding: 30px; text-align: center; font-size: 12px; margin-top: 40px; }
.footer a { color: #ffd54f; text-decoration: none; }
.footer p + p { margin-top: 8px; }

/* ============================================
   UTILITY CLASSES (replacing inline styles)
   ============================================ */
.d-none { display: none; }
.m-0 { margin: 0; }
.chip-count { font-size: 10px; opacity: 0.7; }
.flex-spacer { flex: 1; }
.sort-select { padding: 6px 12px; border: 2px solid var(--border); border-radius: 6px; font-size: 12px; font-weight: 600; cursor: pointer; background: #fff; }

/* Card mini price comparison bars */
.idx-bar-wrap { margin-bottom: 8px; }
.idx-bar-row { display: flex; align-items: center; gap: 6px; margin-bottom: 5px; }
.idx-bar-row:last-child { margin-bottom: 0; }
.idx-bar-label { font-size: 10px; font-weight: 700; width: 60px; }
.idx-bar-label--ours { color: var(--success); }
.idx-bar-label--eu { color: #e65100; }
.idx-bar-track { flex: 1; border-radius: 4px; height: 18px; position: relative; }
.idx-bar-track--ours { background: #e8f5e9; }
.idx-bar-track--eu { background: #fff3e0; }
.idx-bar-fill { height: 100%; border-radius: 4px; display: flex; align-items: center; justify-content: flex-end; padding-right: 4px; }
.idx-bar-fill--ours { background: var(--success); }
.idx-bar-fill--eu { background: linear-gradient(90deg, #ff9800, #e65100); }
.idx-bar-price { font-size: 9px; font-weight: 700; color: #fff; }
.idx-margin-row { display: flex; justify-content: space-between; align-items: center; }
.idx-margin-label { font-size: 11px; font-weight: 700; color: #2e7d32; }
.idx-source-note { margin-top: 3px; font-size: 9px; color: #9e9e9e; }
.idx-cost-note { margin-top: 8px; font-size: 10px; color: var(--text-light); }

/* ============================================
   COLORFUL CATEGORY HEADERS
   ============================================ */
.category-section[data-category="Workwear"] .category-header { border-bottom-color: var(--coral); }
.category-section[data-category="Workwear"] .category-title { color: var(--coral); }
.category-section[data-category="Bags"] .category-header { border-bottom-color: var(--teal); }
.category-section[data-category="Bags"] .category-title { color: var(--teal); }
.category-section[data-category="Labels"] .category-header { border-bottom-color: var(--purple); }
.category-section[data-category="Labels"] .category-title { color: var(--purple); }
.category-section[data-category="Films"] .category-header { border-bottom-color: var(--sky); }
.category-section[data-category="Films"] .category-title { color: var(--sky); }
.category-section[data-category="Packaging"] .category-header { border-bottom-color: var(--amber); }
.category-section[data-category="Packaging"] .category-title { color: var(--amber); }

/* Colorful nav active states */
.nav-link[data-cat="Workwear"].active { border-bottom-color: var(--coral); color: var(--coral); }
.nav-link[data-cat="Bags"].active { border-bottom-color: var(--teal); color: var(--teal); }
.nav-link[data-cat="Labels"].active { border-bottom-color: var(--purple); color: var(--purple); }
.nav-link[data-cat="Films"].active { border-bottom-color: var(--sky); color: var(--sky); }
.nav-link[data-cat="Packaging"].active { border-bottom-color: var(--amber); color: var(--amber); }

/* ============================================
   WORKWEAR HERO SECTION
   ============================================ */
.workwear-hero {
    background: linear-gradient(135deg, #1a237e 0%, #4f46e5 30%, #7c3aed 60%, #a855f7 100%);
    border-radius: var(--radius);
    padding: 40px;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
    color: #fff;
}
.workwear-hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="40" fill="rgba(255,255,255,0.03)"/><circle cx="80" cy="80" r="50" fill="rgba(255,255,255,0.04)"/></svg>');
}
.hero-content { position: relative; z-index: 1; }
.hero-top { display: flex; gap: 30px; align-items: center; margin-bottom: 30px; }
.hero-text { flex: 1; }
.hero-text h2 { font-size: 32px; font-weight: 900; margin-bottom: 12px; line-height: 1.2; }
.hero-text p { font-size: 16px; opacity: 0.9; line-height: 1.6; max-width: 500px; }
.hero-badges { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.hero-badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 16px; border-radius: 20px;
    font-size: 12px; font-weight: 700;
    backdrop-filter: blur(10px);
}
.hero-badge--coral { background: rgba(255,107,107,0.25); border: 1px solid rgba(255,107,107,0.4); }
.hero-badge--teal { background: rgba(13,148,136,0.25); border: 1px solid rgba(13,148,136,0.4); }
.hero-badge--amber { background: rgba(217,119,6,0.25); border: 1px solid rgba(217,119,6,0.4); }
.hero-badge--purple { background: rgba(124,58,237,0.25); border: 1px solid rgba(124,58,237,0.4); }
.hero-badge--emerald { background: rgba(5,150,105,0.25); border: 1px solid rgba(5,150,105,0.4); }

/* Hero image gallery */
.hero-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}
.hero-img-card {
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    aspect-ratio: 3/4;
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
    transition: transform 0.3s;
}
.hero-img-card:hover { transform: scale(1.03) rotate(-1deg); }
.hero-img-card img { width: 100%; height: 100%; object-fit: cover; }
.hero-img-label {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 8px 12px;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    font-size: 11px;
    font-weight: 700;
    color: #fff;
}

/* ============================================
   FABRICATION PROCESS SECTION
   ============================================ */
.fabrication-section {
    background: #fff;
    border-radius: var(--radius);
    margin-bottom: 30px;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 2px solid transparent;
    background-image: linear-gradient(#fff, #fff), linear-gradient(135deg, var(--coral), var(--teal), var(--purple), var(--amber));
    background-origin: border-box;
    background-clip: padding-box, border-box;
}
.fabrication-header {
    background: linear-gradient(135deg, #059669 0%, #0d9488 50%, #0284c7 100%);
    padding: 20px 30px;
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.fabrication-header h2 { font-size: 20px; font-weight: 800; }
.fabrication-header span { font-size: 13px; opacity: 0.9; }

.fab-tabs {
    display: flex;
    border-bottom: 2px solid var(--border);
    background: #fafbfc;
    overflow-x: auto;
}
.fab-tab {
    padding: 14px 24px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
    white-space: nowrap;
    color: var(--text-light);
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
}
.fab-tab:hover { color: var(--teal); background: var(--teal-light); }
.fab-tab.active { color: var(--teal); border-bottom-color: var(--teal); background: #fff; }
.fab-tab[data-tab="polyester"].active { color: var(--purple); border-bottom-color: var(--purple); }
.fab-tab[data-tab="polyester"]:hover { color: var(--purple); background: var(--purple-light); }
.fab-tab[data-tab="embroidery"].active { color: var(--coral); border-bottom-color: var(--coral); }
.fab-tab[data-tab="embroidery"]:hover { color: var(--coral); background: var(--coral-light); }

.fab-content { display: none; padding: 24px 30px; }
.fab-content.active { display: block; }
.fab-intro { margin-bottom: 16px; color: var(--text-light); font-size: 13px; }

.fab-process-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 16px;
}
.fab-step {
    text-align: center;
    position: relative;
}
.fab-step-num {
    width: 36px; height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 14px;
    color: #fff;
    margin-bottom: 10px;
}
.fab-step-num.cotton { background: var(--teal); }
.fab-step-num.polyester { background: var(--purple); }
.fab-step-num.embroidery { background: var(--coral); }

.fab-step-img {
    width: 100%;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 10px;
}
.fab-step-img img { width: 100%; height: 100%; object-fit: cover; }
.fab-step h4 { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.fab-step p { font-size: 11px; color: var(--text-light); line-height: 1.5; }

.fab-arrow {
    position: absolute;
    right: -14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: var(--border);
    z-index: 1;
}

/* ============================================
   PRICE CALCULATOR SECTION
   ============================================ */
.price-calc-section {
    background: #fff;
    border-radius: var(--radius);
    margin-bottom: 30px;
    overflow: hidden;
    box-shadow: var(--shadow);
}
.price-calc-header {
    background: linear-gradient(135deg, #d97706 0%, #f59e0b 50%, #fbbf24 100%);
    padding: 20px 30px;
    color: #fff;
}
.price-calc-header h2 { font-size: 20px; font-weight: 800; }
.price-calc-header p { font-size: 13px; opacity: 0.9; margin-top: 4px; }

.calc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    padding: 24px 30px;
}
.calc-card {
    border: 2px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s;
}
.calc-card:hover { border-color: var(--amber); box-shadow: 0 4px 20px rgba(217,119,6,0.15); }

.calc-card-img {
    height: 160px;
    overflow: hidden;
    position: relative;
}
.calc-card-img img { width: 100%; height: 100%; object-fit: cover; }
.calc-card-label {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
}
.calc-card-label.polo { background: var(--coral); }
.calc-card-label.tee { background: var(--sky); }
.calc-card-label.apron { background: var(--teal); }
.calc-card-label.softshell { background: var(--indigo); }
.calc-card-label.uniform { background: var(--purple); }
.calc-card-label.embroidery { background: var(--rose); }

.calc-card-body { padding: 16px; }
.calc-card-body h3 { font-size: 15px; font-weight: 800; color: var(--text); margin-bottom: 10px; }

.calc-formula {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.8;
}
.calc-formula .var-label { color: var(--purple); font-weight: 700; }
.calc-formula .op { color: var(--coral); font-weight: 700; }
.calc-formula .val { color: var(--teal); font-weight: 700; }

.calc-example {
    background: linear-gradient(135deg, var(--amber-light), #fff);
    border: 1px solid #fbbf24;
    border-radius: 8px;
    padding: 12px;
}
.calc-example-title { font-size: 11px; font-weight: 700; color: var(--amber); text-transform: uppercase; margin-bottom: 6px; }
.calc-example table { width: 100%; font-size: 12px; }
.calc-example td { padding: 3px 0; }
.calc-example td:first-child { color: var(--text-light); }
.calc-example td:last-child { text-align: right; font-weight: 700; color: var(--text); }
.calc-example tr.total td { border-top: 2px solid var(--amber); padding-top: 6px; font-weight: 800; color: var(--primary); }

/* Colorful material filter chips */
.origin-chip[href*="Paper"]:hover, .origin-chip[href*="Paper"].active { background: var(--amber); border-color: var(--amber); color: #fff; }
.origin-chip[href*="Plastic"]:hover, .origin-chip[href*="Plastic"].active { background: var(--sky); border-color: var(--sky); color: #fff; }
.origin-chip[href*="Textile"]:hover, .origin-chip[href*="Textile"].active { background: var(--coral); border-color: var(--coral); color: #fff; }

/* Enhanced top bar gradient */
.top-bar { background: linear-gradient(135deg, var(--primary-dark) 0%, #1a237e 50%, #4f46e5 100%); }

/* Colorful intel cells */
.intel-dash { border-color: transparent; background-image: linear-gradient(#fff, #fff), linear-gradient(135deg, var(--primary), var(--teal), var(--purple)); background-origin: border-box; background-clip: padding-box, border-box; }

/* Card hover colors per category */
.category-section[data-category="Workwear"] .product-card:hover { border-color: var(--coral); }
.category-section[data-category="Bags"] .product-card:hover { border-color: var(--teal); }
.category-section[data-category="Labels"] .product-card:hover { border-color: var(--purple); }
.category-section[data-category="Films"] .product-card:hover { border-color: var(--sky); }
.category-section[data-category="Packaging"] .product-card:hover { border-color: var(--amber); }

/* Colorful footer */
.footer {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #1a237e 40%, #4f46e5 100%);
}

/* Empty state */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-light); }
.empty-state-icon { font-size: 48px; margin-bottom: 16px; }
.empty-state h3 { margin-bottom: 8px; }
.empty-state-link { display: inline-block; margin-top: 16px; padding: 10px 24px; background: var(--primary); color: #fff; border-radius: 6px; text-decoration: none; font-weight: 600; }

/* RESPONSIVE */
@media (max-width: 1100px) {
    .product-grid { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
}
@media (max-width: 900px) {
    .header-inner { flex-direction: column; gap: 12px; }
    .header-right { width: 100%; }
    .search-box { flex: 1; }
    .search-box form { display: flex; }
    .search-input { width: 100%; }
    .product-grid { grid-template-columns: 1fr; }
    .card-top { flex-direction: column; }
    .card-image { width: 100%; height: 200px; }
    .container-ref { grid-template-columns: 1fr; }
    .main { padding: 16px; }
    .origin-filters { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 8px; }
    .top-bar { flex-direction: column; gap: 6px; text-align: center; padding: 6px 16px; }
    .workwear-hero { padding: 24px; }
    .hero-top { flex-direction: column; }
    .hero-text h2 { font-size: 24px; }
    .hero-gallery { grid-template-columns: repeat(2, 1fr); }
    .fab-process-grid { grid-template-columns: repeat(2, 1fr); }
    .calc-grid { grid-template-columns: 1fr; }
    .fabrication-header, .fab-content, .price-calc-header, .calc-grid { padding-left: 16px; padding-right: 16px; }
}
@media (max-width: 600px) {
    .nav { padding: 0 8px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .nav-link { padding: 10px 12px; font-size: 11px; white-space: nowrap; }
    .product-grid { grid-template-columns: 1fr; gap: 14px; }
    .card-info { padding: 10px 12px; }
    .card-name { font-size: 14px; }
    .pricing-section { padding: 10px 12px; }
    .card-actions { flex-wrap: wrap; padding: 10px 12px; }
    .qty-control { flex: 1; min-width: 100px; }
    .btn-add { flex: 2; }
    .btn-detail { flex: 1; text-align: center; }
    .container-link span:first-child { display: none; }
    .container-link::before { content: '\1F4E6'; }
    .header { padding: 12px 16px; }
    .logo-title { font-size: 18px; }
    .logo img { height: 36px; }
    .eu-compare { padding: 6px 8px; }
    .cost-details { padding: 8px; }
    .workwear-hero { padding: 16px; }
    .hero-text h2 { font-size: 20px; }
    .hero-gallery { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .hero-img-card { aspect-ratio: 1/1; }
    .fab-process-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .fab-arrow { display: none; }
    .calc-card-img { height: 120px; }
}
