/* 1. Design Tokens & Root */
:root {
  --primary: #f26522;
  --primary-hover: #d1541a;
  --secondary: #002d5d;
  --bg: #f8f9fa;
  --muted: #6c757d;
  --card-bg: #fffcf8;
  --border-light: #ffd8c4;
  --radius: 12px;
}

img{
  width: 100%;
  height: auto;
  display: inline-table;
}

/* 3. Utility Classes */
.text-orange {
  color: var(--primary) !important;
}
.bg-orange {
  background-color: var(--primary) !important;
}
.fw-semibold {
  letter-spacing: -0.2px;
}

.btn-orange {
  background-color: var(--primary);
  color: white;
  border: none;
  font-weight: 600;
  transition: background 0.2s;
}
.btn-orange:hover {
  background-color: var(--primary-hover);
  color: white;
}

.btn-outline-orange {
  border: 1px solid var(--primary);
  color: var(--primary);
  font-weight: 600;
}
.btn-outline-orange:hover {
  background-color: var(--primary);
  color: white;
}

/* 4. Layout Components */
.main-header {
  height: 70px;
  display: flex;
  align-items: center;
}

.header-logo {
  height: 32px;
  width: auto;
}

.search-box-wrapper {
  background: #f1f3f6;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: all 0.3s ease;
  overflow: hidden;
}
.search-box-wrapper:focus-within {
  background: #fff;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(242, 101, 34, 0.1);
}
.search-box-wrapper input {
  background: transparent;
  border: none;
  font-size: 14px;
  padding: 12px 0;
}
.search-box-wrapper .input-group-text {
  border: none;
  color: #878787;
}

.search-suggestions-panel {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  z-index: 1000;
  border-radius: 0 0 12px 12px;
  margin-top: 1px;
}

.wallet-icon {
  height: 36px;
  border: 1px solid #e0e0e0;
}

/* 5. Scroll & Carousel Engines */
.hide-scrollbar {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.hide-scrollbar::-webkit-scrollbar {
  display: none;
}

.scroll-content {
  display: flex;
  overflow-x: auto;
  gap: 1rem;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

.custom-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 999;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  border: 0;
  transition: transform .15s ease, opacity .15s;
  opacity: 1;
}
.custom-nav-btn:hover {
  transform: translateY(-50%) scale(1.05);
}

.prev-btn,
.next-btn {
  cursor: pointer;
  transition: opacity 0.3s, transform 0.2s;
  user-select: none;
}

/* 6. Section Specific Cards */
.section-title {
  font-weight: 700;
  font-size: 1.25rem;
}

/* Offer Banners */
.offer-card {
 /* min-height: 200px; */
  cursor: pointer;
  transition: transform 0.3s ease;
}
.offer-card:hover {
  transform: scale(1.02);
}
.bg-purple-gradient {
  background: linear-gradient(135deg, #7b1fa2, #e91e63);
}

/* Category Circles */
.circle-box {
  width: 80px;
  height: 80px;
  background: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  transition: transform 0.2s;
}
.scroll-card {
  flex: 0 0 auto;
  width: 110px;
}
.scroll-card:hover .circle-box {
  transform: scale(1.08);
  border-color: var(--primary) !important;
}

/* Store Cards */
.store-card {
  border: 1px solid #eee;
  border-radius: 12px;
  background: #fff;
  text-align: center;
  padding: 15px;
  height: 100%;
  transition: transform 0.2s, box-shadow 0.2s;
}
.store-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
}
.cashback-badge {
  color: #198754;
  font-weight: 700;
  font-size: 0.85rem;
}

/* How It Works Section */
.works-wrapper {
  overflow-x: auto;
  padding-bottom: 15px;
  padding: 10px 5px 20px 5px; /* Added padding to prevent shadow clipping */
  scrollbar-width: none; /* Hides scrollbar for Firefox */
  -ms-overflow-style: none; /* Hides scrollbar for IE/Edge */
}
.works-scroll-content {
  display: flex;
  gap: 16px;
}
.work-card {
  flex: 0 0 320px;
  background: var(--card-bg);
  border: 1.5px solid var(--border-light);
  border-radius: 16px;
  padding: 20px;
  transition: transform 0.3s ease;
}
.card-inner {
  display: flex;
  gap: 15px;
  justify-content: space-between;
  height: 100%;
}
.step-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.3;
}
.step-desc {
  font-size: 0.85rem;
  color: #555;
}
.image-box img {
  height: 100px;
  width: auto;
  object-fit: contain;
}

/* 7. Sidebar & Offcanvas */
#sidebarMenu {
  font-family: "Inter", sans-serif;
}
.list-group-item-action {
  color: #212529;
  transition: background 0.2s;
}
.list-group-item-action:hover {
  background-color: #f8f9fa;
  color: var(--primary);
}

/* 8. Responsive Media Queries (Unified) */
@media (max-width: 768px) {
  .main-header {
    height: 60px;
  }
  .header-logo {
    height: 24px;
  }
  .search-box-wrapper input {
    padding: 8px 0;
    font-size: 13px;
  }
  .custom-nav-btn {
    width: 35px;
    height: 35px;
  }
  .carousel-control-prev.custom-nav-btn {
    left: 5px;
  }
  .carousel-control-next.custom-nav-btn {
    right: 5px;
  }
  .section-title {
    font-size: 1.1rem;
  }
}

@media (min-width: 992px) {
  .circle-box {
    width: 115px;
    height: 115px;
  }
  .scroll-card {
    width: 150px;
  }
  .works-scroll-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }
  .work-card {
    flex: none;
    width: 100%;
  }
  .work-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(242, 101, 34, 0.1);
  }
  .carousel-control-prev.custom-nav-btn {
    left: -22px;
  }
  .carousel-control-next.custom-nav-btn {
    right: -22px;
  }
}

/* Accordion Custom Styling */
.custom-accordion .accordion-button {
  font-size: 1.1rem;
  padding: 10px;
}

/* Remove default arrow and add custom centered behavior */
.custom-accordion .accordion-button::after {
  margin-left: 10px;
  background-size: 1rem;
}

/* The 5-Column Grid for Links */
.footer-links-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* Default 2 columns for mobile */
  gap: 15px 10px;
  place-items: center;
}

.footer-links-grid a {
  color: #333;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.footer-links-grid a:hover {
  color: var(--primary);
}

/* Desktop Alignment: Exactly matches the 5-column layout in your image */
@media (min-width: 992px) {
  .footer-links-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 20px 30px;
  }

  .custom-accordion .accordion-button {
    justify-content: center; /* Centers the title as seen in image */
  }
}

/* Specific Accordion behavior to match CashKaro's flat design */
.custom-accordion .accordion-item {
  background-color: transparent;
}

.custom-accordion .accordion-button:not(.collapsed) {
  color: #000;
  background-color: #fff;
  box-shadow: none;
}

/* Flash Deals Specialized Styling */
.flash-deals-container {
  background: linear-gradient(180deg, #3b5998 0%, #2a437c 100%); /* Matches blue theme in image */
  border-radius: 8px;
  overflow: hidden;
}

#flash-deals-section .flash-deal-item {
  flex: 0 0 280px; /* Precise width for deal banners */
  transition: transform 0.3s ease;
}

#flash-deals-section .flash-deal-item:hover {
  transform: translateY(-5px);
}

#flash-deals-section .flash-deal-item img {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  width: 100%;
  display: block;
}

/* View All Button Styling */
.view-all-flash {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.4);
  font-size: 14px;
  letter-spacing: 0.5px;
}

.view-all-flash:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: #fff;
  color: #fff;
}

/* Shared small utilities and minimal components used by multiple views */
.hide-scrollbar{scrollbar-width:none;-ms-overflow-style:none}
.hide-scrollbar::-webkit-scrollbar{display:none}

.scroll-content{display:flex;overflow-x:auto;gap:1rem;-webkit-overflow-scrolling:touch}
.custom-nav-btn{width:44px;height:44px;border-radius:50%;display:flex;align-items:center;justify-content:center;border:0;background:#fff;box-shadow:0 6px 18px rgba(0,0,0,0.06)}
.custom-nav-btn:focus{outline:0}

/* Offer banner container baseline */
.offer-banner-container{position:relative;overflow:hidden;border-radius:10px;background:#f5f5f5}
.offer-banner-container img{width:100%;height:100%;object-fit:cover;display:block;transition:transform .3s ease}

/* Small store logo helpers used in multiple views */
.store-logo{max-height:56px;object-fit:contain}
.store-logo-large{max-height:120px;object-fit:contain}

/* Minimal card base used by multiple views */
.card-base{background:#fff;border-radius:var(--radius,12px);box-shadow:0 6px 18px rgba(2,45,93,0.04);overflow:hidden}

/* Ensure scroll sections are positioned for absolute controls */
.dynamic-scroll-section {
  position: relative;
}

/* Fixed positioning, visibility and z-index for carousel nav buttons */
.custom-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 999;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  border: 0;
  transition: transform .15s ease, opacity .15s;
  opacity: 1;
}

/* Slight lift on hover */
.custom-nav-btn:hover {
  transform: translateY(-50%) scale(1.05);
}

/* Position sides */
.custom-nav-btn.prev-btn { left: 8px; }
.custom-nav-btn.next-btn { right: 8px; }

/* Section-specific offsets (preserve existing inline offsets like -20px) */
.flash-deals-container .custom-nav-btn.prev-btn { left: -20px; }
.flash-deals-container .custom-nav-btn.next-btn { right: -20px; }

/* Keep responsive visibility controlled by existing bootstrap utility classes (d-none d-md-flex) */
