/* ============================================
   Tech Me — Reusable Components
   Apple/Google Store–inspired clean UI
   ============================================ */

/* Logo Styling */
.header__logo .logo-brand,
.header__logo .custom-logo-link {
  display: block;
  line-height: 0;
}

.header__logo .logo-img,
.header__logo .custom-logo {
  height: auto;
  max-height: 48px;
  width: auto;
  object-fit: contain;
  transition: max-height var(--transition-base);
}

@media (max-width: 768px) {
  .header__logo .logo-img,
  .header__logo .custom-logo {
    max-height: 36px;
  }
}

.footer__logo .logo-text,
.mobile-menu__header .logo-text {
  display: flex !important;
  align-items: center !important;
}

.footer__logo img,
.mobile-menu__header img {
  display: inline-block;
  margin-right: 12px;
}

/* ---- Reset & Base ---- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height-normal);
  color: var(--color-text);
  background-color: var(--color-bg);
  max-width: 100% !important;
  margin: 0 !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

ul, ol {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  font-size: inherit;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: var(--space-md);
  padding-right: var(--space-md);
}

.container--narrow {
  max-width: var(--container-lg);
}

.container--wide {
  max-width: var(--container-max);
}

/* ---- Section ---- */
.section {
  padding: var(--space-2xl) 0;
}

.section--gray {
  background-color: var(--color-bg-alt);
}

.section--dark {
  background-color: var(--color-bg-dark);
  color: var(--color-text-white);
}

.section__header {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.section__title {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-secondary);
  margin-bottom: var(--space-sm);
}

.section__subtitle {
  font-size: var(--font-size-base);
  color: var(--color-text-light);
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 0.75rem 1.5rem;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  border-radius: var(--radius-full);
  transition: background-color var(--transition-base), color var(--transition-base), box-shadow var(--transition-base);
  white-space: nowrap;
  text-align: center;
  line-height: 1;
}

.btn--primary {
  background-color: var(--color-primary);
  color: var(--color-text-white);
}

.btn--primary:hover {
  background-color: var(--color-primary-dark);
  box-shadow: var(--shadow-md);
}

.btn--secondary {
  background-color: var(--color-primary-light);
  color: var(--color-primary);
}

.btn--secondary:hover {
  background-color: #c2d7f9;
  box-shadow: var(--shadow-sm);
}

.btn--outline {
  background-color: var(--color-primary-light);
  border: none;
  color: var(--color-primary);
}

.btn--outline:hover {
  background-color: var(--color-primary);
  color: var(--color-text-white);
  box-shadow: var(--shadow-md);
}

.btn--zalo {
  background-color: #0068FF;
  color: var(--color-text-white);
}

.btn--zalo:hover {
  background-color: #0055CC;
  box-shadow: var(--shadow-md);
}

.btn--phone {
  background-color: var(--color-success);
  color: var(--color-text-white);
}

.btn--phone:hover {
  background-color: #1a7431;
  box-shadow: var(--shadow-md);
}

.btn--sm {
  padding: 0.5rem 1rem;
  font-size: var(--font-size-xs);
}

.btn--lg {
  padding: 1rem 2rem;
  font-size: var(--font-size-base);
}

.btn--full {
  width: 100%;
}

.btn--icon {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: var(--radius-full);
}

/* ---- Product Card ---- */
.product-card {
  background: var(--color-bg);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow var(--transition-base), border-color var(--transition-base);
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  border: 1px solid var(--color-border-light);
}

.product-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.product-card__badges {
  position: absolute;
  top: var(--space-sm);
  left: var(--space-sm);
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  z-index: 2;
}

.product-card__badge {
  display: inline-block;
  padding: 4px 10px;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  border-radius: var(--radius-full);
  color: var(--color-text-white);
}

.product-card__badge--sale {
  background-color: var(--color-badge-sale);
}

.product-card__badge--new {
  background-color: var(--color-badge-new);
}

.product-card__badge--hot {
  background-color: var(--color-badge-hot);
}

.product-card__badge--installment {
  background-color: var(--color-badge-installment);
}

.product-card__image {
  position: relative;
  padding-top: 100%; /* 1:1 aspect ratio */
  overflow: hidden;
  background-color: var(--color-bg-alt);
}

.product-card__image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: var(--space-md);
  transition: transform var(--transition-slow);
}

.product-card:hover .product-card__image img {
  transform: scale(1.05);
}

.product-card__content {
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-card__brand {
  font-size: var(--font-size-xs);
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: var(--space-xs);
  font-weight: var(--font-weight-semibold);
}

.product-card__name {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-secondary);
  margin-bottom: var(--space-sm);
  line-height: var(--line-height-tight);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card__name a:hover {
  color: var(--color-primary);
}

.product-card__prices {
  margin-top: auto;
  margin-bottom: var(--space-sm);
}

.product-card__price {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  color: var(--color-accent);
}

.product-card__price-original {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  text-decoration: line-through;
  margin-left: var(--space-sm);
}

.product-card__cta {
  margin-top: var(--space-sm);
}

/* ---- Blog Card ---- */
.blog-card {
  background: var(--color-bg);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow var(--transition-base), border-color var(--transition-base);
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid var(--color-border-light);
}

.blog-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.blog-card__image {
  position: relative;
  padding-top: 56.25%; /* 16:9 */
  overflow: hidden;
}

.blog-card__image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.blog-card:hover .blog-card__image img {
  transform: scale(1.05);
}

.blog-card__content {
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  flex: 1;
}

.blog-card__category {
  display: inline-block;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: var(--space-sm);
}

.blog-card__title {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  color: var(--color-secondary);
  margin-bottom: var(--space-sm);
  line-height: var(--line-height-tight);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card__title a:hover {
  color: var(--color-primary);
}

.blog-card__excerpt {
  font-size: var(--font-size-sm);
  color: var(--color-text-light);
  margin-bottom: var(--space-md);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.blog-card__meta {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-top: auto;
}

/* ---- Grid ---- */
.grid {
  display: grid;
  gap: var(--space-md);
}

.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

/* ---- Badges / Tags ---- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  border-radius: var(--radius-full);
  color: var(--color-text-white);
}

.badge--sale { background-color: var(--color-badge-sale); }
.badge--new { background-color: var(--color-badge-new); }
.badge--hot { background-color: var(--color-badge-hot); }
.badge--installment { background-color: var(--color-badge-installment); }

/* ---- Brand Filter Tabs ---- */
.brand-filter {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.brand-filter__tab {
  padding: 0.5rem 1.25rem;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  border: none;
  border-radius: var(--radius-full);
  color: var(--color-text);
  background: var(--color-bg-alt);
  cursor: pointer;
  transition: background-color var(--transition-fast), color var(--transition-fast);
  white-space: nowrap;
}

.brand-filter__tab:hover {
  background-color: var(--color-primary-light);
  color: var(--color-primary);
}

.brand-filter__tab.active {
  background-color: var(--color-primary);
  color: var(--color-text-white);
}

/* ---- Breadcrumbs ---- */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-xs);
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  padding: var(--space-md) 0;
}

.breadcrumbs a {
  color: var(--color-text-light);
}

.breadcrumbs a:hover {
  color: var(--color-primary);
}

.breadcrumbs__separator {
  color: var(--color-text-muted);
  font-size: var(--font-size-xs);
}

.breadcrumbs__current {
  color: var(--color-text);
  font-weight: var(--font-weight-medium);
}

/* ---- Price Display ---- */
.price {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.price__current {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-accent);
}

.price__original {
  font-size: var(--font-size-base);
  color: var(--color-text-muted);
  text-decoration: line-through;
}

.price__save {
  font-size: var(--font-size-sm);
  color: var(--color-success);
  font-weight: var(--font-weight-medium);
}

/* ---- Floating CTA ---- */
.floating-cta {
  position: fixed;
  bottom: var(--space-lg);
  right: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  z-index: var(--z-floating-cta);
}

.floating-cta__btn {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
  color: var(--color-text-white);
}

.floating-cta__btn:hover {
  transform: scale(1.1);
  box-shadow: var(--shadow-xl);
}

.floating-cta__btn--zalo {
  background-color: #0068FF;
}

.floating-cta__btn--phone {
  background-color: var(--color-success);
}

.floating-cta__btn svg,
.floating-cta__btn img {
  width: 28px;
  height: 28px;
}

/* ---- Sticky CTA Bar (Product Detail) ---- */
.sticky-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--color-bg);
  border-top: 1px solid var(--color-border);
  padding: var(--space-sm) var(--space-md);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  z-index: var(--z-sticky);
  box-shadow: 0 -4px 12px rgba(11, 87, 208, 0.06);
}

.sticky-cta__price {
  flex: 1;
}

.sticky-cta__price .price__current {
  font-size: var(--font-size-lg);
}

.sticky-cta__price .price__original {
  font-size: var(--font-size-sm);
}

.sticky-cta__actions {
  display: flex;
  gap: var(--space-sm);
}

/* ---- Pagination ---- */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-sm);
  margin-top: var(--space-2xl);
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 var(--space-sm);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  border-radius: var(--radius-full);
  border: none;
  color: var(--color-text);
  background: var(--color-bg-alt);
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

.pagination a:hover {
  background-color: var(--color-primary-light);
  color: var(--color-primary);
}

.pagination .current {
  background-color: var(--color-primary);
  color: var(--color-text-white);
}

/* ---- Utilities ---- */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-primary { color: var(--color-primary); }
.text-accent { color: var(--color-accent); }
.text-muted { color: var(--color-text-muted); }

.mt-auto { margin-top: auto; }
.mb-0 { margin-bottom: 0; }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
