/* Catalogue Grid */
.soc-catalogues-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    padding: 20px 0;
}

.soc-catalogue-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.3s ease, transform 0.2s ease;
}
.soc-catalogue-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.1); transform: translateY(-2px); }
.soc-catalogue-card.soc-expired { opacity: 0.6; }
.soc-card-image { width: 100%; height: 200px; overflow: hidden; }
.soc-card-image img { width: 100%; height: 100%; object-fit: cover; }
.soc-card-body { padding: 16px; }
.soc-card-title { margin: 0 0 8px 0; font-size: 16px; line-height: 1.4; }
.soc-card-title a { color: #1a202c; text-decoration: none; }
.soc-card-title a:hover { color: #2b6cb0; }
.soc-card-store { display: inline-block; background: #edf2f7; color: #4a5568; font-size: 12px; padding: 2px 8px; border-radius: 4px; margin-right: 8px; }
.soc-card-expiry { font-size: 13px; color: #38a169; }
.soc-card-expiry.expired { color: #e53e3e; font-weight: bold; }

/* PDF Iframe — Visible Catalogue Template */
.soc-pdf-wrapper { margin: 20px 0; }

.soc-pdf-iframe-box {
    width: 100%;
    height: 500px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    overflow: hidden;
    background: #f3f4f6;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 12px;
}

.soc-pdf-iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* VIEW OFFER CATALOGUE Button */
.soc-view-pdf-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 700;
    text-align: left;
    letter-spacing: 0.5px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 3px 12px rgba(102, 126, 234, 0.3);
}
.soc-view-pdf-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(102, 126, 234, 0.45); }
.soc-view-pdf-btn:active { transform: translateY(0); }
.soc-view-pdf-icon { font-size: 22px; line-height: 1; }
.soc-view-pdf-label { flex: 1; }
.soc-view-pdf-arrow { font-size: 18px; opacity: 0.8; }

.soc-pdf-fallback { text-align: center; padding: 12px; }
.soc-pdf-fallback a { color: #3182ce; text-decoration: underline; font-size: 14px; }

/* Fullscreen Modal */
.soc-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 999999;
    display: flex;
    align-items: stretch;
    justify-content: center;
    animation: socFadeIn 0.2s ease;
}
@keyframes socFadeIn { from { opacity: 0; } to { opacity: 1; } }

.soc-modal-box { width: 100%; height: 100%; display: flex; flex-direction: column; background: #111827; }

.soc-modal-header {
    display: flex; align-items: center; padding: 10px 20px;
    background: #0d1117; color: #fff; gap: 12px;
    flex-shrink: 0; border-bottom: 1px solid #30363d;
}
.soc-modal-title { font-size: 14px; font-weight: 600; margin-right: auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 80%; }
.soc-modal-close { background: #dc2626; color: #fff !important; border: none; padding: 6px 16px; border-radius: 6px; cursor: pointer; font-size: 22px; font-weight: bold; line-height: 1; }
.soc-modal-close:hover { background: #b91c1c; }

.soc-modal-body { flex: 1; overflow: hidden; background: #1f2937; }
.soc-modal-iframe { width: 100%; height: 100%; border: none; display: block; }

/* Meta Below PDF */
.soc-catalogue-meta-below { display: flex; flex-wrap: wrap; gap: 10px 24px; padding: 16px 0; margin-top: 8px; border-top: 1px solid #e2e8f0; font-size: 14px; }
.soc-meta-item { display: inline-flex; align-items: center; gap: 6px; }
.soc-meta-label { color: #718096; font-weight: 600; font-size: 13px; }
.soc-meta-value { color: #2d3748; }
.soc-meta-expiry.expired .soc-meta-value { color: #e53e3e; }
.expired-tag { color: #fff; background: #e53e3e; font-weight: bold; font-size: 11px; padding: 2px 8px; border-radius: 3px; text-transform: uppercase; letter-spacing: 0.5px; }

.soc-watermarked { position: relative; }
.soc-watermarked::after { content: attr(data-watermark-text); position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%) rotate(-30deg); font-size: 24px; color: rgba(128,128,128,0.3); white-space: nowrap; pointer-events: none; z-index: 10; }
.soc-whatsapp-share { margin: 20px 0; }
.soc-whatsapp-btn { display: inline-flex; align-items: center; padding: 10px 20px; background: #25D366; color: #fff !important; text-decoration: none !important; border-radius: 8px; font-size: 14px; font-weight: 600; }
.soc-whatsapp-btn:hover { background: #128C7E; }
.soc-expired-notice { padding: 14px 20px; background: #fff5f5; border: 1px solid #fc8181; border-radius: 8px; text-align: center; color: #c53030; font-size: 14px; margin: 14px 0; }
.soc-no-pdf-notice { padding: 14px 20px; background: #fffff0; border: 1px solid #ecc94b; border-radius: 8px; text-align: center; color: #975a16; font-size: 14px; margin: 14px 0; }
.soc-no-catalogues { text-align: center; padding: 40px; color: #718096; font-size: 16px; }
.soc-single-catalogue { max-width: 1200px; margin: 0 auto; padding: 20px; }
.soc-pdf-section { margin-top: 10px; }

@media (max-width: 768px) {
    .soc-catalogues-grid { grid-template-columns: 1fr; }
    .soc-pdf-iframe-box { height: 350px; }
    .soc-view-pdf-btn { padding: 12px 16px; font-size: 14px; }
    .soc-view-pdf-icon { font-size: 20px; }
    .soc-modal-title { font-size: 12px; max-width: 70%; }
    .soc-catalogue-meta-below { flex-direction: column; gap: 8px; }
}

@media (max-width: 480px) {
    .soc-pdf-iframe-box { height: 280px; }
    .soc-modal-header { padding: 8px 12px; }
    .soc-modal-close { padding: 4px 12px; font-size: 18px; }
}