/* =========================================================
   UPS Communication Company - Main Stylesheet
   ========================================================= */

:root {
  --brand-blue: #0b3d91;
  --brand-blue-light: #1657c4;
  --brand-accent: #ff8c1a;
  --brand-accent-dark: #e07300;
  --ink: #0f172a;
  --muted: #64748b;
  --bg-soft: #f5f8fc;
  --success: #16a34a;
  --danger: #dc2626;
  --warning: #d97706;
  --radius: 14px;
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, .06);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, .10);
}

* { box-sizing: border-box; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: #fff;
  padding-bottom: 62px; /* space for mobile bottom nav */
}

h1, h2, h3, h4, h5, h6, .font-heading {
  font-family: 'Poppins', 'Inter', sans-serif;
}

a { text-decoration: none; }
.text-accent { color: var(--brand-accent); }
.text-light-50 { color: rgba(255,255,255,.65); }

/* ---------------- Topbar & Header ---------------- */
.topbar {
  background: var(--ink);
  color: #fff;
}

.main-header {
  background: #fff;
  box-shadow: var(--shadow-sm);
  z-index: 1030;
}

.brand-icon {
  width: 42px; height: 42px;
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-blue-light));
  color: #fff;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.brand-text {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--ink);
}

.navbar-nav .nav-link {
  font-weight: 500;
  color: var(--ink);
  padding: .5rem 1rem !important;
  border-radius: 8px;
}
.navbar-nav .nav-link:hover { color: var(--brand-blue); background: var(--bg-soft); }

.search-form { width: 220px; }
.search-form .form-control { border-radius: 20px 0 0 20px; }
.search-form .btn { border-radius: 0 20px 20px 0; }

.cart-btn { border-radius: 50%; width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; }
.cart-count, .mb-cart-count {
  position: absolute;
  top: -6px; right: -6px;
  font-size: .65rem;
  min-width: 18px;
  padding: 2px 5px;
}
.mb-cart-count { top: -2px; right: 8px; font-size: .6rem; }

/* ---------------- Buttons ---------------- */
.btn-primary {
  background: var(--brand-blue);
  border-color: var(--brand-blue);
}
.btn-primary:hover, .btn-primary:focus {
  background: var(--brand-blue-light);
  border-color: var(--brand-blue-light);
}
.btn-outline-primary {
  color: var(--brand-blue);
  border-color: var(--brand-blue);
}
.btn-outline-primary:hover {
  background: var(--brand-blue);
  border-color: var(--brand-blue);
}
.btn-accent {
  background: var(--brand-accent);
  border-color: var(--brand-accent);
  color: #fff;
  font-weight: 600;
}
.btn-accent:hover { background: var(--brand-accent-dark); border-color: var(--brand-accent-dark); color: #fff; }
.btn-whatsapp {
  background: #25D366;
  border-color: #25D366;
  color: #fff;
  font-weight: 600;
}
.btn-whatsapp:hover { background: #1ebe5a; border-color: #1ebe5a; color: #fff; }

/* ---------------- Hero ---------------- */
.hero {
  background: radial-gradient(circle at 20% 20%, #123a8f 0%, var(--brand-blue) 45%, #082657 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
  padding: 4.5rem 0 5rem;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,.08) 1px, transparent 1px);
  background-size: 26px 26px;
  opacity: .5;
}
.hero .hero-content { position: relative; z-index: 2; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.25);
  color: #fff;
  padding: .35rem .9rem;
  border-radius: 30px;
  font-size: .8rem;
  font-weight: 500;
}
.hero h1 {
  font-weight: 800;
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  line-height: 1.15;
}
.hero p.lead { color: rgba(255,255,255,.85); font-size: 1.1rem; }
.hero-visual {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 24px;
  backdrop-filter: blur(6px);
  padding: 2rem;
}

/* ---------------- Section headings ---------------- */
.section-title {
  font-weight: 800;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
}
.section-sub { color: var(--muted); font-size: 1.02rem; }
.section-eyebrow {
  color: var(--brand-accent);
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  font-size: .78rem;
}

/* ---------------- Category cards ---------------- */
.category-card {
  background: #fff;
  border: 1px solid #eef1f6;
  border-radius: var(--radius);
  padding: 1.5rem 1rem;
  text-align: center;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  height: 100%;
  color: var(--ink);
  display: block;
}
.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--brand-blue-light);
  color: var(--ink);
}
.category-icon {
  width: 56px; height: 56px;
  margin: 0 auto 1rem;
  border-radius: 16px;
  background: linear-gradient(135deg, #e8f0ff, #dbe9ff);
  color: var(--brand-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}
.category-card:hover .category-icon {
  background: var(--brand-blue);
  color: #fff;
}

/* ---------------- Service cards ---------------- */
.service-card {
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  height: 100%;
  background: var(--bg-soft);
  border: 1px solid transparent;
  transition: all .2s ease;
}
.service-card:hover {
  background: #fff;
  border-color: #e5edfb;
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}
.service-icon { font-size: 2.2rem; margin-bottom: 1rem; }

/* ---------------- Product cards ---------------- */
.product-card {
  border: 1px solid #eef1f6;
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  transition: transform .2s ease, box-shadow .2s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.product-thumb {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--bg-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.product-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.product-card:hover .product-thumb img { transform: scale(1.06); }
.product-badges { position: absolute; top: .6rem; left: .6rem; display: flex; flex-direction: column; gap: .3rem; z-index: 2; }
.badge-featured { background: var(--brand-accent); color: #fff; }
.badge-condition { background: var(--ink); color: #fff; }
.badge-outofstock { background: var(--danger); color: #fff; }
.badge-lowstock { background: var(--warning); color: #fff; }

.product-body { padding: 1rem; display: flex; flex-direction: column; flex-grow: 1; }
.product-cat { font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; font-weight: 600;}
.product-name {
  font-weight: 600;
  font-size: .98rem;
  margin: .25rem 0 .5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.6em;
}
.product-price { font-weight: 800; color: var(--brand-blue); font-size: 1.1rem; }
.product-actions { margin-top: auto; padding-top: .75rem; }

.stock-ok { color: var(--success); }
.stock-low { color: var(--warning); }
.stock-out { color: var(--danger); }

/* ---------------- Why choose us ---------------- */
.why-card { text-align: center; padding: 1.5rem; }
.why-icon {
  width: 70px; height: 70px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-blue-light));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  margin: 0 auto 1rem;
}

/* ---------------- Filters / shop ---------------- */
.filter-panel { background: var(--bg-soft); border-radius: var(--radius); padding: 1.25rem; }
.filter-panel .form-check-label { font-size: .92rem; }
.sort-select { max-width: 220px; }

/* ---------------- Cart ---------------- */
.cart-item-row { border-bottom: 1px solid #eef1f6; padding: 1rem 0; }
.cart-thumb { width: 80px; height: 80px; object-fit: cover; border-radius: 10px; background: var(--bg-soft); }
.qty-control { display: inline-flex; align-items: center; border: 1px solid #dfe6f0; border-radius: 8px; overflow: hidden; }
.qty-control button { border: none; background: #fff; width: 32px; height: 32px; font-weight: 700; color: var(--brand-blue); }
.qty-control button:hover { background: var(--bg-soft); }
.qty-control input { width: 42px; border: none; text-align: center; font-weight: 600; }
.qty-control input:focus { outline: none; }
.cart-summary-card { background: var(--bg-soft); border-radius: var(--radius); padding: 1.5rem; position: sticky; top: 100px; }
.empty-state { text-align: center; padding: 4rem 1rem; }
.empty-state i { font-size: 4rem; color: #d9e2ef; }

/* ---------------- Steps / checkout progress ---------------- */
.checkout-steps { display: flex; justify-content: center; gap: .5rem; margin-bottom: 2rem; flex-wrap: wrap; }
.checkout-steps .step {
  display: flex; align-items: center; gap: .4rem;
  background: var(--bg-soft); padding: .4rem .9rem; border-radius: 30px; font-size: .85rem; font-weight: 600; color: var(--muted);
}
.checkout-steps .step.active { background: var(--brand-blue); color: #fff; }
.checkout-steps .step.done { background: #e6f7ec; color: var(--success); }

/* ---------------- Footer ---------------- */
.site-footer { background: var(--ink); color: rgba(255,255,255,.85); }
.footer-links li { margin-bottom: .5rem; }
.footer-links a { color: rgba(255,255,255,.65); }
.footer-links a:hover { color: var(--brand-accent); }
.social-btn {
  width: 38px; height: 38px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.08);
  border-radius: 50%;
  color: #fff;
}
.social-btn:hover { background: var(--brand-accent); color: #fff; }

/* ---------------- Mobile bottom nav ---------------- */
.mobile-bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: #fff;
  border-top: 1px solid #eef1f6;
  display: flex;
  justify-content: space-around;
  padding: .4rem 0;
  z-index: 1040;
  box-shadow: 0 -4px 12px rgba(15,23,42,.06);
}
.mb-nav-item {
  display: flex; flex-direction: column; align-items: center;
  font-size: .65rem; color: var(--muted); gap: 2px; position: relative;
  padding: .2rem .4rem;
}
.mb-nav-item i { font-size: 1.2rem; }
.mb-nav-item:hover { color: var(--brand-blue); }

/* ---------------- Floating WhatsApp ---------------- */
.whatsapp-float {
  position: fixed;
  bottom: 24px; right: 24px;
  width: 58px; height: 58px;
  background: #25D366;
  color: #fff;
  border-radius: 50%;
  align-items: center; justify-content: center;
  font-size: 1.6rem;
  box-shadow: 0 6px 18px rgba(37,211,102,.4);
  z-index: 1050;
  animation: pulse 2.4s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(37,211,102,.5); }
  70% { box-shadow: 0 0 0 14px rgba(37,211,102,0); }
  100% { box-shadow: 0 0 0 0 rgba(37,211,102,0); }
}

/* ---------------- Toasts ---------------- */
.toast-container .toast { min-width: 280px; }

/* ---------------- Misc ---------------- */
.rounded-xl { border-radius: var(--radius); }
.shadow-soft { box-shadow: var(--shadow-sm); }
.spec-table td { padding: .5rem .75rem; }
.spec-table tr:nth-child(odd) { background: var(--bg-soft); }

.skeleton {
  background: linear-gradient(90deg, #eef1f6 25%, #f7f9fc 37%, #eef1f6 63%);
  background-size: 400% 100%;
  animation: skeleton 1.4s ease infinite;
  border-radius: 8px;
}
@keyframes skeleton {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}

@media (max-width: 991.98px) {
  .cart-summary-card { position: static; }
}
