/* ==========================================================
   Print Catalogue Customize Page — Stylesheet
   /print-catalogue/assets/css/customize-page.css
   Version: 4.0
   ========================================================== */

/* ── Page reset ──────────────────────────────────────────── */
body.page-template-print-catalogue-customize,
body.page-template-print-catalogue-customize .site-content,
body.page-template-print-catalogue-customize .content-area,
body.page-template-print-catalogue-customize #main,
body.page-template-print-catalogue-customize .site-main {
    background: #fff !important;
}
.print-catalogue-customize-page { min-height: 100vh; background: #fff; padding: 20px 0; }

/* ── Breadcrumbs ─────────────────────────────────────────── */
.customize-page-header { max-width: 1400px; margin: 0 auto 20px; padding: 0 20px; }
.breadcrumbs { font-size: 13px; color: #888; }
.breadcrumbs a { color: #0073aa; text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }

/* ── Main two-column layout ──────────────────────────────── */
.customize-main-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}
@media (max-width: 1024px) {
    .customize-main-container { grid-template-columns: 1fr; gap: 30px; padding: 24px; }
}

/* ── Left column ─────────────────────────────────────────── */
.preview-left-column {
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: sticky;
    top: 20px;
    align-self: start;
}
.product-preview-wrapper {
    position: relative;
    background: #f7f7f7;
    border-radius: 10px;
    padding: 30px;
    min-height: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.main-product-image { max-width: 100%; height: auto; border-radius: 6px; transition: transform 0.3s ease; }
.main-product-image:hover { transform: scale(1.03); }

.favorite-icon {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 38px;
    height: 38px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.12);
    font-size: 20px;
    transition: transform 0.2s;
    user-select: none;
}
.favorite-icon:hover { transform: scale(1.15); }
.favorite-icon.active { color: #dc3232; }

/* Thumbnail gallery — shared by product images AND uploaded designs */
.thumbnail-gallery { display: flex; gap: 10px; overflow-x: auto; padding: 4px 0 8px; scrollbar-width: thin; }
.thumbnail-item {
    position: relative;
    min-width: 72px;
    width: 72px;
    height: 72px;
    border: 2px solid transparent;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.2s;
    background: #f0f0f0;
    flex-shrink: 0;
}
.thumbnail-item:hover, .thumbnail-item.active { border-color: #0073aa; }
.thumbnail-item img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* "YOUR DESIGN" badge */
.uploaded-thumb-badge {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: rgba(0,115,170,0.85);
    color: #fff;
    font-size: 7px;
    font-weight: 700;
    text-align: center;
    padding: 2px 0;
    letter-spacing: 0.4px;
    pointer-events: none;
    line-height: 1.3;
}

/* ✕ remove button — revealed on thumbnail hover */
.remove-uploaded-image {
    position: absolute;
    top: 3px; right: 3px;
    width: 18px; height: 18px;
    background: #dc3232;
    color: #fff;
    border: none;
    border-radius: 50%;
    padding: 0;
    cursor: pointer;
    font-size: 13px;
    line-height: 18px;
    text-align: center;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.15s;
}
.uploaded-thumbnail-item:hover .remove-uploaded-image { opacity: 1; }

/* ── Right column ────────────────────────────────────────── */
.config-right-column { display: flex; flex-direction: column; gap: 20px; }
.product-title { font-size: 28px; font-weight: 700; color: #1a1a1a; margin: 0 0 8px; }
.product-rating { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.stars { color: #f5a623; font-size: 17px; }
.rating-text { font-size: 13px; color: #777; }
.discount-badge {
    display: inline-block; background: #00a651; color: #fff;
    padding: 3px 10px; border-radius: 4px; font-size: 12px; font-weight: 600; margin-bottom: 12px;
}
.product-description { font-size: 14px; color: #666; line-height: 1.65; }

/* Pricing */
.product-pricing { padding: 16px 0; border-top: 1px solid #eee; border-bottom: 1px solid #eee; }
.price-row { display: flex; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.original-price { text-decoration: line-through; color: #aaa; font-size: 16px; }
.current-price { color: #00a651; font-size: 26px; font-weight: 700; }
.unit-price-display { font-size: 13px; color: #777; margin-top: 4px; min-height: 18px; }
.vat-text { font-size: 12px; color: #bbb; margin-top: 4px; }
.savings-badge {
    display: inline-block; background: #00a651; color: #fff;
    padding: 2px 7px; border-radius: 4px; font-size: 11px; font-weight: 700; margin-left: 4px; vertical-align: middle;
}

/* Config sections */
.config-section { margin-bottom: 20px; }
.section-label { display: block; font-size: 14px; font-weight: 600; color: #333; margin-bottom: 8px; }
.required-star { color: #dc3232; margin-left: 2px; }
.config-section.has-error .config-select,
.config-section.has-error .config-input,
.config-section.has-error .config-textarea {
    border-color: #dc3232 !important;
    box-shadow: 0 0 0 3px rgba(220,50,50,0.08) !important;
}
.config-section.has-error .section-label { color: #dc3232; }
.field-error-message { display: none; color: #dc3232; font-size: 12px; margin-top: 5px; font-style: italic; }
.config-section.has-error .field-error-message { display: block; }
.field-hint { font-size: 12px; color: #888; margin-top: 4px; display: block; }

/* Form controls */
.config-select, .config-input {
    width: 100%; padding: 12px 18px; border: 2px solid #e0e0e0; border-radius: 7px;
    font-size: 14px; color: #333; background: #fff; min-height: 46px;
    box-sizing: border-box; transition: border-color 0.2s, box-shadow 0.2s;
    appearance: none; -webkit-appearance: none;
}
.config-select {
    background-image: url('data:image/svg+xml;charset=UTF-8,%3Csvg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12"%3E%3Cpath fill="%23555" d="M6 9L1 4h10z"/%3E%3C/svg%3E');
    background-repeat: no-repeat; background-position: right 16px center; padding-right: 44px; cursor: pointer;
}
.config-select:focus, .config-input:focus {
    outline: none; border-color: #0073aa; box-shadow: 0 0 0 3px rgba(0,115,170,0.1);
}
.config-textarea {
    width: 100%; padding: 12px 18px; border: 2px solid #e0e0e0; border-radius: 7px;
    font-size: 14px; color: #333; min-height: 90px; resize: vertical;
    box-sizing: border-box; transition: border-color 0.2s, box-shadow 0.2s; font-family: inherit;
}
.config-textarea:focus { outline: none; border-color: #0073aa; box-shadow: 0 0 0 3px rgba(0,115,170,0.1); }
.custom-input-reveal { margin-top: 10px; animation: slideDown 0.2s ease; }
@keyframes slideDown { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }

/* Orientation */
.orientation-buttons { display: flex; gap: 10px; }
.orientation-btn {
    flex: 1; padding: 11px 16px; border: 2px solid #e0e0e0; background: #fff;
    border-radius: 7px; cursor: pointer; font-size: 14px; font-weight: 600; color: #444;
    transition: all 0.2s; text-align: center; display: flex; align-items: center; justify-content: center; gap: 8px;
}
.orientation-btn:hover { border-color: #0073aa; background: #f0f7fa; }
.orientation-btn.active { border-color: #0073aa; background: #0073aa; color: #fff; }
.orientation-icon { font-size: 18px; display: inline-block; }
.orientation-landscape { transform: rotate(90deg); }

/* Dimensions */
.dimension-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.dimension-input-group > label { font-size: 12px; color: #666; font-weight: 500; display: block; margin-bottom: 6px; }

/* Shirt sizes */
.shirt-sizes-container { display: flex; flex-direction: column; gap: 8px; }
.shirt-size-row { display: flex; align-items: center; gap: 12px; }
.shirt-size-row > label { min-width: 90px; font-size: 14px; font-weight: 600; color: #333; }
.shirt-size-row .config-input { max-width: 120px; }
.shirt-total-display { margin-top: 10px; font-size: 14px; color: #555; padding: 8px 14px; background: #f5f5f5; border-radius: 6px; }

/* Artwork note */
.artwork-note-info { padding: 14px 18px; background: #f0f7fa; border: 2px solid #0073aa; border-radius: 8px; font-size: 14px; color: #0073aa; font-weight: 600; }
.artwork-note-info p { margin: 0; }

/* Upload */
.upload-buttons { display: flex; flex-direction: column; gap: 10px; }
.template-btn, .upload-btn {
    width: 100%; padding: 13px 20px; border: 2px solid #0073aa; border-radius: 7px;
    font-size: 15px; font-weight: 600; cursor: pointer; transition: all 0.25s;
    display: flex; align-items: center; justify-content: center; gap: 8px;
}
.template-btn { background: #e6f4f8; color: #0073aa; }
.template-btn:hover { background: #0073aa; color: #fff; }
.upload-btn { background: #fff; color: #555; border-color: #ccc; }
.upload-btn:hover { background: #f5f5f5; border-color: #999; }
.upload-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.upload-spinner-wrapper {
    display: none; align-items: center; gap: 12px; margin-top: 12px;
    padding: 14px 18px; background: #f0f7fa; border: 2px solid #0073aa; border-radius: 8px;
}
.upload-spinner-wrapper.active { display: flex; }
.upload-spinner {
    width: 28px; height: 28px; border: 3px solid #e0e0e0; border-top-color: #0073aa;
    border-radius: 50%; animation: spin 0.75s linear infinite; flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }
.upload-spinner-text { font-size: 14px; color: #333; font-weight: 500; }
.upload-note { font-size: 12px; color: #888; margin-top: 8px; font-style: italic; }
.upload-success-message { color: #00a651; font-size: 14px; font-weight: 600; margin-top: 8px; display: none; }
.uploaded-files-list { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.upload-progress-item { padding: 8px 12px; background: #f0f7fa; border: 1px dashed #0073aa; border-radius: 6px; font-size: 13px; color: #0073aa; }
.uploaded-file-item { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; background: #f9f9f9; border: 1px solid #e8e8e8; border-radius: 6px; }
.file-name { color: #0073aa; font-weight: 600; font-size: 13px; word-break: break-all; }
.remove-file-btn { background: #dc3232; color: #fff; border: none; padding: 4px 10px; border-radius: 4px; cursor: pointer; font-size: 12px; flex-shrink: 0; margin-left: 10px; transition: background 0.2s; }
.remove-file-btn:hover { background: #b52020; }
.file-input-hidden { display: none; }

/* Info links */
.product-info-links { display: flex; flex-direction: column; gap: 8px; }
.info-link { display: inline-flex; align-items: center; gap: 8px; color: #0073aa; text-decoration: none; font-size: 14px; padding: 4px 0; }
.info-link:hover { color: #005580; text-decoration: underline; }

/* Add to cart */
.add-to-cart-section { margin-top: 10px; }
.add-to-cart-btn {
    width: 100%; padding: 17px 30px; background: #ff6600; color: #fff;
    border: none; border-radius: 8px; font-size: 17px; font-weight: 700;
    cursor: pointer; text-transform: uppercase; letter-spacing: 0.5px; transition: all 0.25s;
}
.add-to-cart-btn:hover { background: #e55a00; transform: translateY(-2px); box-shadow: 0 6px 18px rgba(255,102,0,0.3); }
.add-to-cart-btn:disabled { background: #ccc; cursor: not-allowed; transform: none; box-shadow: none; }
.error-message { display: none; margin-top: 14px; padding: 12px 16px; background: #fff0f0; border: 2px solid #dc3232; border-radius: 7px; color: #dc3232; font-size: 14px; }
.error-message.active { display: block; }
