/* ============================================
   Curatery Good Card — good-card.css v1.0.0
   Load on: goods archive, corner pages,
            category archives, search results
   ============================================ */

/* Grid wrapper — used by archive templates */
.gc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 24px;
}

/* ── Card ── */
.gc {
    background: #FAF7F2;
    border: 1px solid #E8D5C0;
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s, transform 0.2s;
}

.gc:hover {
    box-shadow: 0 4px 20px rgba(30,26,14,0.1);
    transform: translateY(-2px);
}

/* ── Thumbnail ── */
.gc-thumb-wrap {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #EDE0D0;
    text-decoration: none;
}

.gc-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.gc:hover .gc-thumb {
    transform: scale(1.03);
}

.gc-thumb-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

/* ── Badges ── */
.gc-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.gc-badge {
    font-family: 'DM Sans', -apple-system, sans-serif;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 100px;
    line-height: 1.4;
}

.gc-badge-club {
    background: #1E1A0E;
    color: #D4A843;
}

.gc-badge-format {
    background: rgba(250,247,242,0.92);
    color: #5C4A32;
    backdrop-filter: blur(4px);
}

/* ── Body ── */
.gc-body {
    padding: 14px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

/* ── Title ── */
.gc-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 15px;
    font-weight: 500;
    color: #1E1A0E;
    text-decoration: none;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gc-title:hover {
    color: #B87E2A;
}

/* ── Meta row (corner + rating) ── */
.gc-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 2px;
}

.gc-corner {
    font-family: 'DM Sans', -apple-system, sans-serif;
    font-size: 12px;
    color: #7A6248;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gc-corner:hover {
    color: #B87E2A;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.gc-rating {
    display: flex;
    align-items: center;
    gap: 3px;
    flex-shrink: 0;
}

.gc-rating-star {
    flex-shrink: 0;
}

.gc-rating-num {
    font-family: 'DM Sans', -apple-system, sans-serif;
    font-size: 12px;
    font-weight: 500;
    color: #5C4A32;
}

/* ── Footer (price) ── */
.gc-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    padding-top: 8px;
}

.gc-price {
    font-family: 'DM Sans', -apple-system, sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #1E1A0E;
}

.gc-price-struck {
    text-decoration: line-through;
    color: #B0987E;
    font-weight: 400;
    opacity: 0.6;
}

.gc-price-free-label {
    font-family: 'DM Sans', -apple-system, sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: #2A7D4F;
}

/* ── Responsive ── */
@media (max-width: 480px) {
    .gc-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .gc-title { font-size: 13px; }
    .gc-body { padding: 10px 12px 12px; }
}

/* ── Card heart button — overlaid top-right on thumbnail ── */
.gc-heart-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: none;
    border-radius: 50%;
    color: #7A6248;
    cursor: pointer;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.12);
    transition: color 0.2s, background 0.2s, transform 0.15s;
    opacity: 0;
    pointer-events: none;
}

/* Show on card hover */
.gc:hover .gc-heart-btn {
    opacity: 1;
    pointer-events: auto;
}

/* Always show if already hearted */
.gc-heart-btn.is-hearted {
    opacity: 1;
    pointer-events: auto;
    color: #c0392b;
    background: rgba(255, 245, 245, 0.92);
}

.gc-heart-btn:hover {
    color: #c0392b;
    background: rgba(255, 255, 255, 0.98);
    transform: scale(1.1);
}

.gc-heart-btn svg {
    display: block;
    flex-shrink: 0;
}

.gc-thumb-link {
    display: block;
    width: 100%;
    height: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
}