/**
 * TonyHerb - Main Stylesheet
 * Theme: Shopee Orange
 */

:root {
    --primary: #ee4d2d;
    --primary-dark: #d73211;
    --primary-light: #ff6533;
    --primary-bg: rgba(238, 77, 45, 0.08);
    --secondary: #222222;
    --text-primary: #222222;
    --text-secondary: #757575;
    --text-muted: #bdbdbd;
    --bg-primary: #f5f5f5;
    --bg-white: #ffffff;
    --bg-gradient: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%);
    --border-color: #e8e8e8;
    --border-light: #f0f0f0;
    --success: #00bfa5;
    --warning: #ff9800;
    --danger: #d32f2f;
    --shadow-sm: 0 1px 4px rgba(0,0,0,0.08);
    --shadow-md: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-lg: 0 4px 16px rgba(0,0,0,0.12);
    --radius-sm: 2px;
    --radius-md: 4px;
    --radius-lg: 8px;
    --transition: all 0.2s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: 'Prompt', -apple-system, BlinkMacSystemFont, sans-serif; background: var(--bg-primary); color: var(--text-primary); line-height: 1.6; min-height: 100vh; }
a { text-decoration: none; color: inherit; transition: var(--transition); }
a:hover { color: var(--primary); }
img { max-width: 100%; height: auto; }

/* Header */
.header { background: var(--bg-gradient); position: sticky; top: 0; z-index: 100; box-shadow: var(--shadow-md); }
.header-top { font-size: 12px; padding: 5px 0; border-bottom: 1px solid rgba(255,255,255,0.1); }
.header-top-inner { max-width: 1200px; margin: 0 auto; padding: 0 15px; display: flex; justify-content: space-between; color: rgba(255,255,255,0.8); }
.header-top a { color: rgba(255,255,255,0.8); }
.header-top a:hover { color: white; }
.header-main { padding: 12px 0; }
.header-inner { max-width: 1200px; margin: 0 auto; padding: 0 15px; display: flex; align-items: center; gap: 30px; }
.logo { color: white; font-size: 28px; font-weight: 700; display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.logo:hover { color: white; }
.search-container { flex: 1; max-width: 700px; }
.search-box { display: flex; background: white; border-radius: var(--radius-sm); overflow: hidden; }
.search-box input { flex: 1; padding: 12px 15px; border: none; outline: none; font-family: inherit; font-size: 14px; }
.search-box button { padding: 12px 25px; background: var(--primary-light); border: none; color: white; cursor: pointer; font-size: 18px; transition: var(--transition); }
.search-box button:hover { background: var(--primary-dark); }
.search-suggestions { display: flex; gap: 15px; margin-top: 8px; font-size: 12px; }
.search-suggestions a { color: rgba(255,255,255,0.7); }
.search-suggestions a:hover { color: white; }
.header-actions { display: flex; align-items: center; gap: 20px; }
.cart-btn { color: white; font-size: 28px; position: relative; display: flex; align-items: center; gap: 5px; }
.cart-btn:hover { color: white; transform: scale(1.1); }
.cart-count { position: absolute; top: -8px; right: -8px; background: white; color: var(--primary); font-size: 12px; font-weight: 600; min-width: 20px; height: 20px; border-radius: 10px; display: flex; align-items: center; justify-content: center; }

/* Categories */
.categories-section { background: white; padding: 20px 0; margin-bottom: 15px; }
.section-header { max-width: 1200px; margin: 0 auto; padding: 0 15px 15px; display: flex; justify-content: space-between; align-items: center; border-bottom: 4px solid var(--primary); }
.section-title { font-size: 18px; font-weight: 500; color: var(--text-secondary); }
.section-link { color: var(--primary); font-size: 14px; }
.categories-grid { max-width: 1200px; margin: 0 auto; padding: 15px; display: grid; grid-template-columns: repeat(10, 1fr); gap: 10px; }
.category-card { display: flex; flex-direction: column; align-items: center; padding: 15px 10px; border-radius: var(--radius-md); transition: var(--transition); text-align: center; }
.category-card:hover { background: var(--primary-bg); color: var(--primary); }
.category-card .icon { font-size: 32px; margin-bottom: 8px; }
.category-card .name { font-size: 13px; line-height: 1.3; }

/* Flash Sale */
.flash-sale-section { background: white; margin-bottom: 15px; }
.flash-sale-header { max-width: 1200px; margin: 0 auto; padding: 15px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border-light); }
.flash-sale-title { display: flex; align-items: center; gap: 15px; }
.flash-sale-title h2 { color: var(--primary); font-size: 20px; font-weight: 600; }
.countdown { display: flex; gap: 5px; }
.countdown-item { background: var(--secondary); color: white; padding: 4px 8px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 600; min-width: 30px; text-align: center; }
.flash-sale-content { max-width: 1200px; margin: 0 auto; padding: 15px; }

/* Products Grid */
.products-section { max-width: 1200px; margin: 0 auto 20px; padding: 0 15px; }
.products-header { background: white; padding: 15px 20px; border-radius: var(--radius-md) var(--radius-md) 0 0; border-bottom: 4px solid var(--primary); display: flex; justify-content: space-between; align-items: center; }
.products-header h2 { font-size: 18px; font-weight: 500; color: var(--text-secondary); }
.products-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; padding: 10px; background: var(--bg-primary); }
.product-card { background: white; border-radius: var(--radius-md); overflow: hidden; transition: var(--transition); position: relative; }
.product-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.product-card .image { aspect-ratio: 1; overflow: hidden; position: relative; }
.product-card .image img { width: 100%; height: 100%; object-fit: cover; transition: var(--transition); }
.product-card:hover .image img { transform: scale(1.05); }
.product-card .badges { position: absolute; top: 8px; left: 8px; display: flex; flex-direction: column; gap: 4px; }
.badge { padding: 3px 8px; border-radius: var(--radius-sm); font-size: 11px; font-weight: 500; }
.badge-sale { background: var(--primary); color: white; }
.badge-mall { background: var(--primary); color: white; }
.badge-freeship { background: var(--success); color: white; }
.product-card .info { padding: 10px; }
.product-card .name { font-size: 13px; font-weight: 400; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 40px; margin-bottom: 10px; line-height: 1.4; }
.product-card .price { display: flex; align-items: baseline; gap: 8px; }
.product-card .price .current { color: var(--primary); font-size: 16px; font-weight: 500; }
.product-card .price .original { color: var(--text-muted); font-size: 12px; text-decoration: line-through; }
.product-card .meta { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; font-size: 11px; color: var(--text-secondary); }
.product-card .rating { color: var(--primary); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 24px; border-radius: var(--radius-md); font-family: inherit; font-size: 14px; font-weight: 500; cursor: pointer; transition: var(--transition); border: none; }
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); color: white; }
.btn-outline { background: white; color: var(--primary); border: 1px solid var(--primary); }
.btn-outline:hover { background: var(--primary-bg); }
.btn-accent { background: var(--success); color: white; }
.btn-lg { padding: 14px 32px; font-size: 16px; }
.btn-block { width: 100%; }

/* Footer */
.footer { background: white; border-top: 4px solid var(--primary); margin-top: 40px; }
.footer-main { max-width: 1200px; margin: 0 auto; padding: 40px 15px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; }
.footer-section h4 { font-size: 14px; font-weight: 600; color: var(--text-primary); margin-bottom: 15px; text-transform: uppercase; }
.footer-section ul { list-style: none; }
.footer-section ul li { margin-bottom: 10px; }
.footer-section ul a { color: var(--text-secondary); font-size: 13px; }
.footer-section ul a:hover { color: var(--primary); }
.footer-bottom { background: var(--bg-primary); padding: 20px 15px; text-align: center; font-size: 13px; color: var(--text-secondary); }

/* Utilities */
.container { max-width: 1200px; margin: 0 auto; padding: 0 15px; }
.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }

/* Alert & Notifications */
.alert { padding: 12px 16px; border-radius: var(--radius-md); margin-bottom: 15px; font-size: 14px; }
.alert-success { background: #e8f5e9; color: #2e7d32; border-left: 4px solid #2e7d32; }
.alert-warning { background: #fff3e0; color: #e65100; border-left: 4px solid #e65100; }
.alert-error { background: #ffebee; color: #c62828; border-left: 4px solid #c62828; }

/* Loading */
.loading { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 60px 20px; color: var(--text-secondary); }
.spinner { width: 40px; height: 40px; border: 3px solid var(--border-color); border-top-color: var(--primary); border-radius: 50%; animation: spin 1s linear infinite; margin-bottom: 15px; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-secondary); }
.empty-state .icon { font-size: 64px; margin-bottom: 15px; }
.empty-state h3 { font-size: 18px; margin-bottom: 10px; color: var(--text-primary); }

/* Responsive */
@media (max-width: 1024px) {
    .categories-grid { grid-template-columns: repeat(5, 1fr); }
    .products-grid { grid-template-columns: repeat(4, 1fr); }
    .footer-main { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .header-inner { flex-wrap: wrap; }
    .search-container { order: 3; width: 100%; max-width: none; margin-top: 10px; }
    .search-suggestions { display: none; }
    .categories-grid { grid-template-columns: repeat(4, 1fr); gap: 5px; }
    .category-card { padding: 10px 5px; }
    .category-card .icon { font-size: 24px; }
    .category-card .name { font-size: 11px; }
    .products-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; padding: 8px; }
    .footer-main { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
    .logo { font-size: 22px; }
    .cart-btn { font-size: 24px; }
    .product-card .info { padding: 8px; }
    .product-card .name { font-size: 12px; min-height: 36px; }
    .product-card .price .current { font-size: 14px; }
}

@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.fade-in { animation: fadeIn 0.3s ease; }
