/* --- CSS GIAO DIỆN TRANG CHỦ --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800&display=swap');

html { scroll-behavior: smooth; }
body { font-family: 'Inter', sans-serif !important; background: #f4f7f6; user-select: none; }

.fade-in-up { animation: fadeInUp 0.5s ease-out forwards; opacity: 0; transform: translateY(20px); }
@keyframes fadeInUp { to { opacity: 1; transform: translateY(0); } }

.modal { z-index: 10051 !important; }
.modal-backdrop { z-index: 10050 !important; }
body.modal-open { overflow: auto !important; padding-right: 0 !important; }
.mobile-menu-overlay { pointer-events: none; }
.mobile-menu-overlay.show { pointer-events: auto; }

.main-container { padding: 145px 0 20px 0 !important; margin-left: 0 !important; width: 100% !important; transition: none !important; }
.container-divine { max-width: 1400px !important; margin: 0 auto !important; padding: 0 20px !important; }

/* GRID & BANNER */
.yt-slider-row { display: grid !important; grid-template-columns: repeat(4, 1fr) !important; gap: 20px !important; padding: 20px 0 !important; }
.yt-item-fixed { width: 100% !important; flex: none !important; }
.section-spacing { max-height: 420px !important; overflow: hidden; border-radius: 12px !important; margin-bottom: 25px; box-shadow: 0 5px 15px rgba(0,0,0,0.1); }
.section-spacing img { width: 100%; height: auto; max-height: 420px !important; object-fit: cover; }

/* HEADER STYLE */
.header-red-wide { background: #fff; padding: 18px 25px !important; border-bottom: 3px solid #ff0000; display: flex; justify-content: space-between; align-items: center; border-radius: 8px 8px 0 0; }
.title-red-yt { color: #ff0000 !important; font-weight: 800; font-size: 20px !important; text-transform: uppercase; margin: 0; }
.header-pink-wide { background: #fff; padding: 18px 20px !important; border-bottom: 3px solid #db2777; margin-top: 0; border-radius: 8px 8px 0 0; display: flex; justify-content: space-between; align-items: center; }
.title-pink-yt { color: #db2777 !important; font-weight: 800; font-size: 20px !important; margin: 0; text-transform: uppercase; }

/* MINI CARD */
.yt-mini-card { background: #fff; border-radius: 12px !important; overflow: hidden; transition: 0.3s; border: 1px solid #eee; box-shadow: 0 2px 5px rgba(0,0,0,0.05); height: 100%; opacity: 1 !important; pointer-events: auto !important; }
.yt-mini-card:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.1); border-color: #db2777; }
.yt-mini-thumb { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.yt-mini-title { padding: 10px 10px 14px 10px; font-size: 14px !important; font-weight: 700 !important; color: #be185d !important; text-align: center; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 46px; }
.btn-nav-products { background: #ff0000; color: #fff; border-radius: 5px !important; width: 35px; height: 35px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; border: none; font-size: 16px; }

/* --- CARD SẢN PHẨM --- */
.product-card-wrap { position: relative; background: #fff; border: 1px solid #f0f0f0; border-radius: 12px; overflow: hidden; transition: all 0.3s ease; height: 100%; padding-bottom: 15px; display: flex; flex-direction: column; box-shadow: 0 5px 15px rgba(0,0,0,0.03); }
.product-card-wrap:hover { box-shadow: 0 15px 30px rgba(219, 39, 119, 0.15); transform: translateY(-5px); border-color: #fce7f3; }
.p-thumb-box { position: relative; overflow: hidden; border-bottom: 1px solid #f9f9f9; display: block; }
.p-thumb { width: 100%; aspect-ratio: 16/9; object-fit: cover; transition: 0.5s; }
.product-card-wrap:hover .p-thumb { transform: scale(1.05); }
.p-body { padding: 15px; flex: 1; display: flex; flex-direction: column; }
.p-title { font-weight: 700; font-size: 15px; color: #333; margin-bottom: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; height: 42px; line-height: 1.4; transition: 0.2s; }
.product-card-wrap:hover .p-title { color: #db2777; }
.p-price { color: #db2777; font-weight: 800; font-size: 18px; display: block; margin-bottom: 10px; }
.p-meta-info { display: flex; justify-content: space-between; align-items: center; font-size: 11px; margin-bottom: 15px; background: #f8f9fa; padding: 6px 10px; border-radius: 6px; border: 1px solid #eee; }
.code-tag { color: #666; font-weight: 600; text-transform: uppercase; }
.stock-tag { color: #10b981; font-weight: 700; display: flex; align-items: center; gap: 3px; }
.stock-tag.red { color: #ef4444; }
.action-group { display: flex; gap: 10px; margin-top: auto; align-items: stretch; }
.btn-buy-now { flex: 1; background: linear-gradient(135deg, #db2777, #be185d); color: #fff; display: flex; align-items: center; justify-content: center; padding: 10px; border-radius: 8px; font-weight: 700; font-size: 14px; text-decoration: none; text-transform: uppercase; box-shadow: 0 4px 10px rgba(219, 39, 119, 0.3); transition: 0.3s; }
.btn-buy-now:hover { background: linear-gradient(135deg, #be185d, #9d174d); transform: translateY(-2px); box-shadow: 0 6px 15px rgba(219, 39, 119, 0.4); color: #fff; }
.btn-mini-cart { width: 45px; display: flex; align-items: center; justify-content: center; background: #fff; border: 2px solid #db2777; color: #db2777; border-radius: 8px; cursor: pointer; transition: 0.3s; font-size: 18px; }
.btn-mini-cart:hover { background: #db2777; color: #fff; transform: rotate(15deg); }

/* BADGE */
.sticker-badge { position: absolute; top: 10px; right: 10px; z-index: 5; color: #fff; font-size: 10px; font-weight: 800; padding: 5px 10px; border-radius: 20px; box-shadow: 0 4px 10px rgba(0,0,0,0.15); text-transform: uppercase; }
.badge-flash-sale { background: linear-gradient(135deg, #ff0000, #ff5e62); animation: pulse-red 1.5s infinite; }
.badge-sale { background: linear-gradient(135deg, #f59e0b, #d97706); }
.badge-new { background: linear-gradient(135deg, #10b981, #059669); }
.badge-soldout { background: #374151; color: #e5e7eb; }
@keyframes pulse-red { 0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 0, 0, 0.7); } 70% { transform: scale(1.05); box-shadow: 0 0 0 10px rgba(255, 0, 0, 0); } 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 0, 0, 0); } }

/* CSS PHÂN TRANG */
.pagination-container { display: flex; justify-content: center; margin-top: 30px; gap: 5px; }
.page-link-custom { display: inline-flex; width: 40px; height: 40px; border-radius: 8px; background: #fff; border: 1px solid #ddd; color: #333; font-weight: 700; align-items: center; justify-content: center; text-decoration: none; transition: 0.3s; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }
.page-link-custom:hover, .page-link-custom.active { background: #db2777; color: #fff; border-color: #db2777; }

/* CSS KHỐI GIAO DỊCH DẠNG GRID */
.recent-transactions-wrapper { padding: 20px; background: #fafafa; border-radius: 8px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.transaction-card { display: flex; flex-direction: column; background: #fff; padding: 18px; border-radius: 12px; box-shadow: 0 4px 15px rgba(0,0,0,0.03); border: 1px solid #f0f0f0; transition: transform 0.3s, box-shadow 0.3s; height: 100%; }
.transaction-card:hover { transform: translateY(-5px); box-shadow: 0 10px 30px rgba(219, 39, 119, 0.12); border-color: #fce7f3; }
.t-header-top { display: flex; align-items: center; margin-bottom: 12px; border-bottom: 1px dashed #f0f0f0; padding-bottom: 12px; }
.t-avatar { width: 55px; height: 55px; border-radius: 50%; object-fit: cover; margin-right: 12px; border: 2px solid #fbcfe8; flex-shrink: 0; }
.t-user-info { flex-grow: 1; }
.t-name { font-weight: 800; color: #1e293b; font-size: 15px; display: flex; align-items: center; gap: 5px; }
.verified-tick { color: #0ea5e9; font-size: 13px; }
.t-time { font-size: 12px; color: #94a3b8; margin-top: 2px; }
.t-detail { font-size: 14px; color: #334155; margin-bottom: 12px; line-height: 1.5; }
.t-price { font-weight: 800; color: #db2777; }
.t-product-link { color: #db2777; font-weight: 700; text-decoration: none; transition: 0.2s; }
.t-product-link:hover { color: #be185d; text-decoration: underline; }
.t-review-box { background: #f8fafc; padding: 12px; border-radius: 8px; font-size: 13px; color: #475569; font-style: italic; line-height: 1.6; border-left: 3px solid #db2777; margin-top: auto; }
.t-rating { color: #f59e0b; font-size: 12px; margin-bottom: 5px; }

/* TỐI ƯU CHO MOBILE & TABLET */
@media (max-width: 1024px) { 
    .recent-transactions-wrapper { grid-template-columns: repeat(2, 1fr); } 
}
@media (max-width: 768px) { 
    .main-container { padding-top: 130px !important; } 
    .container-divine { padding: 0 8px !important; }
    .yt-slider-row { grid-template-columns: repeat(2, 1fr) !important; gap: 8px !important; padding: 10px 0 !important; } 
    .yt-mini-title { font-size: 11px !important; padding: 8px 5px 12px 5px; line-height: 1.5; min-height: 38px; }
    .header-pink-wide, .header-red-wide { padding: 12px 10px !important; }
    .title-pink-yt, .title-red-yt { font-size: 14px !important; }
    .btn-outline-danger { font-size: 10px; padding: 3px 8px; }
    .pd-20 { padding: 10px !important; }
    .col-6 { padding-right: 5px !important; padding-left: 5px !important; }
    .row { margin-right: -5px; margin-left: -5px; }
    .mb-30 { margin-bottom: 10px !important; }
    .product-card-wrap { padding-bottom: 10px; border-radius: 8px; }
    .p-body { padding: 8px; }
    .p-title { font-size: 13px; height: 36px; margin-bottom: 5px; line-height: 1.3; }
    .p-price { font-size: 15px; margin-bottom: 5px; }
    .p-meta-info { flex-direction: column; align-items: flex-start; gap: 3px; padding: 5px; margin-bottom: 8px; }
    .action-group { gap: 5px; }
    .btn-buy-now { font-size: 11px; padding: 6px 2px; border-radius: 6px; }
    .btn-mini-cart { width: 35px; height: 32px; border-radius: 6px; font-size: 14px; }
    .sticker-badge { font-size: 9px; padding: 3px 6px; top: 5px; right: 5px; }
    .vinh-float-contact { right: 5px; bottom: 80px; transform: scale(0.7); transform-origin: bottom right; }
    .recent-transactions-wrapper { grid-template-columns: 1fr; gap: 15px; padding: 15px; } 
}

/* CSS POPUP RITO KEY */
#modalRitokey .modal-content { background-color: #1e1e1e; color: #fff; border-radius: 20px; border: 1px solid #333; box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
#modalRitokey .close-top { position: absolute; top: 10px; right: 12px; color: #888; background:none; border:none; font-size:20px; cursor:pointer; }
#modalRitokey .modal-body { padding: 12px; text-align: center; max-height: 60vh; overflow-y: auto; }
#modalRitokey .modal-body img { max-width: 100%; height: auto; border-radius: 12px; }
.btn-rito-close { flex: 1; background: #333; color: #fff; border: none; padding: 8px 0; border-radius: 30px; }
.btn-rito-1h { flex: 1; background: #db2777; color: #fff; border: none; padding: 8px 0; border-radius: 30px; }
