/*
Theme Name: FashionPixie Clone
Theme URI: https://example.com
Author: ChatGPT
Description: Clone-style theme for listing posts as product cards and single-post coupon lists. Includes modal hidden coupon logic.
Version: 1.1
License: GNU General Public License v2 or later
Text Domain: fashionpixie-clone
*/
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root{
  --accent:#ff3b30; /* stronger red like thefashionpixie */
  --muted:#6b6b6b;
  --card-shadow: 0 6px 22px rgba(0,0,0,0.06);
}

body {
    font-family: 'Poppins', sans-serif;
    background: #ffffff;
    margin: 0;
    color: #222;
    line-height: 1.6;
}

a { color: inherit; text-decoration: none; }

header {
    width: 100%;
    background: #ffffff;
    border-bottom: 1px solid #f0f0f0;
    padding: 18px 36px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo a {
    font-size: 28px;
    font-weight: 700;
    text-decoration: none;
    color: #111;
    letter-spacing: -0.2px;
}

/* Container */
.container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 28px;
}

/* Filter bar */
.filter-bar{
    display:flex;
    gap:12px;
    align-items:center;
    margin-bottom:18px;
}
.filter-bar select{
    padding:10px 12px;
    border-radius:8px;
    border:1px solid #eee;
    font-size:15px;
}

/* Homepage grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 28px;
    padding: 10px 0 60px 0;
}

/* Card */
.card {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid #f3f3f3;
    box-shadow: var(--card-shadow);
    padding-bottom: 12px;
    transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover{
    transform: translateY(-6px);
    box-shadow: 0 14px 40px rgba(0,0,0,0.08);
}

.card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.card h3 {
    font-size: 18px;
    padding: 14px 16px 6px 16px;
    margin: 0;
}

.card p {
    padding: 0 16px;
    font-size: 14px;
    color: var(--muted);
    min-height: 44px;
}

/* Buttons */
.btn {
    width: calc(100% - 32px);
    margin: 12px 16px;
    padding: 12px;
    border: 0;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    font-size: 15px;
    letter-spacing: 0.2px;
}

.btn-shop { background: #111; color: #fff; }
.btn-code { background: var(--accent); color: #fff; }

/* Single post: offers list */
.offers-list {
    max-width: 860px;
    margin: 30px auto 80px;
    display: grid;
    gap: 20px;
}

/* Offer card inside post */
.offer-card {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 18px;
    background: #fff;
    border-radius: 12px;
    padding: 14px;
    align-items: center;
    border: 1px solid #f3f3f3;
    box-shadow: 0 6px 20px rgba(0,0,0,0.04);
}

.offer-card img { width: 100%; height: 130px; object-fit: cover; border-radius: 8px; }

.offer-meta h4 { margin: 0 0 8px 0; font-size: 18px; }
.offer-meta p { margin: 0 0 12px 0; color: var(--muted); font-size: 14px; }

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    justify-content: center;
    align-items: center;
    z-index: 99999;
}

.modal-inner {
    background: #fff;
    padding: 22px;
    border-radius: 12px;
    width: 360px;
    text-align: center;
    box-shadow: 0 18px 60px rgba(0,0,0,0.2);
}

.code-box {
    background: #fafafa;
    padding: 12px;
    border-radius: 6px;
    margin: 10px 0 14px 0;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 2px;
}

/* hidden before reveal */
.code-box.blurred {
    color: transparent;
    text-shadow: 0 0 12px #bbb;
}

/* responsive */
@media (max-width: 700px) {
    .offer-card { grid-template-columns: 1fr; }
    .card img { height: 160px; }
    .offer-card img { height: 180px; }
    header { padding: 14px 18px; }
    .container { padding: 18px; }
}
