/* Shared site chrome (header/footer/sidebars)
   Purpose: apply landing header/footer across PHP pages
   Scope: intentionally avoids global resets on body/* */

:root {
  --tiv-red: #e63946;
  --tiv-red2: #c1121f;
  --tiv-red-soft: rgba(230, 57, 70, 0.08);
  --tiv-border: rgba(0, 0, 0, 0.07);
  --tiv-text: #1a202c;
  --tiv-dark: #111827;
  --tiv-muted: #6b7280;
  --tiv-dim: #9ca3af;
  --tiv-alt: #f9fafb;
  --tiv-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

/* ---------- Header ---------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 999;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--tiv-border);
  transition: box-shadow 0.25s ease;
}

.navbar.scrolled {
  box-shadow: var(--tiv-shadow);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 66px;
  gap: 14px;
}

.nav-logo {
  display: flex;
  flex-direction: column;
  line-height: 1;
  text-decoration: none;
}

.logo-t {
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--tiv-red);
  letter-spacing: 0.04em;
}

.logo-e {
  font-size: 0.48rem;
  font-weight: 800;
  letter-spacing: 0.28em;
  color: var(--tiv-dim);
  text-transform: uppercase;
  margin-top: 1px;
}

.nav-links {
  display: flex;
  gap: 6px;
  align-items: center;
  flex: 1;
  justify-content: center;
  overflow: hidden;
  min-width: 0;
}

.nav-links a {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--tiv-muted);
  white-space: nowrap;
  transition: color 0.2s ease, background 0.2s ease;
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--tiv-red);
  background: var(--tiv-red-soft);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.86rem;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.btn.btn-red {
  background: var(--tiv-red);
  color: #fff;
  box-shadow: 0 4px 18px rgba(230, 57, 70, 0.22);
}

.btn.btn-red:hover {
  background: var(--tiv-red2);
  transform: translateY(-1px);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 6px;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--tiv-text);
  border-radius: 2px;
}

.icon-btn {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--tiv-border);
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  color: var(--tiv-dark);
}

.icon-btn:hover {
  background: var(--tiv-red-soft);
  border-color: rgba(230, 57, 70, 0.25);
  color: var(--tiv-red);
}

.icon-btn svg {
  width: 18px;
  height: 18px;
}

.count-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--tiv-red);
  color: #fff;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 900;
  display: none;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
}

.count-badge.show {
  display: flex;
}

@media (max-width: 900px) {
  .nav-links {
    display: none;
  }
  .hamburger {
    display: flex;
  }
}

@media (max-width: 420px) {
  .nav-inner {
    padding: 0 14px;
    gap: 10px;
  }

  .logo-t {
    font-size: 1.05rem;
  }

  .btn {
    padding: 9px 12px;
    font-size: 0.82rem;
  }

  .icon-btn {
    width: 38px;
    height: 38px;
  }
}

/* ---------- Footer ---------- */
.footer {
  background: var(--tiv-dark);
  border-top: 3px solid var(--tiv-red);
}

.footer .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 28px;
}

.footer-main {
  padding: 64px 0 44px;
  display: grid;
  grid-template-columns: 1.7fr 1fr 1fr 1fr 1fr;
  gap: 36px;
}

.foot-logo {
  display: flex;
  flex-direction: column;
  line-height: 1;
  margin-bottom: 14px;
}

.fl-t {
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--tiv-red);
}

.fl-e {
  font-size: 0.44rem;
  font-weight: 800;
  letter-spacing: 0.28em;
  color: rgba(255, 255, 255, 0.3);
  text-transform: uppercase;
  margin-top: 2px;
}

.foot-tagline {
  font-size: 0.84rem;
  color: rgba(255, 255, 255, 0.42);
  line-height: 1.6;
}

.foot-col h5 {
  font-size: 0.72rem;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.85);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 16px;
}

.foot-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.foot-col ul li a {
  font-size: 0.84rem;
  color: rgba(255, 255, 255, 0.42);
  text-decoration: none;
  transition: color 0.2s ease;
}

.foot-col ul li a:hover {
  color: var(--tiv-red);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 18px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-bottom p {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.28);
  margin: 0;
}

.pay-badges {
  display: flex;
  gap: 8px;
}

.pay-badge {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.07);
  padding: 4px 10px;
  border-radius: 6px;
}

@media (max-width: 1100px) {
  .footer-main {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 640px) {
  .footer-main {
    grid-template-columns: 1fr;
  }
}

/* ---------- Cart/Wishlist sidebars ---------- */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.sidebar-overlay.show {
  opacity: 1;
  visibility: visible;
}

.sidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: min(420px, 100%);
  height: 100vh;
  background: #fff;
  z-index: 999;
  transform: translateX(100%);
  transition: transform 0.25s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sidebar.show {
  transform: translateX(0);
}

.sidebar-header {
  padding: 18px 20px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--tiv-alt);
}

.sidebar-title {
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  font-size: 1.05rem;
  font-weight: 900;
  color: var(--tiv-dark);
}

.sidebar-close {
  background: transparent;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 10px;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  color: var(--tiv-muted);
}

.sidebar-close:hover {
  background: #fff;
  color: var(--tiv-red);
  border-color: rgba(230, 57, 70, 0.25);
}

.sidebar-content {
  padding: 18px 20px;
  overflow: auto;
  flex: 1;
}

.sidebar-empty {
  text-align: center;
  padding: 40px 12px;
  color: var(--tiv-muted);
}

.sidebar-footer {
  padding: 18px 20px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  background: var(--tiv-alt);
}

.sidebar-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.total-label {
  color: var(--tiv-muted);
  font-weight: 800;
}

.total-value {
  color: var(--tiv-red);
  font-weight: 900;
  font-size: 1.25rem;
}

.sidebar-checkout {
  width: 100%;
  padding: 14px 16px;
  border: none;
  border-radius: 12px;
  background: var(--tiv-red);
  color: #fff;
  font-weight: 900;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.sidebar-checkout:hover {
  background: var(--tiv-red2);
  transform: translateY(-1px);
}

.cart-item,
.wishlist-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  margin-bottom: 12px;
}

.cart-item-image,
.wishlist-item-image {
  width: 72px;
  height: 72px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--tiv-alt);
}

.cart-item-name,
.wishlist-item-name {
  font-weight: 900;
  color: var(--tiv-dark);
  font-size: 0.9rem;
}

.cart-item-price,
.wishlist-item-price {
  color: var(--tiv-red);
  font-weight: 900;
  margin-top: 6px;
}

.item-remove {
  margin-left: auto;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--tiv-red);
}

.quantity-btn {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: #fff;
  cursor: pointer;
}

.cart-item-quantity {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.quantity-value {
  min-width: 24px;
  text-align: center;
  font-weight: 900;
  color: var(--tiv-dark);
}

