/* ============================================
   ChabadWorks Designer - Public Styles
   ============================================ */

/* Design It button — inherits theme .button.alt styling, add small spacing */
.cwd-design-button {
    margin-left: 10px !important;
    text-decoration: none !important;
    vertical-align: middle;
}

/* Designable product page: hide WAPF custom fields (user customizes via designer) */
.cwd-designable-product form.cart .wapf,
.cwd-designable-product form.cart .wapf-wrapper,
.cwd-designable-product form.cart .wapf-product-totals {
    display: none !important;
}

/* Align quantity, Add to Cart and Design It on same row */
.cwd-designable-product form.cart .quantity,
.cwd-designable-product form.cart .single_add_to_cart_button {
    vertical-align: middle;
}

/* Customize Yourself badge (shop loop) */
.cwd-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 10;
    background: #2563eb;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============================================
   Cart page: design preview (thumb + tooltip)
   ============================================ */
.cwd-cart-preview {
    position: relative;
    display: inline-block;
    margin-top: 6px;
    line-height: 0;
}

/* 100x100 thumbnail */
.cwd-preview-thumb {
    width: 100px;
    height: 100px;
    object-fit: contain;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    background: #f9fafb;
    padding: 3px;
    cursor: pointer;
    display: block;
    transition: border-color 0.2s;
}
.cwd-cart-preview:hover .cwd-preview-thumb {
    border-color: #2563eb;
}

/* 400px hover tooltip */
.cwd-preview-tooltip {
    display: none;
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 99999;
    padding: 8px;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.22);
    pointer-events: none;
}
.cwd-preview-tooltip img {
    max-width: 400px;
    max-height: 400px;
    width: auto;
    height: auto;
    display: block;
    border-radius: 6px;
}
.cwd-cart-preview:hover .cwd-preview-tooltip {
    display: block;
}

/* Tooltip arrow */
.cwd-preview-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-top-color: #fff;
}
.cwd-preview-tooltip::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 9px solid transparent;
    border-top-color: #d1d5db;
}

/* ============================================
   Mini-cart / slide panel: "view design" link
   ============================================ */
.cwd-mini-cart-notice {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    line-height: 1.3;
}
.cwd-mini-cart-notice a {
    color: #2563eb;
    text-decoration: underline;
}
.cwd-mini-cart-notice a:hover {
    color: #1d4ed8;
}
