/*
 * ZW Wish List — Stylesheet
 *
 * Uses CSS custom properties (variables) so the grid inherits
 * your theme's color scheme and is easy to override from your
 * child theme's style.css with a single variable change.
 *
 * To override any variable, add this to your child theme's style.css:
 *   :root { --zw-accent: #your-color; }
 */

:root {
    --zw-accent:       #F59E0B;   /* Amber — matches your brand */
    --zw-accent-dark:  #d97706;
    --zw-text:         #1a1a2e;
    --zw-text-muted:   #555;
    --zw-bg-card:      #ffffff;
    --zw-border:       #e5e7eb;
    --zw-radius:       8px;
    --zw-shadow:       0 2px 8px rgba(0,0,0,0.08);
    --zw-shadow-hover: 0 6px 20px rgba(0,0,0,0.14);
    --zw-gap:          1.5rem;
    --zw-font:         inherit;  /* Uses your theme's font stack */
}


/* ─── Grid Container ─────────────────────────────────────────────── */

.zw-wishlist-grid {
    display: grid;
    gap: var(--zw-gap);
    font-family: var(--zw-font);
    margin: 2rem 0;
}

/* Column variants — controlled by the [columns] shortcode attribute */
.zw-wishlist-cols-1 { grid-template-columns: 1fr; }
.zw-wishlist-cols-2 { grid-template-columns: repeat(2, 1fr); }
.zw-wishlist-cols-3 { grid-template-columns: repeat(3, 1fr); }
.zw-wishlist-cols-4 { grid-template-columns: repeat(4, 1fr); }

/* Responsive: collapse to 2 cols on tablet, 1 on mobile */
@media ( max-width: 900px ) {
    .zw-wishlist-cols-3,
    .zw-wishlist-cols-4 { grid-template-columns: repeat(2, 1fr); }
}
@media ( max-width: 540px ) {
    .zw-wishlist-grid { grid-template-columns: 1fr; }
}


/* ─── Card ───────────────────────────────────────────────────────── */

.zw-wishlist-card {
    position: relative;
    background: var(--zw-bg-card);
    border: 1px solid var(--zw-border);
    border-radius: var(--zw-radius);
    box-shadow: var(--zw-shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.zw-wishlist-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--zw-shadow-hover);
}

/* Featured card gets an amber left border accent */
.zw-wishlist-card--featured {
    border-left: 4px solid var(--zw-accent);
}


/* ─── Featured Badge ─────────────────────────────────────────────── */

.zw-wishlist-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--zw-accent);
    color: #1a1a2e;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 20px;
    z-index: 1;
}


/* ─── Image Area ─────────────────────────────────────────────────── */

.zw-wishlist-card__image {
    width: 100%;
    aspect-ratio: 1 / 1;       /* Square crop — consistent across grid */
    overflow: hidden;
    background: #f9fafb;
    display: flex;
    align-items: center;
    justify-content: center;
}

.zw-wishlist-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;          /* Crop to fit — no stretching */
    display: block;
    transition: transform 0.3s ease;
}

.zw-wishlist-card:hover .zw-wishlist-card__image img {
    transform: scale(1.04);    /* Subtle zoom on hover */
}

/* Placeholder when no image is set */
.zw-wishlist-card__no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #ccc;
    background: #f3f4f6;
}


/* ─── Card Body ──────────────────────────────────────────────────── */

.zw-wishlist-card__body {
    padding: 1.1rem 1.2rem 1.4rem;
    display: flex;
    flex-direction: column;
    flex: 1;                   /* Pushes button to bottom regardless of content height */
    gap: 0.5rem;
}

.zw-wishlist-card__title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--zw-text);
    margin: 0;
    line-height: 1.3;
}

.zw-wishlist-card__price {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--zw-accent-dark);
    margin: 0;
}

.zw-wishlist-card__desc {
    font-size: 0.875rem;
    color: var(--zw-text-muted);
    margin: 0;
    line-height: 1.5;
    flex: 1;
}

/* ─── Button ─────────────────────────────────────────────────────── */

.zw-wishlist-card__btn {
    display: block;
    text-align: center;
    background: var(--zw-accent);
    color: #1a1a2e !important;  /* !important overrides aggressive theme link colors */
    font-weight: 700;
    font-size: 0.875rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-decoration: none !important;
    padding: 0.65rem 1rem;
    border-radius: calc( var(--zw-radius) - 2px );
    margin-top: auto;           /* Sticks to bottom of card body */
    transition: background 0.15s ease;
}

.zw-wishlist-card__btn:hover {
    background: var(--zw-accent-dark);
    color: #fff !important;
    text-decoration: none !important;
}


/* ─── Empty State ────────────────────────────────────────────────── */

.zw-wishlist-empty {
    color: var(--zw-text-muted);
    font-style: italic;
    padding: 2rem 0;
}
