/* ==========================================================================
   Sunlight Traders Core - Daraz Nepal Style Engine
   Domain: sunlighttraders.com.np
   ========================================================================== */

:root {
  --daraz-orange: #f85606;
  --daraz-orange-dark: #d34502;
  --daraz-blue: #0f136d;
  --daraz-bg: #f5f5f5;
  --daraz-card-bg: #ffffff;
  --daraz-text: #212121;
  --daraz-subtext: #757575;
  --daraz-border: #eff0f5;
  --daraz-star: #faca51;
  --daraz-success: #008a00;
  --daraz-radius: 4px;
}

.stc-mall-wrapper {
  background-color: var(--daraz-bg);
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  color: var(--daraz-text);
  padding: 0 0 40px;
}

.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Micro Top Nav */
.stc-micro-bar {
  background: #f7f7f7;
  border-bottom: 1px solid #e0e0e0;
  font-size: 12px;
  padding: 6px 12px;
}

.stc-micro-left a, .stc-micro-right a {
  color: var(--daraz-subtext);
  margin-right: 14px;
  text-decoration: none;
}

.stc-micro-left a:hover, .stc-micro-right a:hover {
  color: var(--daraz-orange);
}

@media (max-width: 768px) {
  .stc-micro-bar {
    display: none;
  }
}

/* Daraz Header */
.stc-header {
  background: #ffffff;
  padding: 12px 16px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.06);
  position: sticky;
  top: 0;
  z-index: 99;
}

.stc-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  gap: 16px;
}

.stc-brand {
  font-size: 22px;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

.stc-brand .orange {
  color: var(--daraz-orange);
}

.stc-brand .navy {
  color: var(--daraz-blue);
}

.stc-brand .tld {
  font-size: 11px;
  background: var(--daraz-blue);
  color: #fff;
  padding: 2px 4px;
  border-radius: 3px;
  margin-left: 4px;
}

.stc-search-bar {
  flex-grow: 1;
  max-width: 650px;
  display: flex;
}

.stc-search-bar input {
  width: 100%;
  height: 40px;
  padding: 0 14px;
  background: #eff0f5;
  border: 1px solid transparent;
  border-radius: 2px 0 0 2px;
  font-size: 13px;
  outline: none;
}

.stc-search-bar input:focus {
  background: #ffffff;
  border-color: var(--daraz-orange);
}

.stc-search-bar button {
  width: 46px;
  background: var(--daraz-orange);
  color: #fff;
  border: none;
  border-radius: 0 2px 2px 0;
  cursor: pointer;
}

.stc-header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.stc-action-btn {
  color: var(--daraz-blue);
  font-size: 20px;
  position: relative;
  text-decoration: none;
  padding: 4px;
}

.stc-action-btn .badge {
  position: absolute;
  top: -3px;
  right: -5px;
  background: var(--daraz-orange);
  color: #fff;
  font-size: 11px;
  font-weight: bold;
  height: 17px;
  width: 17px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Hero Section */
.stc-hero-section {
  max-width: 1200px;
  margin: 12px auto;
  padding: 0 12px;
}

.stc-hero-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 12px;
}

@media (max-width: 991px) {
  .stc-hero-grid {
    grid-template-columns: 1fr;
  }
  .stc-hero-categories {
    display: none;
  }
}

.stc-hero-categories {
  background: #ffffff;
  border-radius: var(--daraz-radius);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  padding: 6px 0;
}

.stc-cat-tree {
  list-style: none;
  margin: 0;
  padding: 0;
}

.stc-cat-tree li a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  color: #424242;
  font-size: 13px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.stc-cat-tree li:hover a, .stc-cat-tree li.active a {
  background: #fdeee7;
  color: var(--daraz-orange);
}

.stc-hero-banner {
  background: linear-gradient(135deg, #0f136d 0%, #1e26aa 55%, #f85606 100%);
  border-radius: var(--daraz-radius);
  color: #ffffff;
  padding: 36px 30px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 280px;
}

.stc-banner-tag {
  background: #ffffff;
  color: var(--daraz-orange);
  font-weight: 900;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 12px;
  width: fit-content;
  margin-bottom: 8px;
}

.stc-hero-banner h2 {
  font-size: 28px;
  color: #ffffff;
  margin: 0 0 6px;
  font-weight: 900;
}

.stc-hero-banner p {
  font-size: 14px;
  margin: 0 0 18px;
  opacity: 0.95;
}

.stc-banner-cta {
  background: var(--daraz-orange);
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 20px;
  border-radius: 2px;
  text-decoration: none;
  width: fit-content;
}

/* Features Strip */
.stc-features-strip {
  max-width: 1200px;
  margin: 0 auto 16px;
  padding: 10px 12px;
  background: #ffffff;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  border-bottom: 1px solid var(--daraz-border);
}

@media (max-width: 768px) {
  .stc-features-strip {
    grid-template-columns: repeat(2, 1fr);
  }
}

.stc-feature {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  color: #424242;
}

.stc-feature i {
  color: var(--daraz-orange);
  font-size: 18px;
}

/* Sections & Grids */
.stc-section {
  max-width: 1200px;
  margin: 0 auto 20px;
  padding: 0 12px;
}

.stc-section-header {
  background: #ffffff;
  padding: 12px 16px;
  border-bottom: 1px solid var(--daraz-border);
  border-radius: 4px 4px 0 0;
}

.stc-flash-title-area {
  display: flex;
  align-items: center;
  gap: 18px;
}

.stc-section-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--daraz-text);
  margin: 0;
}

.stc-timer-box {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--daraz-subtext);
}

.stc-t-digit {
  background: var(--daraz-orange);
  color: #fff;
  padding: 2px 5px;
  border-radius: 2px;
  font-weight: bold;
}

.stc-view-all-link {
  font-size: 12px;
  font-weight: 700;
  color: var(--daraz-orange);
  text-decoration: none;
}

.stc-products-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  background: #ffffff;
  padding: 12px;
}

@media (max-width: 1200px) {
  .stc-products-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
@media (max-width: 768px) {
  .stc-products-grid {
    grid-template-columns: repeat(2, 1fr);
    padding: 8px;
    gap: 8px;
  }
}

.stc-card {
  background: #ffffff;
  border: 1px solid transparent;
  border-radius: 2px;
  display: flex;
  flex-direction: column;
  transition: all 0.2s ease;
  overflow: hidden;
}

.stc-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  border-color: #e0e0e0;
}

.stc-card-thumb {
  position: relative;
  height: 170px;
  background: #f8f8f8;
}

.stc-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.stc-badge-tag {
  position: absolute;
  top: 6px;
  left: 6px;
  background: var(--daraz-orange);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 4px;
  border-radius: 2px;
}

.stc-card-body {
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.stc-card-title {
  font-size: 13px;
  font-weight: 400;
  line-height: 1.35;
  height: 35px;
  overflow: hidden;
  margin: 0 0 6px;
}

.stc-price-box {
  margin-bottom: 4px;
}

.stc-current-price {
  font-size: 15px;
  font-weight: 700;
  color: var(--daraz-orange);
  margin-right: 6px;
}

.stc-old-price {
  font-size: 11px;
  color: #9e9e9e;
  text-decoration: line-through;
}

.stc-stars {
  color: var(--daraz-star);
  font-size: 10px;
  margin-top: auto;
  margin-bottom: 8px;
}

.stc-add-btn {
  background: #fdeee7;
  color: var(--daraz-orange);
  border: 1px solid var(--daraz-orange);
  font-size: 12px;
  font-weight: 700;
  padding: 6px 0;
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.stc-add-btn:hover {
  background: var(--daraz-orange);
  color: #ffffff;
}

/* Catalog Layout with Filters */
.stc-catalog-grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 14px;
}

@media (max-width: 991px) {
  .stc-catalog-grid {
    grid-template-columns: 1fr;
  }
  .stc-filter-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    background: #fff;
    z-index: 1002;
    padding: 16px;
    box-shadow: 4px 0 20px rgba(0,0,0,0.25);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
  }
  .stc-filter-sidebar.open-filter {
    transform: translateX(0);
  }
}

.stc-filter-sidebar {
  background: #ffffff;
  padding: 16px;
  border-radius: 4px;
  height: fit-content;
}

.stc-filter-header-m {
  display: none;
}

@media (max-width: 991px) {
  .stc-filter-header-m {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
  }
  .stc-filter-header-m button {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
  }
}

.stc-widget {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--daraz-border);
}

.stc-widget h4 {
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 10px;
}

.stc-checks label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #424242;
  margin-bottom: 8px;
  cursor: pointer;
}

.stc-checks input {
  accent-color: var(--daraz-orange);
}

.stc-price-inputs {
  display: flex;
  align-items: center;
  gap: 6px;
}

.stc-price-inputs input {
  width: 70px;
  padding: 6px 8px;
  border: 1px solid #ccc;
  font-size: 12px;
  border-radius: 2px;
}

.stc-price-inputs button {
  background: var(--daraz-orange);
  color: #fff;
  border: none;
  padding: 6px 10px;
  border-radius: 2px;
  cursor: pointer;
}

.stc-catalog-toolbar {
  background: #ffffff;
  padding: 10px 14px;
  border-radius: 4px;
  margin-bottom: 10px;
  font-size: 13px;
  color: var(--daraz-subtext);
}

.stc-sort select {
  padding: 4px 8px;
  border: 1px solid #ccc;
  background: #fff;
  border-radius: 2px;
}

/* ==========================================================================
   Global Slide-Over Cart Drawer & Bottom Nav
   ========================================================================== */
.stc-cart-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.stc-cart-backdrop.show {
  opacity: 1;
  visibility: visible;
}

.stc-cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 380px;
  max-width: 88vw;
  height: 100%;
  background: #ffffff;
  z-index: 9999;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
  display: flex;
  flex-direction: column;
}

.stc-cart-drawer.open {
  transform: translateX(0);
}

.stc-drawer-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--daraz-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.stc-drawer-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--daraz-text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.stc-close-btn {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #757575;
}

.stc-drawer-body {
  padding: 16px;
  flex-grow: 1;
  overflow-y: auto;
}

.stc-empty-cart {
  text-align: center;
  padding: 40px 10px;
  color: var(--daraz-subtext);
}

.stc-empty-cart i {
  font-size: 40px;
  color: #ccc;
  margin-bottom: 10px;
}

.stc-btn-orange {
  background: var(--daraz-orange);
  color: #fff;
  border: none;
  padding: 8px 16px;
  font-weight: 700;
  font-size: 12px;
  border-radius: 2px;
  cursor: pointer;
}

.stc-cart-row {
  display: flex;
  gap: 12px;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--daraz-border);
  position: relative;
}

.stc-cart-row img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 2px;
}

.stc-cart-row-info {
  flex-grow: 1;
}

.stc-cart-row-title {
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 4px;
}

.stc-cart-row-price {
  font-size: 14px;
  font-weight: 700;
  color: var(--daraz-orange);
}

.stc-qty-btn-group {
  display: inline-flex;
  border: 1px solid #ccc;
  border-radius: 2px;
  margin-top: 6px;
}

.stc-qty-btn-group button {
  background: #f5f5f5;
  border: none;
  width: 22px;
  height: 22px;
  cursor: pointer;
}

.stc-qty-btn-group span {
  padding: 0 8px;
  font-size: 12px;
}

.stc-delete-item {
  position: absolute;
  top: 0;
  right: 0;
  background: none;
  border: none;
  color: #9e9e9e;
  cursor: pointer;
}

.stc-drawer-footer {
  padding: 16px 20px;
  background: #f7f7f7;
  border-top: 1px solid var(--daraz-border);
}

.stc-summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 6px;
}

.stc-free-delivery {
  color: var(--daraz-success);
}

.stc-total-row {
  font-size: 16px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed #ccc;
}

.stc-total-row strong {
  color: var(--daraz-orange);
}

.stc-btn-checkout {
  display: block;
  text-align: center;
  width: 100%;
  background: var(--daraz-orange);
  color: #ffffff;
  padding: 12px;
  font-size: 14px;
  font-weight: 700;
  border-radius: 2px;
  text-decoration: none;
  margin-top: 10px;
}

/* Mobile Bottom Bar */
.stc-mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 52px;
  background: #ffffff;
  border-top: 1px solid #e0e0e0;
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1000;
}

@media (min-width: 992px) {
  .stc-mobile-bottom-nav {
    display: none;
  }
}

.stc-m-nav-item {
  background: none;
  border: none;
  color: #757575;
  font-size: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  position: relative;
  text-decoration: none;
  cursor: pointer;
}

.stc-m-nav-item i {
  font-size: 18px;
}

.stc-m-nav-item.active, .stc-m-nav-item:hover {
  color: var(--daraz-orange);
}

.stc-m-badge {
  position: absolute;
  top: -3px;
  right: -5px;
  background: var(--daraz-orange);
  color: #fff;
  font-size: 9px;
  font-weight: bold;
  height: 15px;
  width: 15px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Toast */
.stc-toast {
  position: fixed;
  bottom: 70px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  font-size: 13px;
  padding: 10px 18px;
  border-radius: 4px;
  z-index: 10000;
  transition: transform 0.3s ease;
  white-space: nowrap;
}

@media (min-width: 992px) {
  .stc-toast {
    bottom: 24px;
  }
}

.stc-toast.show {
  transform: translateX(-50%) translateY(0);
}
