/* Centered loading message */
.loading-centered {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100px;
  text-align: center;
}
body {
    font-family: system-ui, Arial, sans-serif;
    margin: 0;
    background: #f8f9fa;
    color: #222;
}
header {
    background: #2d3e50;
    color: #fff;
    padding: 1.2em 0.5em 1em 0.5em;
    text-align: center;
}
header h1 {
    margin: 0 0 0.2em 0;
    font-size: 2em;
}
nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    gap: 1.5em;
}
nav a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
}
main {
    max-width: 900px;
    margin: 2em auto 0 auto;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 12px #0001;
    padding: 1.5em 1em 2em 1em;
}
#search-section {
    margin-bottom: 2em;
}
#search-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5em;
    align-items: center;
    justify-content: center;
}
#search-query {
    flex: 1 1 180px;
    min-width: 0;
    padding: 0.8em 1.2em;
    font-size: 1.35em;
    border: 1px solid #bbb;
    border-radius: 6px;
    background: #f9f9f9;
}
#search-form button {
    padding: 0.8em 1.4em;
    font-size: 1.25em;
    border: none;
    border-radius: 6px;
    background: #2d3e50;
    color: #fff;
    cursor: pointer;
    transition: background 0.2s;
}
#search-form button:hover {
    background: #1a2533;
}
#search-form label {
    font-size: 0.98em;
    color: #333;
    margin-left: 0.5em;
    display: flex;
    align-items: center;
    margin-bottom: 0;
}
#search-form .search-checkbox-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-left: 12px;
    margin-bottom: 0;
    gap: 2px;
}
.store-section-link {
    color: inherit;
    text-decoration: underline;
}
footer {
    text-align: center;
    color: #888;
    font-size: 0.95em;
    margin: 2em 0 1em 0;
}
#search-results {
    margin-top: 1.5em;
}
#search-results h3 {
    margin-top: 0;
    margin-bottom: 0.5em;
    font-size: 1.35em;
    color: #2d3e50;
    text-align: center;
    font-weight: 700;
    letter-spacing: 0.01em;
}
#search-results ul {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)) !important;
    gap: 18px !important;
    padding: 0 !important;
    margin: 0 0 48px 0 !important;
}
#search-results ul li {
    display: unset !important;
    align-items: unset !important;
    flex-wrap: unset !important;
    min-height: unset !important;
    padding: unset !important;
    background: unset !important;
    border-radius: unset !important;
    margin-bottom: unset !important;
    font-size: unset !important;
    overflow: unset !important;
}
.product-card-square {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    padding: 18px 12px 14px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 210px;
    height: 100%;
    list-style: none;
    transition: box-shadow 0.18s;
    position: relative;
}
.product-card-square:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.13);
}
.product-card-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    height: 100%;
}
.product-card-link-disabled {
    pointer-events: none;
    opacity: 0.6;
}
.product-card-img-wrapper {
    width: 90px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    background: #f7f7f7;
    border-radius: 8px;
    overflow: hidden;
}
.product-card-img {
    max-width: 90px;
    max-height: 90px;
    object-fit: contain;
    background: #fff;
    border-radius: 6px;
    display: block;
    margin: 0 auto;
}
.product-card-info {
    width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}
.product-card-name {
    font-weight: 600;
    font-size: 1.05em;
    color: #222;
    margin-bottom: 2px;
    display: block;
    word-break: break-word;
}
.product-card-price {
    color: #1a7f37;
    font-weight: 700;
    font-size: 1.08em;
    margin-bottom: 0;
    display: block;
}
.product-card-price-per {
    color: #888;
    font-size: 0.93em;
    margin-top: 0;
    display: block;
}
.store-section-bar {
    height: 10px;
    border-radius: 0 0 4px 4px;
    margin: 4px 0 16px 0;
    width: 100%;
    background: #3b82f6;
    transition: height 0.2s;
}
@media (max-width: 600px) {
    main {
        margin: 0.5em;
        padding: 1em 0.3em 1.5em 0.3em;
    }
    #search-form {
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: center;
        gap: 0.5em;
    }
    #search-query {
        flex: 1 1 120px;
        min-width: 0;
        padding: 0.5em 0.7em;
        font-size: 1em;
    }
    #search-form button {
        width: auto;
        padding: 0.5em 1em;
        font-size: 1em;
    }
    #search-form label {
        margin-left: 0;
        margin-top: 0.5em;
    }
    #search-form .search-checkbox-group {
        margin-left: 0.5em;
    }
    .store-section-bar {
        height: 50px;
    }
}
