:root {
  --footer-height: 70px;
}

body, html {
    height: 100%;
    margin: 0;
  }

  body {
    padding-top: 0; /* removed top padding */
    padding-bottom: var(--footer-height); /* space for fixed footer */
  }

  .logo {
    height: 60px; /* Adjust the height as needed */
    margin-right: 20px;
  }

  .navbar {
    margin-bottom: 0px;
    border-radius: 0;
    background-color: #ff6600; /* Orange background */
    border-color: #ff6600; /* Orange border */
    min-height: 70px; /* match footer height (~70px) */
  }
  .landing-page {
    position: relative;
    height: 100%;
    min-height: calc(100vh - var(--footer-height)); /* ensure footer doesn't cover content */
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    z-index: 1;
  }
  .navbar .navbar-brand {
    padding: 0;
    height: 70px; /* match navbar height */
    line-height: 70px; /* vertically center */
  }
  .navbar .nav > li.active > a {
    background-color: transparent !important; /* Remove black background */
    color: white !important; /* Ensure text color is white */
  }

  /* Ensure nav links are vertically centered in taller navbar */
  .navbar .nav > li > a {
    line-height: 70px;
    padding-top: 0;
    padding-bottom: 0;
  }

  .landing-content h1 {
    margin-bottom: 30px;
  }
  .landing-content .btn {
    margin: 10px;
    padding: 15px 30px;
    font-size: 18px;
  }
  .background {
    position: fixed; /* Make background persist while scrolling */
    inset: 0; /* top:0; right:0; bottom:0; left:0 */
    width: 100%;
    height: 100%;
    background-image: url('images/addis_skyline.jpeg');
    background-size: cover; /* Fill entire viewport */
    background-position: center center;
    background-repeat: no-repeat;
    filter: blur(2.5px); /* Reduced blur value */
    z-index: -1; /* Keep it behind all content */
    pointer-events: none; /* Ensure it never blocks clicks */
  }

  .container {
    background-color: white;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    margin-top: 50px;
    margin-bottom: calc(var(--footer-height) + 20px); /* prevent cutoff behind fixed footer */
  }

  /* Remove the jumbotron's default bottom margin */ 
  .jumbotron {
    margin-bottom: 0;
  }
 
  /* Add a navbar-matching background color and some padding to the footer */
  footer {
    background-color: #ff6600; /* match .navbar */
    color: #ffffff; /* ensure text is readable */
    min-height: var(--footer-height); /* match navbar height */
    padding: 0 25px; /* horizontal padding only to keep height consistent */
    display: flex;
    align-items: center; /* vertically center content */
    justify-content: center; /* center text horizontally */
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
  }
  footer a {
    color: #ffffff;
  }
  footer a:hover,
  footer a:focus {
    color: #ffe0cc; /* light tint for hover */
    text-decoration: none;
  }

  .panel-body img {
    max-width: 100%;
    height: auto;
  }

  .page-content {
    padding-top: 100px; /* Adjust based on your navbar/banner height */
    padding-bottom: calc(var(--footer-height) + 30px);
    min-height: 100vh; /* Ensure content always fills the viewport */
    box-sizing: border-box;
  }

  /* Uniform sizing for product panels in the catalog */
  #product-list .panel {
    display: flex;
    flex-direction: column;
    height: 420px; /* total fixed height for all panels */
  }

  #product-list .panel-heading {
    flex: 0 0 auto;
    min-height: 54px; /* stabilize heading height */
    display: -webkit-box;
    -webkit-line-clamp: 2; /* show up to 2 lines */
    line-clamp: 2; /* standard property for compatibility */
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  #product-list .panel-body {
    flex: 1 1 auto;
    height: 220px; /* fixed image area */
    padding: 0; /* let image fill the area */
    overflow: hidden;
  }

  #product-list .panel-body .carousel,
  #product-list .panel-body .carousel .carousel-inner,
  #product-list .panel-body .carousel .item {
    height: 100%;
  }

  #product-list .panel-body .carousel .item img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* crop to fill without distortion */
  }

  #product-list .panel-footer {
    flex: 0 0 auto;
    min-height: 90px; /* stabilize footer height */
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  #product-list .panel-footer .btn {
    margin-top: auto; /* push button to bottom */
  }

  /* View Product layout: centered and responsive */
  .product-container {
    max-width: 1100px; /* keep content readable on large screens */
    margin-left: auto;
    margin-right: auto;
    margin-top: 40px;
  }
  .product-details,
  .product-image {
    display: flex;
    flex-direction: column;
    justify-content: center; /* vertically center column content */
    gap: 10px;
  }
  .product-image h3,
  .product-details h3 {
    margin-top: 0;
  }
  /* Responsive carousel images on view-product */
  .product-image .carousel .item img {
    width: 100%;
    height: auto;
    max-height: 60vh; /* scale to viewport height */
    object-fit: contain; /* show full image */
  }
  @media (max-width: 768px) {
    .product-container {
      margin-top: 20px;
      padding-left: 15px;
      padding-right: 15px;
    }
    .product-image .carousel .item img {
      max-height: 45vh;
    }
    .product-details .btn {
      margin-top: 10px;
    }
  }

  /* Login page styles */
  .login-container {
    max-width: 400px;
    margin: 50px auto;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  }
  .login-container h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #333;
  }
  .login-container a {
    color: #337ab7;
    text-decoration: none;
  }
  .login-container a:hover {
    text-decoration: underline;
  }

  /* Order page overrides (to avoid content cutoff when Stripe element expands) */
  body.order-page {
    display: block !important;
    height: auto !important;
    width: 100% !important;
    justify-content: flex-start !important;
    align-content: stretch !important;
    overflow-y: auto !important; /* enable scrolling when content grows */
  }
  .order-page .panel {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 5px;
  }
  .order-page .panel-heading {
    background-color: #337ab7 !important;
    color: #fff !important;
    border-radius: 5px 5px 0 0;
  }
  .order-page .btn-primary {
    background-color: #337ab7;
    border-color: #2e6da4;
  }
  .order-page .btn-primary:hover {
    background-color: #286090;
    border-color: #204d74;
  }
  .order-page .container {
    margin-top: 30px;
  }

  /* Make main container fluid and flexible */
  .catalog-main.container {
    max-width: none;
    width: auto;
    margin: 0; /* remove default container margins */
    min-height: calc(100vh - var(--footer-height) - 50px); /* fill screen minus footer and top gap */
  }

  @media (max-width: 992px) {
    /* no special rules needed; Bootstrap grid will stack columns */
  }

  /* Compact filter styles to save space */
  #filters-col .panel-heading {
    padding: 8px 10px;
    font-size: 13px;
  }
  #filters-col .panel-body {
    padding: 10px;
  }
  #filters-col .form-group {
    margin-bottom: 8px;
  }
  #filters-col .input-group .form-control.input-sm {
    height: 28px;
    padding: 4px 8px;
    font-size: 12px;
  }
  #filters-col .input-group-btn .btn {
    padding: 3px 8px;
  }
  #category-filters {
    max-height: 320px; /* keep filter concise */
    overflow: auto;
  }
  #category-filters .checkbox {
    margin-top: 4px;
    margin-bottom: 4px;
  }
  #category-filters .checkbox label {
    font-size: 12px;
    line-height: 1.2;
    white-space: normal; /* allow wrapping */
    word-break: break-word; /* wrap long words */
  }
  #category-filters input[type="checkbox"] {
    margin-right: 6px;
    vertical-align: text-top;
  }
  #clearFiltersBtn {
    padding-left: 0;
  }

  /* Catalog: shrink filter to 75% of its previous width (2 cols -> 1.5 cols equivalent)
     and expand main accordingly (10 cols -> 10.5 cols) at sm and up. */
  @media (min-width: 768px) {
    .catalog-main > .row > #filters-col.col-sm-2 { width: 12.5%; }
    .catalog-main > .row > .col-sm-10 { width: 87.5%; }
  }