/* =========================================
   1. CONFIG & VARIABLES
   ========================================= */
:root {
    --primary: #ee4d2d;
    --primary-dark: #d73211;
    --secondary: #f53d2d;
    --accent-gold: #ffd700;
    --accent-black: #1a1a1a;
    
    --bg-body: #f5f5f5;
    --bg-white: #ffffff;
    --text-main: #222222;
    --text-sub: #757575;
    --border-color: #e8e8e8;
    --star-color: #ffce3d;

    --container-width: 1200px;
    --radius-sm: 2px;
    --radius-md: 4px;
    --shadow-sm: 0 1px 1px 0 rgba(0,0,0,.05);
    --shadow-md: 0 1px 6px 0 rgba(0,0,0,.1);
}

/* =========================================
   2. RESET & BASE STYLES
   ========================================= */
* { margin: 0; padding: 0; box-sizing: border-box; outline: none; }
body {
    font-family: 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; transition: color 0.2s; }
ul { list-style: none; }
button { border: none; outline: none; cursor: pointer; background: none; font-family: inherit; }

.container { max-width: var(--container-width); margin: 0 auto; padding: 0 16px; }

/* =========================================
   3. HEADER COMPONENT
   ========================================= */
.header {
    background: linear-gradient(-180deg, #1a1a1a, #000000);
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-md);
}

.header__top { font-size: 12px; padding: 8px 0; border-bottom: 1px solid #333; }
.header__container { display: flex; justify-content: space-between; }
.header__links, .header__user { display: flex; align-items: center; gap: 15px; }
.divider { width: 1px; height: 12px; background: #555; }
.header__top a:hover { color: var(--accent-gold); }

.header__main { padding: 15px 0; }
.header__main-wrapper { display: flex; align-items: center; gap: 30px; position: relative; }
.header__logo img { height: 45px; object-fit: contain; }

.header__search { flex: 1; }
.header__search-box {
    background: #fff; border-radius: 4px; display: flex; padding: 0; height: 40px; overflow: hidden;
}
.header__search-box input { flex: 1; padding: 0 15px; border: none; font-size: 14px; }
.btn-search {
    background: var(--primary); color: #fff; width: 60px; border-radius: 0; font-size: 18px; transition: background 0.2s;
}
.btn-search:hover { background: var(--primary-dark); }

.header__keywords { font-size: 12px; margin-top: 8px; display: flex; gap: 15px; color: #ccc; }
.header__keywords a:hover { color: var(--accent-gold); text-decoration: underline; }
.header__cart { font-size: 24px; margin-left: 10px; position: relative; cursor: pointer; }

/* Default Hidden Desktop */
.header__hamburger, .mobile-nav { display: none; }

/* =========================================
   4. MAIN LAYOUT & PRODUCT
   ========================================= */
.main-content { padding: 20px 0 10px; }

.breadcrumb { font-size: 13px; color: var(--text-sub); margin-bottom: 20px; display: flex; align-items: center; gap: 8px; }
.breadcrumb i { font-size: 10px; }
.breadcrumb__current { color: var(--text-main); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.product-wrapper { background: var(--bg-white); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); display: flex; padding: 20px; gap: 30px; margin-bottom: 20px; }

/* Gallery */
.product-gallery { flex: 0 0 450px; width: 450px; }
.product-gallery__main img { width: 100%; cursor: pointer; border-radius: var(--radius-sm); }
.product-gallery__thumbs { display: flex; gap: 10px; margin-top: 10px; overflow-x: auto; }
.thumb-item { width: 80px; height: 80px; border: 2px solid transparent; cursor: pointer; }
.thumb-item:hover, .thumb-item.active { border-color: var(--primary); }
.thumb-item img { width: 100%; height: 100%; object-fit: cover; }

.social-share { display: flex; align-items: center; gap: 10px; margin-top: 20px; justify-content: center; }
.social-btn { font-size: 20px; color: var(--text-main); width: 30px; height: 30px; border-radius: 50%; }
.social-btn.fb { color: #3b5998; } .social-btn.wa { color: #25D366; } .social-btn.tw { color: #1DA1F2; }

/* Detail */
.product-detail { flex: 1; }
.product-title { font-size: 20px; font-weight: 500; line-height: 1.4; margin-bottom: 15px; display: block; }
.badge-mall { background: var(--primary); color: #fff; font-size: 12px; padding: 2px 6px; border-radius: 2px; vertical-align: middle; margin-right: 6px; }
.product-stats { display: flex; font-size: 14px; color: var(--text-sub); margin-bottom: 15px; }
.stat-item { padding: 0 15px; display: flex; align-items: center; gap: 5px; }
.stat-item:first-child { padding-left: 0; }
.border-right { border-right: 1px solid #ddd; }
.text-primary { color: var(--primary); border-bottom: 1px solid var(--primary); font-weight: 500; }
.stars { color: var(--star-color); margin-left: 5px; font-size: 11px; }

.price-banner { background: #fafafa; padding: 15px 20px; margin-bottom: 25px; }
.price-banner__old { text-decoration: line-through; color: #929292; font-size: 14px; }
.price-banner__current { font-size: 32px; color: var(--primary); font-weight: 500; display: flex; align-items: center; gap: 15px; }
.price-tag { font-size: 12px; background: var(--primary); color: #fff; padding: 2px 6px; border-radius: 2px; font-weight: bold; }
.price-banner__guarantee { color: #26aa99; font-size: 12px; margin-top: 5px; }

/* Options */
.option-row { display: flex; margin-bottom: 24px; align-items: center; }
.option-row label { width: 110px; color: var(--text-sub); font-size: 14px; }
.option-content { flex: 1; display: flex; gap: 10px; }
.voucher-ticket { background: rgba(238, 77, 45, 0.1); color: var(--primary); padding: 4px 12px; font-size: 12px; border: 1px dashed var(--primary); cursor: pointer; }

.btn-option { border: 1px solid rgba(0,0,0,.09); padding: 8px 24px; border-radius: 2px; background: #fff; color: rgba(0,0,0,.8); transition: all 0.2s; }
.btn-option:hover { border-color: var(--primary); color: var(--primary); }
.btn-option.selected { border-color: var(--primary); color: var(--primary); position: relative; }
.btn-option.selected::after { content: '✓'; position: absolute; bottom: 0; right: 0; background: var(--primary); color: #fff; font-size: 8px; padding: 0 4px; }

.qty-wrapper { display: flex; border: 1px solid #e8e8e8; }
.qty-wrapper button { width: 32px; height: 32px; font-size: 16px; background: #fff; border-right: 1px solid #e8e8e8; }
.qty-wrapper button:last-child { border-right: none; border-left: 1px solid #e8e8e8; }
.qty-wrapper input { width: 50px; text-align: center; border: none; font-size: 14px; color: var(--text-main); }
.stock-info { margin-left: 15px; color: var(--text-sub); font-size: 12px; }

/* Buttons */
.action-group { display: flex; gap: 15px; margin-top: 25px; margin-bottom: 25px; width: 100%; }
.btn-lg { height: 48px; min-width: 180px; font-size: 16px; text-transform: uppercase; border-radius: 2px; display: flex; align-items: center; justify-content: center; font-weight: 500; flex: 1; }
.btn-secondary { background: rgba(238, 77, 45, 0.1); color: var(--primary); border: 1px solid var(--primary); }
.btn-secondary:hover { background: rgba(238, 77, 45, 0.05); }
.btn-primary { background: var(--primary); color: #fff; border: 1px solid var(--primary); }
.btn-primary:hover { background: #f05d40; }

.shopee-protect { border-top: 1px solid #f0f0f0; padding-top: 20px; margin-top: 30px; display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--text-sub); }

/* Shop Card */
.shop-card { background: #fff; padding: 25px; border-radius: var(--radius-md); box-shadow: var(--shadow-sm); margin-bottom: 20px; display: flex; align-items: center; }
.shop-card__profile { display: flex; gap: 15px; border-right: 1px solid #eee; padding-right: 40px; min-width: 350px; }
.shop-avatar { width: 70px; height: 70px; border-radius: 50%; border: 1px solid #eee; }
.shop-details h3 { font-size: 16px; font-weight: 500; margin-bottom: 4px; }
.status-online { color: #26aa99; font-size: 12px; display: block; margin-bottom: 10px; }
.shop-actions { display: flex; gap: 10px; }
.btn-chat, .btn-visit { padding: 6px 12px; font-size: 12px; border: 1px solid rgba(0,0,0,.09); color: #555; border-radius: 2px; }
.btn-chat { background: rgba(238, 77, 45, 0.1); border-color: var(--primary); color: var(--primary); }
.shop-card__stats { display: flex; flex: 1; justify-content: space-around; padding-left: 20px; }
.shop-stat { display: flex; flex-direction: column; align-items: center; gap: 5px; font-size: 13px; }
.shop-stat label { color: var(--text-sub); }
.shop-stat span { color: var(--primary); }

/* Content Block */
.content-block { background: #fff; padding: 15px; border-radius: var(--radius-md); box-shadow: var(--shadow-sm); margin-bottom: 15px; }
.content-block__header { background: #fafafa; padding: 10px 12px; font-size: 14px; font-weight: 700; color: #222; margin: -12px -12px 10px; border-bottom: 1px solid #eee; }
.mt-separator { margin-top: 5px; margin-bottom: 10px; border-top: 1px solid #eee; }
.spec-table { display: flex; flex-direction: column; gap: 0; }
.spec-row { display: flex; padding: 5px 0; font-size: 13px; border-bottom: 1px solid #f9f9f9; align-items: flex-start; }
.spec-row:last-child { border-bottom: none; }
.spec-row label { width: 100px; color: var(--text-sub); flex-shrink: 0; font-weight: 400; }
.spec-val { color: var(--text-main); line-height: 1.3; font-weight: 400; }

.desc-text { font-size: 14px; color: #333; line-height: 1.6; text-align: justify; }
.desc-text p { margin-top: 0 !important; margin-bottom: 15px !important; }
.desc-text p:last-child { margin-bottom: 0 !important; }

.highlight-box { display: block; background: #fffbf0; padding: 8px 12px; border-radius: 4px; border: 1px solid #ffe082; font-size: 14px; font-weight: 500; margin-top: 15px !important; margin-bottom: 18px !important; }
.neat-list { list-style: none; padding: 0; margin: 0 !important; }
.neat-list li { position: relative; padding-left: 15px; margin-bottom: 10px !important; line-height: 1.5; color: #444; font-size: 14px; }
.neat-list li::before { content: "•"; color: var(--primary); font-weight: bold; position: absolute; left: 0; top: 0; font-size: 16px; line-height: 1.4; }

/* Toast */
.toast { visibility: hidden; min-width: 250px; background-color: rgba(0,0,0,0.7); color: #fff; text-align: center; border-radius: 4px; padding: 16px; position: fixed; z-index: 999; left: 50%; bottom: 30px; transform: translateX(-50%); font-size: 14px; display: flex; align-items: center; justify-content: center; gap: 10px; opacity: 0; transition: opacity 0.3s; }
.toast.show { visibility: visible; opacity: 1; }

/* Footer */
.site-footer { background-color: #fbfbfb; border-top: 4px solid var(--primary); color: #333; font-size: 13px; padding-top: 40px; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1.2fr 1.5fr 1.5fr; gap: 20px; padding-bottom: 40px; }
.footer-heading { font-size: 12px; font-weight: 700; text-transform: uppercase; color: var(--text-main); margin-bottom: 15px; }
.footer-links li { margin-bottom: 6px; }
.footer-links a { color: rgba(0,0,0,0.65); transition: color 0.2s; }
.footer-links a:hover { color: var(--primary); }
.payment-icons { display: flex; flex-wrap: wrap; gap: 6px; }
.pay-icon img { width: 50px; border: 1px solid #e0e0e0; border-radius: 2px; background: #fff; padding: 2px; }
.mt-3 { margin-top: 20px; }
.social-links { display: flex; gap: 10px; margin-bottom: 20px; }
.social-icon { width: 28px; height: 28px; background: #555; color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; transition: background 0.3s; }
.social-icon:hover { background: var(--primary); }
.app-download { display: flex; gap: 10px; align-items: center; }
.qr-code img { width: 70px; height: 70px; border: 1px solid #e0e0e0; padding: 4px; background: #fff; }
.app-stores { display: flex; flex-direction: column; gap: 6px; }
.store-btn img { height: 22px; width: auto; }
.footer-bottom { background-color: #f5f5f5; border-top: 1px solid #e8e8e8; padding: 20px 0; }
.footer-bottom-wrapper { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: rgba(0,0,0,0.54); }
.region-selector { display: flex; align-items: center; gap: 5px; }
.region-selector a:hover { color: var(--primary); }
.sep { margin: 0 5px; color: #ccc; }

/* =========================================
   7. MOBILE RESPONSIVE (HAMBURGER & LAYOUT)
   ========================================= */
@media (max-width: 768px) {
    .header__top, .header__keywords, .header__user, .breadcrumb { display: none; }

    /* Header */
    .header__main { padding: 10px 0; position: relative; }
    .header__main-wrapper { display: flex; align-items: center; justify-content: space-between; padding: 0 10px; gap: 8px; flex-wrap: nowrap; }
    .header__logo img { height: 28px; max-width: 80px; object-fit: contain; }
    
    /* Search & Menu */
    .header__search { flex: 1; min-width: 0; }
    .header__search-box { height: 32px; width: 100%; display: flex; }
    .header__search-box input { font-size: 12px; padding: 0 8px; width: 100%; min-width: 0; }
    .btn-search { width: 32px; font-size: 14px; padding: 0; flex-shrink: 0; }
    .header__cart { font-size: 20px; margin-left: 0; flex-shrink: 0; }
    .header__hamburger { display: flex; align-items: center; justify-content: center; color: #fff; font-size: 22px; cursor: pointer; flex-shrink: 0; width: 30px; height: 30px; }

    /* Menu Drawer */
    .mobile-nav { display: none; background: #fff; position: absolute; top: 100%; left: 0; width: 100%; box-shadow: 0 10px 20px rgba(0,0,0,0.2); border-top: 3px solid var(--primary); z-index: 9999; }
    .mobile-nav.active { display: block; }
    .mobile-nav__content { display: flex; flex-direction: column; }
    .mobile-nav a { padding: 15px 20px; color: #333; font-weight: 500; border-bottom: 1px solid #f0f0f0; font-size: 14px; display: block; }
    .mobile-nav__auth { display: flex; gap: 10px; padding: 15px 20px; background: #f9f9f9; }
    .btn-login, .btn-register { flex: 1; text-align: center; padding: 10px; border-radius: 4px; font-weight: bold; border: none; }
    .btn-login { border: 1px solid #ddd; color: #555; background: #fff; }
    .btn-register { background: var(--primary); color: #fff; }

    /* Content Mobile */
    .product-wrapper { flex-direction: column; gap: 0; padding: 0; background: transparent; box-shadow: none; }
    .product-gallery { width: 100%; }
    .product-detail { background: #fff; padding: 15px; border-radius: 0; margin-top: 10px; padding-bottom: 20px; }
    .option-row { flex-direction: column; align-items: flex-start; gap: 10px; }
    .shop-card { flex-direction: column; align-items: flex-start; gap: 20px; margin-top: 10px; border-radius: 0; }
    .shop-card__profile { border: none; padding: 0; width: 100%; }
    .shop-card__stats { width: 100%; padding: 0; justify-content: space-between; }
    
    /* Footer Mobile */
    .site-footer { padding-bottom: 0 !important; margin-bottom: 0; }
    .footer-grid { grid-template-columns: 1fr; gap: 25px; }
    .footer-bottom-wrapper { flex-direction: column; gap: 10px; text-align: center; }
    .region-selector { flex-wrap: wrap; justify-content: center; }
    
    /* Action Buttons Static */
    .action-group { position: static; box-shadow: none; margin: 20px 0; padding: 0; width: 100%; display: flex; gap: 10px; }
    .btn-lg { min-width: 0 !important; flex: 1; height: 45px; font-size: 13px; border-radius: 4px; padding: 0 5px; white-space: nowrap; }
    
    .main-content { padding-bottom: 20px; }
}

/* Tablet */
@media (max-width: 992px) {
    .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 30px; }
}