/* ==========================================================================
   Quotes Mag Products Widget — quotes-mag-products.css
   Drop this file in the same folder as the plugin PHP file.
   ========================================================================== */

/* Google Fonts – editorial pairing */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700&family=Space+Mono:wght@400;700&display=swap');

/* --------------------------------------------------------------------------
   Wrapper
   -------------------------------------------------------------------------- */
.qm-products-wrap {
    background-color: #f0ece4;
    padding: 48px 32px 56px;
    font-family: 'Space Mono', monospace;
}

/* --------------------------------------------------------------------------
   Section heading  (mirrors "Quotes Mag" bold editorial title)
   -------------------------------------------------------------------------- */
.qm-heading {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: clamp(2rem, 4vw, 3rem);
    text-align: center;
    letter-spacing: -0.02em;
    color: #1a1a1a;
    margin: 0 0 40px;
}

/* --------------------------------------------------------------------------
   Grid
   -------------------------------------------------------------------------- */
.qm-grid {
    display: grid;
    gap: 20px;
}

.qm-cols-1 { grid-template-columns: 1fr; }
.qm-cols-2 { grid-template-columns: repeat(2, 1fr); }
.qm-cols-3 { grid-template-columns: repeat(3, 1fr); }
.qm-cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1024px) {
    .qm-cols-4 { grid-template-columns: repeat(2, 1fr); }
    .qm-cols-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .qm-cols-2,
    .qm-cols-3,
    .qm-cols-4 { grid-template-columns: 1fr; }
    .qm-products-wrap { padding: 32px 16px 40px; }
}

/* --------------------------------------------------------------------------
   Card
   -------------------------------------------------------------------------- */
.qm-card {
    background: transparent;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.qm-card:hover {
    transform: translateY(-4px);
}

/* --------------------------------------------------------------------------
   Card image area
   -------------------------------------------------------------------------- */
.qm-card-image-wrap {
    display: block;
    text-decoration: none;
    overflow: hidden;
    position: relative;
}

.qm-card-image {
    height: 340px;
    overflow: hidden;
    position: relative;
}

.qm-card-image .qm-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.qm-card:hover .qm-card-image .qm-img {
    transform: scale(1.05);
}

.qm-img-placeholder {
    width: 100%;
    height: 100%;
    background: #d8d0c4;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: #888;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   Badges (Sale / Featured)
   -------------------------------------------------------------------------- */
.qm-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    font-family: 'Space Mono', monospace;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    padding: 4px 10px;
    z-index: 2;
}

.qm-badge-sale {
    background: #d4006e;
    color: #fff;
}

.qm-badge-featured {
    background: #1a1a1a;
    color: #fff;
    top: 14px;
    left: auto;
    right: 14px;
}

/* --------------------------------------------------------------------------
   Card meta (white panel at bottom — matches the screenshot style)
   -------------------------------------------------------------------------- */
.qm-card-meta {
    background-color: #ffffff;
    padding: 18px 20px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* --------------------------------------------------------------------------
   Category label  (hot-pink monospaced small caps)
   -------------------------------------------------------------------------- */
.qm-card-category {
    font-family: 'Space Mono', monospace;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #d4006e;
    margin: 0 0 2px;
    line-height: 1.4;
}

/* --------------------------------------------------------------------------
   Product title  (serif editorial)
   -------------------------------------------------------------------------- */
.qm-card-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.2rem, 2vw, 1.65rem);
    font-weight: 400;
    line-height: 1.2;
    color: #1a1a1a;
    margin: 0 0 6px;
}

.qm-card-title a {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.2s ease;
}

.qm-card-title a:hover { opacity: 0.65; }

/* --------------------------------------------------------------------------
   Price
   -------------------------------------------------------------------------- */
.qm-card-price {
    font-family: 'Space Mono', monospace;
    font-size: 0.9rem;
    color: #1a1a1a;
    margin: 4px 0 10px;
}

.qm-card-price .woocommerce-Price-amount { font-weight: 700; }

.qm-card-price del {
    opacity: 0.45;
    margin-right: 6px;
}

.qm-card-price ins {
    text-decoration: none;
    color: #d4006e;
}

/* --------------------------------------------------------------------------
   Actions / buttons
   -------------------------------------------------------------------------- */
.qm-card-actions {
    margin-top: auto;
    padding-top: 10px;
}

.qm-add-to-cart,
.qm-view-product {
    display: inline-block;
    background-color: #1a1a1a;
    color: #fff;
    font-family: 'Space Mono', monospace;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-decoration: none;
    padding: 10px 20px;
    border: 2px solid #1a1a1a;
    cursor: pointer;
    transition:
        background-color 0.25s ease,
        color 0.25s ease;
}

.qm-add-to-cart:hover,
.qm-view-product:hover {
    background-color: transparent;
    color: #1a1a1a;
}

/* --------------------------------------------------------------------------
   No products fallback
   -------------------------------------------------------------------------- */
.qm-no-products {
    font-family: 'Space Mono', monospace;
    font-size: 0.85rem;
    color: #888;
    text-align: center;
    padding: 40px 0;
}
