/* ==========================================
   No.1 Insulation - Premium UI
   Cloudflare inspired theme + Dark/Light
========================================== */

/* ---------- CSS Variables ---------- */
:root {
  --bg: #ffffff;
  --card: #ffffff;
  --text: #0b1220;
  --muted: rgba(11, 18, 32, 0.72);
  --border: rgba(11, 18, 32, 0.10);

  /* Cloudflare-ish */
  --primary: #0051ff;
  --primary-dark: #003cc2;
  --primary-soft: rgba(0, 81, 255, 0.12);

  --accent: #ff8a00; /* cloudflare orange vibe */
  --success: #1db954;
  --danger: #ff3b3b;
  --info: #2f80ed;

  --radius: 18px;
  --radius-sm: 14px;

  --shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 18px 50px rgba(0, 0, 0, 0.12);

  --container: 1200px;
}

/* Dark Mode */
body.dark {
  --bg: #0b1020;
  --card: #0f172a;
  --text: #f5f7ff;
  --muted: rgba(245, 247, 255, 0.72);
  --border: rgba(245, 247, 255, 0.10);

  --primary: #4c7dff;
  --primary-dark: #2a58db;
  --primary-soft: rgba(76, 125, 255, 0.14);

  --shadow: 0 10px 28px rgba(0, 0, 0, 0.40);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.50);
}

/* ---------- Reset ---------- */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Poppins, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  background: var(--bg);
  color: var(--text);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 16px;
}

/* ---------- Utility ---------- */
.section-header h2 {
  letter-spacing: -0.02em;
}

.section-header p {
  color: var(--muted);
}

.btn {
  border: none;
  cursor: pointer;
  font-weight: 800;
  border-radius: var(--radius-sm);
  transition: 0.25s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.btn-outline {
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
}

.btn-outline:hover {
  border-color: rgba(0, 81, 255, 0.32);
  box-shadow: 0 10px 24px rgba(0, 81, 255, 0.12);
  transform: translateY(-1px);
}

.badge {
  font-size: 12px;
  font-weight: 900;
  border-radius: 999px;
  padding: 6px 10px;
}

/* ==========================================
   Header / Navbar
========================================== */
.header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 999;
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 0;
}

.logo {
  display: flex;
  gap: 10px;
  align-items: center;
  text-decoration: none;
  font-weight: 900;
  font-size: 18px;
}

.logo i {
  color: var(--primary);
}

.nav-menu > a {
  text-decoration: none;
  opacity: 0.85;
  font-weight: 700;
}

.nav-menu > a:hover {
  opacity: 1;
  color: var(--primary);
}

.nav-menu > a.active {
  opacity: 1;
  color: var(--primary);
}

.nav-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.nav-phone {
  text-decoration: none;
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--text);
  opacity: 0.9;
  font-weight: 700;
}

.nav-phone i {
  color: var(--primary);
}

.nav-cta {
  background: var(--primary);
  color: #fff;
  font-weight: 900;
  padding: 10px 14px;
  border-radius: 14px;
  text-decoration: none;
  transition: 0.25s;
}

.nav-cta:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.mobile-menu-btn {
  display: none;
  font-size: 22px;
  cursor: pointer;
}

/* Theme toggle */
.theme-toggle {
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: 0.25s;
}

.theme-toggle:hover {
  transform: translateY(-1px);
  border-color: rgba(0, 81, 255, 0.30);
}

/* ==========================================
   Hero Slider
========================================== */
.hero {
  position: relative;
}

.hero .swiper-button-next,
.hero .swiper-button-prev {
  color: #fff;
}

.hero .swiper-pagination-bullet {
  background: #fff !important;
  opacity: 0.3;
}

.hero .swiper-pagination-bullet-active {
  opacity: 1;
}

.hero-content h1 {
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.hero-content p {
  color: rgba(255, 255, 255, 0.88);
}

/* ==========================================
   Stats
========================================== */
.stats-section {
  position: relative;
}

.stat-card {
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  gap: 12px;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: 0.25s;
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.stat-icon i {
  color: var(--primary);
}

.stat-content p {
  color: var(--muted);
}

/* ==========================================
   Products
========================================== */
.category-filter .filter-btn {
  transition: 0.25s;
}

.category-filter .filter-btn.active,
.category-filter .filter-btn:hover {
  border-color: rgba(0, 81, 255, 0.35) !important;
  background: var(--primary-soft) !important;
  color: var(--primary) !important;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.product-card {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: 0.25s;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.product-image img {
  width: 100%;
  height: 230px;
  object-fit: cover;
}

.product-badge {
  background: var(--primary);
  color: #fff;
}

.product-overlay {
  backdrop-filter: blur(6px);
}

.product-info {
  padding: 14px;
}

.product-category {
  color: var(--muted);
}

.product-title {
  text-decoration: none;
  font-weight: 900;
}

.product-title:hover {
  color: var(--primary);
}

.product-desc {
  margin: 0;
  color: var(--muted);
}

.product-specs span i {
  color: var(--primary);
}

.product-footer {
  margin-top: 12px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.product-price .price {
  color: var(--text);
  font-size: 18px;
}

.btn-add-cart {
  background: var(--primary);
  color: #fff;
  border-radius: 14px;
  padding: 10px 12px;
}

.btn-add-cart:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.btn-compare:hover {
  border-color: rgba(0, 81, 255, 0.30);
  color: var(--primary);
}

/* ==========================================
   Services
========================================== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.service-card {
  border-radius: var(--radius);
  padding: 18px;
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: 0.25s;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.service-icon i {
  color: var(--primary);
}

.service-content p {
  color: var(--muted);
}

/* ==========================================
   Projects
========================================== */
.project-card {
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: 0.25s;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.project-card p {
  color: var(--muted);
}

.project-card img {
  height: 220px;
  object-fit: cover;
  width: 100%;
}

/* ==========================================
   Contact
========================================== */
.contact-form,
.contact-info {
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  outline: none;
  border: 1px solid var(--border) !important;
  background: var(--bg) !important;
  color: var(--text) !important;
  transition: 0.2s;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  border-color: rgba(0, 81, 255, 0.50) !important;
  box-shadow: 0 0 0 4px rgba(0, 81, 255, 0.12);
}

.info-icon i {
  color: var(--primary);
}

/* ==========================================
   Testimonials
========================================== */
.testimonial-card {
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: 0.25s;
}

.testimonial-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.testimonial-rating i {
  color: #ffb700;
}

.author-info span,
.testimonial-card p {
  color: var(--muted);
}

/* Swiper pagination for testimonials */
.testimonials-section .swiper-pagination-bullet {
  background: var(--text) !important;
  opacity: 0.25;
}

.testimonials-section .swiper-pagination-bullet-active {
  opacity: 1;
}

/* ==========================================
   Footer
========================================== */
.footer a:hover {
  text-decoration: underline;
}

/* ==========================================
   Notifications
========================================== */
.notification-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 10003;
}

.notification-container .notification {
  pointer-events: auto;
}

/* ==========================================
   Quick View Modal
========================================== */
.quick-view-modal .modal-content {
  box-shadow: var(--shadow-lg);
}

.quick-view-modal img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
}

/* ==========================================
   Cart Sidebar
========================================== */
.cart-sidebar {
  background: var(--card);
  border-left: 1px solid var(--border);
}

.cart-sidebar strong {
  color: var(--text);
}

.cart-sidebar span {
  color: var(--muted);
}

/* ==========================================
   Back to top
========================================== */
.back-to-top:hover {
  transform: translateY(-2px);
}

/* ==========================================
   Responsive
========================================== */
@media (max-width: 1024px) {
  .products-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .mobile-menu-btn {
    display: block;
  }

  .nav-menu {
    position: fixed;
    left: 0;
    right: 0;
    top: 64px;
    background: var(--bg);
    padding: 16px;
    flex-direction: column;
    align-items: flex-start;
    transform: translateY(-20px);
    opacity: 0;
    visibility: hidden;
    transition: 0.25s;
    border-bottom: 1px solid var(--border);
  }

  .nav-menu.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
}

@media (max-width: 480px) {
  .products-grid {
    grid-template-columns: 1fr;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================
   Extra polish
========================================== */
::selection {
  background: rgba(0, 81, 255, 0.22);
}

::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,.18);
  border-radius: 999px;
}

body.dark ::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,.18);
}
