/* ============================================================
   Print Forge Designs — Product Customizer CSS
   Brand: #CC3872
   ============================================================ */

:root {
    --pfd-brand:        #CC3872;
    --pfd-brand-dark:   #a82e5e;
    --pfd-brand-light:  #fdeef4;
    --pfd-border:       #e0e0e0;
    --pfd-bg:           #f7f7f7;
    --pfd-text:         #1a1a1a;
    --pfd-muted:        #777;
    --pfd-radius:       10px;
    --pfd-ctrl-radius:  6px;
}

/* ── Wrapper ── */
.pfdc-wrap {
    margin: 24px 0;
    font-family: inherit;
    border: 1.5px solid var(--pfd-border);
    border-radius: var(--pfd-radius);
    background: #fff;
}

.pfdc-price-panel {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    padding: 12px 16px;
    border-bottom: 1.5px solid var(--pfd-border);
    background: var(--pfd-brand-light);
}
.pfdc-price-panel__item {
    display: inline-flex;
    align-items: baseline;
    gap: 10px;
}
.pfdc-price-panel__label {
    font-size: 12px;
    font-weight: 700;
    color: var(--pfd-muted);
    text-transform: uppercase;
}
.pfdc-price-panel__value {
    font-size: 20px;
    font-weight: 800;
    color: var(--pfd-brand);
    line-height: 1;
}
.pfdc-price-panel__sku {
    font-size: 14px;
    font-weight: 800;
    color: var(--pfd-text);
    line-height: 1.1;
}
.pfdc-price-html {
    display: inline-flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: baseline;
}
.pfdc-price-html__part {
    white-space: nowrap;
}
.pfdc-price-html__sep {
    color: var(--pfd-muted);
}

/*
 * Archive/category product card price line.
 * Purpose: keep Blank/Printed prices visible on product cards without making
 * them overpower the product image, title, or Shop Now button.
 * Safe to remove: yes, but archive card pricing will go back to the larger
 * theme/Elementor price styling.
 */
.woocommerce ul.products li.product .price .pfdc-price-html--archive,
.elementor-widget-woocommerce-archive-products .price .pfdc-price-html--archive {
    display: inline-flex;
    justify-content: center;
    gap: 4px;
    max-width: 100%;
    font-size: 13px !important;
    font-weight: 600 !important;
    line-height: 1.25 !important;
    color: #c82d73;
}

.woocommerce ul.products li.product .price .pfdc-price-html--archive .woocommerce-Price-amount,
.woocommerce ul.products li.product .price .pfdc-price-html--archive bdi,
.elementor-widget-woocommerce-archive-products .price .pfdc-price-html--archive .woocommerce-Price-amount,
.elementor-widget-woocommerce-archive-products .price .pfdc-price-html--archive bdi,
.price .pfdc-price-html.pfdc-price-html--archive,
.price .pfdc-price-html.pfdc-price-html--archive * {
    font-size: 13px !important;
    font-weight: 600 !important;
    line-height: 1.25 !important;
    color: inherit !important;
}

/* ================================================================
   TOGGLE BAR
================================================================ */
.pfdc-toggle-bar {
    display: flex;
    gap: 8px;
    padding: 8px;
    border-bottom: 1.5px solid var(--pfd-border);
    background: var(--pfd-brand-light);
}
.pfdc-toggle-btn {
    flex: 1;
    padding: 13px 12px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    border: 1.5px solid rgba(204,56,114,0.22);
    border-radius: 8px;
    background: var(--pfd-brand) !important;
    color: #fff !important;
    cursor: pointer;
    transition: background 0.18s, color 0.18s, box-shadow 0.18s, transform 0.18s;
}
.pfdc-toggle-btn--active {
    background: var(--pfd-brand-dark) !important;
    color: #fff !important;
    border-color: var(--pfd-brand-dark);
    box-shadow: 0 2px 10px rgba(204,56,114,0.22);
}
.pfdc-toggle-btn:hover:not(.pfdc-toggle-btn--active) {
    background: var(--pfd-brand-dark) !important;
    color: #fff !important;
    transform: translateY(-1px);
}

/* ================================================================
   MODE PANELS
================================================================ */
.pfdc-mode {
    display: none;
    padding: 18px 18px 10px;
}
.pfdc-mode--active {
    display: block;
}

/* ================================================================
   CANVAS
================================================================ */
.pfdc-canvas-wrap {
    position: relative;
    display: inline-block;
    width: 100%;
    padding: 24px 12px 10px 12px;
    box-sizing: border-box;
}

/* Dimension labels */
.pfdc-dim {
    position: absolute;
    font-size: 12px;
    font-weight: 600;
    color: var(--pfd-text);
}
.pfdc-dim--top {
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
}
.pfdc-dim--right {
    right: 4px;
    top: 50%;
    transform: translateY(-50%) rotate(90deg);
    white-space: nowrap;
}

/* Guide labels removed — guides baked into canvas image */

/* Canvas box — sized explicitly via inline style from PHP */
.pfdc-canvas {
    position: relative;
    display: inline-block;
    background: transparent;
    border-radius: 6px;
    overflow: hidden;
    user-select: none;
    touch-action: none;
    line-height: 0;
}

/* Product base image — fills canvas div exactly */
.pfdc-canvas__product {
    position: relative;
    width: 100%;
    height: 100%;
    display: block;
    pointer-events: none;
    z-index: 1;
}
/* Guide overlays removed — guides baked into canvas image */

/* Finish overlay */
.pfdc-finish-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none;
    z-index: 4;
    transition: opacity 0.3s;
}
.pfdc-finish-overlay.finish-gloss {
    background: linear-gradient(135deg,
        rgba(255,255,255,0.38) 0%,
        rgba(255,255,255,0.0) 55%,
        rgba(255,255,255,0.12) 100%);
}
.pfdc-finish-overlay.finish-satin {
    background: linear-gradient(160deg,
        rgba(255,255,255,0.18) 0%,
        rgba(200,200,200,0.08) 100%);
}
.pfdc-finish-overlay.finish-matte {
    background: rgba(230,230,230,0.14);
}

/* Frame overlay — transparent center PNG sits above customer design */
.pfdc-canvas__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: fill;
    pointer-events: none;
    z-index: 5;
    display: block;
}

/* Design layer */
.pfdc-design-layer {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
#pfdc-design-img {
    max-width: 90%;
    max-height: 90%;
    cursor: grab;
    transform-origin: center center;
    position: absolute;
}
#pfdc-design-img:active { cursor: grabbing; }

/* Canvas placeholder */
.pfdc-canvas__placeholder {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--pfd-muted);
    font-size: 12px;
    pointer-events: all;
    cursor: pointer;
}
.pfdc-canvas__placeholder:hover {
    color: var(--pfd-brand);
}
.pfdc-canvas__placeholder:hover svg {
    color: var(--pfd-brand);
}
.pfdc-canvas__placeholder svg {
    width: 36px;
    height: 36px;
    color: #bbb;
}

/* Guides toggle and notice removed — guides baked into canvas image */

/* ================================================================
   UPLOAD BOX
================================================================ */
.pfdc-upload-box {
    background: var(--pfd-bg);
    border: 1.5px dashed var(--pfd-border);
    border-radius: var(--pfd-radius);
    padding: 14px 16px;
    margin: 10px 0;
}
.pfdc-upload-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--pfd-text);
    margin-bottom: 8px;
}
.pfdc-upload-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.pfdc-file-btn {
    display: inline-block;
    padding: 7px 16px;
    background: #fff;
    border: 1.5px solid var(--pfd-border);
    border-radius: var(--pfd-ctrl-radius);
    font-size: 13px;
    font-weight: 600;
    color: var(--pfd-text);
    cursor: pointer;
    transition: border-color 0.18s, color 0.18s;
}
.pfdc-file-btn:hover {
    border-color: var(--pfd-brand);
    color: var(--pfd-brand);
}
.pfdc-file-name {
    font-size: 13px;
    color: var(--pfd-muted);
}

/* ================================================================
   CONTROLS
================================================================ */
.pfdc-controls {
    margin: 8px 0 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.pfdc-controls__row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.pfdc-ctrl-btn {
    padding: 7px 14px;
    border-radius: var(--pfd-ctrl-radius);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    border: 1.5px solid var(--pfd-border);
    background: #fff;
    color: var(--pfd-text);
    transition: all 0.18s;
    white-space: nowrap;
}
.pfdc-ctrl-btn:hover {
    border-color: var(--pfd-brand);
    color: var(--pfd-brand);
}
.pfdc-ctrl-btn--brand {
    background: var(--pfd-brand) !important;
    border-color: var(--pfd-brand) !important;
    color: #fff !important;
}
.pfdc-ctrl-btn--brand:hover {
    background: var(--pfd-brand-dark) !important;
    border-color: var(--pfd-brand-dark) !important;
    color: #fff !important;
}
.pfdc-ctrl-btn--outline {
    background: #fff;
    border-color: var(--pfd-brand);
    color: var(--pfd-brand);
}
.pfdc-ctrl-btn--outline:hover {
    background: var(--pfd-brand);
    color: #fff;
}
.pfdc-ctrl-btn--dark {
    background: #1a1a1a;
    border-color: #1a1a1a;
    color: #fff;
}
.pfdc-ctrl-btn--dark:hover {
    background: #333;
    border-color: #333;
    color: #fff;
}

.pfdc-slider-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--pfd-muted);
    white-space: nowrap;
}
.pfdc-slider-label input[type="range"] {
    accent-color: var(--pfd-brand);
    width: 90px;
}

/* ================================================================
   FINISH CARDS
================================================================ */
.pfdc-finish-section {
    border-top: 1.5px solid var(--pfd-border);
    padding-top: 16px;
    margin-top: 8px;
    padding-bottom: 14px;
}
.pfdc-finish-section__label {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--pfd-text);
    margin-bottom: 12px;
}
.pfdc-required {
    color: var(--pfd-brand);
}
.pfdc-finish-cards {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.pfdc-finish-card {
    flex: 1;
    min-width: 90px;
    max-width: 160px;
    padding: 16px 10px 14px;
    border: 2px solid var(--pfd-border);
    border-radius: var(--pfd-radius);
    background: #fff;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
    text-align: center;
}
.pfdc-finish-card:hover {
    border-color: var(--pfd-brand);
    box-shadow: 0 2px 10px rgba(204,56,114,0.12);
}
.pfdc-finish-card--active {
    border-color: var(--pfd-brand);
    background: var(--pfd-brand-light);
    box-shadow: 0 2px 14px rgba(204,56,114,0.18);
}

/* Finish swatches */
.pfdc-finish-card__swatch {
    display: block;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1.5px solid rgba(0,0,0,0.08);
}
.pfdc-finish-card__swatch--gloss {
    background: radial-gradient(circle at 35% 30%,
        #ffffff 0%, #e0e0e0 40%, #b0b0b0 100%);
    box-shadow: inset 0 2px 6px rgba(255,255,255,0.9),
                0 2px 8px rgba(0,0,0,0.15);
}
.pfdc-finish-card__swatch--satin {
    background: linear-gradient(135deg,
        #d8d8d8 0%, #ebebeb 50%, #cecece 100%);
    box-shadow: inset 0 1px 4px rgba(255,255,255,0.6),
                0 1px 4px rgba(0,0,0,0.1);
}
.pfdc-finish-card__swatch--matte {
    background: #d0d0d0;
    box-shadow: none;
}

.pfdc-finish-card__name {
    font-size: 13px;
    font-weight: 700;
    color: var(--pfd-text);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.pfdc-finish-card__desc {
    display: none;
}

/* ================================================================
   BLANK MODE
================================================================ */
.pfdc-blank-info {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    background: var(--pfd-bg);
    border-radius: var(--pfd-radius);
    padding: 16px;
    margin-bottom: 14px;
}
.pfdc-blank-icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    color: var(--pfd-brand);
}
.pfdc-blank-info p {
    font-size: 13px;
    color: var(--pfd-muted);
    margin: 0;
    line-height: 1.5;
}
.pfdc-blank-info strong {
    color: var(--pfd-text);
}

/* ================================================================
   VALIDATION MESSAGE
================================================================ */
.pfdc-validation {
    background: #fff3f3;
    border-top: 1.5px solid #f5c2c7;
    color: #b02a37;
    font-size: 13px;
    padding: 11px 18px;
    font-weight: 600;
}

/* ================================================================
   MODALS
================================================================ */
.pfdc-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.pfdc-modal__box {
    background: #fff;
    border-radius: 14px;
    padding: 28px 24px 22px;
    max-width: 520px;
    width: 100%;
    box-shadow: 0 8px 40px rgba(0,0,0,0.18);
}
.pfdc-modal__box--small {
    max-width: 380px;
}
.pfdc-modal__title {
    font-size: 18px;
    font-weight: 800;
    color: var(--pfd-text);
    margin: 0 0 4px;
    text-align: center;
}
.pfdc-modal__sub {
    font-size: 13px;
    color: var(--pfd-muted);
    text-align: center;
    margin: 0 0 16px;
}
.pfdc-modal__canvas-wrap {
    border-radius: 8px;
    overflow: hidden;
    border: 1.5px solid var(--pfd-border);
    background: #f0f0f0;
    margin-bottom: 16px;
    line-height: 0;
}
.pfdc-modal__canvas-wrap canvas {
    max-width: 100%;
    display: block;
}
.pfdc-modal__actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}
.pfdc-modal__actions--res {
    margin-top: 14px;
}

/* Resolution modal */
.pfdc-modal__site-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--pfd-text);
    margin: 0 0 10px;
}
.pfdc-res-warning-icon {
    font-size: 14px;
    font-weight: 600;
    color: #7a5c00;
    background: #fffbea;
    border: 1px solid #f5d442;
    border-radius: 6px;
    padding: 9px 12px;
    margin: 0 0 10px;
}
.pfdc-res-detail {
    font-size: 13px;
    color: var(--pfd-text);
    margin: 0 0 6px;
    line-height: 1.7;
}
.pfdc-res-continue {
    font-size: 13px;
    color: var(--pfd-muted);
    margin: 0;
}

/* ================================================================
   RESPONSIVE
================================================================ */
@media (max-width: 500px) {
    .pfdc-canvas-wrap { padding-left: 48px; padding-right: 18px; }
    .pfdc-finish-card { min-width: 75px; padding: 10px 6px; }
    .pfdc-finish-card__swatch { width: 34px; height: 34px; }
    .pfdc-ctrl-btn { padding: 6px 10px; font-size: 11px; }
    .pfdc-slider-label input[type="range"] { width: 65px; }
}

/* ================================================================
   QUANTITY INPUT
================================================================ */
input.qty,
input[name="quantity"],
.quantity input,
.quantity input.qty,
.woocommerce input.qty,
.woocommerce-page input.qty,
form.cart input.qty {
    width: 80px !important;
    min-width: 80px !important;
    max-width: 80px !important;
    padding-left: 8px !important;
    padding-right: 8px !important;
    text-align: center !important;
    box-sizing: border-box !important;
}

/* ================================================================
   CART PAGE STYLES
================================================================ */

/* ── Cart page button color ── */
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce input.button.alt,
.woocommerce #respond input#submit.alt {
    background-color: #CC3872 !important;
    border-color: #CC3872 !important;
    color: #fff !important;
}
.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover {
    background-color: #a82e5e !important;
    border-color: #a82e5e !important;
}

.woocommerce-cart .woocommerce-info {
    background: #fff !important;
    border-top-color: #CC3872 !important;
    color: #1a1a1a !important;
    border-radius: 0 0 10px 10px !important;
    padding: 40px 20px !important;
    text-align: center !important;
    font-size: 18px !important;
}
.woocommerce-cart .woocommerce-info::before {
    content: "😢" !important;
    font-style: normal !important;
    background: none !important;
    color: inherit !important;
    font-size: 32px !important;
    display: block !important;
    margin-bottom: 10px !important;
}
.woocommerce-cart .return-to-shop .button {
    background-color: #CC3872 !important;
    border-radius: 50px !important;
    color: #fff !important;
    padding: 10px 30px !important;
    font-weight: 600 !important;
}
.woocommerce-cart .return-to-shop .button:hover {
    background-color: #a82e5e !important;
}

/* ── Cart thumbnail size ── */
.woocommerce table.shop_table td.product-thumbnail img {
    width: 80px !important;
    height: 80px !important;
    object-fit: contain !important;
}


/* ── Cart notification bar color override ── */
body.woocommerce-cart .woocommerce-message,
body.woocommerce .woocommerce-message {
    border-top-color: #CC3872 !important;
}
body.woocommerce-cart .woocommerce-message::before,
body.woocommerce .woocommerce-message::before {
    color: #CC3872 !important;
    content: "\e015" !important;
}
