html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

/* Custom primary color to match logo - blue-gray/slate */
:root {
  --bs-primary: #518291;
  --bs-primary-rgb: 74, 95, 127;
  --bs-primary-hover: #3d4f68;
  --bs-primary-active: #354459;
}

/* Override Bootstrap primary button colors */
.btn-primary {
  background-color: #518291;
  border-color: #518291;
  color: #ffffff;
}

.btn-primary:hover {
  background-color: #3d4f68;
  border-color: #354459;
  color: #ffffff;
}

.btn-primary:focus,
.btn-primary:active,
.btn-primary.active {
  background-color: #354459;
  border-color: #2d3a4a;
  color: #ffffff;
  box-shadow: 0 0 0 0.25rem rgba(74, 95, 127, 0.5);
}

.btn-primary:disabled,
.btn-primary.disabled {
  background-color: #518291;
  border-color: #518291;
  opacity: 0.65;
}

/* Override Bootstrap outline primary button */
.btn-outline-primary {
  color: #518291;
  border-color: #518291;
}

.btn-outline-primary:hover {
  background-color: #518291;
  border-color: #518291;
  color: #ffffff;
}

.btn-outline-primary:focus,
.btn-outline-primary:active,
.btn-outline-primary.active {
  background-color: #3d4f68;
  border-color: #354459;
  color: #ffffff;
  box-shadow: 0 0 0 0.25rem rgba(74, 95, 127, 0.5);
}

/* Update text-primary class */
.text-primary {
  color: #518291 !important;
}

/* Update link colors */
a {
  color: #518291;
}

a:hover {
  color: #3d4f68;
}

/* Navbar toggler button styling */
.navbar-toggler {
  border-color: #518291;
}

.navbar-toggler:focus {
  box-shadow: 0 0 0 0.25rem rgba(81, 130, 145, 0.25);
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23518291' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem rgba(74, 95, 127, 0.5);
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

.discount-price {
    color: red !important;
}

.retail-price {
    color: blue !important;
}

.mainpage ul {
    list-style-type: none;
    padding-left: 0;
    margin: 0;
}

/* ============================================
   Products DataTable Styles
   ============================================ */

/* Loading spinner */
#loadingSpinner {
    margin: 20px 0;
}

.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Page overlay for loading state */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
}

/* Favorite heart icon hover effect */
.favorite-heart:hover {
    transform: scale(1.2);
    transition: transform 0.2s ease-in-out;
}

/* Responsive menu styling for mobile/collapsed view */
@media (max-width: 991.98px) {
    /* Center align all collapsed menu items */
    .navbar-collapse {
        text-align: center;
    }
    
    /* Remove default flex alignment */
    .navbar-collapse .navbar-nav {
        align-items: center;
    }
    
    /* Style dropdown menu items as buttons */
    .navbar-nav .nav-item {
        margin: 0.5rem 0;
        width: 100%;
        max-width: 300px;
    }
    
    /* Style nav links as button boxes */
    .navbar-nav .nav-link {
        display: block;
        padding: 0.75rem 1.5rem;
        margin: 0.25rem auto;
        background-color: #f8f9fa;
        border: 1px solid #dee2e6;
        border-radius: 0.375rem;
        text-align: center;
        transition: all 0.3s ease;
        width: 90%;
        max-width: 280px;
    }
    
    /* Hover effect for nav links */
    .navbar-nav .nav-link:hover {
        background-color: #e9ecef;
        border-color: #adb5bd;
        transform: translateY(-2px);
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }
    
    /* Style dropdown toggle button */
    .navbar-nav .dropdown-toggle {
        background-color: #518291;
        color: white !important;
        border-color: #518291;
        font-weight: 500;
    }
    
    .navbar-nav .dropdown-toggle:hover {
        background-color: #3d4f68;
        border-color: #354459;
    }
    
    /* Style dropdown menu */
    .navbar-nav .dropdown-menu {
        border: none;
        box-shadow: none;
        background-color: transparent;
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
        padding: 0.5rem;
    }
    
    /* Style dropdown items as buttons */
    .dropdown-menu .dropdown-item {
        display: block;
        padding: 0.5rem 1rem;
        margin: 0.25rem 0;
        background-color: #ffffff;
        border: 1px solid #dee2e6;
        border-radius: 0.25rem;
        text-align: center;
        transition: all 0.3s ease;
    }
    
    .dropdown-menu .dropdown-item:hover {
        background-color: #f8f9fa;
        border-color: #518291;
        color: #518291;
        transform: translateX(5px);
    }
    
    /* Center the search form */
    #globalSearchForm {
        justify-content: center;
        margin: 1rem auto;
        max-width: 300px;
    }
    
    /* Style search input and button */
    #globalSearchForm .form-control {
        text-align: center;
    }
    
    #globalSearchForm .btn {
        margin-top: 0.5rem;
    }
    
    /* Style icon links (Favorites, Profile, Logout) */
    .navbar-nav.ms-auto {
        flex-direction: row;
        justify-content: center;
        margin: 1rem 0;
    }
    
    .navbar-nav.ms-auto .nav-item {
        width: auto;
        margin: 0 0.5rem;
    }
    
    .navbar-nav.ms-auto .nav-link {
        width: auto;
        padding: 0.5rem 1rem;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background-color: #ffffff;
        border: 2px solid #dee2e6;
        border-radius: 50%;
        min-width: 45px;
        min-height: 45px;
    }
    
    .navbar-nav.ms-auto .nav-link:hover {
        transform: scale(1.1);
        box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    }
}

/* Hide reCAPTCHA badge */
.grecaptcha-badge {
    visibility: hidden;
}