/** PRICE COMPARATOR **/

/* Quick links */
.price-quick-links {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Search row */
.price-search-row {
    display: flex;
    gap: 0.75rem;
    align-items: stretch;
}

@media screen and (max-width: 840px) {
    .price-search-row {
        flex-direction: column;
        max-width: 100%;
    }
}

/* Family select */
.price-family-select {
    height: 3rem;
    padding: 0 1rem;
    border: 2px solid var(--light-blue);
    border-radius: 10px;
    font-size: 0.9rem;
    outline: none;
    background: var(--white);
    color: var(--dark-blue);
    cursor: pointer;
    transition: border-color 0.2s ease;
    white-space: nowrap;
    min-width: 0;
}

.price-family-select:focus {
    border-color: var(--dark-blue);
}

/* Search bar */
.price-search-bar {
    display: flex;
    gap: 0;
    flex: 1;
    min-width: 0;
}

.price-search-bar input[type="text"] {
    flex: 1;
    height: 3rem;
    border: 2px solid var(--light-blue);
    border-radius: 10px;
    padding: 0 1.25rem;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s ease;
    min-width: 0;
}

.price-search-bar input[type="text"]:focus {
    border-color: var(--dark-blue);
}

.price-search-bar button {
    height: 3rem;
    padding: 0 1rem;
    background: var(--dark-blue);
    color: var(--white);
    border: 2px solid var(--dark-blue);
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    margin-left: -2px;
}

.price-search-bar button:hover {
    background: var(--white);
    color: var(--dark-blue);
}

/* Geolocation banner */
.price-geo-banner {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.price-geo-banner--active {
    background: #e8f5e9;
    color: #2e7d32;
}

.price-geo-banner--fallback {
    background: #fff3e0;
    color: #e65100;
}

/* Products grid */
.price-products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

@media screen and (max-width: 1240px) {
    .price-products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 840px) {
    .price-products-grid {
        grid-template-columns: repeat(1, 1fr);
    }
}

/* Product card */
.price-product-card {
    display: flex;
    flex-direction: column;
    background-color: var(--white);
    border-radius: 10px;
    padding: 1.25rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
    color: inherit;
}

.price-product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.price-product-card__name {
    font-weight: 600;
    color: var(--dark-blue);
    margin-bottom: 0.25rem;
    font-size: 1.05rem;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.price-product-card__quantity {
    color: var(--text-grey);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.price-product-card__footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid var(--light-grey);
}

.price-product-card__price {
    font-size: 1.4rem;
    font-weight: 700;
    color: #2e7d32;
}

.price-product-card__price--unavailable {
    font-size: 0.9rem;
    color: var(--text-grey);
    font-weight: 400;
}

.price-product-card__store {
    text-align: right;
    font-size: 0.85rem;
    color: var(--text-grey);
}

.price-product-card__store-logo {
    height: 1.5rem;
    width: auto;
    object-fit: contain;
    margin-bottom: 0.25rem;
}

.price-product-card__distance {
    font-size: 0.8rem;
    color: var(--text-grey);
}

/* Badge */
.price-badge {
    display: inline-block;
    background: var(--orange);
    color: var(--white);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 5px;
    text-transform: uppercase;
}

.price-badge--best {
    background: #2e7d32;
}

/* Sort controls */
.price-sort-controls {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.price-sort-btn {
    padding: 0.5rem 1.25rem;
    border-radius: 10px;
    border: 1px solid var(--light-blue);
    background: var(--white);
    color: var(--light-blue);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.95rem;
}

.price-sort-btn:hover {
    background: var(--light-blue);
    color: var(--white);
    border-color: var(--light-blue);
}

.price-sort-btn--active {
    background: var(--dark-blue);
    color: var(--white);
    border-color: var(--dark-blue);
}

/* Compare list */
.price-compare-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

@media screen and (max-width: 1240px) {
    .price-compare-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 840px) {
    .price-compare-list {
        grid-template-columns: 1fr;
    }
}

.price-compare-item {
    display: flex;
    flex-direction: column;
    background: var(--white);
    border-radius: 10px;
    padding: 1rem 1.25rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.price-compare-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.price-compare-item__top {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.price-compare-item--best {
    border: 2px solid #2e7d32;
}

.price-compare-item__logo {
    width: 3.5rem;
    height: 3.5rem;
    object-fit: contain;
    flex-shrink: 0;
}

.price-compare-item__logo-placeholder {
    width: 3.5rem;
    height: 3.5rem;
    background: var(--light-grey);
    border-radius: 8px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: var(--text-grey);
}

.price-compare-item__info {
    flex: 1;
    min-width: 0;
}

.price-compare-item__store-name {
    font-weight: 600;
    color: var(--dark-blue);
    margin-bottom: 0.15rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.price-compare-item__commune {
    font-size: 0.85rem;
    color: var(--text-grey);
}

.price-compare-item__right {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid var(--light-grey);
}

.price-compare-item__price {
    font-size: 1.3rem;
    font-weight: 700;
    color: #2e7d32;
}

.price-compare-item__diff {
    font-size: 0.8rem;
    color: var(--text-grey);
}

.price-compare-item__distance {
    font-size: 0.8rem;
    color: var(--text-grey);
}

/* Product header */
.price-product-header {
    margin-bottom: 1.5rem;
}

.price-product-header__name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark-blue);
    margin-bottom: 0.25rem;
}

.price-product-header__meta {
    font-size: 0.9rem;
    color: var(--text-grey);
}

/* Chart */
.price-chart-container {
    background: var(--white);
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 1.5rem;
    height: 400px;
}

@media screen and (max-width: 840px) {
    .price-chart-container {
        height: 300px;
        padding: 1rem;
    }
}

/* Store card */
.price-store-card {
    display: flex;
    flex-direction: column;
    background: var(--white);
    border-radius: 10px;
    padding: 1.25rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.price-store-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.price-store-card__top {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.price-store-card__logo {
    width: 3.5rem;
    height: 3.5rem;
    object-fit: contain;
    flex-shrink: 0;
}

.price-store-card__logo-placeholder {
    width: 3.5rem;
    height: 3.5rem;
    background: var(--light-grey);
    border-radius: 8px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: var(--text-grey);
    font-weight: 600;
}

.price-store-card__info {
    flex: 1;
    min-width: 0;
}

.price-store-card__name {
    font-weight: 600;
    color: var(--dark-blue);
    margin-bottom: 0.15rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.price-store-card__address {
    font-size: 0.85rem;
    color: var(--text-grey);
}

.price-store-card__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid var(--light-grey);
}

.price-store-card__phone {
    font-size: 0.85rem;
    color: var(--dark-blue);
}

.price-store-card__distance {
    font-weight: 600;
    color: var(--dark-blue);
    font-size: 0.9rem;
}

/* Map */
.price-map-container {
    height: 400px;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.price-map-container--single {
    height: 250px;
}

.price-map-user-marker {
    background: none;
    border: none;
}

.price-map-user-marker span {
    display: block;
    width: 14px;
    height: 14px;
    background: var(--dark-blue);
    border: 3px solid var(--white);
    border-radius: 50%;
    box-shadow: 0 0 0 2px var(--dark-blue);
}

@media screen and (max-width: 840px) {
    .price-map-container {
        height: 280px;
    }

    .price-map-container--single {
        height: 200px;
    }
}

/* Radius selector */
.price-radius-select {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.price-radius-select label {
    font-weight: 600;
    color: var(--dark-blue);
}

.price-radius-select select {
    padding: 0.4rem 0.75rem;
    border: 2px solid var(--light-blue);
    border-radius: 6px;
    font-size: 0.9rem;
    outline: none;
}

/* Stores grid */
.price-stores-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

@media screen and (max-width: 1240px) {
    .price-stores-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 840px) {
    .price-stores-grid {
        grid-template-columns: 1fr;
    }
}

/* Load more */
.price-load-more {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

/* Loading */
.price-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 3rem;
    color: var(--text-grey);
}

.price-spinner {
    display: inline-block;
    width: 2rem;
    height: 2rem;
    border: 3px solid var(--light-grey);
    border-top-color: var(--dark-blue);
    border-radius: 50%;
    animation: price-spin 0.8s linear infinite;
    margin-right: 0.75rem;
}

@keyframes price-spin {
    to { transform: rotate(360deg); }
}

/* Empty state */
.price-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-grey);
    grid-column: 1 / -1;
}

.price-empty__title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dark-blue);
}

/* Responsive search bar */
@media screen and (max-width: 840px) {
    .price-search-bar {
        max-width: 100%;
    }

    .price-sort-controls {
        flex-wrap: wrap;
    }

    .price-compare-item__right {
        justify-content: space-between;
    }
}

/* Store detail */
.price-store-detail {
    margin-bottom: 2rem;
}

.price-store-detail__header {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.price-store-detail__logo {
    width: 5rem;
    height: 5rem;
    object-fit: contain;
    flex-shrink: 0;
}

.price-store-detail__name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark-blue);
    margin-bottom: 0.25rem;
}

.price-store-detail__address {
    font-size: 0.9rem;
    color: var(--text-grey);
}

.price-store-detail__phone {
    margin-top: 0.25rem;
}

.price-store-detail__phone a {
    color: var(--dark-blue);
    font-weight: 600;
    text-decoration: none;
}

.price-store-detail__phone a:hover {
    text-decoration: underline;
}

.price-store-detail__products-header {
    margin-bottom: 1rem;
}

.price-store-detail__products-header h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--dark-blue);
    margin-bottom: 0.25rem;
}

.price-store-detail__survey {
    font-size: 0.9rem;
    color: var(--text-grey);
}

.price-store-family-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--dark-blue);
    margin: 1.5rem 0 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--light-blue);
}

.price-store-products-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.price-store-product-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--white);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease;
}

.price-store-product-item:hover {
    transform: translateX(4px);
}

.price-store-product-item__info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.price-store-product-item__name {
    font-weight: 600;
    color: var(--dark-blue);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.price-store-product-item__quantity {
    font-size: 0.85rem;
    color: var(--text-grey);
}

.price-store-product-item__price {
    font-weight: 700;
    color: #2e7d32;
    font-size: 1.1rem;
    flex-shrink: 0;
    margin-left: 1rem;
}

/* Alerts page */
.price-alerts-section {
    margin-bottom: 2rem;
}

.price-alerts-section__title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--dark-blue);
    margin-bottom: 1rem;
}

.price-alert-form {
    background: var(--white);
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.price-alert-form__field {
    margin-bottom: 1rem;
}

.price-alert-form__field label {
    display: block;
    font-weight: 600;
    color: var(--dark-blue);
    margin-bottom: 0.35rem;
    font-size: 0.9rem;
}

.price-alert-form__field input[type="email"],
.price-alert-form__field input[type="number"],
.price-alert-form__field input[type="text"] {
    width: 100%;
    height: 2.75rem;
    border: 2px solid var(--light-grey);
    border-radius: 8px;
    padding: 0 1rem;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s ease;
}

.price-alert-form__field input:focus {
    border-color: var(--light-blue);
}

.price-alert-form__field .price-alert-form__hint {
    font-size: 0.8rem;
    color: var(--text-grey);
    margin-top: 0.25rem;
}

.price-alert-form__product-result {
    background: var(--white);
    border: 2px solid var(--light-blue);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-top: 0.5rem;
}

.price-alert-form__product-name {
    font-weight: 600;
    color: var(--dark-blue);
}

.price-alert-form__product-meta {
    font-size: 0.85rem;
    color: var(--text-grey);
}

.price-alert-form__search-results {
    border: 1px solid var(--light-grey);
    border-radius: 8px;
    margin-top: 0.5rem;
    max-height: 200px;
    overflow-y: auto;
}

.price-alert-form__search-item {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.6rem 1rem;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.15s ease;
}

.price-alert-form__search-item:hover {
    background: var(--light-grey);
}

.price-alert-form__search-item + .price-alert-form__search-item {
    border-top: 1px solid var(--light-grey);
}

.price-alert-message {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    font-size: 0.9rem;
}

.price-alert-message--success {
    background: #e8f5e9;
    color: #2e7d32;
}

.price-alert-message--error {
    background: #fce4ec;
    color: #c62828;
}

/* Alerts list */
.price-alerts-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.price-alert-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--white);
    border-radius: 10px;
    padding: 1rem 1.25rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.price-alert-item__info {
    min-width: 0;
}

.price-alert-item__product {
    font-weight: 600;
    color: var(--dark-blue);
}

.price-alert-item__meta {
    font-size: 0.85rem;
    color: var(--text-grey);
    margin-top: 0.15rem;
}

.price-alert-item__threshold {
    flex-shrink: 0;
    font-weight: 600;
    color: var(--dark-blue);
    margin-left: 1rem;
}

.price-alert-manage {
    background: var(--white);
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.price-alert-manage p {
    font-size: 0.9rem;
    color: var(--text-grey);
    margin-bottom: 1rem;
}

@media screen and (max-width: 840px) {
    .price-store-detail__header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .price-product-card__footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .price-product-card__store {
        text-align: left;
    }

    .price-alert-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .price-alert-item__threshold {
        margin-left: 0;
    }
}

/* Store history page */
.price-store-history-card {
    display: block;
    background: var(--white);
    border-radius: 10px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--dark-blue);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease;
}

.price-store-history-card:hover {
    transform: translateX(4px);
}

.price-store-history-card strong {
    display: block;
    color: var(--dark-blue);
    margin-bottom: 0.25rem;
}

.price-store-history-card span {
    font-size: 0.85rem;
    color: var(--text-grey);
}

.price-store-history-list-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dark-blue);
    margin: 1.5rem 0 0.75rem;
}

.price-store-history-list {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.price-store-history-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid var(--light-grey);
}

.price-store-history-row:last-child {
    border-bottom: none;
}

.price-store-history-row__month {
    color: var(--text-grey);
    font-size: 0.9rem;
}

.price-store-history-row__price {
    font-weight: 600;
    color: var(--dark-blue);
}

