/* Print Film Product Detail Page Styles */
.wcpf-product-detail {
    width: 80%;
    max-width: none;
    margin: 0 auto;
    padding: 20px;
}

.wcpf-detail-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

/* 左侧图片区域 */
.wcpf-image-area {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.wcpf-main-image {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    background: #f9f9f9;
}

.wcpf-main-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.wcpf-carousel-prev,
.wcpf-carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #ddd;
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 10;
}

.wcpf-carousel-prev:hover,
.wcpf-carousel-next:hover {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.wcpf-carousel-prev {
    left: 12px;
}

.wcpf-carousel-next {
    right: 12px;
}

.wcpf-thumbnail-carousel {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 4px 0;
}

.wcpf-thumb-item {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border: 2px solid transparent;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.2s;
}

.wcpf-thumb-item:hover {
    border-color: #1677ff;
}

.wcpf-thumb-item.active {
    border-color: #1677ff;
}

.wcpf-thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 右侧内容区域 */
.wcpf-content-area {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* 标题区域 */
.wcpf-title-section {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.wcpf-product-title {
    font-size: 28px;
    font-weight: 600;
    margin: 0;
    color: #111;
}

.wcpf-badge {
    display: inline-block;
    padding: 4px 12px;
    background: #52c41a;
    color: #fff;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

/* 描述区域 */
.wcpf-description-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.wcpf-price-hint {
    font-size: 16px;
    margin: 0;
    color: #111;
}

.wcpf-description {
    font-size: 14px;
    line-height: 1.6;
    color: #666;
}

/* 标签内容区域 */
.wcpf-tags-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.wcpf-tag-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #333;
}

.wcpf-tag-icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.wcpf-info-icon {
    margin-left: auto;
    width: 16px;
    height: 16px;
    border: 1px solid #999;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: #999;
    cursor: help;
}

/* 营销提示区域 */
.wcpf-marketing-section {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.wcpf-marketing-section .wcpf-marketing-text {
    margin: 0;
    font-size: 14px;
    color: #333;
    position: relative;
    padding-right: 16px;
}

.wcpf-marketing-section .wcpf-marketing-text:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 16px;
    background: #e0e0e0;
}

/* 上传区域 */
.wcpf-upload-section {
    border: 2px dashed #91d5ff;
    border-radius: 8px;
    padding: 24px;
    background: #f0f9ff;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

.wcpf-upload-title {
    margin: 0;
    font-size: 14px;
    color: #52c41a;
    font-weight: 500;
}

.wcpf-new-badge {
    display: inline-block;
    padding: 2px 6px;
    background: #52c41a;
    color: #fff;
    border-radius: 2px;
    font-size: 10px;
    margin-right: 6px;
}

.wcpf-upload-desc {
    margin: 0;
    font-size: 13px;
    color: #666;
    text-align: center;
}

.wcpf-upload-zone {
    width: 100%;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.wcpf-upload-zone.dragover {
    background: #e6f7ff;
    border: 2px dashed #1677ff;
}

.wcpf-upload-hint {
    margin: 0;
    font-size: 14px;
    color: #333;
}

.wcpf-upload-or {
    margin: 0;
    font-size: 13px;
    color: #999;
}

.wcpf-upload-btn {
    padding: 10px 24px;
    background: #1677ff;
    color: #fff;
    border: 0;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.wcpf-upload-btn:hover {
    background: #1468e6;
}

.wcpf-previous-design {
    color: #1677ff;
    text-decoration: none;
    font-size: 13px;
}

.wcpf-previous-design:hover {
    text-decoration: underline;
}

/* 上传后的内容区域 */
.wcpf-uploaded-content {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* 图片信息区域 */
.wcpf-image-info-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: stretch;
}

.wcpf-image-preview-area {
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: 100%;
}

.wcpf-zoom-hint {
    margin: 0;
    font-size: 13px;
    color: #666;
}

.wcpf-enlarge-link {
    color: #1677ff;
    text-decoration: none;
}

.wcpf-enlarge-link:hover {
    text-decoration: underline;
}

/* Preview carousel container */
.wcpf-preview-carousel {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
}

.wcpf-preview-box-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.wcpf-preview-box {
    position: relative;
    width: 100%;
    height: 100%;
    aspect-ratio: 1;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background: #f5f5f5;
    background-image: 
        linear-gradient(45deg, #ddd 25%, transparent 25%),
        linear-gradient(-45deg, #ddd 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #ddd 75%),
        linear-gradient(-45deg, transparent 75%, #ddd 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    overflow: hidden;
}

.wcpf-preview-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.wcpf-delete-img {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    background: rgba(0, 0, 0, 0.6);
    border: 0;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.wcpf-delete-img:hover {
    background: rgba(0, 0, 0, 0.8);
}

/* Preview carousel navigation buttons */
.wcpf-preview-prev,
.wcpf-preview-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.6);
    border: 0;
    border-radius: 50%;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: background 0.2s;
}

.wcpf-preview-prev {
    left: 10px;
}

.wcpf-preview-next {
    right: 10px;
}

.wcpf-preview-prev:hover,
.wcpf-preview-next:hover {
    background: rgba(0, 0, 0, 0.8);
}

/* Image thumbnail in size table */
.wcpf-size-image-cell {
    padding: 8px !important;
    width: 80px;
}

.wcpf-size-image-thumb {
    position: relative;
    width: 60px;
    height: 60px;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.2s;
}

.wcpf-size-image-thumb:hover {
    border-color: #1677ff;
}

.wcpf-size-image-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.wcpf-image-number {
    position: absolute;
    top: 2px;
    right: 2px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 2px;
    line-height: 1;
}

/* Active row highlighting */
.wcpf-size-row.active .wcpf-size-image-thumb {
    border-color: #1677ff;
    border-width: 3px;
}

.wcpf-size-row {
    cursor: pointer;
    transition: background-color 0.2s;
}

.wcpf-size-row:hover {
    background-color: #f5f5f5;
}

.wcpf-size-row.active {
    background-color: #e6f7ff;
}

.wcpf-preview-note {
    margin: 0;
    font-size: 13px;
    color: #666;
}

/* 价格阶梯区域 */
.wcpf-pricing-tiers-area {
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: 100%;
}

.wcpf-pricing-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #111;
    display: flex;
    align-items: center;
    gap: 6px;
}

.wcpf-info-icon-small {
    width: 16px;
    height: 16px;
    border: 1px solid #999;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: #999;
    cursor: help;
}

.wcpf-pricing-note {
    margin: 0;
    font-size: 13px;
    color: #666;
    line-height: 1.5;
}

.wcpf-pricing-table {
    overflow: hidden;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    position: relative;
}

.wcpf-pricing-table table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    display: block;
    height: 100%;
    border: none;
}

.wcpf-pricing-table thead {
    display: table;
    width: 100%;
    table-layout: fixed;
    border: none;
}

.wcpf-pricing-table thead th {
    width: 50%;
    border: none;
}

.wcpf-pricing-table tbody {
    display: block;
    max-height: 120px;
    overflow-y: auto;
    overflow-x: hidden;
    width: 100%;
    border: none;
}

/* 当内容超出时显示滚动条 */
.wcpf-pricing-table tbody::-webkit-scrollbar {
    width: 6px;
}

.wcpf-pricing-table tbody::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.wcpf-pricing-table tbody::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.wcpf-pricing-table tbody::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.wcpf-pricing-table tbody tr {
    display: table;
    width: 100%;
    table-layout: fixed;
    border: none;
}

.wcpf-pricing-table tbody td {
    width: 50%;
}

.wcpf-pricing-table th,
.wcpf-pricing-table td {
    padding: 10px 12px;
    text-align: left;
    font-size: 13px;
    border: none;
    border-left: none;
    border-right: none;
    border-top: none;
}

.wcpf-pricing-table th {
    font-weight: 600;
    color: #333;
    border-bottom: none;
}

.wcpf-pricing-table td {
    border-bottom: 1px solid #e0e0e0;
    color: #666;
}

.wcpf-view-all {
    display: block;
    padding: 8px 12px;
    color: #1677ff;
    text-decoration: none;
    font-size: 12px;
    text-align: right;
}

.wcpf-view-all:hover {
    text-decoration: underline;
}

.wcpf-guarantee-banner {
    padding: 12px;
    background: #52c41a;
    color: #fff;
    border-radius: 4px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.wcpf-hand-icon {
    font-size: 18px;
}

/* Custom Size区域 */
.wcpf-custom-size-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.wcpf-custom-size-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #111;
    display: flex;
    align-items: center;
    gap: 8px;
}

.wcpf-size-icon {
    font-size: 18px;
}

.wcpf-size-guide-hint {
    margin: 0;
    font-size: 13px;
    color: #666;
}

.wcpf-size-guide-link {
    color: #1677ff;
    text-decoration: none;
}

.wcpf-size-guide-link:hover {
    text-decoration: underline;
}

.wcpf-size-table {
    overflow: hidden;
}

.wcpf-size-table table {
    width: 100%;
    border-collapse: collapse;
    border: none;
}

.wcpf-size-table thead {
    border: none;
}

.wcpf-size-table thead th {
    border: none;
}

.wcpf-size-table tbody {
    border: none;
}

.wcpf-size-table tbody tr {
    border: none;
}

.wcpf-size-table th,
.wcpf-size-table td {
    padding: 10px 12px;
    text-align: left;
    font-size: 13px;
    border: none;
    border-left: none;
    border-right: none;
    border-top: none;
}

.wcpf-size-table th {
    font-weight: 600;
    color: #333;
    border-bottom: none;
}

.wcpf-size-table td {
    border-bottom: 1px solid #e0e0e0;
}

.wcpf-size-table input {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 13px;
}

/* Ensure readonly inputs can still trigger events */
.wcpf-size-table input[readonly] {
    pointer-events: auto !important;
    cursor: default;
    background-color: #f5f5f5;
}

/* Ensure width and height inputs are accessible */
.wcpf-size-width,
.wcpf-size-height {
    pointer-events: auto !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    user-select: none !important;
}

/* Ensure number input spinners are visible (high priority) */
.wcpf-size-table input[type="number"] {
    -webkit-appearance: textfield !important;
    -moz-appearance: textfield !important;
    appearance: textfield !important;
}

/* Show spinner buttons for number inputs */
.wcpf-size-table input[type="number"]::-webkit-inner-spin-button,
.wcpf-size-table input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: inner-spin-button !important;
    opacity: 1 !important;
    height: 20px !important;
    width: 20px !important;
    cursor: pointer !important;
    display: block !important;
    margin: 0 !important;
    position: relative !important;
}

/* Price display wrapper */
.wcpf-price-wrapper {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* Original price (with strikethrough and light color) */
.wcpf-original-price {
    text-decoration: line-through;
    color: #999;
    font-size: 13px;
    line-height: 1.2;
    white-space: nowrap;
}

/* Discounted price (bold, below original price) */
.wcpf-discounted-price {
    font-weight: 600;
    color: #111;
    font-size: 13px;
    line-height: 1.2;
    white-space: nowrap;
}

/* Original total (with strikethrough and light color) */
.wcpf-original-total {
    text-decoration: line-through;
    color: #999;
    font-size: 13px;
    line-height: 1.2;
    white-space: nowrap;
}

/* Discounted total (bold, below original total) */
.wcpf-discounted-total {
    font-weight: 600;
    color: #111;
    font-size: 13px;
    line-height: 1.2;
    white-space: nowrap;
}

.wcpf-size-discount {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: flex-end;
}

.wcpf-discount-text {
    color: #52c41a;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
}

.wcpf-delete-size-row {
    width: 24px;
    height: 24px;
    padding: 0;
    border: 0;
    background: #f5f5f5;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    color: #666;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.wcpf-delete-size-row:hover {
    background: #ff4d4f;
    color: #fff;
}

.wcpf-add-size-link {
    display: block;
    padding: 12px;
    color: #1677ff;
    text-decoration: none;
    font-size: 13px;
    text-align: center;
    border: none;
}

.wcpf-add-size-link:hover {
    background: #f5f5f5;
}

/* 备注区域 */
.wcpf-notes-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.wcpf-notes-row {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.wcpf-notes-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
}

.wcpf-pre-cut-area {
    display: flex;
    align-items: center;
    gap: 8px;
}

.wcpf-pre-cut-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #333;
    margin-right: 8px;
}

.wcpf-pre-cut-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
}

.wcpf-notes-textarea-area {
    margin-top: 8px;
}

.wcpf-notes-textarea-area textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 13px;
    font-family: inherit;
    resize: vertical;
}

/* 第四个区域：上传图片区域 */
.wcpf-upload-image-section {
    margin-top: 24px;
}

.wcpf-upload-image-zone {
    width: 100%;
    min-height: 200px;
    border: 2px dashed #91d5ff;
    border-radius: 8px;
    background: #f0f9ff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 40px 20px;
    cursor: pointer;
    transition: all 0.2s;
}

.wcpf-upload-image-zone:hover {
    border-color: #1677ff;
    background: #e6f7ff;
}

.wcpf-upload-image-zone.dragover {
    border-color: #1677ff;
    background: #e6f7ff;
}

.wcpf-choose-image-btn {
    padding: 12px 24px;
    background: #1677ff;
    color: #fff;
    border: 0;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s;
}

.wcpf-choose-image-btn:hover {
    background: #1468e6;
}

.wcpf-upload-arrow {
    font-size: 16px;
    line-height: 1;
}

.wcpf-drag-drop-text {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

/* 第五个区域：结算按钮区域 */
.wcpf-checkout-section {
    margin-top: 24px;
}

.wcpf-checkout-btn {
    width: 100%;
    padding: 14px 24px;
    background: #1677ff;
    color: #fff;
    border: 0;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: background 0.2s;
}

.wcpf-checkout-btn:hover {
    background: #1468e6;
}

.wcpf-checkout-btn:active {
    background: #0958d9;
}

/* 响应式 */
@media (max-width: 768px) {
    .wcpf-detail-container {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .wcpf-tags-section {
        grid-template-columns: 1fr;
    }

    .wcpf-image-info-section {
        grid-template-columns: 1fr;
    }
}

