/************* Page Container *************/

#wines {
    max-width: 960px;
    margin: 0 auto;
    padding: 40px 20px 60px;
}

/************* Search (public search landing) *************/

#search {
    max-width: 640px;
    margin: 0 auto;
    padding: 64px 20px 80px;
    text-align: center;
}

#searchTitle {
    font-size: 36px;
    font-weight: bold;
    margin-bottom: 14px;
}

#searchIntro {
    font-size: 17px;
    color: #555;
    line-height: 1.5;
    margin-bottom: 28px;
}

#search .wineSearch {
    margin: 0 auto 24px;
}

#searchResults {
    text-align: left;
}

.searchResultsItem {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid #F2F2F2;
    color: var(--black);
    text-decoration: none;
}

.searchResultsItem:hover {
    background: #FAFAF9;
}

.searchResultsItemName {
    flex: 1;
    font-size: 15px;
}

.searchResultsItemType {
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 600;
    color: #8C8D8B;
    text-transform: uppercase;
}

.searchResultsEmpty {
    padding: 14px 0;
    font-size: 15px;
    color: #8C8D8B;
    text-align: center;
}

#searchCta {
    margin: 0 auto;
}

/************* Breadcrumb *************/

#winesBreadcrumb {
    margin-bottom: 20px;
    font-size: 14px;
}

#winesBreadcrumbList {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.winesBreadcrumbListItem {
    color: #8C8D8B;
}

.winesBreadcrumbListItem:not(:last-child)::after {
    content: "/";
    margin-left: 6px;
    color: #CCC;
}

.winesBreadcrumbListItemLink {
    color: var(--primary);
    text-decoration: none;
}

.winesBreadcrumbListItemLink:hover {
    text-decoration: underline;
}

.winesBreadcrumbListItemCurrent {
    color: #333;
    font-weight: 600;
}

/************* Header *************/

#winesHeader {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
    gap: 24px;
    align-items: center;
    margin-bottom: 40px;
}

#winesHeaderSummary {
    min-width: 0;
}

#winesHeaderSummaryTitle {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 10px;
}

#winesHeaderSummaryProducer {
    font-size: 16px;
    color: #555;
    margin-bottom: 12px;
}

#winesHeaderIntro,
#winesHeaderSummaryMeta {
    font-size: 16px;
    color: #555;
    line-height: 1.5;
    margin-bottom: 12px;
}

.winesHeaderSummaryMetaLink {
    color: var(--primary);
    text-decoration: none;
}

.winesHeaderSummaryMetaLink:hover {
    text-decoration: underline;
}

#winesHeaderUpdated {
    font-size: 13px;
    color: #8C8D8B;
    margin-bottom: 20px;
}

#winesHeaderCta {
    margin: 0;
}

/********** Header feature: best-offer card (right of the header grid) **********/

#winesHeaderFeature {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 18px 20px;
    border: 1px solid #EBEBEA;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

#winesHeaderFeature.active {
    display: flex;
}

.winesHeaderFeatureLabel {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #8C8D8B;
}

.winesHeaderFeaturePrice {
    font-size: 26px;
    font-weight: 700;
    color: #1A1A1A;
}

.winesHeaderFeatureRetailer {
    font-size: 14px;
    color: #555;
}

.winesHeaderFeatureBadge {
    padding: 3px 9px;
    border-radius: 999px;
    background: rgba(46, 125, 50, 0.12);
    color: #2E7D32;
    font-size: 12px;
    font-weight: 600;
}

.winesHeaderFeatureView {
    width: auto;
    margin-top: 6px;
    padding: 10px 18px;
}

.winesHeaderSummaryAlertBtn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: auto;
    margin-top: 4px;
    padding: 11px 18px;
    border: 1px solid var(--primary);
    border-radius: 999px;
    background: var(--primary);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}

.winesHeaderSummaryAlertBtn:hover {
    filter: brightness(0.95);
}

.winesHeaderSummaryAlertBtnIcon {
    width: 16px;
    height: 16px;
}

/********** Price-alert popup (SweetAlert) **********/

.winesAlertModalText {
    font-size: 15px;
    color: #555;
    margin-bottom: 16px;
}

.winesAlertModalLabel {
    display: block;
    font-size: 14px;
    color: #555;
    margin-bottom: 8px;
}

.winesAlertModalField {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0 14px;
    border: 1px solid #DADADA;
    border-radius: 10px;
    background: #fff;
}

.winesAlertModalCurrency {
    font-size: 16px;
    color: #8C8D8B;
}

.winesAlertModalInput {
    width: 110px;
    padding: 11px 0;
    border: none;
    background: transparent;
    font-size: 16px;
    text-align: center;
}

.winesAlertModalInput:focus {
    outline: none;
}

/********** Producer link in the header **********/

#winesHeaderSummaryProducerLink {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}

#winesHeaderSummaryProducerLink:hover {
    color: var(--primary);
}

/********** More from this producer **********/

#winesRelated {
    margin-top: 36px;
}

#winesRelatedTitle {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 14px;
}

#winesRelatedTitleLink {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

#winesRelatedGrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
}

/* the cards inside #winesRelatedGrid are the shared .wineCard component (wine-card.css) */

/********** No-current-listings banner (every listing is stale) **********/

#winesNoListings {
    margin: 24px 0;
    padding: 14px 18px;
    background: #FFF8EC;
    border: 1px solid #F2D793;
    border-radius: 8px;
}

#winesNoListingsText {
    margin: 0;
    font-size: 14px;
    color: #6B5414;
}

/************* Search *************/

#winesSearch {
    position: relative;
    margin-bottom: 28px;
}

#winesSearchInput {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    border: 1px solid #DADADA;
    border-radius: 10px;
}

#winesSearchResults {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    z-index: 10;
    background: #fff;
    border: 1px solid #EBEBEA;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

#winesSearchResults:empty {
    display: none;
}

.winesSearchResult {
    display: block;
    padding: 10px 16px;
    font-size: 14px;
    color: #333;
    text-decoration: none;
    border-bottom: 1px solid #F2F2F2;
}

.winesSearchResult:hover {
    background: #FBF6F2;
    color: var(--primary);
}

/************* Header Stats *************/

#winesHeaderSummaryStats {
    font-size: 15px;
    color: #333;
    margin-bottom: 16px;
}

/************* Vintage Tabs *************/

#winesVintages {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.winesVintagesTab {
    padding: 6px 14px;
    border: 1px solid #DADADA;
    border-radius: 999px;
    background: #fff;
    font-size: 14px;
    color: #333;
    cursor: pointer;
}

.winesVintagesTab.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

/************* Prices *************/

#winesPricesTitle {
    font-size: 18px;
    font-weight: 700;
    margin: 28px 0 12px;
}

#winesShip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px;
    font-size: 13px;
    color: #555;
}

#winesShipState {
    padding: 6px 10px;
    border: 1px solid #EBEBEA;
    border-radius: 8px;
    font-size: 13px;
    background: #fff;
    color: var(--black);
}

#winesShipSummary {
    color: #8C8D8B;
}

#winesPrices {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid #EBEBEA;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    font-size: 14px;
}

.winesPricesHeadCell {
    text-align: left;
    padding: 12px 16px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: #8C8D8B;
    background: #FAFAF9;
    border-bottom: 1px solid #EBEBEA;
}

.winesPricesHeadSize {
    width: 90px;
}

.winesPricesHeadPrice {
    width: 100px;
    text-align: right;
}

.winesPricesHeadAction {
    width: 72px;
}

/* keep the cell a normal table-cell so colspan spans the full width; the flex
   layout lives on an inner wrapper (display:flex on a th would break colspan) */
.winesPricesGroupHeadCell {
    padding: 10px 16px;
    background: #FAFAF9;
    border-top: 1px solid #EBEBEA;
    border-bottom: 1px solid #EBEBEA;
    font-weight: 400;
    text-align: left;
}

.winesPricesGroupHeadInner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: baseline;
    gap: 4px 12px;
}

.winesPricesGroupHeadVintage {
    font-size: 13px;
    font-weight: 700;
    color: #333;
}

.winesPricesGroupHeadStats {
    font-size: 12px;
    color: #8C8D8B;
}

.winesPricesRowRetailer,
.winesPricesRowSize,
.winesPricesRowPrice,
.winesPricesRowAction {
    padding: 12px 16px;
    border-bottom: 1px solid #F2F2F2;
    vertical-align: top;
}

.winesPricesRowRetailer {
    color: #333;
}

/* possibly-gone listing: not re-seen within 72h */
.winesPricesRowStale {
    display: block;
    white-space: normal;
    margin-top: 2px;
    font-size: 11px;
    font-weight: 600;
    color: #B7791F;
}

/* freshness sub-line under the retailer name */
.winesPricesRowSeen {
    display: block;
    white-space: normal;
    margin-top: 2px;
    font-size: 11px;
    color: #8C8D8B;
}

/* out-of-stock marker + dimmed row (only on the "currently unavailable" page) */
.winesPricesRowOos {
    display: inline-block;
    margin-left: 8px;
    padding: 1px 6px;
    border-radius: 4px;
    background: #F0F0EF;
    font-size: 11px;
    font-weight: 600;
    color: #8C8D8B;
}

.winesPricesRowOosRow {
    opacity: 0.6;
}

/* "currently unavailable" feature-card copy */
.winesHeaderFeatureUnavailableText {
    display: block;
    margin-top: 6px;
    font-size: 14px;
    line-height: 1.5;
    color: #6B6C6A;
}

/* shipping descriptor sub-line under the retailer name */
.winesPricesRowShip {
    display: block;
    white-space: normal;
    margin-top: 2px;
    font-size: 11px;
    color: #8C8D8B;
}

/* a listing hidden by the "ships to my state" filter (Everywhere shows all) */
.winesPricesRowHidden {
    display: none;
}

.winesPricesRowSize {
    white-space: nowrap;
}

/* bottle-format badge (Bottle (750ml) / Magnum (1.5L) / Case ...) */
.winesPricesRowSizeBadge {
    display: inline-block;
    padding: 3px 10px;
    border: 1px solid #E5E2DC;
    border-radius: 999px;
    background: #F4F2EE;
    font-size: 12px;
    color: #555;
    white-space: nowrap;
}

.winesPricesRowPrice {
    text-align: right;
    white-space: nowrap;
}

/* real price on top, 750ml-equivalent underneath */
.winesPricesRowPriceMain {
    display: block;
    font-weight: 700;
    color: var(--primary);
}

.winesPricesRowPer750 {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    font-weight: 400;
    color: #8C8D8B;
}

.winesPricesRowAction {
    text-align: right;
    white-space: nowrap;
}

/* the cheapest listing (per 750ml) in a vintage */
.winesPricesRowBest {
    background: #F1F8F1;
}

.winesPricesRowBestTag {
    display: block;
    width: fit-content;
    margin-top: 3px;
    padding: 1px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
    color: #2E7D32;
    background: rgba(46, 125, 50, 0.12);
}

.winesPricesRowLink {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--primary);
    text-decoration: none;
}

.winesPricesRowLink:hover {
    text-decoration: underline;
}

/************* Filter Utility *************/

.winesHidden {
    display: none;
}

/* a vintage group whose listings are all filtered out by the region */
.winesGroupEmpty {
    display: none;
}

/************* No availability in region *************/

#winesNoAvail {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 16px 0;
    padding: 24px;
    background: #FAFAF9;
    border: 1px solid #EBEBEA;
    border-radius: 10px;
    text-align: center;
}

#winesNoAvailText {
    margin: 0 0 14px;
    font-size: 15px;
    color: #555;
}

/************* Empty / Error *************/

#winesEmpty {
    padding: 40px 0;
    text-align: center;
}

#winesEmptyText {
    font-size: 16px;
    color: #8C8D8B;
    margin: 0;
}

/************* Browse *************/

#winesBrowse {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid #EBEBEA;
}

#winesBrowseTitle {
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 24px;
}

.winesBrowseGroup {
    margin-bottom: 24px;
}

.winesBrowseGroupTitle {
    font-size: 14px;
    font-weight: 700;
    color: #8C8D8B;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.winesBrowseGroupList {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.winesBrowseGroupListItem {
    padding: 8px 14px;
    background: #fff;
    border: 1px solid #EBEBEA;
    border-radius: 20px;
    font-size: 13px;
    color: #333;
    text-decoration: none;
    transition: 0.2s;
}

.winesBrowseGroupListItem:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/************* Fair Price *************/

#winesFairPrice {
    margin-top: 32px;
    padding: 20px;
    background: #FAFAF9;
    border: 1px solid #EBEBEA;
    border-radius: 12px;
}

#winesFairPriceTitle {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 8px;
}

#winesFairPriceText {
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    margin: 0;
}

/************* FAQ *************/

#winesFaq {
    margin-top: 32px;
}

#winesFaqTitle {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 16px;
}

.winesFaqItem {
    padding: 16px 0;
    border-bottom: 1px solid #EBEBEA;
}

.winesFaqItem:last-child {
    border-bottom: none;
}

.winesFaqItemQuestion {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 6px;
}

.winesFaqItemAnswer {
    font-size: 14px;
    line-height: 1.6;
    color: #555;
    margin: 0;
}

/************* Browse (lateral hub links) *************/

#winesBrowse {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 40px;
    margin-top: 32px;
}

#winesBrowse:empty {
    display: none;
}

.winesBrowseGroup {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 12px;
}

.winesBrowseGroupLabel {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #8C8D8B;
}

.winesBrowseGroupLink {
    font-size: 14px;
    color: var(--primary);
    text-decoration: none;
}

.winesBrowseGroupLink:hover {
    text-decoration: underline;
}

/************* Footer *************/

#winesFooter {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #EBEBEA;
}

#winesFooterAbout {
    font-size: 13px;
    color: #6B6C6A;
    line-height: 1.6;
    margin: 0 0 14px;
    max-width: 720px;
}

#winesFooterDisclaimer {
    font-size: 12px;
    color: #8C8D8B;
    line-height: 1.6;
    margin: 0;
}

#winesFooterReport {
    margin-top: 14px;
    padding: 0;
    background: none;
    border: none;
    font-size: 12px;
    color: #8C8D8B;
    text-decoration: underline;
    cursor: pointer;
}

#winesFooterReport:hover {
    color: var(--primary);
}

/************* Mobile *************/

@media (max-width: 800px) {
    #wines {
        padding: 24px 16px 40px;
    }

    /* stack the header: feature card drops below the title/meta */
    #winesHeader {
        grid-template-columns: 1fr;
        align-items: start;
    }

    #winesHeaderSummaryTitle {
        font-size: 24px;
    }

    .winesPricesHeadCell,
    .winesPricesGroupHeadCell,
    .winesPricesRowRetailer,
    .winesPricesRowSize,
    .winesPricesRowPrice,
    .winesPricesRowAction {
        padding: 10px 12px;
        font-size: 13px;
    }

    .winesPricesHeadSize {
        width: 56px;
    }

    .winesPricesHeadPrice {
        width: 72px;
    }

    .winesPricesHeadAction {
        width: 52px;
    }
}
