/* ============================================================
   LIFESAF CUSTOM SITE STYLES — custom-styles.css
   ============================================================ */

body {
  font-family: var(--font-secondary);
  background-color: #F8F9FA;
  color: var(--color-text-primary);
}

/* ============================================================
   HEADER & STICKY STYLINGS
   ============================================================ */
.top-header {
  background: var(--color-navy-deep);
  color: var(--color-white);
  padding: 8px 0;
  font-size: var(--fs-sm);
}
.top-header a {
  color: rgba(255,255,255,0.8);
  transition: color var(--transition-fast);
}
.top-header a:hover {
  color: var(--color-accent);
}

.main-header {
  background: var(--color-white);
  padding: 15px 0;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  transition: all var(--transition-base);
  z-index: 1000;
}
.main-header.sticky {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 10px 0;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from { transform: translateY(-100%); }
  to { transform: translateY(0); }
}

.header-logo img {
  max-height: 48px;
  width: auto;
}

/* Search input with rounded pill design */
.header-search-wrapper {
  position: relative;
  max-width: 480px;
  width: 100%;
}
.header-search-input {
  width: 100%;
  height: 40px;
  padding: 10px 50px 10px 20px;
  border-radius: var(--radius-input);
  border: 1px solid var(--color-border-subtle);
  outline: none;
  font-size: var(--fs-base);
  transition: all var(--transition-fast);
}
.header-search-input:focus {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-focus-primary);
}
.header-search-btn {
  position: absolute;
  right: 4px;
  top: 4px;
  width: 32px;
  height: 32px;
  background: var(--color-accent);
  color: var(--color-white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-fast);
}
.header-search-btn:hover {
  background: var(--color-accent-dark);
}

/* Nested Navigation Megamenu */
.navbar-ls {
  padding: 0;
}
.nav-item-ls {
  position: relative;
}
.nav-link-ls {
  color: var(--color-text-secondary);
  font-size: var(--fs-base);
  font-weight: var(--fw-medium);
  padding: 10px 16px;
  display: block;
  transition: color var(--transition-fast);
  text-transform: uppercase;
}
.nav-link-ls:hover,
.nav-link-ls.active {
  color: var(--color-accent);
}

/* Megamenu dropdown design */
.dropdown-menu-ls {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--color-white);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-elevated);
  padding: 12px 0;
  min-width: 220px;
  z-index: 1050;
  animation: fadeIn 0.2s ease;
}
.nav-item-ls:hover .dropdown-menu-ls {
  display: block;
}
.dropdown-item-ls {
  padding: 8px 20px;
  color: var(--color-text-secondary);
  font-size: var(--fs-base);
  transition: all var(--transition-fast);
  display: block;
}
.dropdown-item-ls:hover {
  background: var(--color-surface-light);
  color: var(--color-accent);
  padding-left: 24px;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Cart Icon Badge */
.header-cart-btn {
  position: relative;
  color: var(--color-navy-deep);
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-surface-light);
  transition: all var(--transition-fast);
}
.header-cart-btn:hover {
  background: rgba(254, 117, 0, 0.1);
  color: var(--color-accent);
}
.header-cart-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--color-accent);
  color: var(--color-white);
  font-size: 10px;
  font-weight: var(--fw-bold);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--color-white);
}

/* ============================================================
   FRONTEND HOME SLIDER
   ============================================================ */
.home-slider {
  margin-bottom: 40px;
}
.carousel-item {
  height: 460px;
  background-color: var(--color-navy-deep);
}
.carousel-item img {
  object-fit: cover;
  width: 100%;
  height: 100%;
  opacity: 0.85;
}
.carousel-caption-custom {
  position: absolute;
  top: 50%;
  left: 8%;
  transform: translateY(-50%);
  text-align: left;
  color: var(--color-white);
  max-width: 600px;
  z-index: 10;
}
.carousel-caption-eyebrow {
  color: var(--color-accent);
  font-size: var(--fs-base);
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 12px;
}
.carousel-caption-title {
  font-size: 38px;
  font-weight: var(--fw-bold);
  line-height: 1.2;
  margin-bottom: 16px;
}
.carousel-caption-desc {
  font-size: 15px;
  color: rgba(255,255,255,0.8);
  margin-bottom: 28px;
  line-height: 1.6;
}

@media (max-width: 768px) {
  .carousel-item { height: 320px; }
  .carousel-caption-title { font-size: 24px; }
  .carousel-caption-desc { display: none; }
}

/* ============================================================
   CATEGORIES LIST / HOMEPAGE
   ============================================================ */
.category-highlight-card {
  background: var(--color-white);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-card);
  padding: 20px;
  text-align: center;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-raised);
}
.category-highlight-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-elevated);
}
.category-highlight-img {
  width: 90px;
  height: 90px;
  object-fit: contain;
  margin: 0 auto 16px;
}
.category-highlight-name {
  font-size: var(--fs-lg);
  font-weight: var(--fw-bold);
  margin-bottom: 8px;
  color: var(--color-navy-deep);
}
.category-highlight-desc {
  font-size: var(--fs-base);
  color: var(--color-text-secondary);
  margin-bottom: 16px;
  height: 60px;
  overflow: hidden;
}

/* ============================================================
   PRODUCT CARDS GRID LAYOUTS
   ============================================================ */
.product-card-img-wrapper {
  position: relative;
  aspect-ratio: 1/1;
  background: #FFF;
  border-radius: var(--radius-card);
  overflow: hidden;
  margin-bottom: 12px;
}
.product-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}
.card-product:hover .product-card-img {
  transform: scale(1.08);
}
.product-card-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 5;
}
.product-card-name {
  font-size: var(--fs-base);
  font-weight: var(--fw-medium);
  color: var(--color-text-primary);
  margin-bottom: 6px;
  height: 40px;
  overflow: hidden;
  line-height: 1.4;
}
.product-card-sku {
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  margin-bottom: 8px;
}
.product-card-price-row {
  margin-bottom: 14px;
}
.product-card-price {
  font-size: var(--fs-lg);
  font-weight: var(--fw-bold);
  color: var(--color-accent);
}
.product-card-old-price {
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
  text-decoration: line-through;
  margin-left: 8px;
}
.product-card-buttons {
  margin-top: auto;
  display: flex;
  gap: 8px;
}
.product-card-buttons .btn {
  flex: 1;
  padding: 6px 4px;
  font-size: var(--fs-sm);
}

/* ============================================================
   PRODUCT DETAIL GALLERY & ZOOM
   ============================================================ */
.detail-main-img-wrapper {
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-card);
  background: white;
  aspect-ratio: 1/1;
  overflow: hidden;
  margin-bottom: 12px;
}
.detail-main-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s ease-out;
}
.detail-main-img:hover {
  transform: scale(1.3);
  cursor: zoom-in;
}
.detail-thumb-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}
.detail-thumb-item {
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-badge);
  aspect-ratio: 1/1;
  overflow: hidden;
  cursor: pointer;
  background: white;
  transition: all var(--transition-fast);
}
.detail-thumb-item:hover,
.detail-thumb-item.active {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 2px rgba(254,117,0,0.15);
}
.detail-thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.spec-table {
  width: 100%;
  margin-top: 15px;
}
.spec-table th {
  background: var(--color-surface-light);
  font-weight: var(--fw-medium);
  width: 160px;
}

/* ============================================================
   CART & CHECKOUT TABLE
   ============================================================ */
.cart-table th {
  background: var(--color-navy-deep);
  color: var(--color-white);
  font-weight: var(--fw-medium);
  border: none;
}
.cart-table td {
  vertical-align: middle;
}
.cart-item-qty-input {
  width: 60px;
  text-align: center;
  border-radius: 4px;
  border: 1px solid var(--color-border-subtle);
}

/* ============================================================
   FOOTER SECTION
   ============================================================ */
.site-footer {
  background: var(--color-navy-deep);
  color: rgba(255,255,255,0.7);
  padding: 50px 0 20px;
  font-size: var(--fs-base);
}
.site-footer h4 {
  color: var(--color-white);
  font-size: var(--fs-md);
  font-weight: var(--fw-bold);
  margin-bottom: 20px;
  border-left: 3px solid var(--color-accent);
  padding-left: 10px;
  text-transform: uppercase;
}
.site-footer a {
  color: rgba(255,255,255,0.7);
}
.site-footer a:hover {
  color: var(--color-accent);
}
.site-footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  margin-top: 40px;
  padding-top: 20px;
  font-size: var(--fs-sm);
}

/* ============================================================
   LAZY LOAD EFFECT
   ============================================================ */
img.lazy {
  opacity: 0;
  transition: opacity 0.3s ease;
}
img.lazy.loaded {
  opacity: 1;
}
