:root {
    --pcm-primary: #2563eb;
    /* Premium Blue */
    --pcm-primary-dark: #1d4ed8;
    --pcm-secondary: #0f172a;
    /* Dark Slate */
    --pcm-bg-light: #f8fafc;
    --pcm-text-main: #1e293b;
    --pcm-text-muted: #64748b;
    --pcm-border: #e2e8f0;
    --pcm-success: #10b981;
    --pcm-radius-md: 12px;
    --pcm-radius-lg: 16px;
    --pcm-shadow-sm: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --pcm-shadow-hover: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --pcm-font: 'Inter', system-ui, -apple-system, sans-serif;
    --pcm-trans: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* =========================================
   Global Reset & Utilities
   ========================================= */
.pcm-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    font-family: var(--pcm-font);
}

.pcm-grid {
    display: grid;
    gap: 24px;
    margin-top: 20px;
}

/* Response Grid Columns */
@media (min-width: 1024px) {
    .pcm-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .pcm-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 767px) {
    .pcm-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 2 cols on mobile for stores often looks better, or 1 for coupons */

.pcm-grid.coupons-grid {
    grid-template-columns: repeat(1, 1fr);
    /* List view for coupons often better, or grid */
}

@media (min-width: 768px) {
    .pcm-grid.coupons-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* 2 cols for coupons on desk */
}

/* =========================================
   Store Card (Grid Item)
   ========================================= */
.pcm-store-card {
    background: #ffffff;
    border: 1px solid var(--pcm-border);
    border-radius: var(--pcm-radius-md);
    padding: 24px;
    text-align: center;
    transition: var(--pcm-trans);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.pcm-store-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: var(--pcm-shadow-hover);
    border-color: var(--pcm-primary);
}

.pcm-store-logo-wrapper {
    width: 100px;
    height: 100px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: white;
    /* Ensure pngs look good */
}

.pcm-store-logo {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.pcm-store-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--pcm-text-main);
    margin: 0;
}

/* =========================================
   Coupon Card
   ========================================= */
.pcm-coupon-card {
    background: #fff;
    border: 1px solid var(--pcm-border);
    border-radius: var(--pcm-radius-md);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: var(--pcm-trans);
    position: relative;
    overflow: hidden;
}

.pcm-coupon-card:hover {
    box-shadow: var(--pcm-shadow-hover);
}

.pcm-coupon-image-wrapper {
    width: 120px;
    height: 120px;
    flex-shrink: 0;
    border-radius: var(--pcm-radius-md);
    border: 1px solid var(--pcm-border);
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
}

.pcm-coupon-image {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.pcm-coupon-content {
    flex-grow: 1;
}

.pcm-coupon-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--pcm-text-main);
    margin-bottom: 8px;
    line-height: 1.4;
}

.pcm-coupon-badges {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.pcm-badge {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 500;
}

.pcm-badge.verified {
    background: #dcfce7;
    color: #166534;
}

.pcm-badge.expiry {
    background: #f1f5f9;
    color: var(--pcm-text-muted);
}

.pcm-coupon-actions {
    margin-left: auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    min-width: 140px;
}

/* Premium Reveal Button */
.pcm-btn-reveal {
    background: var(--pcm-primary);
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    transition: var(--pcm-trans);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.pcm-btn-reveal:hover {
    background: var(--pcm-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* Deal Button (Outline) */
.pcm-btn-deal {
    background: white;
    color: var(--pcm-primary);
    border: 2px solid var(--pcm-primary);
    padding: 10px 22px;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: var(--pcm-trans);
    width: 100%;
    text-align: center;
}

.pcm-btn-deal:hover {
    background: var(--pcm-primary);
    color: white;
}

/* Mobile Responsive */
@media (max-width: 600px) {
    .pcm-coupon-card {
        flex-direction: column;
        text-align: center;
    }

    .pcm-coupon-content {
        width: 100%;
    }

    .pcm-coupon-actions {
        width: 100%;
        margin: 10px 0 0 0;
    }

    .pcm-coupon-badges {
        justify-content: center;
    }
}

/* =========================================
   Popup / Modal (Glassmorphism)
   ========================================= */
.pcm-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
}

.pcm-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.pcm-modal {
    background: white;
    width: 90%;
    max-width: 500px;
    border-radius: var(--pcm-radius-lg);
    padding: 40px;
    text-align: center;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);
}

.pcm-modal-overlay.active .pcm-modal {
    transform: scale(1);
}

.pcm-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--pcm-text-muted);
}

.pcm-modal-store-logo {
    height: 80px;
    margin-bottom: 20px;
}

.pcm-modal-store-logo img {
    height: 100%;
    object-fit: contain;
}

.pcm-modal h3 {
    margin-bottom: 10px;
    color: var(--pcm-text-main);
}

.pcm-modal p {
    color: var(--pcm-text-muted);
    margin-bottom: 25px;
}

.pcm-code-box {
    background: var(--pcm-bg-light);
    border: 2px dashed var(--pcm-primary);
    border-radius: var(--pcm-radius-md);
    padding: 15px;
    font-size: 24px;
    font-weight: 700;
    color: var(--pcm-primary);
    margin-bottom: 20px;
    position: relative;
    cursor: pointer;
}

.pcm-code-box:hover {
    background: #eef2ff;
}

.pcm-copy-status {
    font-size: 14px;
    color: var(--pcm-success);
    height: 20px;
    /* prevent layout shift */
    opacity: 0;
    transition: opacity 0.2s;
}

.pcm-copy-status.visible {
    opacity: 1;
}

.pcm-modal-cta {
    margin-top: 20px;
}

/* =========================================
   Store Header (Premium)
   ========================================= */
.pcm-store-header-container {
    background: #0f172a;
    color: white;
    padding: 30px;
    border-radius: var(--pcm-radius-lg);
    display: flex;
    gap: 30px;
    align-items: flex-start;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

.pcm-sh-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 180px;
    flex-shrink: 0;
}

.pcm-sh-logo-box {
    width: 180px;
    height: 180px;
    background: white;
    border-radius: var(--pcm-radius-md);
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.pcm-sh-logo-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.pcm-sh-fav-btn {
    position: absolute;
    top: 10px;
    left: 10px;
    background: none;
    border: none;
    color: #cbd5e1;
    font-size: 18px;
    cursor: pointer;
}

.pcm-sh-rating-box {
    margin-top: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.1);
    padding: 5px 10px;
    border-radius: 6px;
}

.pcm-star-badge {
    background: #16a34a;
    color: white;
    font-weight: bold;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 4px;
}

.pcm-rating-text {
    font-size: 13px;
    color: #cbd5e1;
}

.pcm-sh-content {
    flex-grow: 1;
}

.pcm-sh-title {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 10px 0;
    color: white;
}

.pcm-sh-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #94a3b8;
    margin-bottom: 20px;
}

.pcm-verified-text {
    color: #10b981;
    display: flex;
    align-items: center;
    gap: 5px;
}

.pcm-sh-badges {
    margin-bottom: 30px;
}

.pcm-reward-badge {
    background: linear-gradient(90deg, #dc2626, #b91c1c);
    color: white;
    padding: 6px 15px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.pcm-sh-tabs {
    display: flex;
    gap: 5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.pcm-tab {
    background: rgba(255, 255, 255, 0.05);
    color: #cbd5e1;
    border: none;
    padding: 10px 20px;
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    font-weight: 500;
}

.pcm-tab.active {
    background: white;
    color: #0f172a;
}

@media (max-width: 768px) {
    .pcm-store-header-container {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }

    .pcm-sh-left {
        width: 100%;
    }

    .pcm-sh-meta {
        justify-content: center;
    }

    .pcm-sh-tabs {
        width: 100%;
        justify-content: center;
    }
}

/* =========================================
   List View Row (Reference Design)
   ========================================= */
.pcm-list-view {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.pcm-coupon-row {
    background: white;
    border: 1px solid var(--pcm-border);
    border-radius: 8px;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
}

.pcm-coupon-row:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
    border-color: #cbd5e1;
}

.pcm-row-left {
    flex-grow: 1;
    padding-right: 30px;
}

.pcm-row-verified {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 13px;
    margin-bottom: 8px;
    color: #64748b;
}

.pcm-row-verified .verified-label {
    color: #166534;
    font-weight: 600;
    background: #dcfce7;
    padding: 2px 8px;
    border-radius: 12px;
}

.pcm-row-title {
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 8px 0;
}

.pcm-row-desc {
    color: #475569;
    font-size: 14px;
    margin-bottom: 10px;
}

.pcm-row-toggle {
    font-size: 13px;
    color: var(--pcm-primary);
    cursor: pointer;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.pcm-row-right {
    flex-shrink: 0;
}

.pcm-btn-list-action {
    background: #dc2626;
    /* Red color from image */
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    display: inline-block;
    transition: background 0.2s;
}

.pcm-btn-list-action:hover {
    background: #b91c1c;
}

/* Red Button Style Override for Grid too if needed */
.pcm-btn-reveal.red,
.pcm-btn-deal.red {
    background: #dc2626;
    color: white;
}

.pcm-btn-deal.red {
    background: white;
    border-color: #dc2626;
    color: #dc2626;
}

.pcm-btn-deal.red:hover {
    background: #dc2626;
    color: white;
}

@media (max-width: 600px) {
    .pcm-coupon-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .pcm-row-right {
        width: 100%;
    }

    .pcm-btn-list-action {
        width: 100%;
        text-align: center;
    }
}