/* ============================================
   POPULAR PACKAGES WIDGET - SocialFormula 2026
   Lightweight, Premium Design
   ============================================ */

:root {
    --pp-primary: #673DE6;
    --pp-primary-light: #8B6AEC;
    --pp-gradient: linear-gradient(135deg, #673DE6 0%, #8B6AEC 100%);
    --pp-youtube: #FF0000;
    --pp-instagram: #E1306C;
    --pp-tiktok: #000000;
    --pp-facebook: #1877F2;
    --pp-success: #22c55e;
    --pp-warning: #f59e0b;
    --pp-shadow: 0 8px 30px rgba(103, 61, 230, 0.12);
    --pp-shadow-hover: 0 20px 50px rgba(103, 61, 230, 0.2);
}

/* Section Container */
.popular-packages-section {
    padding: 80px 0;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
    position: relative;
    overflow: hidden;
}

.popular-packages-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -20%;
    width: 80%;
    height: 150%;
    background: radial-gradient(ellipse, rgba(103, 61, 230, 0.03) 0%, transparent 70%);
    pointer-events: none;
}

/* Header */
.pp-header {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
    z-index: 1;
}

.pp-title {
    font-size: 42px;
    font-weight: 900;
    color: #0f172a;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.pp-subtitle {
    font-size: 16px;
    color: #64748b;
    font-weight: 500;
    max-width: 500px;
    margin: 0 auto;
}

/* Platform Tabs */
.pp-platform-tabs {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.pp-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: 2px solid #e2e8f0;
    border-radius: 50px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 14px;
    color: #475569;
}

.pp-tab:hover {
    border-color: var(--pp-primary);
    color: var(--pp-primary);
    transform: translateY(-2px);
}

.pp-tab.active {
    background: var(--pp-gradient);
    color: white;
    border-color: transparent;
    box-shadow: 0 8px 25px rgba(103, 61, 230, 0.35);
}

.pp-tab i {
    font-size: 18px;
}

.pp-tab[data-platform="youtube"] i {
    color: var(--pp-youtube);
}

.pp-tab[data-platform="instagram"] i {
    color: var(--pp-instagram);
}

.pp-tab[data-platform="tiktok"] i {
    color: var(--pp-tiktok);
}

.pp-tab[data-platform="facebook"] i {
    color: var(--pp-facebook);
}

.pp-tab.active i {
    color: white;
}

/* Package Grid */
.pp-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

@media (max-width: 1024px) {
    .pp-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .pp-grid {
        grid-template-columns: 1fr;
        max-width: 360px;
    }

    .pp-title {
        font-size: 28px;
    }
}

/* Package Card */
.pp-card {
    background: white;
    border-radius: 24px;
    padding: 32px 24px;
    text-align: center;
    box-shadow: var(--pp-shadow);
    border: 2px solid transparent;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: visible;
}

.pp-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--pp-shadow-hover);
    border-color: var(--pp-primary);
}

/* Best Value Badge */
.pp-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    padding: 6px 18px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
}

/* Platform Icon */
.pp-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 28px;
    color: white;
}

.pp-icon.youtube {
    background: linear-gradient(135deg, #FF0000 0%, #cc0000 100%);
}

.pp-icon.instagram {
    background: linear-gradient(135deg, #E1306C 0%, #C13584 100%);
}

.pp-icon.tiktok {
    background: linear-gradient(135deg, #000 0%, #333 100%);
}

.pp-icon.facebook {
    background: linear-gradient(135deg, #1877F2 0%, #0d65d9 100%);
}

/* Platform Tag */
.pp-platform-tag {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    color: #94a3b8;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pp-platform-tag i {
    font-size: 12px;
}

/* Service Name */
.pp-service-name {
    font-size: 13px;
    font-weight: 800;
    color: #0f172a;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}

/* Quantity Selector */
.pp-qty-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-bottom: 20px;
}

.pp-qty-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid #e2e8f0;
    background: white;
    cursor: pointer;
    font-size: 18px;
    font-weight: 600;
    color: #64748b;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pp-qty-btn:hover {
    border-color: var(--pp-primary);
    color: var(--pp-primary);
    background: rgba(103, 61, 230, 0.05);
}

.pp-qty-input {
    width: 80px;
    text-align: center;
    font-size: 18px;
    font-weight: 800;
    color: #0f172a;
    border: none;
    background: transparent;
}

.pp-qty-input:focus {
    outline: none;
}

/* Price Display */
.pp-price {
    font-size: 36px;
    font-weight: 900;
    color: #0f172a;
    margin-bottom: 20px;
}

.pp-price-currency {
    font-size: 20px;
    vertical-align: super;
}

/* Buy Button */
.pp-buy-btn {
    width: 100%;
    padding: 14px 24px;
    border-radius: 12px;
    border: 2px solid #e2e8f0;
    background: white;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    color: #475569;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.pp-buy-btn:hover {
    background: var(--pp-gradient);
    color: white;
    border-color: transparent;
    transform: scale(1.02);
}

.pp-buy-btn i {
    transition: transform 0.3s;
}

.pp-buy-btn:hover i {
    transform: translateX(4px);
}

/* ============================================
   CART POPUP (Centered Modal)
   ============================================ */

.pp-cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.pp-cart-overlay.active {
    opacity: 1;
    visibility: visible;
}

.pp-cart-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
    pointer-events: none;
}

.pp-cart-popup.active {
    display: flex;
}

.pp-cart-modal {
    background: white;
    border-radius: 24px;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.3);
    animation: popupSlideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: all;
    overflow: hidden;
}

@keyframes popupSlideUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.pp-cart-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    max-height: 50vh;
}

@media (max-width: 560px) {
    .pp-cart-modal {
        max-width: 100%;
        max-height: 95vh;
        border-radius: 20px;
    }
}

/* Cart Header */
.pp-cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid #e2e8f0;
}

.pp-cart-title {
    font-size: 22px;
    font-weight: 800;
    color: #0f172a;
}

.pp-cart-close {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: none;
    background: #f1f5f9;
    cursor: pointer;
    font-size: 20px;
    color: #64748b;
    transition: all 0.2s;
}

.pp-cart-close:hover {
    background: #e2e8f0;
    color: #0f172a;
}

/* Cart Content */
.pp-cart-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

/* Cart Item */
.pp-cart-item {
    background: #f8fafc;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
    position: relative;
}

.pp-cart-item-header {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
}

.pp-cart-item-thumb {
    width: 80px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    background: #e2e8f0;
}

.pp-cart-item-info {
    flex: 1;
}

.pp-cart-item-url {
    font-size: 12px;
    color: var(--pp-primary);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.pp-cart-item-name {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 8px;
}

.pp-cart-item-price {
    font-size: 18px;
    font-weight: 800;
    color: #0f172a;
}

.pp-cart-item-badges {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.pp-item-badge {
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 20px;
    background: white;
    border: 1px solid #e2e8f0;
    color: #64748b;
    font-weight: 600;
}

.pp-item-badge i {
    margin-right: 4px;
}

.pp-cart-remove {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
}

.pp-cart-remove:hover {
    text-decoration: underline;
}

/* Upsell Box */
.pp-upsell-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 2px dashed #22c55e;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
}

.pp-upsell-text {
    font-size: 14px;
    color: #166534;
    font-weight: 600;
}

.pp-upsell-text i {
    margin-right: 6px;
}

.pp-upsell-btn {
    padding: 10px 20px;
    background: var(--pp-gradient);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}

.pp-upsell-btn:hover {
    transform: scale(1.05);
}

/* Related Services Section */
.pp-related-header {
    margin-top: 24px;
    margin-bottom: 16px;
}

.pp-related-title {
    font-size: 15px;
    font-weight: 800;
    color: #0f172a;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.pp-related-subtitle {
    font-size: 13px;
    color: #64748b;
}

.pp-related-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: white;
    border-radius: 12px;
    margin-bottom: 10px;
    border: 1px solid #e2e8f0;
}

.pp-related-info {
    flex: 1;
}

.pp-related-name {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 4px;
}

.pp-related-meta {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pp-discount-badge {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 6px;
    background: #fef2f2;
    color: #dc2626;
    font-weight: 700;
}

.pp-related-qty {
    font-size: 13px;
    color: #64748b;
}

.pp-related-pricing {
    text-align: right;
    margin-right: 16px;
}

.pp-related-old-price {
    font-size: 12px;
    color: #94a3b8;
    text-decoration: line-through;
}

.pp-related-new-price {
    font-size: 17px;
    font-weight: 800;
    color: #0f172a;
}

.pp-related-add-btn {
    padding: 10px 20px;
    border: 2px solid #e2e8f0;
    background: white;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}

.pp-related-add-btn:hover {
    border-color: var(--pp-primary);
    color: var(--pp-primary);
}

.pp-related-add-btn.added {
    background: var(--pp-success);
    color: white;
    border-color: var(--pp-success);
}

/* Coupon Section */
.pp-coupon-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
    display: none;
}

.pp-coupon-section.visible {
    display: block;
}

.pp-coupon-input-wrap {
    display: flex;
    gap: 10px;
}

.pp-coupon-input {
    flex: 1;
    padding: 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
}

.pp-coupon-input:focus {
    outline: none;
    border-color: var(--pp-primary);
}

.pp-coupon-apply-btn {
    padding: 14px 20px;
    background: #1e293b;
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    font-size: 13px;
}

/* Cart Footer */
.pp-cart-footer {
    padding: 24px;
    border-top: 1px solid #e2e8f0;
    background: white;
}

.pp-cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.pp-total-label {
    font-size: 15px;
    color: #64748b;
    font-weight: 600;
}

.pp-total-amount {
    font-size: 32px;
    font-weight: 900;
    color: #0f172a;
}

.pp-discount-applied {
    font-size: 12px;
    color: var(--pp-success);
    font-weight: 600;
    margin-bottom: 16px;
    display: none;
}

.pp-discount-applied.visible {
    display: block;
}

.pp-checkout-btn {
    width: 100%;
    padding: 18px;
    background: #0f172a;
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s;
}

.pp-checkout-btn:hover {
    background: #1e293b;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.3);
}

.pp-checkout-btn i {
    font-size: 14px;
}

/* Empty Cart State */
.pp-cart-empty {
    text-align: center;
    padding: 60px 20px;
    color: #94a3b8;
}

.pp-cart-empty i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.pp-cart-empty p {
    font-size: 16px;
    font-weight: 600;
}

/* Link Input Modal */
.pp-link-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.pp-link-modal.active {
    display: flex;
}

.pp-link-modal-content {
    background: white;
    border-radius: 24px;
    padding: 40px;
    max-width: 500px;
    width: 100%;
    text-align: center;
    animation: slideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.pp-link-modal-title {
    font-size: 24px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 8px;
}

.pp-link-modal-subtitle {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 24px;
}

.pp-link-input {
    width: 100%;
    padding: 18px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 16px;
}

.pp-link-input:focus {
    outline: none;
    border-color: var(--pp-primary);
}

.pp-link-submit-btn {
    width: 100%;
    padding: 16px;
    background: var(--pp-gradient);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}

.pp-link-cancel {
    margin-top: 16px;
    color: #64748b;
    font-size: 14px;
    cursor: pointer;
}

.pp-link-cancel:hover {
    color: #0f172a;
}

/* Link Modal Icon */
.pp-link-modal-icon {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 36px;
    background: linear-gradient(135deg, var(--pp-primary) 0%, var(--pp-primary-light) 100%);
    color: white;
}

/* Link Error Message */
.pp-link-error {
    background: #fef2f2;
    color: #dc2626;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 16px;
}

.pp-link-error i {
    margin-right: 6px;
}

/* ============================================
   AUTO-SCROLLING SLIDER SECTION
   ============================================ */

.pp-slider-section {
    padding: 60px 0 80px;
    background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
    overflow: hidden;
}

.pp-slider-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 0 20px;
}

.pp-slider-title {
    font-size: 32px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 10px;
}

.pp-slider-subtitle {
    font-size: 16px;
    color: #64748b;
}

.pp-slider-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding: 20px 0;
}

.pp-slider-wrapper::before,
.pp-slider-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    width: 100px;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.pp-slider-wrapper::before {
    left: 0;
    background: linear-gradient(90deg, #f1f5f9 0%, transparent 100%);
}

.pp-slider-wrapper::after {
    right: 0;
    background: linear-gradient(-90deg, #f1f5f9 0%, transparent 100%);
}

.pp-slider-track {
    display: flex;
    gap: 20px;
    animation: ppSliderScroll 60s linear infinite;
    width: max-content;
}

.pp-slider-track:hover {
    animation-play-state: paused;
}

@keyframes ppSliderScroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.pp-slider-card {
    flex-shrink: 0;
    width: 200px;
    background: white;
    border-radius: 16px;
    padding: 24px 20px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    cursor: pointer;
}

.pp-slider-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
    border-color: var(--pp-primary);
}

.pp-slider-icon {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    font-size: 22px;
}

.pp-slider-platform {
    font-size: 11px;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.pp-slider-platform i {
    margin-right: 4px;
}

.pp-slider-name {
    font-size: 14px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.pp-slider-qty {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 6px;
}

.pp-slider-price {
    font-size: 20px;
    font-weight: 800;
    color: var(--pp-primary);
    margin-bottom: 12px;
}

.pp-slider-buy {
    width: 100%;
    padding: 10px;
    background: var(--pp-gradient);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
}

.pp-slider-buy:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 15px rgba(103, 61, 230, 0.4);
}

/* Responsive */
@media (max-width: 768px) {
    .pp-slider-title {
        font-size: 26px;
    }

    .pp-slider-card {
        width: 170px;
        padding: 20px 16px;
    }

    .pp-slider-track {
        gap: 14px;
    }
}