/* ══════════════════════════════════════════
   Greeting Cards Page (cards.html)
   ══════════════════════════════════════════ */

:root {
    --cream: #f7f3ee;
    --white: #ffffff;
    --dark: #1a1a1a;
    --mid: #444444;
    --light: #888888;
    --border: #e2ddd8;
    --hover-bg: #f0ebe4;
    --accent: #c0392b;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-md: 0 6px 20px rgba(0,0,0,0.12);
    --shadow-lg: 0 12px 35px rgba(0,0,0,0.15);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--cream);
    color: var(--dark);
    line-height: 1.6;
}

/* ── Hero ── */
.hero {
    background-color: var(--white);
    text-align: center;
    padding: 4rem 2rem 3rem;
    border-bottom: 1px solid var(--border);
}

.hero h1 {
    font-size: 2.4rem;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--dark);
    margin-bottom: 0.8rem;
}

.hero-tagline {
    font-size: 1.1rem;
    color: var(--light);
    font-style: italic;
    margin-bottom: 1.5rem;
}

.hero-note {
    display: inline-block;
    background: var(--cream);
    border: 1px solid var(--border);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-size: 0.95rem;
    color: var(--mid);
}

/* ── Series Grid (Front Page Style) ── */
.series-section {
    max-width: 1100px;
    margin: 3rem auto;
    padding: 0 2rem;
}

.series-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem 2rem;
}

.series-card {
    cursor: pointer;
    text-align: center;
    transition: transform 0.25s ease;
}

.series-card:hover { transform: translateY(-4px); }

.series-img-wrap {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 4px;
    margin-bottom: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.3s ease;
}

.series-card:hover .series-img-wrap {
    box-shadow: var(--shadow-md);
}

.series-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.series-card:hover .series-img-wrap img {
    transform: scale(1.04);
}

.series-placeholder {
    font-size: 3.5rem;
    opacity: 0.25;
}

.series-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--dark);
    letter-spacing: 0.5px;
}

/* ── Filter Tabs ── */
.filter-bar {
    background: var(--white);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 1rem 2rem;
    position: sticky;
    top: 62px;
    z-index: 900;
}

.filter-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.filter-tabs {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--mid);
    padding: 0.4rem 1.1rem;
    border-radius: 4px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.3px;
}

.filter-btn:hover { background: var(--hover-bg); border-color: #bbb; }

.filter-btn.active {
    background: var(--dark);
    border-color: var(--dark);
    color: white;
}

.results-count {
    font-size: 0.88rem;
    color: var(--light);
}

/* ── Cards Browse Section ── */
.browse-section {
    max-width: 1100px;
    margin: 3rem auto;
    padding: 0 2rem;
}

.section-header {
    display: flex;
    align-items: baseline;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.7rem;
    border-bottom: 2px solid var(--dark);
}

.section-title {
    font-size: 1.2rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--dark);
}

.section-count {
    font-size: 0.82rem;
    color: var(--light);
}

/* ── Cards Grid ── */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1rem;
}

/* ── Individual Card ── */
.greeting-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 3px;
    overflow: hidden;
    cursor: pointer;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.greeting-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.card-img-wrap {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: var(--cream);
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.greeting-card:hover .card-img-wrap img {
    transform: scale(1.05);
}

.card-placeholder-icon {
    font-size: 3.5rem;
    opacity: 0.2;
}

.card-info {
    padding: 0.8rem 0.9rem 1rem;
}

.card-series-tag {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--light);
    margin-bottom: 0.2rem;
}

.card-title {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--dark);
    line-height: 1.3;
    margin-bottom: 0.35rem;
}

.card-price {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--dark);
}

.card-rating {
    margin-top: 0.25rem;
}

/* ── Card Detail Modal ── */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.modal-overlay.open {
    display: flex;
}

.modal {
    background: var(--white);
    border-radius: 6px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    position: relative;
    box-shadow: var(--shadow-lg);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.6rem;
    cursor: pointer;
    color: var(--mid);
    line-height: 1;
    z-index: 10;
}

.modal-close:hover { color: var(--dark); }

.modal-img {
    background: var(--cream);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 380px;
}

.modal-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-img-placeholder {
    font-size: 7rem;
    opacity: 0.18;
}

.modal-details {
    padding: 2.5rem 2rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.modal-breadcrumb {
    font-size: 0.78rem;
    color: var(--light);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.modal-title {
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--dark);
    line-height: 1.2;
}

.modal-price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-price {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--dark);
}

.modal-divider {
    border: none;
    border-top: 1px solid var(--border);
}

.modal-desc-label {
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--mid);
    margin-bottom: 0.3rem;
}

.modal-desc-text {
    font-size: 0.95rem;
    color: var(--mid);
    line-height: 1.8;
}

.modal-size {
    font-size: 0.95rem;
    color: var(--mid);
    margin-bottom: 0.5rem;
}

.modal-shop-btn {
    display: inline-block;
    background: #27ae60;
    color: white;
    padding: 0.9rem 2rem;
    text-align: center;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: background 0.25s ease;
    margin-top: 0.5rem;
    width: 100%;
}

.modal-shop-btn:hover { background: #229954; }

.modal-qty-row {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-top: 0.5rem;
}

.modal-qty-row .qty-label {
    font-weight: 600;
    color: var(--mid);
    font-size: 0.95rem;
}

.modal-qty-row .qty-btn {
    background: var(--dark);
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
}

.modal-qty-row .qty-btn:hover { background: #333; }

.modal-qty-row .qty-display {
    font-size: 1.1rem;
    font-weight: 600;
    min-width: 30px;
    text-align: center;
}

/* ── Square CTA ── */
.cta-section {
    background: var(--dark);
    color: white;
    text-align: center;
    padding: 4rem 2rem;
    margin-top: 2rem;
}

.cta-section h2 {
    font-size: 1.9rem;
    font-weight: 800;
    letter-spacing: 1px;
    margin-bottom: 0.8rem;
}

.cta-section p {
    font-size: 1rem;
    opacity: 0.75;
    max-width: 480px;
    margin: 0 auto 2rem;
}

.cta-btn {
    display: inline-block;
    background: white;
    color: var(--dark);
    padding: 0.9rem 2.8rem;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: 0.5px;
    transition: all 0.25s ease;
}

.cta-btn:hover {
    background: var(--cream);
    transform: translateY(-2px);
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .hero h1 { font-size: 1.8rem; }
    .series-grid { grid-template-columns: repeat(2, 1fr); }
    .cards-grid { grid-template-columns: repeat(2, 1fr); }
    .modal { grid-template-columns: 1fr; }
    .modal-img { min-height: 260px; }
    .filter-bar { top: 0; position: relative; }
}
