:root {
    --pf-primary: #6C3BFF;
    --pf-secondary: #111827;
    --pf-accent: #A855F7;
    --pf-radius: 14px;

}

#printflow-calculator {
    background: white;
    border-radius: var(--pf-radius);
    padding: 30px;
    box-shadow:
        0 10px 30px rgba(0,0,0,.08);
    max-width: 720px;
    margin: 40px auto;
}

#printflow-calculator {
    box-sizing: border-box;
}

#printflow-calculator *,
#printflow-calculator *::before,
#printflow-calculator *::after {
    box-sizing: border-box;
	font-size: 14px;
}

#pf-price.is-calculating {
    opacity: .30;
}


/* --------------------------------------------------
   Material active badge
-------------------------------------------------- */

body.single-product .pf-material-card {
    position: relative !important;
    overflow: visible !important;
}

/* --------------------------------------------------
   PrintFlow Premium Gallery
-------------------------------------------------- */

/* Hide Woo zoom icon if needed */
body.single-product .pf-product-gallery .woocommerce-product-gallery__trigger {
    width: 42px !important;
    height: 42px !important;
    border-radius: 50% !important;
    background: #fff !important;
    box-shadow: 0 8px 24px rgba(15,23,42,.16) !important;
}

/* --------------------------------------------------
   Premium thumbnail strip
-------------------------------------------------- */

.pf-gallery {
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
}

/* Main image */

.pf-gallery-main {
    width: 100%;
    border-radius: 10px;
    overflow: hidden;
}

.pf-gallery-main img {
    width: 100%;
    height: 320px;
    object-fit: cover;
    display: block;
}

/* Nav wrapper */

.pf-gallery-nav-wrap {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
}


/* Thumb row */

.pf-gallery-thumbs {
    flex: 1;
    display: flex;
    gap: 4px;
    overflow: hidden;
}

/* Exactly 3 thumbnails */

.pf-gallery-thumb {
    width: calc((100% - 8px) / 4);
    height: 36px;
    border: 2px solid transparent;
    border-radius: 4px;
    padding: 0;
    overflow: hidden;
    background: #fff;
    cursor: pointer;
    flex-shrink: 0;
}

/* Thumb image */

.pf-gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Active */

.pf-gallery-thumb.is-active {
    border-color: var(--pf-primary, #6c3bff);
}

/* Minimal arrows */

.pf-gallery-nav {
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    width: auto;
    height: auto;
    min-width: auto;
    padding: 0;
    color: #111827;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    transition: .2s ease;
}

/* Hover */

.pf-gallery-nav:hover {
    color: var(--pf-primary, #6c3bff);
}

.pf-gallery-nav:disabled {
    opacity: 0.28;
    cursor: default;
    pointer-events: none;
}

/* -----------------------
  ADDITIONAL OPTIONS
----------------------- */

.pf-option-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 9px;
}

.pf-option-card {
    position: relative;
    overflow: visible;
    border: 1px solid #dbe1ea;
    background: #fff;
    border-radius: 8px;
    padding: 11px 10px;
    cursor: pointer;
    text-align: center;
    transition: .2s ease;
}

.pf-option-card span {
    display: block;
    font-size: 12px;
    font-weight: 500 !important;
    color: #111827;
}

.pf-option-card small {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    color: #64748b;
}

.pf-option-card:hover,
.pf-option-card.is-active {
    border-color: var(--pf-primary, #6c3bff);
    background: rgba(108,59,255,.06);
	box-shadow: 0 2px 10px rgba(108, 59, 255, .28);	
}

.pf-option-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    background: var(--pf-primary, #6c3bff);
    color: #fff;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999;
    box-shadow: 0 4px 10px rgba(108,59,255,.28);
}


.pf-option-card.is-active .pf-option-badge {
    display: flex;
} 

.pf-option-badge svg {
    width: 11px;
    height: 11px;
    display: block;
} 

.pf-summary-options {
    margin-top: 4px;
}

.pf-option-media {
    width: 58px;
    height: 48px;
    margin: 0 auto 8px;
}

.pf-option-image {
    width: 58px;
    height: 48px;
    object-fit: cover;
    border-radius: 3px;
    display: block;
    background: #f1f5f9;
}

/* -----------------------
  Quantity product card
----------------------- */
.pf-quantity-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 9px;
}

.pf-quantity-card {
    position: relative;
    overflow: visible;	
    border: 1px solid #dbe1ea;
    background: #fff;
    border-radius: 8px;
    padding: 13px 10px;
    cursor: pointer;
    text-align: center;
    transition: .2s ease;
}

.pf-quantity-card strong {
    display: block;
    font-size: 15px;
    font-weight: 800;
    color: #111827;
}

.pf-quantity-card span {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #64748b;
}

.pf-quantity-card:hover,
.pf-quantity-card.is-active {
    border-color: var(--pf-primary, #6c3bff);
    background: rgba(108,59,255,.06);
	box-shadow: 0 2px 10px rgba(108, 59, 255, .28);
}

/* --------------------------------------------------
   Attribute Matrix premium cards
-------------------------------------------------- 

body.single-product .pf-matrix-grid {
    display: grid;
	grid-template-columns: repeat(3, 1fr);
    gap: 9px;
}



body.single-product .pf-matrix-card span,
body.single-product .pf-matrix-quantity-card strong {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: #111827;
}

body.single-product .pf-matrix-card:hover,
body.single-product .pf-matrix-card.is-active,
body.single-product .pf-matrix-quantity-card:hover,
body.single-product .pf-matrix-quantity-card.is-active {
    border-color: var(--pf-primary, #6c3bff);
    background: rgba(108,59,255,.06);
}

body.single-product .pf-matrix-media {
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 6px;
    overflow: hidden;
    background: #f3f4f6;
    margin-bottom: 8px;
}

body.single-product .pf-matrix-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
*/


.pf-matrix-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 9px;
}

.pf-matrix-card.pf-material-card {
    width: 100%;
    text-align: center;
}

.pf-matrix-card .pf-material-media {
    margin-bottom: 10px;
}

.pf-matrix-card .pf-material-image {
    width: 100%;
    height: 90px;
    object-fit: cover;
    border-radius: 3px;
}

.pf-matrix-card:not(:has(.pf-material-media img)) {
    display: flex;
    align-items: center;
    justify-content: center;
}

.pf-matrix-card:not(:has(.pf-material-media img)) .pf-material-name {
    margin: 0;
}

body.single-product .pf-matrix-card:hover,
body.single-product .pf-matrix-card.is-active,
body.single-product .pf-matrix-quantity-card:hover,
body.single-product .pf-matrix-quantity-card.is-active {
    border-color: var(--pf-primary, #6c3bff);
    background: rgba(108,59,255,.06);
	box-shadow: 0 2px 10px rgba(108, 59, 255, .28);	
}

body.single-product .pf-matrix-card,
body.single-product .pf-matrix-quantity-card {

    border: 1px solid #dbe1ea;
    background: #fff;
    border-radius: 8px;
    padding: 12px 10px;
    cursor: pointer;
    text-align: center;
	color: #111827;
    transition: .2s ease;
    overflow: visible;
}

.pf-matrix-unavailable {
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 8px;
    background: #fff5f5;
    border: 1px solid #fecaca;
    color: #b91c1c;
    font-size: 13px;
    font-weight: 600;
}

@media (max-width: 768px) {
    .pf-matrix-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .pf-matrix-grid {
        grid-template-columns: 1fr;
    }
}

/* --------------------------------------------------
   PrintFlow reusable active selection badge
-------------------------------------------------- */

body.single-product .pf-selectable-card {
    position: relative;
    overflow: visible;
}

body.single-product .pf-active-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    background: var(--pf-primary, #6c3bff);
    color: #fff;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 20;
    box-shadow: 0 4px 12px rgba(108,59,255,.28); 
}

body.single-product .pf-active-badge svg {
    width: 12px;
    height: 12px;
    display: block;
}

body.single-product .is-active > .pf-active-badge {
    display: flex;
}


/* Debug */

.pf-matrix-debug {
    margin: 16px 0;
    padding: 14px;
    padding: 14px;
    border: 1px dashed #6c3bff;
    border-radius: 10px;
    background: #f8f5ff;
    color: #312e81;
    font-size: 13px;
    line-height: 1.6;
}

