/**
 * TKPP Product Fields v2.0 — Multi-type support
 */

/* ==================== Hide Quantity + Balance Buttons ==================== */
/* Force ẩn input số lượng */
.single-product .quantity,
.single-product div.quantity,
.product .quantity.buttons_added,
form.cart .quantity {
    display: none !important;
}

/* Cân nút Giỏ hàng & Mua ngay — đứng cạnh nhau cùng style */
.single-product form.cart {
    display: flex !important;
    flex-wrap: wrap;
    gap: 10px !important;
    align-items: stretch !important;
    margin-bottom: 20px !important;
}

/* Reset để override Flatsome styling */
.single-product form.cart > * {
    margin: 0 !important;
}

.single-product form.cart .single_add_to_cart_button,
.single-product form.cart .quick-buy-btn,
.single-product form.cart .buy-now-button,
.single-product form.cart .button-quick-buy,
.single-product form.cart button.button {
    flex: 1 1 0 !important;
    min-width: 140px !important;
    text-align: center !important;
    padding: 14px 24px !important;
    font-weight: 700 !important;
    font-size: 14px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    border-radius: 8px !important;
    border: none !important;
    height: auto !important;
    line-height: 1.4 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.25s ease;
}

.single-product form.cart .single_add_to_cart_button:hover,
.single-product form.cart .quick-buy-btn:hover,
.single-product form.cart .buy-now-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

@media (max-width: 480px) {
    .single-product form.cart {
        flex-direction: column;
    }
    .single-product form.cart .single_add_to_cart_button,
    .single-product form.cart .quick-buy-btn,
    .single-product form.cart .buy-now-button {
        width: 100% !important;
        flex: none !important;
    }
}

/* ==================== Miễn Phí Label & Free Download Button ==================== */
.tkpp-free-label {
    display: inline-block;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: #fff !important;
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.25);
}

.tkpp-free-download-section {
    margin: 16px 0 20px;
}

.tkpp-free-download-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    width: 100%;
    padding: 16px 28px !important;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 8px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.3);
}

.tkpp-free-download-btn:hover {
    background: linear-gradient(135deg, #218838 0%, #1aa179 100%) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(40, 167, 69, 0.4);
}

.tkpp-free-download-btn:active {
    transform: translateY(0);
}

.tkpp-free-download-btn svg {
    flex-shrink: 0;
}

.tkpp-free-download-note {
    text-align: center;
    margin: 10px 0 0 !important;
    font-size: 13px;
    color: #666;
    font-style: italic;
}

/* ==================== Demo Section ==================== */
.tkpp-demo-section { margin: 16px 0 20px; }

/* Copyright section — standalone block, đặt sau specs */
.tkpp-copyright-section {
    margin: 18px 0 20px;
    text-align: left;
}

.tkpp-copyright-tag {
    display: inline-flex; align-items: center; gap: 8px;
    background: #fff; border: 1.5px solid #2c2c2c;
    padding: 6px 14px 6px 8px; border-radius: 999px;
    font-size: 13px; color: #2c2c2c; font-weight: 600;
    margin-bottom: 14px;
}
.tkpp-copyright-tag .tkpp-tag-icon {
    background: #2c2c2c; color: #fff;
    width: 22px; height: 22px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.tkpp-copyright-tag .tkpp-tag-icon svg { width: 14px; height: 14px; }

.tkpp-demo-buttons { display: flex; flex-wrap: wrap; gap: 8px; }

.tkpp-demo-btn {
    display: inline-flex !important; align-items: center; gap: 8px;
    padding: 10px 18px !important; border-radius: 999px !important;
    color: #fff !important; font-size: 13px !important; font-weight: 600 !important;
    text-decoration: none !important; transition: all 0.25s ease;
    border: none !important; cursor: pointer; line-height: 1.4 !important;
}
.tkpp-demo-btn:hover {
    transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,0.18);
    color: #fff !important; opacity: 0.95;
}
.tkpp-demo-btn .tkpp-btn-icon { display: inline-flex; align-items: center; }
.tkpp-demo-btn svg { flex-shrink: 0; display: block; }

/* ==================== Specs Section ==================== */
.tkpp-specs-section {
    margin: 24px 0;
    background: linear-gradient(135deg, #fafafa 0%, #ffffff 100%);
    border: 1px solid #f0f0f0; border-radius: 12px;
    padding: 22px 24px;
}

.tkpp-specs-header {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    margin-bottom: 16px; padding-bottom: 14px;
    border-bottom: 1px dashed #e5e5e5;
}

.tkpp-type-badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 11px; border-radius: 6px;
    color: #fff; font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.5px;
    flex-shrink: 0; line-height: 1.4;
}
.tkpp-type-badge svg { width: 13px; height: 13px; }

.tkpp-specs-intro {
    font-size: 14px; color: #555;
    margin: 0 !important; line-height: 1.5;
    flex: 1; min-width: 200px;
    font-weight: 400;
}
.tkpp-specs-intro strong,
.tkpp-specs-intro b {
    font-weight: 400 !important;
}

/* Specs list - căn đều bằng grid 2 cột */
.tkpp-specs-list {
    list-style: none !important; padding: 0 !important; margin: 0 !important;
}
.tkpp-spec-item {
    display: grid !important;
    grid-template-columns: 36px minmax(140px, max-content) 1fr;
    align-items: center; gap: 12px;
    padding: 11px 0; border-bottom: 1px solid #f0f0f0;
    margin: 0 !important; list-style: none !important;
}
.tkpp-spec-item:last-child { border-bottom: none; }
.tkpp-spec-item:before { display: none !important; }

.tkpp-spec-icon {
    flex-shrink: 0; width: 36px; height: 36px;
    border-radius: 50%; display: inline-flex !important;
    align-items: center; justify-content: center;
    color: #fff; box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}
.tkpp-spec-icon svg { width: 18px; height: 18px; display: block; }

.tkpp-spec-label {
    color: #666; font-size: 14px; font-weight: 500;
    line-height: 1.4;
}
.tkpp-spec-value {
    color: #2c2c2c; font-weight: 600; font-size: 14px;
    text-align: right; line-height: 1.4;
    word-break: break-word;
}

.tkpp-value-link {
    color: #FF6B35 !important; text-decoration: none; font-weight: 600;
    display: inline-flex; align-items: center; gap: 4px;
}
.tkpp-value-link:hover { text-decoration: underline !important; }

/* ==================== Type-specific CTAs ==================== */

/* Canva CTA */
.tkpp-canva-cta {
    margin-top: 16px;
    background: linear-gradient(135deg, #00C4CC 0%, #7B61FF 100%);
    border-radius: 12px; padding: 18px 20px; color: #fff;
    box-shadow: 0 6px 20px rgba(0, 196, 204, 0.3);
}

/* CapCut CTA - dùng chung structure với Canva */
.tkpp-capcut-cta {
    margin-top: 16px;
    background: linear-gradient(135deg, #000000 0%, #2B2B2B 100%);
    border-radius: 12px; padding: 18px 20px; color: #fff;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}
.tkpp-capcut-cta .tkpp-canva-cta-btn {
    color: #2B2B2B !important;
}
.tkpp-capcut-cta .tkpp-canva-cta-btn:hover {
    color: #000 !important;
}
.tkpp-canva-cta-inner { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.tkpp-canva-cta-icon {
    width: 48px; height: 48px;
    background: rgba(255,255,255,0.2);
    border: 2px solid rgba(255,255,255,0.4);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: #fff; flex-shrink: 0;
}
.tkpp-canva-cta-icon svg { width: 24px; height: 24px; }
.tkpp-canva-cta-body { flex: 1; min-width: 200px; }
.tkpp-canva-cta-body h4 {
    color: #fff !important; font-size: 16px !important;
    font-weight: 700 !important; margin: 0 0 4px !important;
}
.tkpp-canva-cta-body p { color: rgba(255,255,255,0.95); font-size: 13px; margin: 0 !important; line-height: 1.5; }
.tkpp-canva-cta-btn {
    background: #fff !important; color: #00A6AC !important;
    padding: 10px 20px !important; border-radius: 999px !important;
    font-weight: 700 !important; font-size: 13px !important;
    text-decoration: none !important; flex-shrink: 0;
    transition: all 0.25s ease;
}
.tkpp-canva-cta-btn:hover {
    background: #f0fafa !important; color: #008B91 !important;
    transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.18);
}

/* Google Slides CTA */
.tkpp-gslides-cta {
    margin-top: 16px;
    background: linear-gradient(135deg, #F4B400 0%, #DB4437 100%);
    border-radius: 12px; padding: 18px 20px; color: #fff;
    box-shadow: 0 6px 20px rgba(244, 180, 0, 0.3);
}
.tkpp-gslides-cta-inner { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.tkpp-gslides-cta-icon {
    width: 48px; height: 48px;
    background: rgba(255,255,255,0.2);
    border: 2px solid rgba(255,255,255,0.4);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: #fff; flex-shrink: 0;
}
.tkpp-gslides-cta-icon svg { width: 24px; height: 24px; }
.tkpp-gslides-cta-body { flex: 1; min-width: 200px; }
.tkpp-gslides-cta-body h4 {
    color: #fff !important; font-size: 16px !important;
    font-weight: 700 !important; margin: 0 0 4px !important;
}
.tkpp-gslides-cta-body p { color: rgba(255,255,255,0.95); font-size: 13px; margin: 0 !important; line-height: 1.5; }
.tkpp-gslides-cta-btn {
    background: #fff !important; color: #DB4437 !important;
    padding: 10px 20px !important; border-radius: 999px !important;
    font-weight: 700 !important; font-size: 13px !important;
    text-decoration: none !important; flex-shrink: 0;
    transition: all 0.25s ease;
}
.tkpp-gslides-cta-btn:hover {
    background: #fff5f5 !important; color: #C53929 !important;
    transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.18);
}

/* ==================== Card Badge (trang shop) ==================== */
.tkpp-card-badge {
    position: absolute; top: 12px; left: 12px; z-index: 5;
    display: inline-flex; align-items: center; gap: 4px;
    padding: 4px 10px; border-radius: 4px;
    color: #fff; font-size: 10px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.5px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
.tkpp-card-badge svg { width: 11px; height: 11px; }

/* Variable product: multi-badges (icon only, không text) */
.tkpp-card-badges {
    position: absolute; top: 12px; left: 12px; z-index: 5;
    display: inline-flex; gap: 4px;
}
.tkpp-card-badges .tkpp-card-badge {
    position: static;
    padding: 5px;
    width: 22px; height: 22px;
    justify-content: center;
}
.tkpp-card-badges .tkpp-card-badge svg { width: 12px; height: 12px; }

/* ==================== Gift Box ==================== */
.tkpp-extra-section { margin: 32px 0 24px; }

.tkpp-gift-box {
    display: flex; align-items: flex-start; gap: 18px;
    background: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%);
    color: #fff; padding: 22px 24px; border-radius: 14px;
    margin-bottom: 16px;
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.25);
}
.tkpp-gift-icon {
    flex-shrink: 0; width: 56px; height: 56px;
    background: rgba(255,255,255,0.18);
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center; color: #fff;
}
.tkpp-gift-icon svg { width: 28px; height: 28px; }
.tkpp-gift-body { flex: 1; }
.tkpp-gift-title {
    color: #fff !important; font-size: 17px !important;
    font-weight: 700 !important; margin: 0 0 6px !important;
    text-transform: uppercase; letter-spacing: 0.5px;
}
.tkpp-gift-content { color: #fff; font-size: 14px; line-height: 1.6; }
.tkpp-gift-content p { margin: 0 0 8px !important; color: #fff !important; }
.tkpp-gift-content p:last-child { margin-bottom: 0 !important; }
.tkpp-gift-content strong { color: #fff; font-weight: 700; }
.tkpp-gift-btn {
    display: inline-flex !important; align-items: center; gap: 6px;
    background: #fff !important; color: #FF6B35 !important;
    padding: 10px 22px !important; border-radius: 999px !important;
    font-weight: 700 !important; font-size: 13px !important;
    text-decoration: none !important; margin-top: 14px !important;
    transition: all 0.25s ease; border: none !important;
}
.tkpp-gift-btn svg { width: 14px; height: 14px; }
.tkpp-gift-btn:hover {
    background: #fff8f3 !important; color: #E55A24 !important;
    transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.18);
}

/* ==================== Footer Note ==================== */
.tkpp-footer-note {
    display: flex; align-items: flex-start; gap: 10px;
    background: #fff5f5; border-left: 3px solid #dc3545;
    padding: 12px 16px; border-radius: 4px;
    color: #c82333; font-size: 13px; line-height: 1.6;
}
.tkpp-footer-note .tkpp-warning-icon {
    width: 18px; height: 18px; flex-shrink: 0;
    color: #dc3545; margin-top: 2px;
}
.tkpp-footer-note-text { flex: 1; }
.tkpp-footer-note-text p { margin: 0 !important; color: #c82333 !important; }
.tkpp-footer-note-text strong { color: #a01622; }

/* ==================== Video Modal ==================== */
.tkpp-video-modal {
    position: fixed; inset: 0; z-index: 999999;
    display: flex; align-items: center; justify-content: center; padding: 20px;
}
.tkpp-video-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.85); backdrop-filter: blur(4px); }
.tkpp-video-wrap {
    position: relative; width: 90%; max-width: 900px;
    background: #000; border-radius: 12px; overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.tkpp-video-close {
    position: absolute; top: -40px; right: 0;
    background: transparent; border: none; color: #fff;
    font-size: 32px; cursor: pointer; line-height: 1;
    padding: 4px 12px; transition: opacity 0.2s;
}
.tkpp-video-close:hover { opacity: 0.7; }
.tkpp-video-frame { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; }
.tkpp-video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ==================== Mobile ==================== */
@media (max-width: 768px) {
    .tkpp-demo-buttons { flex-direction: column; }
    .tkpp-demo-btn { width: 100%; justify-content: center; }
    .tkpp-specs-section { padding: 18px 16px; }
    .tkpp-specs-header { flex-direction: column; align-items: flex-start; gap: 8px; }
    .tkpp-spec-item {
        grid-template-columns: 32px 1fr;
        grid-template-areas: "icon label" "icon value";
        gap: 4px 10px;
        padding: 10px 0;
    }
    .tkpp-spec-item .tkpp-spec-icon { grid-area: icon; align-self: center; }
    .tkpp-spec-item .tkpp-spec-label { grid-area: label; font-size: 12px; }
    .tkpp-spec-item .tkpp-spec-value { grid-area: value; font-size: 14px; text-align: left; }
    .tkpp-spec-icon { width: 32px; height: 32px; }
    .tkpp-spec-icon svg { width: 16px; height: 16px; }

    .tkpp-canva-cta-inner,
    .tkpp-gslides-cta-inner { flex-direction: column; text-align: center; }
    .tkpp-canva-cta-btn,
    .tkpp-gslides-cta-btn { width: 100%; justify-content: center; }
    .tkpp-capcut-cta .tkpp-canva-cta-inner { flex-direction: column; text-align: center; }
    .tkpp-capcut-cta .tkpp-canva-cta-btn { width: 100%; justify-content: center; }

    .tkpp-gift-box { flex-direction: column; text-align: center; padding: 20px; }
    .tkpp-gift-icon { margin: 0 auto; }
    .tkpp-gift-body { text-align: center; }
}

/* Override Flatsome */
.product .tkpp-demo-btn,
.product .tkpp-gift-btn,
.product .tkpp-canva-cta-btn,
.product .tkpp-gslides-cta-btn { text-shadow: none !important; }

.tkpp-specs-list,
.tkpp-specs-list li { background: transparent !important; }
