/* ==== Reset cơ bản ==== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html, body {
  font-family: 'Poppins', system-ui, Arial, sans-serif;
  color: #222;
  background: #f8f9fb;
  scroll-behavior: smooth;
}
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px;
}

/* ==== Header & Navigation ==== */
.site-header {
  background: linear-gradient(90deg, #0078d4, #00b0ff);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
}
.logo img {
  height: 50px;
  filter: drop-shadow(1px 1px 2px rgba(0,0,0,0.3));
}
.main-nav a {
  margin-left: 22px;
  text-decoration: none;
  color: #fff;
  font-weight: 500;
  position: relative;
  transition: color .3s ease;
}
.main-nav a::after {
  content: "";
  display: block;
  width: 0;
  height: 2px;
  background: #fff;
  transition: width .3s ease;
  position: absolute;
  bottom: -4px;
  left: 0;
}
.main-nav a:hover {
  color: #fff;
}
.main-nav a:hover::after {
  width: 100%;
}
.nav-toggle {
  display: none;
}

/* ==== Hero ==== */
.hero {
  padding: 60px 0;
  background: linear-gradient(120deg, #00b0ff, #00d4a0);
  color: #fff;
  text-align: center;
}
.hero-inner {
  display: flex;
  gap: 24px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}
.hero-image {
  width: 320px;
  border-radius: 20px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.15);
  animation: float 3s ease-in-out infinite;
}
.hero-text h1 {
  font-size: 2.4rem;
  margin-bottom: 12px;
  text-shadow: 1px 2px 6px rgba(0,0,0,0.2);
}
.hero-text p {
  font-size: 1.1rem;
  opacity: 0.95;
  margin-bottom: 20px;
}
.cta-row .btn {
  margin-right: 12px;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* ==== Features ==== */
.features {
  display: flex;
  gap: 16px;
  margin-top: 40px;
  flex-wrap: wrap;
}
.feature {
  background: #fff;
  padding: 24px;
  border-radius: 12px;
  flex: 1;
  text-align: center;
  box-shadow: 0 6px 20px rgba(0,0,0,0.05);
  transition: transform .3s ease, box-shadow .3s ease;
}
.feature:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* ==== Grid sản phẩm ==== */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 30px;
}
.card {
  background: #fff;
  padding: 16px;
  border-radius: 14px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.05);
  text-align: center;
  transition: all .3s ease;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}
.card img {
  width: 60%;
  height: 180px;
  object-fit: contain;
  border-radius: 10px;
  margin-bottom: 10px;
}
.card h4 {
  margin-bottom: 6px;
  font-size: 1rem;
}
.price {
  color: #00b0ff;
  font-weight: 700;
}
.price.big {
  font-size: 1.6rem;
}

/* ==== Buttons ==== */
.btn {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 10px;
  background: linear-gradient(90deg, #0078d4, #00b0ff);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(0,120,212,0.3);
  transition: all .3s ease;
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,120,212,0.4);
}
.btn.ghost {
  background: transparent;
  border: 2px solid #00b0ff;
  color: #0078d4;
}
.btn.small {
  padding: 6px 10px;
  font-size: 0.9rem;
}

/* ==== Form ==== */
.auth-page {
  max-width: 520px;
  margin: 0 auto;
}
.auth-form label {
  display: block;
  margin: 12px 0 4px;
  font-weight: 500;
}
.auth-form input {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #ccc;
  transition: border-color .3s ease, box-shadow .3s ease;
}
.auth-form input:focus {
  border-color: #00b0ff;
  box-shadow: 0 0 6px rgba(0,176,255,0.3);
}
.form-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

/* ==== Footer ==== */
.site-footer {
  background: #111;
  color: #ccc;
  padding: 30px 0;
  margin-top: 50px;
  text-align: center;
}
.site-footer h4 {
  color: #00b0ff;
  margin-bottom: 10px;
}
.site-footer p {
  font-size: 0.95rem;
  opacity: 0.9;
}
.copyright {
  margin-top: 10px;
  font-size: 0.85rem;
  color: #aaa;
}

/* ==== Hiệu ứng chung ==== */
.fade-in {
  animation: fadeInUp 0.7s ease both;
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==== Responsive ==== */
@media (max-width: 800px) {
  .hero-inner {
    flex-direction: column;
  }
  .main-nav {
    display: none;
  }
  .nav-toggle {
    display: block;
    background: none;
    border: 0;
    font-size: 1.8rem;
    color: #fff;
  }
}
/* ==== About Page ==== */
.about-page {
  padding: 60px 0;
}

.profile-card {
  display: flex;
  align-items: center;
  gap: 30px;
  background: #fff;
  padding: 30px;
  border-radius: 16px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.05);
  animation: fadeInUp 0.8s ease both;
}

.profile-card img {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #00b0ff;
  box-shadow: 0 4px 16px rgba(0,176,255,0.3);
  transition: transform 0.3s ease;
}
.profile-card img:hover {
  transform: scale(1.05);
}

.profile-info h1 {
  color: #0078d4;
  margin-bottom: 8px;
  font-size: 1.8rem;
}
.profile-info p {
  line-height: 1.6;
  color: #444;
}

.socials {
  margin-top: 10px;
}
.socials a {
  color: #0078d4;
  margin-right: 10px;
  font-size: 1.2rem;
  text-decoration: none;
  transition: color 0.3s;
}
.socials a:hover {
  color: #00b0ff;
}

/* Tiểu sử cá nhân */
.bio {
  margin-top: 40px;
  background: #fff;
  padding: 30px;
  border-radius: 16px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.05);
  animation: fadeInUp 1s ease both;
}
.bio h2 {
  color: #0078d4;
  margin-bottom: 12px;
}
.bio p {
  color: #444;
  line-height: 1.6;
}
/* ==== Contact Page ==== */
.contact-page {
  padding: 60px 0;
  text-align: center;
}
.contact-page h1 {
  color: #0078d4;
  margin-bottom: 10px;
}
.contact-page p {
  color: #444;
  margin-bottom: 30px;
}

.contact-wrapper {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  justify-content: center;
}

.contact-info {
  flex: 1;
  min-width: 260px;
  text-align: left;
  background: #fff;
  padding: 24px;
  border-radius: 14px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.05);
  animation: fadeInUp 0.8s ease both;
}
.contact-info h2 {
  color: #00b0ff;
  margin-bottom: 10px;
}
.contact-info p {
  margin: 6px 0;
  color: #333;
}
.contact-info .socials a {
  display: inline-block;
  margin-right: 10px;
  color: #0078d4;
  text-decoration: none;
  transition: color 0.3s;
}
.contact-info .socials a:hover {
  color: #00b0ff;
}

/* Form liên hệ */
.contact-form {
  flex: 1;
  min-width: 320px;
  background: #fff;
  padding: 28px;
  border-radius: 14px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.05);
  animation: fadeInUp 1s ease both;
}
.contact-form label {
  display: block;
  text-align: left;
  margin-bottom: 6px;
  font-weight: 500;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 10px;
  margin-bottom: 16px;
  border-radius: 8px;
  border: 1px solid #ccc;
  transition: border-color .3s ease, box-shadow .3s ease;
}
.contact-form input:focus,
.contact-form textarea:focus {
  border-color: #00b0ff;
  box-shadow: 0 0 6px rgba(0,176,255,0.3);
}
/* ==== LOGIN & REGISTER ==== */
.auth-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 90vh;
  background: linear-gradient(135deg, #81c2f4, #00b0ff);
}

.auth-box {
  background: #fff;
  padding: 40px;
  border-radius: 20px;
  width: 400px;
  max-width: 90%;
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: all 0.5s ease;
}

.auth-box h2 {
  color: #0078d4;
  margin-bottom: 20px;
}

.auth-box input {
  width: 100%;
  padding: 12px;
  margin: 10px 0;
  border-radius: 8px;
  border: 1px solid #ccc;
  transition: 0.3s;
}

.auth-box input:focus {
  border-color: #00b0ff;
  box-shadow: 0 0 8px rgba(0,176,255,0.2);
}

.auth-box button {
  background: #0078d4;
  color: #fff;
  border: none;
  padding: 12px 0;
  border-radius: 8px;
  width: 100%;
  font-size: 16px;
  cursor: pointer;
  transition: 0.3s;
}

.auth-box button:hover {
  background: #2299e7;
}

.toggle-text {
  margin-top: 14px;
  font-size: 14px;
  color: #555;
}

.toggle-text span {
  color: #279ffa;
  font-weight: 600;
  cursor: pointer;
}

/* Ẩn/hiện form */
.register-form { display: none; }
.auth-box.show-register .login-form { display: none; }
.auth-box.show-register .register-form { display: block; }

/* Hiệu ứng chuyển đổi */
.fade {
  animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
/* ==== CART PAGE ==== */
.cart-page h1 {
  margin: 30px 0;
  color: #0078d4;
  text-align: center;
}

.cart-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 3px 10px rgba(0,0,0,0.05);
}

.cart-table th, .cart-table td {
  padding: 14px;
  text-align: center;
  border-bottom: 1px solid #eee;
}

.cart-table th {
  background: #f5f9ff;
  color: #0078d4;
}

.cart-item {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
}

.cart-item img {
  width: 60px;
  height: 60px;
  border-radius: 10px;
  object-fit: cover;
}

.cart-table input[type="number"] {
  width: 60px;
  text-align: center;
  border-radius: 6px;
  border: 1px solid #ccc;
  padding: 4px;
}

.remove-btn {
  background: transparent;
  color: #d9534f;
  font-size: 20px;
  border: none;
  cursor: pointer;
  transition: 0.3s;
}

.remove-btn:hover {
  color: #ff3b30;
  transform: scale(1.2);
}

.cart-summary {
  margin-top: 20px;
  text-align: right;
}

.cart-summary h3 {
  margin-bottom: 10px;
  color: #333;
}

.cart-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.cart-empty {
  text-align: center;
  background: #fff;
  padding: 40px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.cart-empty p {
  font-size: 1.1rem;
  color: #555;
  margin-bottom: 10px;
}
/* Cart counter */
.cart-count {
  background: #ff3b30;
  color: #fff;
  font-size: 0.8rem;
  padding: 2px 6px;
  border-radius: 50%;
  vertical-align: top;
  margin-left: 4px;
  font-weight: 600;
}
#user-section {
  margin-left: 12px;
}

.username {
  color: #0078d4;
  font-weight: 600;
  margin-right: 8px;
}
