.codlp {
    --codlp-primary: #ff6b35;
    --codlp-red: #ff4757;
    --codlp-soft: #fff5f0;
    --codlp-text: #1a1a1a;
    --codlp-muted: #777;
    --codlp-border: #e8e8e8;
    color: var(--codlp-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang TC", "Microsoft JhengHei", Arial, sans-serif;
}

.codlp *,
.codlp *::before,
.codlp *::after {
    box-sizing: border-box;
}

.codlp button,
.codlp input,
.codlp select,
.codlp textarea {
    font: inherit;
}

.codlp-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.codlp-product-wrapper {
    display: flex;
    gap: 25px;
    align-items: flex-start;
}

.codlp-product-images {
    position: sticky;
    top: 0;
    flex: 0 0 45%;
    max-width: 500px;
    min-width: 300px;
    padding: 15px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.codlp-main-image {
    width: 100%;
    overflow: hidden;
    border-radius: 8px;
    background: #fafafa;
}

.codlp-product-image,
.codlp-main-image img {
    display: block;
    width: 100%;
    height: auto;
}

.codlp-image-placeholder {
    display: flex;
    min-height: 360px;
    align-items: center;
    justify-content: center;
    color: var(--codlp-muted);
    background: #f7f7f7;
}

.codlp-product-info-wrap {
    flex: 1;
    min-width: 280px;
    max-width: 600px;
}

.codlp-product-info {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.codlp-product-title {
    margin: 0 0 15px;
    color: var(--codlp-text);
    font-size: 24px;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: 0;
}

.codlp-product-price {
    margin-bottom: 20px;
}

.codlp-current-price {
    color: var(--codlp-primary);
    font-size: 32px;
    font-weight: 800;
    line-height: 1;
}

.codlp-service-info {
    display: flex;
    gap: 30px;
    margin-bottom: 20px;
    padding: 15px;
    border-radius: 8px;
    background: #f9f9f9;
}

.codlp-service-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
    font-size: 14px;
    white-space: nowrap;
}

.codlp-service-icon {
    display: inline-flex;
    width: 20px;
    height: 20px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--codlp-primary);
    color: #fff;
    font-size: 12px;
}

.codlp-spec-section {
    margin-bottom: 20px;
}

.codlp-spec-title {
    position: relative;
    margin-bottom: 12px;
    padding-left: 8px;
    color: #333;
    font-size: 14px;
    font-weight: 700;
}

.codlp-spec-title::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    width: 3px;
    height: 14px;
    border-radius: 2px;
    transform: translateY(-50%);
    background: linear-gradient(180deg, var(--codlp-primary), #ff8c5a);
}

.codlp-package-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.codlp-package-card {
    position: relative;
    display: flex;
    min-height: 126px;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 15px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid #eee;
    border-radius: 10px;
    background: #fff;
    text-align: left;
    transition: border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.codlp-package-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    opacity: 0;
    background: linear-gradient(180deg, var(--codlp-primary), #ff8c5a);
    transition: opacity 0.25s ease;
}

.codlp-package-card:hover,
.codlp-package-card.is-active {
    border-color: var(--codlp-primary);
    background: var(--codlp-soft);
}

.codlp-package-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.14);
}

.codlp-package-card:hover::before,
.codlp-package-card.is-active::before {
    opacity: 1;
}

.codlp-package-info,
.codlp-package-footer {
    position: relative;
    z-index: 1;
    width: 100%;
}

.codlp-package-name {
    display: block;
    margin-bottom: 4px;
    color: #333;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
}

.codlp-package-desc {
    color: #999;
    font-size: 12px;
}

.codlp-package-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
}

.codlp-package-price {
    color: var(--codlp-primary);
    font-size: 18px;
    font-weight: 800;
}

.codlp-package-check {
    display: inline-flex;
    width: 0;
    height: 0;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    opacity: 0;
    background: var(--codlp-primary);
    color: #fff;
    font-size: 0;
    transition: all 0.25s ease;
}

.codlp-package-card.is-active .codlp-package-check {
    width: 20px;
    height: 20px;
    opacity: 1;
    font-size: 14px;
}

.codlp-mini-card {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 25px;
    padding: 15px;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.codlp-mini-image {
    width: 100px;
    height: 100px;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 8px;
    background: #f7f7f7;
}

.codlp-mini-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.codlp-mini-info {
    min-width: 0;
    flex: 1;
}

.codlp-mini-info h3 {
    display: -webkit-box;
    margin: 0 0 18px;
    overflow: hidden;
    color: #333;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.codlp-mini-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.codlp-mini-bottom span {
    padding: 4px 10px;
    border-radius: 4px;
    background: #f5f5f5;
    color: #999;
    font-size: 12px;
}

.codlp-mini-bottom strong {
    color: var(--codlp-primary);
    font-size: 18px;
}

.codlp-form {
    margin-bottom: 25px;
    padding: 20px;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.codlp-form-title {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
    color: var(--codlp-text);
    font-size: 16px;
    font-weight: 700;
}

.codlp-form-section,
.codlp-form-group {
    margin-bottom: 15px;
}

.codlp-form-label {
    display: block;
    margin-bottom: 10px;
    color: #333;
    font-size: 14px;
    font-weight: 600;
}

.codlp-required {
    color: var(--codlp-primary);
}

.codlp-form-row {
    display: flex;
    gap: 15px;
}

.codlp-form-row .codlp-form-group {
    flex: 1;
}

.codlp-input,
.codlp-select,
.codlp-textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    color: #333;
    font-size: 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.codlp-input:focus,
.codlp-select:focus,
.codlp-textarea:focus {
    outline: 0;
    border-color: var(--codlp-primary);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.12);
}

.codlp-textarea {
    min-height: 80px;
    resize: vertical;
}

.codlp-delivery-options {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 2px solid #ddd;
    border-radius: 12px;
}

.codlp-delivery-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    background: #fff;
    transition: background 0.2s ease;
}

.codlp-delivery-option:last-child {
    border-bottom: 0;
}

.codlp-delivery-option:hover,
.codlp-delivery-option.is-active {
    background: #fff9f7;
}

.codlp-delivery-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.codlp-radio {
    display: inline-flex;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    border: 2px solid #ddd;
    border-radius: 50%;
}

.codlp-radio span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: transparent;
    transform: scale(0);
    transition: transform 0.2s ease, background 0.2s ease;
}

.codlp-delivery-option.is-active .codlp-radio {
    border-color: var(--codlp-primary);
}

.codlp-delivery-option.is-active .codlp-radio span {
    background: var(--codlp-primary);
    transform: scale(1);
}

.codlp-delivery-icon {
    display: inline-flex;
    width: 26px;
    height: 26px;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    background: var(--codlp-soft);
    color: var(--codlp-primary);
    font-weight: 800;
}

.codlp-delivery-text {
    flex: 1;
    color: #333;
    font-size: 15px;
    font-weight: 600;
}

.codlp-delivery-tag {
    padding: 4px 12px;
    border-radius: 20px;
    background: #e8f5e9;
    color: #2e7d32;
    font-size: 12px;
    font-weight: 700;
}

.codlp-price-hint {
    margin: 4px 0 10px;
    color: #999;
    font-size: 12px;
    line-height: 1.4;
    text-align: center;
}

.codlp-buy-button,
.codlp-go-order {
    display: flex;
    width: 100%;
    min-height: 56px;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 0 25px;
    overflow: hidden;
    cursor: pointer;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--codlp-primary) 0%, var(--codlp-red) 50%, var(--codlp-primary) 100%);
    background-size: 200% 200%;
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.4), 0 4px 10px rgba(255, 71, 87, 0.3);
    color: #fff;
    font-size: 17px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
    animation: codlpGradient 3s ease infinite, codlpPulse 2s ease-in-out infinite;
}

.codlp-buy-button:hover,
.codlp-go-order:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(255, 107, 53, 0.48), 0 6px 16px rgba(255, 71, 87, 0.36);
}

.codlp-buy-button[disabled] {
    cursor: wait;
    opacity: 0.65;
}

.codlp-buy-button strong {
    font-size: 20px;
}

.codlp-message {
    display: none;
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
}

.codlp-message.is-visible {
    display: block;
}

.codlp-message.is-error {
    background: #fff0f0;
    color: #c62828;
}

.codlp-message.is-success {
    background: #edf8ef;
    color: #226b31;
}

.codlp-honeypot {
    position: absolute !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

.codlp-details {
    margin-top: 20px;
    padding: 25px;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.codlp-details h2 {
    margin: 0 0 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
    color: var(--codlp-text);
    font-size: 18px;
    font-weight: 700;
}

.codlp-details-content {
    color: #666;
    font-size: 14px;
    line-height: 2;
}

.codlp-details-content img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
}

.codlp-go-order {
    position: sticky;
    bottom: 0;
    z-index: 90;
    display: none;
    justify-content: center;
    margin-top: 20px;
}

.codlp-go-order.is-visible {
    display: flex;
}

.codlp-back-top {
    position: fixed;
    right: 25px;
    bottom: 150px;
    z-index: 998;
    display: flex;
    width: 50px;
    height: 50px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 0;
    border-radius: 50%;
    opacity: 0;
    visibility: hidden;
    background: linear-gradient(135deg, var(--codlp-red), var(--codlp-primary));
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4);
    color: #fff;
    font-size: 24px;
    line-height: 1;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.codlp-back-top.is-visible {
    opacity: 1;
    visibility: visible;
}

.codlp-notice {
    max-width: 760px;
    margin: 24px auto;
    padding: 14px 16px;
    border-left: 4px solid #ff6b35;
    background: #fff8f5;
    color: #333;
}

@keyframes codlpGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes codlpPulse {
    0%, 100% { box-shadow: 0 8px 25px rgba(255, 107, 53, 0.4), 0 4px 10px rgba(255, 71, 87, 0.3); }
    50% { box-shadow: 0 12px 35px rgba(255, 107, 53, 0.58), 0 6px 15px rgba(255, 71, 87, 0.45); }
}

@media (max-width: 768px) {
    .codlp-container {
        padding: 0;
    }

    .codlp-product-wrapper {
        flex-direction: column;
        gap: 15px;
    }

    .codlp-product-images,
    .codlp-product-info-wrap,
    .codlp-product-info {
        width: 100%;
        max-width: none;
        min-width: 0;
    }

    .codlp-product-images {
        position: static;
        border-radius: 0;
    }

    .codlp-product-info {
        padding: 16px;
        border-radius: 0;
    }

    .codlp-product-title {
        font-size: 20px;
    }

    .codlp-current-price {
        font-size: 28px;
    }

    .codlp-service-info {
        flex-direction: column;
        gap: 10px;
    }

    .codlp-package-options {
        grid-template-columns: 1fr;
    }

    .codlp-form-row {
        flex-direction: column;
        gap: 0;
    }

    .codlp-form {
        padding: 15px;
    }

    .codlp-mini-card {
        padding: 12px;
    }

    .codlp-mini-image {
        width: 80px;
        height: 80px;
    }

    .codlp-go-order.is-visible {
        position: fixed;
        right: 20px;
        bottom: 86px;
        left: 20px;
        width: auto;
    }
}

@media (max-width: 580px) {
    .codlp-product-title {
        font-size: 18px;
    }

    .codlp-current-price {
        font-size: 24px;
    }

    .codlp-delivery-option {
        padding: 14px 12px;
        gap: 10px;
    }

    .codlp-delivery-text {
        font-size: 14px;
    }

    .codlp-delivery-tag {
        padding: 3px 8px;
        font-size: 11px;
    }
}
