/* Product Carousel Flash Style - แบบ JD Central */

/* Section Container - พื้นหลังขาว */
.product-carousel-flash-style {
    margin: 1.5rem 5%;
    padding: 1rem 0;
    background: transparent;
    border-radius: 0;
    color: #1e3a5f;
    overflow: hidden;
    position: relative;
    font-family: 'Prompt', 'Prompt Local', sans-serif;
}

/* Grid Mode - แสดงสินค้าทั้งหมดเป็น Grid 2 แถว */
.product-carousel-flash-style.product-grid-mode .pcf-products-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
    padding: 0.5rem;
}

/* Responsive Grid */
@media (max-width: 1400px) {
    .product-carousel-flash-style.product-grid-mode .pcf-products-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 992px) {
    .product-carousel-flash-style.product-grid-mode .pcf-products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .product-carousel-flash-style.product-grid-mode .pcf-products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .product-carousel-flash-style.product-grid-mode .pcf-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
}

/* Header */
.pcf-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0 0.5rem;
}

.pcf-header-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pcf-badge-preview {
    display: none;
}

.pcf-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e3a5f;
    margin: 0;
    font-family: 'Prompt', 'Prompt Local', sans-serif;
}

.pcf-view-all {
    color: #0891b2;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.pcf-view-all:hover {
    color: #0e7490;
}

/* Products Container - 5 การ์ดพอดี */
.pcf-products-wrapper {
    position: relative;
    padding: 0; /* ไม่ต้องมี padding เพราะซ่อนปุ่ม nav */
}

.pcf-products {
    display: flex;
    flex-wrap: nowrap;
    gap: 1rem;
    overflow-x: hidden;
    scroll-behavior: smooth;
    padding: 0.5rem 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
    user-select: none;
    justify-content: center;
}

.pcf-products::-webkit-scrollbar {
    display: none;
}

/* Navigation Buttons - ซ่อนเมื่อแสดง 5 การ์ดพอดี */
.pcf-nav-btn {
    display: none !important; /* ซ่อนปุ่ม nav เพราะแสดงแค่ 5 การ์ดพอดี */
}

/* Product Card - แบบ Advice 5 การ์ดพอดี */
.pcf-card {
    flex: 0 0 calc((100% - 4rem) / 5);
    width: calc((100% - 4rem) / 5);
    min-width: 220px;
    background: #fff;
    border-radius: 1.25rem;
    border: 1px solid #e2e8f0;
    padding: 1.25rem 1.25rem 1rem;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    box-shadow: 0 18px 32px rgba(15,23,42,0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    overflow: visible;
}

.pcf-card.flash-sale-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 26px 40px rgba(15,23,42,0.12);
}

.pcf-category-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: linear-gradient(135deg, #f97316, #fb923c);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.2rem 0.7rem;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    z-index: 9;
    box-shadow: 0 10px 20px rgba(249, 115, 22, 0.32);
}

.pcf-category-badge::before {
    content: "⚡";
    font-size: 0.8rem;
}

/* Badges Container */
.pcf-badges {
    position: absolute;
    top: 2.7rem;
    left: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    z-index: 6;
    max-width: 75%;
}

.pcf-ict-badge,
.pcf-hot-badge,
.pcf-new-badge,
.pcf-bestseller-badge {
    font-size: 0.6rem;
    font-weight: 700;
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    text-transform: uppercase;
}

.pcf-ict-badge { background: #8b5cf6; color: #fff; }
.pcf-hot-badge { background: #ef4444; color: #fff; }
.pcf-new-badge { background: #22c55e; color: #fff; }
.pcf-bestseller-badge { background: #f59e0b; color: #fff; }

/* AI Badge */
.pcf-ai-badge {
    position: absolute;
    top: 2.7rem;
    left: auto;
    right: 1rem;
    background: linear-gradient(135deg, #06b6d4, #0ea5e9);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 0.3rem 0.6rem;
    border-radius: 0.375rem;
    z-index: 5;
}

/* Copilot+PC Badge (มุมซ้ายบน เล็กๆ เหมือน Advice) */
.pcf-copilot-badge {
    position: absolute;
    top: 2.7rem;
    left: 1rem;
    z-index: 7;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, #0078D4 0%, #00BCF2 100%);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 700;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
    white-space: nowrap;
}

.pcf-copilot-badge::before {
    content: "✦";
    font-size: 0.55rem;
    color: #ffd700;
}

.pcf-copilot-badge img {
    display: none; /* ซ่อน img ใช้ text แทน */
}

.pcf-copilot-text {
    background: transparent;
    color: white;
    padding: 0;
    border-radius: 0;
    font-size: inherit;
    font-weight: inherit;
    display: inline;
    box-shadow: none;
}

.pcf-copilot-text::before {
    display: none;
}

/* Brand Corner */
.pcf-brand-corner {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    padding: 0 0.55rem;
    border-radius: 999px;
    background: rgba(255,255,255,0.95);
    border: 1px solid rgba(148, 163, 184, 0.35);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.18);
    min-width: 60px;
    min-height: 28px;
}

.pcf-brand-corner img {
    height: 16px;
    width: auto;
    display: block;
}

.pcf-brand-corner span {
    font-size: 0.62rem;
    font-weight: 700;
    color: #2563eb;
    text-transform: uppercase;
    letter-spacing: 0.45px;
    white-space: nowrap;
}

/* Image Link */
.pcf-img-link {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.35rem;
    min-height: 190px;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 65%);
    border-radius: 1rem;
    position: relative;
}

.pcf-product-img {
    width: 100%;
    height: 160px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.pcf-card:hover .pcf-product-img {
    transform: scale(1.04);
}

/* Body Content */
.pcf-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 0;
    gap: 0.5rem;
}

.pcf-brand-small {
    display: inline-block;
    font-size: 0.62rem;
    font-weight: 700;
    color: #2563eb;
    text-transform: uppercase;
    letter-spacing: 0.45px;
}

.pcf-product-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.35;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-family: 'Prompt', 'Prompt Local', sans-serif;
}

.pcf-description {
    font-size: 0.72rem;
    color: #64748b;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
}

/* Meta Row - ประกัน, จัดส่ง (Advice Style) */
.pcf-meta-row {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.65rem;
    color: #475569;
    flex-wrap: wrap;
    margin-top: 0.25rem;
    position: absolute;
    top: 3.2rem;
    right: 1.1rem;
    z-index: 5;
}

/* Warranty Badge - Advice Blue Style */
.pcf-warranty-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #f1f5f9;
    color: #0f172a;
    font-size: 0.62rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 999px;
    border: 1px solid #e2e8f0;
    white-space: nowrap;
}

.pcf-warranty-badge svg {
    color: #0891b2;
    flex-shrink: 0;
}

/* Shipping Badge */
.pcf-shipping-badge {
    color: #0f172a;
    font-size: 0.62rem;
    font-weight: 700;
    background: #e0f2fe;
    border-radius: 999px;
    padding: 3px 10px;
    border: 1px solid #bae6fd;
    white-space: nowrap;
}

.pcf-warranty {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
}

/* Price Panel */
.pcf-price-panel {
    background: transparent;
    padding: 0;
    margin-top: 0.25rem;
}

.pcf-price-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    align-items: baseline;
}

.pcf-main-price {
    font-size: 1.45rem;
    font-weight: 800;
    color: #0f172a;
    font-family: 'Prompt', 'Prompt Local', sans-serif;
}

.pcf-original-price {
    font-size: 0.8rem;
    color: #94a3b8;
    text-decoration: line-through;
}

/* Discount Pills */
.pcf-discount-row {
    display: inline-flex;
    gap: 0.35rem;
    margin-top: 0.3rem;
}

.pcf-discount-pill {
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.3px;
    box-shadow: 0 8px 20px rgba(239,68,68,0.25);
}

.pcf-percent-pill { background: linear-gradient(135deg, #22c55e, #16a34a); }
.pcf-amount-pill { background: linear-gradient(135deg, #ef4444, #f97316); }

/* Installment Badge */
.pcf-installment-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fef9c3;
    color: #b45309;
    font-size: 0.62rem;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    margin-left: auto;
    border: 1px solid #fde68a;
}

/* Online Price Note */
.pcf-online-note {
    font-size: 0.6rem;
    color: #f97316;
    font-weight: 500;
    margin-top: 0.25rem;
}

/* Action Button - สีฟ้าเหมือน Advice */
.pcf-action {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0;
    background: linear-gradient(135deg, #38bdf8, #0ea5e9) !important;
    color: #fff;
    border: none;
    border-radius: 999px;
    font-family: 'Prompt', 'Prompt Local', sans-serif;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-top: 0.5rem;
    overflow: hidden;
    min-height: 44px;
    box-shadow: 0 12px 24px rgba(14, 165, 233, 0.35) !important;
}

.pcf-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 28px rgba(14, 165, 233, 0.4) !important;
    background: linear-gradient(135deg, #0ea5e9, #0284c7) !important;
}

.pcf-action-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.15);
    padding: 0 0.9rem;
}

.pcf-action-icon {
    width: 1.1rem;
    height: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pcf-action-icon svg {
    width: 1rem;
    height: 1rem;
    fill: currentColor;
    stroke: none;
}

.pcf-action-text-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.3rem 1rem;
}

.pcf-action-text {
    font-size: 0.85rem;
    font-weight: 800;
    text-transform: uppercase;
}

.pcf-action-subtext {
    font-size: 0.65rem;
    font-weight: 600;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.35px;
}

/* Stat Footer - Views */
.pcf-footnote {
    font-size: 0.6rem;
    color: #94a3b8;
    margin-top: 0.35rem;
}

.pcf-stat-footer {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.35rem;
    font-size: 0.68rem;
    color: #94a3b8;
    margin-top: 0.75rem;
    padding-top: 0.5rem;
    border-top: 1px solid #f1f5f9;
    font-weight: 600;
}

.pcf-stat-footer svg {
    width: 13px;
    height: 13px;
    opacity: 0.65;
}

/* Responsive */
@media (max-width: 62em) {
    .product-carousel-flash-style {
        margin: 1rem 3%;
    }
    
    .pcf-card {
        flex: 0 0 220px;
        width: 220px;
    }
    
    .pcf-title {
        font-size: 1.25rem;
    }
}

@media (max-width: 48em) {
    .product-carousel-flash-style {
        margin: 1rem 2%;
    }
    
    .pcf-card {
        flex: 0 0 200px;
        width: 200px;
    }
    
    .pcf-main-price {
        font-size: 1.1rem;
    }
}

@media (max-width: 36em) {
    .product-carousel-flash-style {
        margin: 0.75rem 1.5%;
    }
    
    .pcf-card {
        flex: 0 0 170px;
        width: 170px;
    }
    
    .pcf-title {
        font-size: 1.1rem;
    }
    
    .pcf-main-price {
        font-size: 1rem;
    }
    
    .pcf-product-title {
        font-size: 0.75rem;
    }
}
