/* ============================================================
   Product Catalog — Front-end styles
   v1.2.3 — adds description line-clamp for consistent card heights
   ============================================================ */

.com-productcatalog {
    --pc-accent:      #0d6efd;
    --pc-free:        #198754;
    --pc-radius:      8px;
    --pc-img-bg:      #e9ecef;
    --pc-gap:         16px;
}

/* --- Primary tab bar --- */
.com-productcatalog .pc-tabbar {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    border-bottom: 2px solid #dee2e6;
    margin-bottom: 20px;
    padding: 0;
    list-style: none;
}
.com-productcatalog .pc-tab {
    background: none;
    border: 1px solid transparent;
    border-bottom: none;
    border-radius: var(--pc-radius) var(--pc-radius) 0 0;
    padding: 8px 18px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #555;
    cursor: pointer;
    transition: color .15s, background .15s;
    margin-bottom: -2px;
}
.com-productcatalog .pc-tab:hover {
    color: var(--pc-accent);
    background: #f8f9fa;
}
.com-productcatalog .pc-tab--active {
    color: var(--pc-accent);
    background: #fff;
    border-color: #dee2e6 #dee2e6 #fff;
}

/* --- Category pane (show/hide) --- */
.com-productcatalog .pc-catpane {
    display: none;
}
.com-productcatalog .pc-catpane--active {
    display: block;
}

/* --- Subcategory pill bar --- */
.com-productcatalog .pc-subbar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 18px;
}
.com-productcatalog .pc-subtab {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 2rem;
    padding: 4px 14px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #555;
    cursor: pointer;
    transition: background .15s, color .15s, border-color .15s;
}
.com-productcatalog .pc-subtab:hover {
    border-color: var(--pc-accent);
    color: var(--pc-accent);
}
.com-productcatalog .pc-subtab--active {
    background: var(--pc-accent);
    border-color: var(--pc-accent);
    color: #fff;
}

/* --- Sub pane (show/hide) --- */
.com-productcatalog .pc-pane {
    display: block;
}
.com-productcatalog .pc-pane[hidden] {
    display: none !important;
}

/* --- 5-column grid with vertical row gap --- */
.com-productcatalog .pc-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    column-gap: var(--pc-gap);
    row-gap: 24px;
}
@media (max-width: 1024px) {
    .com-productcatalog .pc-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 600px) {
    .com-productcatalog .pc-grid { grid-template-columns: repeat(2, 1fr); }
}

/* --- Card --- */
.com-productcatalog .pc-card {
    border: 1px solid #e0e0e0;
    border-radius: var(--pc-radius);
    overflow: hidden;
    background: #fff;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform .15s ease, box-shadow .15s ease;
}
.com-productcatalog .pc-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,.1);
}

/* Square image */
.com-productcatalog .pc-image-wrap {
    position: relative;
    width: 100%;
    padding-top: 100%;
    background: var(--pc-img-bg);
    overflow: hidden;
    flex-shrink: 0;
    line-height: 0;
}
.com-productcatalog .pc-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.com-productcatalog .pc-image-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #bbb;
}

/* Card body */
.com-productcatalog .pc-body {
    padding: 12px 14px 14px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 6px;
}

/* Description: truncate to 5 lines with ellipsis for consistent card heights.
   Adjust -webkit-line-clamp to taste (3-7 is a reasonable range). */
.com-productcatalog .pc-desc {
    font-size: 0.825rem;
    color: #666;
    line-height: 1.45;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.com-productcatalog .pc-footer {
    margin-top: auto;
    padding-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.com-productcatalog .pc-price {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--pc-accent);
}
.com-productcatalog .pc-price--free {
    color: var(--pc-free);
}
.com-productcatalog .pc-btn {
    display: block;
    text-align: center;
    background: var(--pc-accent);
    color: #fff;
    border-radius: 4px;
    padding: 5px 8px;
    font-size: 0.75rem;
    font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: .04em;
    transition: background .15s;
}
.com-productcatalog .pc-btn:hover {
    background: #0b5ed7;
    color: #fff;
    text-decoration: none;
}
.com-productcatalog .pc-empty {
    color: #888;
    font-style: italic;
    padding: 12px 0;
    margin: 0;
}

/* --- Grid card as a link to the pack page --- */
.com-productcatalog .pc-cardlink { text-decoration: none; color: inherit; }
.com-productcatalog .pc-cardlink:hover { color: inherit; text-decoration: none; }

/* ============================================================
   Pack page (single product) + image carousel
   ============================================================ */
.com-productcatalog.pc-productpage { max-width: 1100px; margin: 0 auto; }

.com-productcatalog .pc-back {
    display: inline-block;
    margin-bottom: 16px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--pc-accent);
    text-decoration: none;
}
.com-productcatalog .pc-back:hover { text-decoration: underline; }

.com-productcatalog .pc-product {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}
@media (max-width: 768px) {
    .com-productcatalog .pc-product { grid-template-columns: 1fr; }
}

/* Carousel */
.com-productcatalog .pc-gallery {
    position: relative;
    border-radius: var(--pc-radius);
    overflow: hidden;
    background: var(--pc-img-bg);
    outline: none;
}
.com-productcatalog .pc-slides { position: relative; width: 100%; padding-top: 56.3%; } /* 1080x608 ratio */
.com-productcatalog .pc-slide {
    position: absolute; inset: 0; margin: 0;
    opacity: 0; visibility: hidden;
    transition: opacity .25s ease;
}
.com-productcatalog .pc-slide--active { opacity: 1; visibility: visible; }
.com-productcatalog .pc-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.com-productcatalog .pc-gallery .pc-image-placeholder {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #bbb;
}

.com-productcatalog .pc-car-nav {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 40px; height: 40px; border: none; border-radius: 50%;
    background: rgba(0,0,0,.45); color: #fff; font-size: 1.6rem; line-height: 1;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: background .15s;
}
.com-productcatalog .pc-car-nav:hover { background: rgba(0,0,0,.7); }
.com-productcatalog .pc-car-prev { left: 10px; }
.com-productcatalog .pc-car-next { right: 10px; }

.com-productcatalog .pc-dots {
    position: absolute; bottom: 10px; left: 0; right: 0;
    display: flex; justify-content: center; gap: 6px;
}
.com-productcatalog .pc-dot {
    width: 9px; height: 9px; border-radius: 50%; border: none;
    background: rgba(255,255,255,.6); cursor: pointer; padding: 0;
}
.com-productcatalog .pc-dot--active { background: #fff; }

/* Info column */
.com-productcatalog .pc-product-title { font-size: 1.6rem; font-weight: 700; margin: 0 0 8px; line-height: 1.25; }
.com-productcatalog .pc-product-price { font-size: 1.3rem; font-weight: 700; color: var(--pc-accent); margin-bottom: 16px; }
.com-productcatalog .pc-product-price.pc-price--free { color: var(--pc-free); }
.com-productcatalog .pc-product-desc { font-size: 0.95rem; color: #444; line-height: 1.6; margin-bottom: 20px; }

.com-productcatalog .pc-btn--lg {
    display: inline-block; width: auto;
    padding: 12px 28px; font-size: 0.95rem; border-radius: 6px; text-transform: none; letter-spacing: 0;
}

/* ============================================================
   v1.3.4 additions — preview video, Payhip cues, store notice
   ============================================================ */

/* --- Pack-page preview video (replaces the carousel when set) --- */
.com-productcatalog .pc-video-wrap {
    position: relative;
    width: 100%;
    background: #000;
    border-radius: var(--pc-radius);
    overflow: hidden;
    line-height: 0;
}
.com-productcatalog .pc-video {
    width: 100%;
    height: auto;
    display: block;
}

/* --- "You'll be taken to Payhip" note under the buy button --- */
.com-productcatalog .pc-payhip-note {
    font-size: 0.82rem;
    color: #666;
    margin: 10px 0 0;
    line-height: 1.4;
}

/* --- Rich-text long description niceties --- */
.com-productcatalog .pc-product-desc p { margin: 0 0 0.8em; }
.com-productcatalog .pc-product-desc ul,
.com-productcatalog .pc-product-desc ol { margin: 0 0 0.8em 1.4em; padding: 0; }
.com-productcatalog .pc-product-desc li { margin: 0 0 0.3em; }
.com-productcatalog .pc-product-desc h2,
.com-productcatalog .pc-product-desc h3,
.com-productcatalog .pc-product-desc h4 { margin: 1em 0 0.4em; line-height: 1.3; }
.com-productcatalog .pc-product-desc img { max-width: 100%; height: auto; }

/* --- Store-wide "purchases via Payhip" notice at the top of the catalog --- */
.com-productcatalog .pc-store-notice {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #eef4ff;
    border: 1px solid #cfe0ff;
    color: #274b8a;
    border-radius: var(--pc-radius);
    padding: 10px 16px;
    margin: 0 0 20px;
    font-size: 0.9rem;
    line-height: 1.4;
}
.com-productcatalog .pc-store-notice-icon {
    flex: 0 0 auto;
    color: var(--pc-accent);
}
.com-productcatalog .pc-store-notice strong { font-weight: 700; }

/* ============================================================
   v1.3.6 — inline pack-details modal ("View Pack" opens here)
   ============================================================ */
.com-productcatalog .pc-card--clickable { cursor: pointer; }
.com-productcatalog .pc-card--clickable:focus-visible {
    outline: 2px solid var(--pc-accent);
    outline-offset: 2px;
}

body.pc-modal-lock { overflow: hidden; }

.com-productcatalog .pc-modal { position: fixed; inset: 0; z-index: 10500; display: none; }
.com-productcatalog .pc-modal.pc-modal--open { display: block; }
.com-productcatalog .pc-modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.6); }
.com-productcatalog .pc-modal-dialog {
    position: relative;
    z-index: 1;
    background: #fff;
    color: #222;
    width: calc(100% - 32px);
    max-width: 760px;
    max-height: calc(100vh - 64px);
    margin: 32px auto;
    padding: 24px 28px 28px;
    border-radius: 10px;
    overflow: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,.35);
}
.com-productcatalog .pc-modal-close {
    position: sticky;
    top: 0;
    float: right;
    margin: -10px -12px 0 0;
    background: none;
    border: none;
    font-size: 1.9rem;
    line-height: 1;
    color: #888;
    cursor: pointer;
}
.com-productcatalog .pc-modal-close:hover { color: #222; }
.com-productcatalog .pc-modal-media {
    margin-bottom: 16px;
    border-radius: 8px;
    overflow: hidden;
    background: #000;
    line-height: 0;
}
.com-productcatalog .pc-modal-media video,
.com-productcatalog .pc-modal-media .pc-modal-img { width: 100%; height: auto; display: block; }
.com-productcatalog .pc-modal-title { font-size: 1.5rem; font-weight: 700; margin: 0 0 6px; line-height: 1.25; }
.com-productcatalog .pc-modal-price { font-size: 1.25rem; font-weight: 700; color: var(--pc-accent); margin-bottom: 14px; }
.com-productcatalog .pc-modal-price.pc-price--free { color: var(--pc-free); }
.com-productcatalog .pc-modal-desc { font-size: 0.95rem; color: #444; line-height: 1.6; margin-bottom: 18px; }
.com-productcatalog .pc-modal-desc p { margin: 0 0 0.8em; }
.com-productcatalog .pc-modal-desc ul,
.com-productcatalog .pc-modal-desc ol { margin: 0 0 0.8em 1.4em; padding: 0; }
.com-productcatalog .pc-modal-desc li { margin: 0 0 0.3em; }
.com-productcatalog .pc-modal-desc h2,
.com-productcatalog .pc-modal-desc h3,
.com-productcatalog .pc-modal-desc h4 { margin: 1em 0 0.4em; line-height: 1.3; }
.com-productcatalog .pc-modal-desc img { max-width: 100%; height: auto; }

/* Card action (Buy) button — it is an <a>, keep the button look, no underline */
.com-productcatalog .pc-card-buy,
.com-productcatalog .pc-card-buy:hover,
.com-productcatalog .pc-card-buy:focus { text-decoration: none; color: #fff; }
