/* ==========================================================================
   CSS SHOP FINAL (ĐÃ THÊM NÚT CART & SAO)
   ========================================================================== */

:root {
    --primary-color: #0B74E5; 
    --price-color: #ee4d2d;   
    --bg-gray: #f5f5fa;       
}

/* 1. Reset Cơ bản */
body, #page, #content, .site-content, .wrapper { background-color: var(--bg-gray) !important; }
.container, .shopee-container-width { max-width: 1200px !important; width: 100% !important; margin: 0 auto !important; padding: 0 15px; }
#secondary, .widget-area, .sidebar-main, .page-header, .page-title { display: none !important; }

/* 2. Layout & Sidebar */
.shopee-page-container { background-color: var(--bg-gray) !important; font-family: 'Be Vietnam Pro', Arial, sans-serif; padding-bottom: 50px; }
.shopee-layout { display: flex; padding-top: 20px; gap: 20px; align-items: flex-start; }

.shopee-sidebar { width: 190px; flex-shrink: 0; }
.shopee-sidebar .filter-title { font-weight: 700; margin-bottom: 15px; text-transform: uppercase; font-size: 1rem; border-bottom: 2px solid var(--primary-color) !important; padding-bottom: 10px; color: var(--primary-color) !important; }
.shopee-sidebar ul li { padding: 8px 0; }
.shopee-sidebar ul li a { text-decoration: none; color: #333 !important; font-size: 14px; display: block; transition: 0.2s; }
.shopee-sidebar ul li a:hover, .shopee-sidebar ul li a.active-cat { color: var(--primary-color) !important; font-weight: 700 !important; transform: translateX(5px); }

/* 3. Sort Bar */
.shopee-sort-bar { background: #ededed; padding: 13px 20px; display: flex; align-items: center; border-radius: 4px; margin-bottom: 15px; }
.shopee-sort-bar .sort-label { margin-right: 15px; color: #555; }
.shopee-sort-bar .sort-btn { background: #fff; border: 0; height: 34px; padding: 0 15px; border-radius: 4px; margin-right: 10px; display: flex; align-items: center; justify-content: center; text-decoration: none; color: #333; font-size: 14px; transition: 0.2s; }
.shopee-sort-bar .sort-btn.active, .shopee-sort-bar .sort-btn:hover { background: var(--primary-color) !important; color: #fff !important; box-shadow: 0 2px 5px rgba(11, 116, 229, 0.3); }

/* 4. Product Grid */
.shopee-product-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }

/* 5. Product Card Style (Mới) */
.shopee-product-card {
    background: #fff; border: 1px solid transparent; box-shadow: 0 1px 2px rgba(0,0,0,.1);
    border-radius: 6px; transition: 0.2s; overflow: hidden; display: flex; flex-direction: column;
}
.shopee-product-card:hover { transform: translateY(-2px); border-color: var(--primary-color) !important; box-shadow: 0 4px 15px rgba(0,0,0,.1); z-index: 2; }
.shopee-product-card a { text-decoration: none; color: inherit; }

.img-wrapper { position: relative; width: 100%; padding-top: 100%; }
.img-wrapper img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; }

.badge-sale-shopee { position: absolute; top: 0; right: 0; background-color: #ffd839; width: 38px; height: 35px; text-align: center; font-size: 11px; color: #ee4d2d; font-weight: 700; padding-top: 4px; line-height: 1.1; z-index: 3; border-radius: 0 0 0 6px; }

/* Info Wrapper */
.info-wrapper { padding: 10px; display: flex; flex-direction: column; justify-content: space-between; height: 100%; }

/* Tên Sản Phẩm (Fix lỗi mất chữ) */
.shopee-product-card .name {
    font-size: 13px; line-height: 1.4; height: 38px; /* Đủ cho 2 dòng */
    overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
    margin-bottom: 5px; color: #333; font-weight: 500;
}
.shopee-product-card .name a:hover { color: var(--primary-color); }

/* Giá */
.price-row { color: var(--price-color) !important; display: flex; align-items: baseline; font-weight: 700; font-size: 16px; }
.price-row .currency { font-size: 11px; text-decoration: underline; margin-right: 2px; }

/* Nút Thêm Vào Giỏ (Hover Effect) */
.btn-mini-add:hover { background: var(--primary-color) !important; color: #fff !important; }

/* 6. Pagination */
.shopee-pagination { margin-top: 40px; text-align: center; display: flex; justify-content: center; gap: 8px; }
.shopee-pagination .page-numbers { display: flex; align-items: center; justify-content: center; min-width: 36px; height: 36px; border: 1px solid #ddd; background: #fff; color: #555; font-size: 14px; text-decoration: none; border-radius: 4px; transition: 0.2s; }
.shopee-pagination .page-numbers.current, .shopee-pagination .page-numbers:hover { background: var(--primary-color) !important; color: #fff !important; border-color: var(--primary-color) !important; }

/* Responsive */
@media (max-width: 1200px) { .shopee-product-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 992px) { .shopee-product-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px) { .shopee-layout { flex-direction: column; } .shopee-sidebar { display: none; } .shopee-product-grid { grid-template-columns: repeat(2, 1fr); } }