/* Futilitee Custom Styles */

/* Global Styles */
body {
  font-family: "Verdana";
  color: #f8f9fa;
  line-height: 1.6;
  background-color: #212529; /* Bootstrap's bg-dark color */
}

a {
  color: #6ea8fe; /* Lighter blue for better contrast on dark background */
  text-decoration: none;
}

a:hover {
  color: #9ec5fe;
  text-decoration: underline;
}

/* Header Styles */
.navbar-brand {
  font-family: "Verdana";
  font-weight: 700;
  font-size: 1.5rem;
}

/* Header with background image */
header.header-with-image {
  position: relative;
  z-index: 1;
  min-height: 200px; /* Maintain minimum height */
  height: auto;      /* Allow height to adjust based on content */
  max-height: 30vh;  /* Limit maximum height to 30% of viewport height */
  transition: height 0.3s ease; /* Smooth transition when resizing */
}

.header-image-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
}

.header-background-image {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Change to cover for better responsiveness */
  object-position: left center;
  opacity: 0.7; /* Maintain readability of text */
}

/* Make the clickable area responsive */
header a[style*="position: absolute"] {
  height: 100% !important; /* Override inline style to make height responsive */
}

/* Clickable header area */
.header-home-link {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  /* Fixed width instead of calculated width */
  width: 200px;
  z-index: 100; /* Increased z-index to ensure it's above all other elements */
  cursor: pointer; /* Add cursor pointer to indicate it's clickable */
}

/* Add a CSS variable to store the position of the Products link */
:root {
  --products-link-left: 200px; /* Default value, will be updated with JavaScript */
}

header.header-with-image .navbar {
  background-color: transparent !important;
  /* Position the navbar at the top of the header */
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2; /* Ensure navbar is above the image */
}

header.header-with-image .navbar-brand,
header.header-with-image .nav-link {
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7); /* Add text shadow for better readability */
}

/* Add left margin to navbar navigation links */
.navbar-nav-shifted {
  margin-left: 200px; /* Move links 200px to the right */
}

/* Hero Section */
.hero {
  background-color: #000000; /* Black background */
  padding: 4rem 0;
  margin-bottom: 2rem;
}

.hero h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
}

/* Product Cards */
.card-link {
  color: inherit;
  text-decoration: none;
  display: block;
  cursor: pointer;
}

.card-link:hover {
  text-decoration: none;
  color: inherit;
}

.card-link:focus {
  outline: 2px solid #6ea8fe;
  outline-offset: 2px;
}

.product-card {
  border: 1px solid #495057;
  border-radius: 0.25rem;
  transition: all 0.3s ease;
  margin-bottom: 2rem;
  background-color: #343a40; /* Slightly lighter than the body background */
}

.product-card:hover {
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transform: translateY(-5px);
}

/* Ensure the card maintains its hover effects when inside a link */
.card-link .product-card:hover {
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transform: translateY(-5px);
}

/* Style the View Details span to look like a button but prevent interaction */
.card-link .btn {
  pointer-events: none; /* Prevent double-click issues */
}

.product-card img {
  width: 100%;
  height: auto;
  border-top-left-radius: 0.25rem;
  border-top-right-radius: 0.25rem;
}

.product-card .card-body {
  padding: 1.25rem;
}

.product-card .card-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.product-card .card-text {
  color: #adb5bd; /* Lighter gray for better readability on dark background */
  margin-bottom: 1rem;
}

.product-card .price {
  font-size: 1.25rem;
  font-weight: 700;
  color: #28a745;
  margin-bottom: 1rem;
}

/* Product Detail */
.product-detail .product-image {
  border-radius: 0.25rem;
  margin-bottom: 1rem;
}

.product-detail .product-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.product-detail .product-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: #28a745;
  margin-bottom: 1rem;
}

.product-detail .product-description {
  margin-bottom: 2rem;
}

/* Variant Selection */
.variant-selection {
  margin-bottom: 2rem;
}

.variant-selection .form-label {
  font-weight: 600;
}

.variant-selection .form-select {
  margin-bottom: 1rem;
}

/* Cart */
.cart-item {
  padding: 1rem 0;
  border-bottom: 1px solid #495057; /* Darker border to match the dark theme */
}

.cart-item:last-child {
  border-bottom: none;
}

.cart-item .item-image {
  width: 100px;
  height: auto;
  border-radius: 0.25rem;
}

.cart-item .item-details {
  padding-left: 1rem;
}

.cart-item .item-title {
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.cart-item .item-variant {
  color: #adb5bd; /* Lighter gray for better readability on dark background */
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

.cart-item .item-price {
  font-weight: 600;
  color: #28a745;
}

.cart-summary {
  background-color: #343a40; /* Match product card background */
  padding: 1.5rem;
  border-radius: 0.25rem;
  border: 1px solid #495057;
}

.cart-summary .summary-title {
  font-weight: 700;
  margin-bottom: 1rem;
}

.cart-summary .summary-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.cart-summary .summary-total {
  font-weight: 700;
  font-size: 1.25rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #495057; /* Darker border to match the dark theme */
}

/* Forms */
.form-container {
  max-width: 600px;
  margin: 0 auto;
}

.form-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

/* Main Content */
main.container {
  background-color: #2c3034; /* Slightly lighter than body background */
  padding: 2rem;
  border-radius: 0.25rem;
  margin-top: 1rem;
  margin-bottom: 1rem;
  border: 1px solid #495057;
}

/* Footer */
footer {
  margin-top: auto;
  position: relative;
  height: 200px; /* Change from min-height to fixed height */
  overflow: auto; /* Add scrolling if content exceeds height */
  display: flex;
  flex-direction: column;
}

/* Adjust footer container to be more compact */
footer .container {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding-top: 10px;
  padding-bottom: 10px;
}

/* Make footer content more compact */
footer h5 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

footer p,
footer span,
footer a {
  font-size: 0.85rem;
  margin-bottom: 0.25rem;
  line-height: 1.4;
}

footer hr {
  margin: 0.5rem 0;
}

footer .text-center p {
  margin-bottom: 0;
}

/* New styles for horizontal layout */
.footer-logo {
  height: 30px;
  width: auto;
}

.footer-slogan {
  display: inline-block;
  margin-left: 10px;
  font-style: italic;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.contact-heading {
  margin-bottom: 0;
  font-size: 0.9rem;
  display: inline-block;
  vertical-align: middle;
}

.contact-info {
  display: inline-flex;
  flex-wrap: wrap;
  vertical-align: middle;
}

/* Add new style */
.contact-section {
  text-align: right;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

/* Responsive adjustments for footer */
@media (max-width: 768px) {
  .footer-links, .contact-info {
    justify-content: flex-start;
    margin-top: 0.5rem;
  }

  .contact-section {
    text-align: left;
  }

  .contact-heading {
    display: block;
    margin-bottom: 0.25rem;
  }

  .contact-info {
    display: flex;
  }

  .footer-slogan {
    display: block;
    margin-left: 0;
    margin-top: 0.25rem;
  }
}

footer a {
  color: #fff;
  text-decoration: none;
}

footer a:hover {
  color: #f8f9fa;
  text-decoration: underline;
}

/* Footer with background image */
.footer-with-image {
  position: relative;
  z-index: 1;
}

.footer-image-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: -1;
}

.footer-background-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.8; /* Adjust opacity to ensure text readability */
}

.footer-with-image .container {
  position: relative;
  z-index: 2;
}

.footer-with-image h5,
.footer-with-image p,
.footer-with-image a,
.footer-with-image address {
  color: white;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7); /* Add text shadow for better readability */
}

.footer-with-image hr {
  border-color: rgba(255, 255, 255, 0.3);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .hero {
    padding: 2rem 0;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .product-detail .product-title {
    font-size: 1.5rem;
  }

  .product-detail .product-price {
    font-size: 1.25rem;
  }
}

/* Placeholder Styles */
.placeholder-image {
  background-color: #495057;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #adb5bd;
  font-weight: bold;
  text-align: center;
  border-radius: 0.25rem;
}

.placeholder-hero {
  height: 400px;
  width: 100%;
}

.placeholder-category {
  height: 250px;
  width: 100%;
}

.placeholder-product {
  height: 250px;
  width: 100%;
}

.placeholder-detail {
  height: 600px;
  width: 100%;
}

/* Authentication Forms */
.login-form,
.signup-form {
  max-width: 500px;
  margin: 2rem auto;
}

.auth-card {
  border-radius: 0.5rem;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  background-color: #343a40; /* Match product card background */
  border: 1px solid #495057;
}

.auth-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  text-align: center;
}

.auth-form .form-control {
  padding: 0.75rem 1rem;
  font-size: 1rem;
}

.auth-form .btn-primary {
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-weight: 600;
}

.auth-links {
  margin-top: 1.5rem;
  text-align: center;
}

.auth-links a {
  color: #6ea8fe; /* Match global link color */
  text-decoration: none;
}

.auth-links a:hover {
  color: #9ec5fe; /* Match global link hover color */
  text-decoration: underline;
}
