/* ============================================================
   albums.css  —  All styles for the albums listing page
   ============================================================ */

/* ── Base ── */
body {
    background-color: #848482;
    color: #222;
}

/* ── Page header ── */
.page-header {
    background: #fff;
    max-width: 980px;
    margin: .5rem auto;
    border: 1px solid #ddd;
    border-radius: 6px;
}
.page-header-inner {
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.page-header a.back-link {
    font-size: 0.9rem;
    color: #555;
    text-decoration: none;
}
.page-header a.back-link:hover {
    color: #222;
    text-decoration: underline;
}

/* ── Info section ── */
.info-section {
    max-width: 980px;
    margin: 0 auto 1rem;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 1.25rem 1.5rem;
    font-size: 0.92rem;
    line-height: 1.6;
    color: #333;
}
.info-section p {
    margin-bottom: 0.75rem;
}
.info-section p:last-child {
    margin-bottom: 0;
}

/* ── Country switcher ── */
.country-switcher {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}
.country-switcher .switcher-label {
    font-size: 0.92rem;
    color: #444;
    font-weight: 500;
}
.country-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 1.1rem;
    border: 2px solid #ccc;
    border-radius: 5px;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    color: #333;
    background: #f5f5f5;
    transition: background 0.15s, border-color 0.15s;
}
.country-btn:hover {
    background: #e0e8f0;
    border-color: #2c5f8a;
    color: #1a3a55;
    text-decoration: none;
}
.country-btn.active {
    background: #2c5f8a;
    color: #fff;
    border-color: #2c5f8a;
    cursor: default;
    pointer-events: none;
}

/* ── Listing cards ── */
.listing-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    margin-bottom: 2rem;
    overflow: hidden;
}
.listing-card.sold {
    opacity: 0.6;
}
.sold-badge {
    display: inline-block;
    background: #888;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.4rem;
}

/* ── Listing grid ── */
.listing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    align-items: start;
}
.listing-info {
    grid-column: 1 / -1;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #eee;
}
@media (min-width: 860px) {
    .listing-grid { grid-template-columns: repeat(3, 1fr); }
    .listing-info { grid-column: 1; border-bottom: none; border-right: 1px solid #eee; }
}

/* ── Listing info fields ── */
.item-brand {
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #888;
    margin-bottom: 0.3rem;
}
.item-title {
    font-size: 1.05rem;
    font-weight: 500;
    margin-bottom: 0.4rem;
    color: #1a1a1a;
}
.item-desc {
    font-size: 0.88rem;
    color: #444;
    line-height: 1.5;
    margin-bottom: 0.75rem;
}
.item-price {
    font-size: 1.1rem;
    font-weight: 500;
    color: #c0392b;
    margin-bottom: 0.2rem;
}
.item-price .price-original {
    text-decoration: line-through;
    color: #aaa;
    font-weight: 400;
    margin-right: 0.4rem;
}
.item-price .price-sale {
    color: #c0392b;
    font-weight: 700;
    font-size: 1.15rem;
}
.sale-badge {
    display: inline-block;
    background: #c0392b;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.1rem 0.45rem;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-left: 0.3rem;
    vertical-align: middle;
}
.item-postage {
    font-size: 0.88rem;
    color: #555;
    margin-bottom: 0.2rem;
}
.item-meta {
    font-size: 0.8rem;
    color: #999;
    margin-bottom: 0.2rem;
}

/* ── Info popup (ⓘ tooltip) ── */
.info-tip {
    position: relative;
    display: inline-block;
    margin-left: 0.25rem;
    vertical-align: super;
    font-size: 0.7rem;
    line-height: 1;
}
.info-tip .tip-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.1em;
    height: 1.1em;
    border-radius: 50%;
    background: #2c5f8a;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    user-select: none;
    /* override superscript sizing from parent */
    font-size: 0.85rem;
    width: 1rem;
    height: 1rem;
}
.info-tip .tip-box {
    display: none;
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: #1a1a1a;
    color: #f0f0f0;
    font-size: 0.82rem;
    line-height: 1.5;
    padding: 0.6rem 0.85rem;
    border-radius: 5px;
    width: 260px;
    z-index: 100;
    text-align: left;
    font-weight: 400;
    pointer-events: none;
}
/* Arrow */
.info-tip .tip-box::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #1a1a1a;
}
.info-tip.open .tip-box,
.info-tip:hover .tip-box {
    display: block;
}
/* On mobile, anchor to left edge to avoid overflow */
@media (max-width: 600px) {
    .info-tip .tip-box {
        left: 0;
        transform: none;
        width: 220px;
    }
    .info-tip .tip-box::after {
        left: 1rem;
        transform: none;
    }
}
/* JS adds .tip-flip when tooltip would overflow right edge of viewport */
.info-tip.tip-flip .tip-box {
    left: auto;
    right: 0;
    transform: none;
}
.info-tip.tip-flip .tip-box::after {
    left: auto;
    right: 1rem;
    transform: none;
}

/* ── Order checkbox ── */
.order-check {
    margin-top: 0.6rem;
    padding-top: 0.6rem;
    border-top: 1px solid #eee;
}
.order-check label {
    font-size: 0.88rem;
    color: #444;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.order-check input[type=checkbox] {
    width: 1.1rem;
    height: 1.1rem;
    cursor: pointer;
    flex-shrink: 0;
}

/* ── Thumbnails ── */
.thumb-cell {
    overflow: hidden;
    border-right: 1px solid #eee;
    border-bottom: 1px solid #eee;
    background: #f2f2f2;
}
.thumb-cell a { display: block; width: 100%; }
.thumb-cell img {
    width: 100%;
    height: auto;
    display: block;
    transition: opacity 0.15s ease;
}
.thumb-cell img:hover { opacity: 0.88; }

/* ── Order submission bar ── */
.order-bar {
    max-width: 980px;
    margin: 0 auto 2rem;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 1rem 1.5rem;
}
.order-bar h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}
.order-bar .form-group { margin-bottom: 0.75rem; }
.order-bar label {
    font-size: 0.88rem;
    color: #444;
    display: block;
    margin-bottom: 0.2rem;
}
.order-bar input[type=text],
.order-bar input[type=email],
.order-bar textarea {
    width: 100%;
    padding: 0.4rem 0.6rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.88rem;
}
.order-bar textarea { height: 80px; resize: vertical; }
#selection-summary {
    font-size: 0.85rem;
    color: #555;
    margin-bottom: 0.75rem;
    min-height: 1.2em;
    line-height: 1.6;
}
.btn-order {
    background: #2c5f8a;
    color: #fff;
    border: none;
    padding: 0.5rem 1.25rem;
    border-radius: 4px;
    font-size: 0.9rem;
    cursor: pointer;
}
.btn-order:hover { background: #1e4466; }
.btn-order:disabled {
    background: #aaa;
    cursor: not-allowed;
}

/* ── Pagination ── */
.pagination-bar {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin: 1.5rem 0 2.5rem;
    flex-wrap: wrap;
}
.pagination-bar a,
.pagination-bar span {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.9rem;
    text-decoration: none;
    color: #333;
    background: #fff;
}
.pagination-bar a:hover { background: #f0f0f0; }
.pagination-bar span.current {
    background: #555;
    color: #fff;
    border-color: #555;
}
