/**handles:soc-frontend**/
/**
 * Supermarket Offer Catalogues - Frontend CSS v1.3.0
 */

/* ============================
   SINGLE CATALOGUE PAGE
   ============================ */
.soc-single-catalogue {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Breadcrumb */
.soc-breadcrumb {
    font-size: 14px;
    color: #888;
    margin-bottom: 15px;
    padding: 10px 0;
}
.soc-breadcrumb a {
    color: #6c63ff;
    text-decoration: none;
}
.soc-breadcrumb a:hover {
    text-decoration: underline;
}

/* Title */
.soc-catalogue-title {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 20px;
    line-height: 1.3;
}

/* ============================
   TEMPLATE IMAGE AREA
   ============================ */
.soc-template-image-wrap {
    position: relative;
    display: block;
    max-width: 600px;
    margin: 0 auto 20px;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: #f5f5f5;
}

.soc-template-image-wrap:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
}

.soc-template-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
}

/* Click overlay hint */
.soc-template-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(26, 26, 46, 0);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
    border-radius: 12px;
}

.soc-template-image-wrap:hover .soc-template-overlay {
    background: rgba(26, 26, 46, 0.5);
}

.soc-overlay-icon {
    font-size: 48px;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.3s ease;
}

.soc-overlay-text {
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    margin-top: 8px;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease 0.1s;
}

.soc-template-image-wrap:hover .soc-overlay-icon,
.soc-template-image-wrap:hover .soc-overlay-text {
    opacity: 1;
    transform: scale(1) translateY(0);
}

/* Placeholder when no image */
.soc-placeholder-image {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #fff;
    cursor: pointer;
}

.soc-placeholder-icon {
    font-size: 64px;
    margin-bottom: 12px;
}

.soc-placeholder-text {
    font-size: 18px;
    font-weight: 600;
    opacity: 0.8;
}

/* Watermark */
.soc-watermark-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-30deg);
    font-size: 48px;
    font-weight: 800;
    color: rgba(255,255,255,0.3);
    white-space: nowrap;
    pointer-events: none;
    text-transform: uppercase;
    letter-spacing: 8px;
    user-select: none;
}

/* ============================
   VIEW OFFER CATALOGUE BUTTON
   ============================ */
.soc-view-catalogue-btn {
    display: block;
    width: 100%;
    max-width: 600px;
    margin: 0 auto 25px;
    padding: 16px 30px;
    background: #e94560;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 1.5px;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(233, 69, 96, 0.3);
}

.soc-view-catalogue-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(233, 69, 96, 0.4);
    filter: brightness(1.1);
}

.soc-view-catalogue-btn:active {
    transform: translateY(0);
}

.soc-view-catalogue-btn:disabled {
    background: #999;
    cursor: not-allowed;
    box-shadow: none;
    opacity: 0.6;
}

/* ============================
   EXPIRED NOTICE
   ============================ */
.soc-expired-notice {
    background: #fff3cd;
    color: #856404;
    padding: 12px 18px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #ffc107;
}

/* ============================
   META INFO (Below PDF)
   ============================ */
.soc-catalogue-meta {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    padding: 20px 25px;
    margin-bottom: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.soc-meta-item {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 15px;
}
.soc-meta-item:last-child {
    border-bottom: none;
}

.soc-meta-label {
    font-weight: 600;
    color: #555;
    min-width: 120px;
}

.soc-meta-value a {
    color: #6c63ff;
    text-decoration: none;
}
.soc-meta-value a:hover {
    text-decoration: underline;
}

.soc-expired-date {
    color: #e94560;
    font-weight: 600;
}
.soc-active-date {
    color: #2ecc71;
    font-weight: 600;
}

.soc-expired-badge {
    background: #e94560;
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    margin-left: 8px;
    letter-spacing: 1px;
}

/* WhatsApp share */
.soc-whatsapp-share {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #25D366;
    color: #fff !important;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none !important;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
}
.soc-whatsapp-share:hover {
    background: #1da851;
    transform: translateY(-1px);
}

/* ============================
   DESCRIPTION
   ============================ */
.soc-catalogue-description {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 25px;
}
.soc-catalogue-description h3 {
    margin-top: 0;
    color: #1a1a2e;
    border-bottom: 2px solid #e94560;
    padding-bottom: 8px;
}

/* ============================
   FULL-SCREEN PDF OVERLAY
   ============================ */
.soc-fullscreen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.soc-overlay-visible {
    background: rgba(0,0,0,0.85);
}

.soc-fullscreen-close {
    position: absolute;
    top: 15px;
    right: 20px;
    z-index: 1000000;
    background: rgba(233, 69, 96, 0.9);
    color: #fff;
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    line-height: 1;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}
.soc-fullscreen-close:hover {
    background: #e94560;
    transform: scale(1.1);
}

.soc-fullscreen-iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: #1a1a2e;
}

.soc-pdf-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #fff;
    z-index: 10;
}
.soc-pdf-loader p {
    font-size: 16px;
    margin-top: 15px;
    opacity: 0.8;
}

.soc-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255,255,255,0.2);
    border-top: 4px solid #e94560;
    border-radius: 50%;
    animation: soc-spin 0.8s linear infinite;
    margin: 0 auto;
}

@keyframes soc-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ============================
   RESPONSIVE
   ============================ */
@media (max-width: 768px) {
    .soc-single-catalogue {
        padding: 15px;
    }
    .soc-catalogue-title {
        font-size: 22px;
    }
    .soc-template-image-wrap {
        max-width: 100%;
        border-radius: 8px;
    }
    .soc-view-catalogue-btn {
        max-width: 100%;
        font-size: 15px;
        padding: 14px 20px;
    }
    .soc-meta-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    .soc-meta-label {
        min-width: auto;
    }
    .soc-fullscreen-close {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .soc-catalogue-title {
        font-size: 18px;
    }
    .soc-view-catalogue-btn {
        font-size: 14px;
        padding: 12px 16px;
    }
    .soc-catalogue-meta {
        padding: 15px;
    }
}