/* ==========================================
   BẢNG MÀU PHỐI TONE HỒNG PASTEL DÙNG CHUNG
   ========================================== */
:root {
    --hong-chu-dao: #f472b6;       /* Hồng Pastel chính */
    --hong-nhat-nen: #fffbfe;      /* Nền trang (Trắng kem hồng nhẹ) */
    --hong-man-nhan: #9f1239;      /* Hồng Mận đậm */
    --hong-phan-the: #fce7f3;      /* Hồng Phấn nhẹ */
    --hong-sang-hover: #fff1f2;    /* Hồng Sáng khi rê chuột */
    
    --cam-dao-pastel: #ffedd5;     /* Cam Đào */
    --xanh-la-pastel: #dcfce7;     /* Xanh Bạc Hà */
    --xanh-duong-pastel: #e0f2fe;  /* Xanh Mây */
    
    --chu-chinh: #4a3e3d;          /* Màu chữ xám nâu dịu mắt */
    --chu-phu: #9d8189;            /* Màu chữ phụ */
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--hong-nhat-nen);
    color: var(--chu-chinh);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    font-family: inherit;
    cursor: pointer;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 15px;
}
/* ==========================================
   SLIDER BANNER - HIỂN THỊ NGUYÊN ẢNH 2560×1437
   KHÔNG CẮT, KHÔNG MÉO, KHÔNG GHI ĐÈ TỈ LỆ
   ========================================== */
.slider-container {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  margin: 0 auto 2rem auto;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);

  /* Khớp chiều rộng toàn trang */
  width: 100%;
  max-width: 1100px;
  padding: 0; /* ❌ Xóa padding nếu có, tránh thu hẹp khung */

  /* ✅ Tỉ lệ CHÍNH XÁC 2560 ÷ 1437 ≈ 16 / 9 → KHỚP HOÀN TOÀN ẢNH GỐC */
  aspect-ratio: 16 / 9;
  height: auto !important;
  /* ❌ XÓA HOÀN TOÀN max-height → KHÔNG BAO GIỜ CẮT ẢNH */
}

.slider-wrapper {
  display: flex;
  transition: transform 0.5s ease-in-out;
  width: 100%;
  height: 100%;
}

.slide {
  min-width: 100%;
  height: 100%;
}

.slide img {
  width: 100%;
  height: 100%;
  /* ✅ QUAN TRỌNG NHẤT: Hiển thị toàn bộ ảnh, KHÔNG CẮT BẤT KỲ PHẦN NÀO */
  object-fit: contain;
  object-position: center;
  background-color: var(--hong-nhat-nen); /* Nền khớp trang */
  display: block; /* Tránh khoảng trống lạ dưới ảnh */
}

/* NÚT & CHẤM - giữ nguyên */
.btn-prev, .btn-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.9);
  border: none;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
  z-index: 10;
  color: var(--hong-man-nhan);
  transition: 0.2s;
}
.btn-prev:hover, .btn-next:hover { background: #fff; color: var(--hong-chu-dao); }
.btn-prev { left: 1.5rem; }
.btn-next { right: 1.5rem; }

.dots {
  position: absolute;
  bottom: 0.8rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
}
.dot {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: 0.2s;
}
.dot.active { background: var(--hong-man-nhan); transform: scale(1.1); }

/* 📱 QUAN TRỌNG: XÓA TOÀN BỘ ghi đè tỉ lệ ở media query */
@media (max-width: 1100px) {
  .slider-container {
    max-width: 100%;
    aspect-ratio: 16 / 9; /* ✅ GIỮ NGUYÊN TỈ LỆ ẢNH GỐC - KHÔNG ĐỔI */
  }
}
@media (max-width: 768px) {
  .slider-container {
    aspect-ratio: 16 / 9; /* ✅ VẪN GIỮ NGUYÊN - không bị cắt trên di động */
    border-radius: 8px;
  }
  .btn-prev, .btn-next { width: 2rem; height: 2rem; font-size: 1rem; }
}
@media (max-width: 480px) {
  .slider-container {
    aspect-ratio: 16 / 9; /* ✅ LUÔN GIỮ NGUYÊN TỈ LỆ ẢNH */
  }
  .btn-prev, .btn-next { display: none; }
} 

/* ==========================================
   THANH TIỆN ÍCH NHANH
   ========================================== */
.tien-ich-nhanh {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    margin-bottom: 2rem;
}
.tien-ich-nhanh a {
    flex-shrink: 0;
    padding: 0.75rem 1.25rem;
    background: var(--hong-phan-the);
    border-radius: 999px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: 0.2s;
}
.tien-ich-nhanh a:hover {
    background: var(--hong-sang-hover);
}

/* ==========================================
   KHỐI TIÊU ĐỀ CHUNG + NÚT XEM TẤT CẢ
   ========================================== */
.khoi-tieu-de {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}
.khoi-tieu-de h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--hong-man-nhan);
}
.khoi-tieu-de a {
    color: var(--hong-chu-dao);
    font-weight: 500;
}

/* ==========================================
   KHỐI ƯU ĐÃI
   ========================================== */
.grid-uu-dai {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}
.card-uu-dai {
    border-radius: 12px;
    padding: 1.5rem;
}
.card-uu-dai h3 {
    font-weight: 700;
    margin-bottom: 0.5rem;
}
.card-uu-dai p {
    font-size: 0.9rem;
    margin-bottom: 1rem;
}
.btn-nau {
    background: var(--hong-man-nhan);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: 0.2s;
}
.btn-nau:hover {
    background: #880e2e;
}
.btn-hong {
    background: var(--hong-chu-dao);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: 0.2s;
}
.btn-hong:hover {
    background: var(--hong-man-nhan);
}

/* ==========================================
   DANH MỤC SẢN PHẨM
   ========================================== */
.grid-danh-muc {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}
.item-danh-muc {
    text-align: center;
    padding: 1rem;
    background: white;
    border-radius: 12px;
    border: 1px solid var(--hong-phan-the);
    cursor: pointer;
    transition: 0.2s;
}
.item-danh-muc:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}
.item-danh-muc .icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--hong-chu-dao);
}
.item-danh-muc p {
    font-weight: 500;
    font-size: 0.9rem;
}
.item-danh-muc.chon {
    border: 2px solid var(--hong-chu-dao);
}

/* ==========================================
   SẢN PHẨM NỔI BẬT
   ========================================== */
.grid-san-pham {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}
.card-san-pham {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--hong-phan-the);
    transition: 0.2s;
}
.card-san-pham:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}
.card-san-pham .anh-sp {
    height: 120px;
    background: var(--hong-phan-the);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}
.card-san-pham .noi-dung {
    padding: 0.75rem;
}
.card-san-pham h4 {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}
.card-san-pham .gia {
    color: var(--hong-man-nhan);
    font-weight: 700;
    margin-bottom: 0.5rem;
}
.btn-them-gio {
    width: 100%;
    background: var(--hong-chu-dao);
    color: white;
    border: none;
    padding: 0.5rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: 0.2s;
}
.btn-them-gio:hover {
    background: var(--hong-man-nhan);
}



/* ===================================================
   CẤU HÌNH CĂN GIỮA TRANG ĐĂNG NHẬP / ĐĂNG KÝ
   =================================================== */

/* Khung container căn giữa toàn màn hình */
.login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 50px 15px;
    background-color: var(--hong-nhat-nen);
    width: 100%;
}

/* Card chính giữa */
.login-card {
    background: #ffffff;
    width: 100%;
    max-width: 420px;
    padding: 35px 30px;
    border-radius: 20px;
    border: 1px solid var(--hong-phan-the);
    box-shadow: 0 10px 25px rgba(244, 114, 182, 0.12);
    margin: 0 auto;
}

.login-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--chu-chinh);
    margin-bottom: 6px;
    text-align: left;
}

.login-subtitle {
    font-size: 0.9rem;
    color: var(--chu-phu);
    margin-bottom: 25px;
    text-align: left;
}

/* Ô nhập SĐT */
.input-phone-group {
    display: flex;
    align-items: center;
    border: 1px solid var(--hong-phan-the);
    border-radius: 25px;
    padding: 4px;
    margin-bottom: 18px;
    background-color: #ffffff;
    transition: all 0.2s ease;
}

.input-phone-group:focus-within {
    border-color: var(--hong-chu-dao);
    box-shadow: 0 0 0 3px rgba(244, 114, 182, 0.2);
}

.country-code {
    background-color: var(--hong-phan-the);
    color: var(--hong-man-nhan);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 20px;
    white-space: nowrap;
}

.input-phone {
    border: none !important;
    outline: none !important;
    width: 100%;
    padding: 8px 15px;
    font-size: 0.95rem;
    color: var(--chu-chinh);
    background: transparent;
    box-shadow: none !important;
}

/* Nút Gửi OTP */
.btn-submit-otp {
    width: 100%;
    background-color: var(--hong-chu-dao);
    color: #ffffff;
    border: none;
    border-radius: 25px;
    padding: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.btn-submit-otp:hover {
    background-color: var(--hong-man-nhan);
}

/* Dòng HOẶC */
.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 22px 0;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--hong-phan-the);
}

.divider span {
    padding: 0 12px;
    color: var(--chu-phu);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Nút Email */
.btn-email-login {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    border: 1px solid var(--hong-phan-the);
    border-radius: 25px;
    padding: 10px;
    color: var(--chu-chinh);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    margin-bottom: 20px;
    transition: all 0.2s ease;
}

.btn-email-login:hover {
    border-color: var(--hong-chu-dao);
    color: var(--hong-man-nhan);
    background-color: var(--hong-sang-hover);
}

/* Các nút Mạng xã hội & Tooltip */
.social-login-group {
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

.btn-social {
    position: relative;
    flex: 1;
    height: 44px;
    border: 1px solid var(--hong-phan-the);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--chu-chinh);
    font-size: 1.2rem;
    transition: all 0.25s ease;
}

.btn-social img {
    width: 22px;
    height: 22px;
}

.btn-facebook { color: #1877f2; }
.btn-google { color: #ea4335; }

.btn-social:hover {
    border-color: var(--hong-chu-dao);
    background-color: var(--hong-sang-hover);
    transform: translateY(-2px);
}

.btn-social::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%) translateY(5px);
    background-color: var(--chu-chinh);
    color: #ffffff;
    padding: 5px 10px;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
    border-radius: 6px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    pointer-events: none;
    z-index: 10;
}

.btn-social::after {
    content: '';
    position: absolute;
    bottom: 110%;
    left: 50%;
    transform: translateX(-50%) translateY(5px);
    border-width: 5px;
    border-style: solid;
    border-color: var(--chu-chinh) transparent transparent transparent;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    pointer-events: none;
    z-index: 10;
}

.btn-social:hover::before,
.btn-social:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* ==========================================
   RESPONSIVE BỔ SUNG CHO TRANG CHỦ
   ========================================== */
img { max-width: 100%; }

@media (max-width: 768px) {
    main.container { padding-top: 12px !important; }
    .tien-ich-nhanh { gap: .65rem; margin-bottom: 1.4rem; }
    .tien-ich-nhanh a { padding: .6rem .9rem; font-size: .85rem; }
    .grid-danh-muc { grid-template-columns: repeat(3, 1fr); gap: .75rem; }
    .grid-san-pham { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .card-san-pham .anh-sp { height: 105px; }
    .khoi-tieu-de h2 { font-size: 1.1rem; }
}

@media (max-width: 480px) {
    .slider-container { margin-bottom: 1.25rem; }
    .grid-uu-dai { grid-template-columns: 1fr; }
    .card-uu-dai { padding: 1.1rem; }
    .grid-danh-muc { grid-template-columns: repeat(2, 1fr); }
    .item-danh-muc { padding: .8rem .45rem; }
    .grid-san-pham { gap: .75rem; }
    .card-san-pham .noi-dung { padding: .65rem; }
    .card-san-pham h4 { min-height: 2.7em; }
}
