/**
 * My Home — Compact List Layout
 * Matches Shopping List / Wishlist item pattern
 */

/* ═══════════════════════════════════════════
   Container
   ═══════════════════════════════════════════ */
.woocommerce-account .eg-my-home {
    max-width: 1100px;
}

.woocommerce-account .eg-my-home h2 {
    font-family: brandon-grotesque, sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    color: #222;
    margin: 0 0 1.25rem;
}

.woocommerce-account .eg-my-home h3 {
    font-family: brandon-grotesque, sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: #222;
    margin: 1.5rem 0 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

/* ═══════════════════════════════════════════
   Search toolbars
   ═══════════════════════════════════════════ */
.woocommerce-account .eg-my-home-toolbar {
    margin: 0 0 1rem;
}

.woocommerce-account .eg-my-home-toolbar label,
.woocommerce-account .eg-my-home-library-search label {
    display: block;
    font-family: brandon-grotesque, sans-serif;
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 0.375rem;
    color: #333;
}

.woocommerce-account .eg-my-home-search {
    width: 100%;
    max-width: 420px;
    border: 1px solid #d3d6da;
    border-radius: 6px;
    padding: 0.625rem 0.75rem;
    font-family: brandon-grotesque, sans-serif;
    font-size: 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.woocommerce-account .eg-my-home-search:focus {
    border-color: #a5ccbc;
    outline: none;
    box-shadow: 0 0 0 3px rgba(165, 204, 188, 0.15);
}

.woocommerce-account .eg-my-home-library-search {
    margin: 0 0 1.25rem;
    padding: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #fafbfa;
}

.woocommerce-account .eg-my-home-library-help {
    margin: 0.5rem 0 0;
    color: #555;
    font-size: 0.8125rem;
}

.woocommerce-account .eg-my-home-library-results {
    margin-top: 0.75rem;
}

.woocommerce-account .eg-my-home-library-hint,
.woocommerce-account .eg-my-home-library-loading,
.woocommerce-account .eg-my-home-library-empty,
.woocommerce-account .eg-my-home-library-error {
    margin: 0;
    font-size: 13px;
    color: #555;
}

.woocommerce-account .eg-my-home-library-error {
    color: #8d3f2b;
}

/* ═══════════════════════════════════════════
   Product list
   ═══════════════════════════════════════════ */
.woocommerce-account .eg-my-home-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* ═══════════════════════════════════════════
   Individual list item — compact horizontal row
   ═══════════════════════════════════════════ */
.woocommerce-account .eg-my-home-item {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.75rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 6px;
    background: #fff;
    transition: border-color 0.2s ease;
}

.woocommerce-account .eg-my-home-item:hover {
    border-color: #a5ccbc;
}

/* Unavailable items */
.woocommerce-account .eg-my-home-item--unavailable {
    opacity: 0.6;
    background: #fafafa;
}

/* ── Thumbnail ── */
.woocommerce-account .eg-my-home-item__image {
    flex: 0 0 64px;
    width: 64px;
    height: 64px;
    border-radius: 4px;
    overflow: hidden;
    background: #f7f9f9;
}

.woocommerce-account .eg-my-home-item__image a {
    display: block;
    width: 100%;
    height: 100%;
}

.woocommerce-account .eg-my-home-item__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.woocommerce-account .eg-my-home-item--unavailable .eg-my-home-item__image {
    opacity: 0.5;
    filter: grayscale(50%);
}

/* ── Product info (name, price, stock) ── */
.woocommerce-account .eg-my-home-item__info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.woocommerce-account .eg-my-home-item__title {
    font-family: brandon-grotesque, sans-serif;
    font-weight: 600;
    font-size: 15px;
    color: #222;
    text-decoration: none;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.woocommerce-account .eg-my-home-item__title:hover {
    color: #2c5e54;
}

.woocommerce-account .eg-my-home-item__price {
    font-size: 14px;
    color: #2d5016;
}

.woocommerce-account .eg-my-home-stock {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 0.125rem 0.5rem;
    border-radius: 3px;
    width: fit-content;
}

.woocommerce-account .eg-my-home-stock--yes {
    color: #166534;
    background: rgba(46, 204, 113, 0.12);
}

.woocommerce-account .eg-my-home-stock--no {
    color: #8d3f2b;
    background: rgba(231, 76, 60, 0.1);
}

/* ── Actions (right side) ── */
.woocommerce-account .eg-my-home-item__actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Reorder button */
.woocommerce-account .eg-my-home-btn--reorder {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.875rem;
    font-family: brandon-grotesque, sans-serif;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    background: rgba(135, 206, 235, 0.15);
    border: 1.5px solid rgba(135, 206, 235, 0.4);
    border-radius: 4px;
    color: #0f4c3a;
    text-decoration: none;
    transition: border-color 0.2s ease, background 0.2s ease;
    white-space: nowrap;
    line-height: 1.4;
}

.woocommerce-account .eg-my-home-btn--reorder:hover {
    border-color: #a5ccbc;
    background: rgba(165, 204, 188, 0.15);
}

/* Detail link */
.woocommerce-account .eg-my-home-item__detail-link {
    font-size: 11px;
    color: #2c5e54;
    text-decoration: underline;
    text-underline-offset: 2px;
    white-space: nowrap;
}

.woocommerce-account .eg-my-home-item__detail-link:hover {
    color: #1e4a3f;
}

/* Toggle form (add/remove) */
.woocommerce-account .eg-my-home-toggle {
    margin: 0;
}

.woocommerce-account .eg-my-home-toggle .button {
    padding: 0.25rem 0.625rem;
    font-size: 11px;
    border-radius: 4px;
    min-height: auto;
    line-height: 1.4;
}

.woocommerce-account .eg-my-home-btn--remove {
    background: #fff3f0;
    border-color: #e7b4a8;
    color: #8b2a11;
}

.woocommerce-account .eg-my-home-btn--add {
    background: #edf8f1;
    border-color: #9bc7a6;
    color: #165a2b;
}

/* ═══════════════════════════════════════════
   Product detail view (unchanged from original)
   ═══════════════════════════════════════════ */
.woocommerce-account .eg-my-home-detail {
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 1.25rem;
    background: #fff;
    max-width: 720px;
}

.woocommerce-account .eg-my-home-detail-image {
    margin: 0.75rem 0 1rem;
}

.woocommerce-account .eg-my-home-detail-image img {
    width: auto;
    max-width: 280px;
    height: auto;
    border-radius: 6px;
}

.woocommerce-account .eg-my-home-sections section + section {
    margin-top: 1rem;
}

.woocommerce-account .eg-my-home-sections h3 {
    margin: 0 0 0.375rem;
    font-size: 1rem;
    text-transform: none;
    letter-spacing: normal;
}

.woocommerce-account .eg-my-home-detail .eg-my-home-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.woocommerce-account .eg-my-home-status-row {
    margin: 0 0 0.5rem;
}

.woocommerce-account .eg-my-home-empty {
    color: #666;
    font-size: 13px;
}

.woocommerce-account .eg-my-home-empty-results {
    margin-top: 1rem;
    color: #666;
}

/* ═══════════════════════════════════════════
   Single product page action button
   ═══════════════════════════════════════════ */
.single-product .eg-my-home-single-action {
    margin: 12px 0 0;
}

.single-product .eg-my-home-single-action .button {
    min-height: 40px;
}

/* ═══════════════════════════════════════════
   Responsive
   ═══════════════════════════════════════════ */
@media (max-width: 600px) {
    /* Stack items vertically on small screens */
    .woocommerce-account .eg-my-home-item {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .woocommerce-account .eg-my-home-item__image {
        flex: 0 0 56px;
        width: 56px;
        height: 56px;
    }

    .woocommerce-account .eg-my-home-item__info {
        flex: 1 1 0;
        min-width: 120px;
    }

    .woocommerce-account .eg-my-home-item__actions {
        flex-basis: 100%;
        justify-content: flex-end;
        padding-top: 0.25rem;
        border-top: 1px solid #f0f0f0;
    }

    .woocommerce-account .eg-my-home-search {
        max-width: 100%;
    }
}
