/* ── Product Carousel Plugin ── Professional Carousel ── */

:root {
    --pc-orange: #FF6600;
    --pc-orange-light: rgba(255, 102, 0, 0.07);
    --pc-orange-hover: #e55c00;
    --pc-text: #1a1a18;
    --pc-text-secondary: #6b7280;
    --pc-white: #ffffff;
    --pc-border: rgba(0, 0, 0, 0.08);
    --pc-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --pc-shadow-hover: 0 10px 25px rgba(0, 0, 0, 0.08), 0 4px 10px rgba(0, 0, 0, 0.04);
    --pc-radius: 14px;
    --pc-radius-card: 12px;
}

/* ══════ Section Container ══════ */
.pc-carousel-section {
    direction: rtl;
    font-family: inherit;
    margin: 2.5rem 0 1rem;
    padding: 1.5rem 1.25rem 1.25rem;
    border-radius: var(--pc-radius);
    background: var(--pc-orange-light);
    position: relative;
}

/* ══════ Header ══════ */
.pc-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.pc-section-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--pc-text);
    margin: 0;
}

.pc-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ── See All Button ── */
.pc-see-all {
    font-size: 12px;
    color: var(--pc-orange);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: color 0.15s;
    font-weight: 500;
    white-space: nowrap;
}

.pc-see-all:hover {
    color: var(--pc-orange-hover);
}

.pc-see-all svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* ── Navigation Buttons ── */
.pc-nav-btns {
    display: flex;
    gap: 6px;
}

.pc-nav-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--pc-border);
    background: var(--pc-white);
    cursor: pointer;
    color: var(--pc-text);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, opacity 0.15s, box-shadow 0.15s;
    padding: 0;
    box-shadow: var(--pc-shadow);
}

.pc-nav-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.pc-nav-btn:hover:not(.pc-nav-disabled) {
    background: #f8f8f6;
    box-shadow: var(--pc-shadow-hover);
}

.pc-nav-btn:disabled,
.pc-nav-btn.pc-nav-disabled {
    opacity: 0.2;
    cursor: default;
    pointer-events: none;
}

/* ══════ Swiper Container ══════ */
.pc-swiper {
    border-radius: var(--pc-radius-card);
    overflow: hidden;
}

.pc-swiper .swiper-wrapper {
    align-items: stretch;
}

/* ══════ Loading State ══════ */
.pc-loading {
    text-align: center;
    padding: 30px 20px;
    color: var(--pc-text-secondary);
    font-size: 13px;
}

.pc-loading::after {
    content: '';
    display: block;
    width: 28px;
    height: 28px;
    margin: 10px auto 0;
    border: 3px solid var(--pc-border);
    border-top-color: var(--pc-orange);
    border-radius: 50%;
    animation: pc-spin 0.7s linear infinite;
}

@keyframes pc-spin {
    to { transform: rotate(360deg); }
}

/* ══════ Card ══════ */
.pc-card {
    background: var(--pc-white);
    border-radius: var(--pc-radius-card);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.25s cubic-bezier(0.25, 0.1, 0.25, 1),
                box-shadow 0.25s cubic-bezier(0.25, 0.1, 0.25, 1);
    direction: rtl;
    height: auto;
    box-sizing: border-box;
    box-shadow: var(--pc-shadow);
}

.pc-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--pc-shadow-hover);
}

/* ── Image Area ── */
.pc-card-img-wrap {
    width: 100%;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: #f9f9f7;
}

.pc-card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.pc-card:hover .pc-card-img-wrap img {
    transform: scale(1.05);
}

.pc-card-img-placeholder {
    width: 48px;
    height: 48px;
    opacity: 0.25;
    color: #999;
}

/* ── Discount Badge ── */
.pc-discount-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--pc-orange);
    color: var(--pc-white);
    font-size: 14px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 8px;
    font-family: inherit;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 8px rgba(255, 102, 0, 0.4);
    line-height: 1.3;
    z-index: 2;
}

/* ── Card Body ── */
.pc-card-body {
    padding: 12px 14px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.pc-card-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--pc-text);
    line-height: 1.6;
    text-decoration: none !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: calc(13px * 1.6 * 2);
}

/* ── Pricing ── */
.pc-card-pricing {
    display: flex;
    align-items: baseline;
    gap: 6px;
    flex-wrap: wrap;
}

.pc-price-now {
    font-size: 14px;
    font-weight: 700;
    color: var(--pc-text);
}

.pc-price-old {
    font-size: 11px;
    color: var(--pc-text-secondary);
    text-decoration: line-through;
}

/* ── Card Footer ── */
.pc-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    gap: 6px;
}

/* ── Stars (Rating) ── */
.pc-stars {
    display: flex;
    gap: 1px;
    font-size: 0;
    direction: ltr;
}

.pc-star-icon {
    width: 14px;
    height: 14px;
    color: #f59e0b;
}

/* ── Buy Button ── */
.pc-btn-add {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 6px 14px;
    border-radius: 20px;
    border: none;
    background: var(--pc-orange);
    color: var(--pc-white);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none !important;
    transition: background 0.15s, transform 0.12s, box-shadow 0.15s;
    flex-shrink: 0;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(255, 102, 0, 0.3);
    white-space: nowrap;
    font-family: inherit;
    line-height: 1.3;
}

.pc-btn-add svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
    flex-shrink: 0;
}

.pc-btn-add:hover {
    background: var(--pc-orange-hover);
    color: var(--pc-white);
    box-shadow: 0 4px 12px rgba(255, 102, 0, 0.35);
}

.pc-btn-add:active {
    transform: scale(0.93);
}

/* ══════ Dots / Pagination ══════ */
.pc-dots {
    display: flex;
    gap: 6px;
    align-items: center;
    justify-content: center;
    margin-top: 16px;
    direction: ltr;
}

.pc-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.15);
    cursor: pointer;
    border: none;
    padding: 0;
    transition: background 0.25s, width 0.3s ease;
}

.pc-dot:hover {
    background: rgba(0, 0, 0, 0.25);
}

.pc-dot.pc-active {
    background: var(--pc-orange);
    width: 20px;
    border-radius: 4px;
}

/* ══════ Responsive ══════ */
@media (max-width: 600px) {
    .pc-carousel-section {
        padding: 1.25rem 0.75rem 1rem;
    }

    .pc-nav-btns {
        display: none;
    }

    .pc-card-title {
        font-size: 12px;
        min-height: calc(12px * 1.6 * 2);
    }

    .pc-price-now {
        font-size: 13px;
    }
}

@media (max-width: 400px) {
    .pc-carousel-section {
        padding: 1rem 0.5rem 0.75rem;
        margin: 1.5rem 0 0.5rem;
        border-radius: 10px;
    }

    .pc-section-title {
        font-size: 14px;
    }

    .pc-btn-add {
        padding: 5px 10px;
        font-size: 11px;
    }

    .pc-btn-add svg {
        width: 12px;
        height: 12px;
    }

    .pc-star-icon {
        width: 12px;
        height: 12px;
    }
}