/* === PRISM SHOP CONTROLLER v1.1.0 === */
/* All colours use --shop-* variables set dynamically by PHP */

/* Hide default WooCommerce elements we replace */
.woocommerce-breadcrumb, .woocommerce-result-count, .woocommerce-ordering { display: none !important; }

.prism-shop-wrap {
    min-height: 60vh;
    background: var(--shop-bg, #0e1117);
    color: var(--shop-text, #e8eaed);
    font-family: var(--shop-font-body, 'Nunito', sans-serif);
    -webkit-font-smoothing: antialiased;
}

/* === HERO BANNER === */
.prism-shop-hero {
    padding: 50px 20px 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
    background: var(--shop-bg-card, #161b22);
    border-bottom: 1px solid var(--shop-border, #21262d);
}
.prism-shop-hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(14,17,23,0.7);
    z-index: 0;
}
.prism-shop-hero-inner {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}
.prism-shop-title {
    color: var(--shop-text, #e8eaed);
    font-size: 2.2em;
    font-weight: 700;
    margin: 0 0 8px;
    font-family: var(--shop-font-heading, 'Fredoka', sans-serif);
}
.prism-shop-desc {
    color: var(--shop-text-sec, #8b949e);
    font-size: 1.05em;
    margin: 0;
}

/* Breadcrumb */
.prism-shop-breadcrumb { margin-bottom: 12px; font-size: 0.9em; }
.prism-shop-breadcrumb a { color: var(--shop-text-sec, #8b949e); text-decoration: none; transition: color 0.2s; }
.prism-shop-breadcrumb a:hover { color: var(--shop-accent, #5ee87a); }
.prism-bc-sep { color: var(--shop-text-muted, #484f58); margin: 0 6px; }
.prism-bc-current { color: var(--shop-text, #e8eaed); font-weight: 500; }

/* === CATEGORY CARDS === */
.prism-shop-categories { padding: 30px 20px; background: transparent; }
.prism-shop-categories-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}
.prism-shop-cat-card {
    display: flex;
    flex-direction: column;
    background: var(--shop-bg-card, #161b22);
    border: 1px solid var(--shop-border, #21262d);
    border-radius: var(--shop-card-radius, 12px);
    overflow: hidden;
    text-decoration: none;
    color: var(--shop-text, #e8eaed);
    transition: all 0.3s;
}
.prism-shop-cat-card:hover {
    border-color: var(--shop-accent, #5ee87a);
    transform: translateY(-4px);
    box-shadow: 0 12px 36px rgba(0,0,0,0.3);
}
.prism-shop-cat-img {
    height: 160px;
    overflow: hidden;
    background: var(--shop-bg-hover, #1c2230);
}
.prism-shop-cat-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.prism-shop-cat-card:hover .prism-shop-cat-img img { transform: scale(1.05); }
.prism-shop-cat-placeholder {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--shop-bg-hover, #1c2230), var(--shop-bg-card, #161b22));
}
.prism-shop-cat-placeholder span { font-size: 2.5em; font-weight: 700; color: var(--shop-text-muted, #484f58); text-transform: uppercase; }
.prism-shop-cat-info { padding: 16px; }
.prism-shop-cat-info h3 { margin: 0 0 4px; font-size: 1.05em; font-weight: 600; color: var(--shop-text, #e8eaed); font-family: var(--shop-font-heading); }
.prism-shop-cat-count { font-size: 0.82em; color: var(--shop-text-sec, #8b949e); }

/* === SEARCH + FILTERS === */
.prism-shop-toolbar {
    padding: 20px;
    background: var(--shop-bg, #0e1117);
    border-bottom: 1px solid var(--shop-border, #21262d);
    z-index: 100;
}
.prism-shop-toolbar-sticky {
    position: sticky;
    top: 70px;
}
.prism-shop-toolbar-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}
.prism-shop-search { flex: 1; min-width: 200px; position: relative; }
.prism-shop-search input {
    width: 100%;
    padding: 12px 40px 12px 16px;
    border: 1px solid var(--shop-border, #21262d);
    border-radius: 10px;
    font-size: 0.95em;
    font-family: var(--shop-font-body);
    background: var(--shop-bg-card, #161b22);
    color: var(--shop-text, #e8eaed);
    transition: border-color 0.2s;
    box-sizing: border-box;
}
.prism-shop-search input::placeholder { color: var(--shop-text-muted, #484f58); }
.prism-shop-search input:focus { border-color: var(--shop-accent, #5ee87a); outline: none; box-shadow: 0 0 0 3px rgba(94,232,122,0.1); }
.prism-shop-search-icon { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-size: 1.1em; pointer-events: none; color: var(--shop-text-muted); }

.prism-shop-filters { display: flex; gap: 12px; align-items: center; }
.prism-shop-filters select {
    padding: 12px 32px 12px 14px;
    border: 1px solid var(--shop-border, #21262d);
    border-radius: 10px;
    font-size: 0.9em;
    font-family: var(--shop-font-body);
    background: var(--shop-bg-card, #161b22);
    color: var(--shop-text, #e8eaed);
    cursor: pointer;
    appearance: auto;
}
.prism-shop-filters select:focus { border-color: var(--shop-accent, #5ee87a); outline: none; }

/* === PRODUCT GRID === */
.prism-shop-products-wrap { max-width: 1200px; margin: 0 auto; padding: 30px 20px; }
.prism-shop-products {
    display: grid;
    grid-template-columns: repeat(var(--shop-columns, 4), 1fr);
    gap: 24px;
    min-height: 200px;
}

/* === PRODUCT CARDS === */
.prism-shop-product {
    background: var(--shop-bg-card, #161b22);
    border: 1px solid var(--shop-border, #21262d);
    border-radius: var(--shop-card-radius, 12px);
    overflow: hidden;
    transition: all 0.3s ease;
}
/* Hover effects */
.prism-shop-product:hover { border-color: var(--shop-accent, #5ee87a); }
.prism-shop-product[data-hover="lift"]:hover,
.prism-shop-product:hover { transform: translateY(-4px); box-shadow: 0 16px 48px rgba(0,0,0,0.35); }

.prism-shop-product-link { text-decoration: none; color: inherit; display: block; }

.prism-shop-product-img {
    height: 220px;
    overflow: hidden;
    background: var(--shop-bg-hover, #1c2230);
}
.prism-shop-product-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; display: block; }
.prism-shop-product:hover .prism-shop-product-img img { transform: scale(1.05); }

.prism-shop-product-info { padding: 14px 16px 18px; }
.prism-shop-product-cat {
    display: inline-block;
    font-size: 0.72em;
    color: var(--shop-accent, #5ee87a);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 4px;
    font-family: var(--shop-font-body);
}
.prism-shop-product-title {
    margin: 0 0 8px;
    font-size: 0.95em;
    font-weight: 600;
    color: var(--shop-text, #e8eaed);
    line-height: 1.3;
    font-family: var(--shop-font-heading);
}
.prism-shop-product-price {
    font-size: 1.05em;
    font-weight: 700;
    color: var(--shop-accent, #5ee87a);
}
.prism-shop-product-price del { color: var(--shop-text-muted, #484f58); font-weight: 400; font-size: 0.85em; }
.prism-shop-product-price ins { text-decoration: none; }
.prism-shop-product-price .woocommerce-Price-amount,
.prism-shop-product-price bdi,
.prism-shop-product-price .amount {
    color: var(--shop-accent, #5ee87a) !important;
}
.prism-shop-product-price .woocommerce-Price-currencySymbol { color: inherit; }

/* No results */
.prism-shop-no-results { grid-column: 1 / -1; text-align: center; padding: 60px 20px; color: var(--shop-text-sec, #8b949e); }

/* === PAGINATION === */
.prism-shop-pagination { text-align: center; padding: 30px 0; }
.prism-shop-load-more {
    display: inline-block;
    padding: 14px 40px;
    background: var(--shop-accent, #5ee87a);
    color: var(--shop-bg, #0e1117);
    border: none;
    border-radius: 100px;
    font-size: 1em;
    font-weight: 800;
    font-family: var(--shop-font-body);
    cursor: pointer;
    transition: all 0.25s;
}
.prism-shop-load-more:hover { box-shadow: 0 8px 32px rgba(94,232,122,0.3); transform: translateY(-2px); }
.prism-shop-load-more:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* Loading */
.prism-shop-loading { text-align: center; padding: 40px; }
.prism-shop-spinner {
    display: inline-block; width: 36px; height: 36px;
    border: 3px solid var(--shop-border, #21262d);
    border-top-color: var(--shop-accent, #5ee87a);
    border-radius: 50%;
    animation: prism-spin 0.7s linear infinite;
}
@keyframes prism-spin { to { transform: rotate(360deg); } }

/* === RESPONSIVE === */
@media (max-width: 1024px) {
    .prism-shop-products { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
    .prism-shop-hero { padding: 35px 16px 30px; }
    .prism-shop-title { font-size: 1.6em; }
    .prism-shop-toolbar-inner { flex-direction: column; }
    .prism-shop-toolbar-sticky { position: static; }
    .prism-shop-search { min-width: 100%; }
    .prism-shop-filters { width: 100%; }
    .prism-shop-filters select { flex: 1; }
    .prism-shop-categories-inner { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .prism-shop-cat-img { height: 120px; }
    .prism-shop-products { grid-template-columns: repeat(2, 1fr); gap: 14px; }
    .prism-shop-product-img { height: 160px; }
}
@media (max-width: 480px) {
    .prism-shop-categories-inner { grid-template-columns: 1fr; }
    .prism-shop-products { grid-template-columns: 1fr; }
    .prism-shop-filters { flex-direction: column; }
    .prism-shop-filters select { width: 100%; }
}
