html, body {
    height: 100%;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
}

.hrStyle {
    border: 0;
    height: 1px;
    background-image: linear-gradient(to right, rgba(0, 0, 0, 0), rgba(131, 131, 131, 0.75), rgba(0, 0, 0, 0));
}

.card-title, footer,footer a  {
    font-family: Arial, sans-serif;
    font-weight: bold;
}

header {
    position: fixed;
    width: 100%;
    background-color: #fff;
    padding-top: 5px;
    padding-bottom: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    vertical-align: middle;
    z-index: 950;
}

.logo {
    max-width: 150px;
}

a, a:active {
    border-color: #b92525;
}

.card-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    padding: 10px;
}


#cardContainer {
    opacity: 1;
    transition: opacity 0.4s ease-in-out;
    margin-top: 10px;
}

#cardContainer.fade-out {
    opacity: 0;
}

#cardContainer.fade-in {
    opacity: 1;
}

.card {
    background-color: white;
    border-radius: 8px;
    border: 1px solid #eee;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    width: 100%;
    max-width: 300px;
    text-align: left;
}

/* Initial state before animation */
.card {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    position: relative;
    z-index: 900;
}

/* Animate in */
.card.show {
    opacity: 1;
    transform: translateY(0);
}

.card img {
    height: 75px;
    margin:auto;
}

.card-content {
    padding: 15px;
}

.card-title {
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: 8px;
    color: #181717;
}

.card-description {
    font-size: 1em;
    line-height: 1.2em;
    color: #444;
    margin-bottom: 17px;
}

.card-btn {
    display: block;
    width: 100%;
    text-align: center;
    background-color: #b92525;
    color: white;
    padding: 10px;
    border: none;
    cursor: pointer;
    font-size: 1em;
    border-radius: 5px;
    transition: background 0.3s;
}

.card-btn:hover {
    background-color: #cc3a3a;
}

.card img.cLogo {
    width: 100%;
    height: 180px;
    object-fit: cover;
}
.card-description {
    position: relative;
    transition: all 0.4s ease;
}

.card-description .full-text {
    display: inline;
    opacity: 0;
    transform: translateY(5px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    white-space: normal;
}

.card-description.expanded .full-text {
    opacity: 1;
    transform: translateY(0);
}

.expand-btn {
    background-color: transparent;
    border: none;
    color: #b92525;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    font-size: 16px;
    padding: 0 4px;
}

.expand-btn:hover {
    background-color: #facece;
}
.search-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 10px;
}

.logo {
    max-height: 50px;
}

#searchInput {
    width: 100%;
    max-width: 250px;
    padding: 7px;
    font-size: 1.1em;
    border: 2px solid #b92525;
    background-color: #efefef;
    border-radius: 5px;
    outline: none;
}

#searchInput:focus {
    border-color: #b92525;
}

#shoppingListBtn {
    font-size: 24px;
    background: none;
    border: none;
    cursor: pointer;
    position:fixed;
    right:15px;
    top:15px;
    border-radius: 5px;
    padding:5px;
}

#shoppingListPanel {
    top: 0;
    right: 0;
    width: 280px;
    height: 90%;
    background-color: white;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.3);
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    position: fixed;
    z-index: 1050;
}

#shoppingListPanel.show {
    transform: translateX(0);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#shoppingListItems {
    list-style: none;
    padding: 0;
    flex-grow: 1;
}

#shoppingListItems li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #ccc;
}

.remove-item {
    background-color: #b92525;
    color: white;
    border: none;
    padding: 5px;
    cursor: pointer;
    border-radius: 5px;
}

.remove-item:hover {
    background-color: #cc3a3a;
}

#clearListBtn {
    background-color: #b92525;
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
    width: 100%;
    font-size: 1em;
    border-radius: 5px;
}

#clearListBtn:hover {
    background-color: #cc3a3a;
}

#feedbackModal {
    bottom: 10%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #d4edda; /* Light green for success */
    color: #155724;
    padding: 10px 20px;
    border-radius: 5px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out;
    font-size: 1em;
    font-weight: bold;
    text-align: center;
    white-space: nowrap;
    position: fixed;
    z-index: 2000;
}

#feedbackModal.show {
    opacity: 1;
    visibility: visible;
}

#feedbackModal.warning {
    background-color: #fff3cd; /* Light yellow for warnings */
    color: #856404;
}

#feedbackModal.error {
    background-color: #f8d7da; /* Light red for errors */
    color: #721c24;
}

/* Side Menu Styles */
.side-menu {
    top: 0;
    left: 0;
    width: 75%;
    max-width: 280px;
    height: 100%;
    background-color: #ffffff;
    box-shadow: 2px 0 5px rgba(0,0,0,0.2);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    padding: 20px;
    display: flex;
    flex-direction: column;
    position: fixed;
    z-index: 1100;
}

/* Show the menu */
.side-menu.show {
    transform: translateX(0);
}

/* Menu Toggle Button (hamburger) */
.menu-toggle {
    position:fixed;
    top: 15px;
    left: 15px;
    font-size: 24px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 955;
    color: #b92525;
    padding: 8px;
}

.menu-toggle:hover {
    color: #cc3a3a;
}

/* Close Button inside side menu */
.close-btn {
    align-self: flex-end;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    margin-bottom: 20px;
    top:15px;
    right:15px;
    position:absolute;
}


/* Navigation Links */
.menu-links a {
    display: block;
    padding: 12px 0;
    font-size: 1.1em;
    color: #b92525;
    text-decoration: none;
    font-weight: bold;
    border-bottom: 1px solid #eee;
}

.menu-links-no-border-bottom {
    border-bottom: 0px solid #eee !important;
    padding-left: 7px !important;
    padding-right:7px !important;
}

.menu-links a:hover {
    color: #cc3a3a;
}

.menu-links {
    margin-top:50px;
}

.filter-links {
    text-align: center;
    margin: 5px;
    margin-top:0px;
    margin-bottom: 0px;
}

.filter-link {
    text-decoration: none;
    color: #cc3a3a;
    background-color: #efefef;
    padding: 8px 15px;
    border-radius: 5px;
    font-size: 1.3em;
    display: inline-block;
    margin-bottom: 10px;
}

.filter-link:hover {
    background-color: #facece;
    color:#efefef;
}


.filter-link-side-menu {
    display: inline-block; /* This is key to make them sit side-by-side */
    width: 100%; /* Will be overridden inside flex row */
    padding: 8px 5px 8px 10px !important;
    font-size: 1em !important;
    margin-bottom: 3px !important;
    box-sizing: border-box;
    text-align: left;
}
.filter-row {
    display: flex;
    gap: 3px;
    flex-wrap: wrap;
}

.filter-row .filter-link-side-menu {
    flex: 1 1 45%;
    max-width: 50%;
    text-align: left;
}

#spacer {
    width:100%;
    height:145px;
    min-height:145px;
}

/* Base styles for filter card */
#filterCard {
    background-color: #fff6f0;
    border-left: 4px solid #b92525;
    padding: 10px 20px;
    margin: 10px 20px;
    margin-left: auto;
    margin-right: 0;
    border-radius: 5px;
    position: relative;
    box-shadow: -4px 0 12px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transform: translateX(100%);
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.4s ease;
    will-change: transform, opacity;
    z-index: 900;
}


/* When shown */
#filterCard.animate-in {
    opacity: 1;
    transform: translateX(0);
}

/* Bounce effect on arrival */
@keyframes bounceIn {
    0% { transform: translateX(100%); }
    60% { transform: translateX(-10px); }
    80% { transform: translateX(5px); }
    100% { transform: translateX(0); }
}

#filterCard.bounce {
    animation: bounceIn 0.6s ease forwards;
}

/* Optional: Slide-out before content switches */
#filterCard.animate-out {
    transform: translateX(100%);
    opacity: 0;
}

#filterName {
    font-weight: bold;
    font-size: 1.1em;
    margin-bottom: 4px;
}

#filterDescription {
    font-size: 0.95em;
    color: #555;
}



/* Responsive Layout */
@media (min-width: 1024px) {
    .card {
        width: 30%;
    }
}

@media (min-width: 768px) {
    .card-container {
        justify-content: space-around;
    }
    .card {
        width: 45%;
    }
}


@media (max-width: 600px) {
    .search-container {
        flex-direction: column;
        gap: 10px;
    }

    #spacer {
        height:180px;
        min-height:180px;
    }

    .logo {
        max-height: 40px;
    }

    #searchInput {
        width: 90%;
    }
}

@media (min-width: 600px) {
    #filterCard {
        max-width:50%;
    }
}

.expand-btn {
    background-color: transparent;
    border: none;
    color: #b92525;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    font-size:16px;
}

.expand-btn:hover {
    text-decoration: none;
    background-color: #facece;
}

.expandTemp {
    background-color: #efefef;
    padding:8px 15px 8px 15px;
    border-radius: 8px;
    margin-left: 1px;
    float:right;
}

.border-left {
    border-left: 1px solid #eee;
}

/* blur background when opening side menus */
#overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backdrop-filter: blur(6px);
    background: rgba(0, 0, 0, 0.3);
    z-index: 950;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

#overlay.show {
    opacity: 1;
    pointer-events: auto;
}

#backgroundTitle {
    font-weight: bold;
    font-size:190px;
    color:#efefef;
    margin-top:140px;
    line-height: 95%;
    position: fixed;
}

#backgroundTitle {
    display: inline-block; /* Needed for transforms */
    transition: transform 0.4s ease, opacity 0.4s ease;
    will-change: transform, opacity;
  }
  
  /* Add this class to trigger the slide out */
  .slide-out {
    transform: translateX(-100%);
    opacity: 0;
  }
  
  /* Add this class to slide back in with bounce */
  .slide-in {
    transform: translateX(0);
    opacity: 1;
    animation: bounce-in 0.5s ease-out;
  }
  
  @keyframes bounce-in {
    0%   { transform: translateX(-100%); }
    60%  { transform: translateX(20px); }
    80%  { transform: translateX(-10px); }
    100% { transform: translateX(0); }
  }

  /* Share Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: #fff;
    padding: 20px 30px;
    border-radius: 10px;
    text-align: center;
    position: relative;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

.modal-content h3 {
    margin-top: 0;
    margin-bottom: 15px;
}

.modal-content input {
    width: 100%;
    padding: 10px;
    font-size: 1em;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.modal-content button {
    background-color: #b92525;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    font-size: 1em;
    cursor: pointer;
}

.modal-content button:hover {
    background-color: #cc3a3a;
}

.modal-close {
    position: absolute;
    right: 10px;
    top: 10px;
    background: transparent;
    font-size: 18px;
    border: none;
    cursor: pointer;
}

#copyFeedback {
    color: green;
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
    font-weight: bold;
    position:absolute;
    left: 35px;
    bottom: 25px;
    float:left;
}
#copyFeedback.show {
    opacity: 1;
}