/**
 * ProfileGazer Boost Overlay - REDESIGNED CSS
 * New layout: Products on left, Price calculator on right
 */

/* ============================================
   OVERLAY STRUCTURE & BASE STYLES
   ============================================ */

.pg-boost-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.pg-boost-overlay.active {
    display: flex;
    opacity: 1;
}

.pg-boost-overlay-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.pg-boost-overlay-content-wrapper {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px 24px;
    animation: slideUp 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow-y: auto;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(60px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pg-boost-overlay-header {
    position: absolute;
    top: 0;
    right: 0;
    padding: 20px;
    z-index: 10;
}

.pg-boost-close-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.95);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.pg-boost-close-btn:hover {
    background: white;
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.pg-boost-close-btn svg {
    width: 20px;
    height: 20px;
    color: #1e1b3a;
    stroke-width: 3;
}

#pg-boost-overlay-content {
    width: 100%;
    max-width: 1400px;
    max-height: 85vh;
    background: white;
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #e5e3f0 transparent;
}

#pg-boost-overlay-content::-webkit-scrollbar {
    width: 6px;
}

#pg-boost-overlay-content::-webkit-scrollbar-track {
    background: transparent;
}

#pg-boost-overlay-content::-webkit-scrollbar-thumb {
    background: #e5e3f0;
    border-radius: 3px;
}

/* ============================================
   STEP HEADER
   ============================================ */

.boost-step-header {
    margin-bottom: 36px;
    position: relative;
}

.boost-step-header h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: #1e1b3a;
    margin-bottom: 8px;
}

.boost-step-header p {
    font-size: 15px;
    color: #7c7a92;
    line-height: 1.6;
}

.boost-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 60px;
    background: #f3eeff;
    border: 1px solid rgba(139, 92, 246, 0.2);
    color: #7c3aed;
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.boost-back-btn:hover {
    background: #e8deff;
    border-color: rgba(139, 92, 246, 0.4);
    transform: translateX(-4px);
}

.boost-back-btn svg {
    width: 16px;
    height: 16px;
}

/* ============================================
   CATEGORIES GRID
   ============================================ */

.boost-categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    animation: fadeIn 0.4s ease 0.1s both;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.boost-category-card {
    position: relative;
    padding: 28px 24px;
    border-radius: 18px;
    background: linear-gradient(135deg, #fafafe 0%, #f3eeff 100%);
    border: 2px solid rgba(139, 92, 246, 0.1);
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.boost-category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.08) 0%, rgba(217, 70, 239, 0.08) 100%);
    opacity: 0;
    transition: opacity 0.35s ease;
    z-index: 0;
}

.boost-category-card:hover {
    border-color: rgba(139, 92, 246, 0.25);
    transform: translateY(-8px);
    box-shadow: 0 12px 36px rgba(139, 92, 246, 0.15);
}

.boost-category-card:hover::before {
    opacity: 1;
}

.boost-category-card > * {
    position: relative;
    z-index: 1;
}

.boost-category-icon {
    font-size: 48px;
    margin-bottom: 16px;
    display: block;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.boost-category-card:hover .boost-category-icon {
    transform: scale(1.2) translateY(-4px);
}

.boost-category-card h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #1e1b3a;
    margin-bottom: 6px;
}

.boost-category-card p {
    font-size: 13px;
    color: #7c7a92;
    margin-bottom: 16px;
}

.boost-category-arrow {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(139, 92, 246, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.35s ease;
}

.boost-category-arrow svg {
    width: 16px;
    height: 16px;
    color: #8b5cf6;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.boost-category-card:hover .boost-category-arrow {
    background: #8b5cf6;
    transform: scale(1.1);
}

.boost-category-card:hover .boost-category-arrow svg {
    color: white;
    transform: translateX(3px);
}

/* ============================================
   NEW PRODUCT LAYOUT - LEFT & RIGHT
   ============================================ */

.boost-products-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: flex-start;
    animation: fadeIn 0.4s ease 0.1s both;
}

.boost-products-grid-left {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

/* PRODUCT CARDS - RECTANGULAR DESIGN */

.boost-product-card-rect {
    position: relative;
    padding: 24px 16px;
    border-radius: 12px;
    background: white;
    border: 2px solid #e5e3f0;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 140px;
}

.boost-product-card-rect:hover {
    border-color: rgba(139, 92, 246, 0.3);
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.12);
    transform: translateY(-4px);
}

.boost-product-card-rect.active {
    border-color: #8b5cf6;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.05) 0%, rgba(217, 70, 239, 0.05) 100%);
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.2);
}

.boost-rect-quantity {
    font-family: 'Outfit', sans-serif;
    font-size: 28px;
    font-weight: 800;
    color: #1e1b3a;
    line-height: 1;
    margin-bottom: 8px;
}

.boost-rect-category {
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #7c7a92;
    text-transform: capitalize;
}

/* PRICE CALCULATOR - RIGHT SIDE */

.boost-calculator-right {
    position: sticky;
    top: 20px;
    animation: slideInRight 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.boost-calculator-box {
    background: linear-gradient(135deg, #fafafe 0%, #f3eeff 100%);
    border: 1px solid rgba(139, 92, 246, 0.1);
    border-radius: 16px;
    padding: 32px 24px;
    text-align: center;
}

.boost-calculator-box h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #1e1b3a;
    margin-bottom: 24px;
    line-height: 1.4;
}

.boost-calculator-price-section {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(139, 92, 246, 0.1);
}

.boost-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.boost-price-label {
    font-size: 15px;
    color: #7c7a92;
    font-weight: 600;
}

.boost-price-amount {
    font-family: 'Outfit', sans-serif;
    font-size: 24px;
    font-weight: 800;
    color: #8b5cf6;
}

.boost-savings-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: rgba(16, 185, 129, 0.08);
    border-radius: 8px;
}

.boost-savings-label {
    font-size: 14px;
    color: #10b981;
    font-weight: 600;
}

.boost-savings-amount {
    font-family: 'Outfit', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #10b981;
}

.boost-btn-buy-now {
    width: 100%;
    padding: 14px 24px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #8b5cf6 0%, #a855f7 100%);
    color: white;
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.boost-btn-buy-now:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
}

.boost-btn-buy-now.loading {
    pointer-events: none;
    opacity: 0.8;
}

.boost-btn-buy-now.success {
    background: #10b981;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.boost-btn-buy-now.error {
    background: #ef4444;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* ============================================
   LOADING & SPINNERS
   ============================================ */

.boost-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
}

.spinner,
.spinner-mini {
    border: 3px solid rgba(139, 92, 246, 0.1);
    border-top-color: #8b5cf6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.spinner {
    width: 48px;
    height: 48px;
}

.spinner-mini {
    width: 16px;
    height: 16px;
    border-width: 2px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ============================================
   SLIDE ANIMATIONS
   ============================================ */

.pg-boost-overlay-content-wrapper.slide-in {
    animation: slideInContent 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.pg-boost-overlay-content-wrapper.slide-out {
    animation: slideOutContent 0.35s cubic-bezier(0.4, 0, 0.2, 1) both;
}

@keyframes slideInContent {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOutContent {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(-100px);
    }
}

/* ============================================
   CART PANEL
   ============================================ */

.pg-cart-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 420px;
    height: 100%;
    background: white;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
    z-index: 99998;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.pg-cart-panel.active {
    transform: translateX(0);
}

.pg-cart-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid #f0ede8;
}

.pg-cart-panel-header h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #1e1b3a;
}

.pg-cart-close-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: #f3eeff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.pg-cart-close-btn:hover {
    background: #e8deff;
    transform: scale(1.05);
}

.pg-cart-close-btn svg {
    width: 20px;
    height: 20px;
    color: #8b5cf6;
}

.pg-cart-panel-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.cart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
}

.cart-empty .empty-icon {
    font-size: 56px;
    margin-bottom: 16px;
}

.cart-empty p {
    font-family: 'Outfit', sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: #1e1b3a;
    margin-bottom: 6px;
}

.cart-empty small {
    font-size: 14px;
    color: #7c7a92;
}

.cart-items {
    margin-bottom: 24px;
}

.cart-item {
    display: flex;
    gap: 16px;
    padding: 16px;
    background: #fafafe;
    border-radius: 12px;
    margin-bottom: 12px;
    align-items: center;
}

.cart-item-info {
    flex: 1;
}

.cart-item-info h4 {
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #1e1b3a;
    margin-bottom: 4px;
}

.cart-item-qty {
    font-size: 12px;
    color: #7c7a92;
}

.cart-item-price {
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #8b5cf6;
}

.cart-item-remove {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: white;
    color: #ef4444;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.cart-item-remove:hover {
    background: #fef2f2;
    transform: scale(1.1);
}

.cart-item-remove svg {
    width: 16px;
    height: 16px;
}

.cart-summary {
    padding: 16px;
    background: linear-gradient(135deg, #f3eeff 0%, #fafafe 100%);
    border-radius: 12px;
    margin-bottom: 20px;
    border: 1px solid rgba(139, 92, 246, 0.1);
}

.cart-subtotal,
.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 14px;
}

.cart-total {
    margin-bottom: 0;
    padding-top: 8px;
    border-top: 1px solid rgba(139, 92, 246, 0.1);
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    color: #1e1b3a;
    font-size: 16px;
}

.cart-subtotal span:first-child,
.cart-total span:first-child {
    color: #7c7a92;
}

.cart-subtotal span:last-child,
.cart-total span:last-child {
    color: #8b5cf6;
}

.cart-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: sticky;
    bottom: 0;
    background: white;
    padding: 20px 0;
}

.boost-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px;
    border-radius: 12px;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 14px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.boost-btn-primary {
    background: linear-gradient(135deg, #8b5cf6 0%, #a855f7 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.25);
}

.boost-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.35);
}

/* ============================================
   FLOATING CART ICON
   ============================================ */

.pg-cart-icon {
    position: fixed;
    bottom: 32px;
    left: 32px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8b5cf6 0%, #a855f7 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.3);
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 99997;
}

.pg-cart-icon:hover {
    transform: scale(1.1) translateY(-4px);
    box-shadow: 0 12px 36px rgba(139, 92, 246, 0.4);
}

.pg-cart-icon svg {
    width: 28px;
    height: 28px;
}

.pg-cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f97316;
    color: white;
    display: none;
    align-items: center;
    justify-content: center;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 1024px) {
    .boost-products-layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .boost-calculator-right {
        position: static;
    }
}

@media (max-width: 768px) {
    #pg-boost-overlay-content {
        max-width: 95vw;
        padding: 24px 16px;
        border-radius: 20px;
    }

    .boost-products-grid-left {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .boost-product-card-rect {
        min-height: 120px;
        padding: 16px 12px;
    }

    .boost-rect-quantity {
        font-size: 24px;
    }

    .pg-cart-icon {
        bottom: 24px;
        left: 24px;
        width: 56px;
        height: 56px;
    }

    .boost-step-header h2 {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .pg-boost-overlay-content-wrapper {
        padding: 20px 16px;
    }

    #pg-boost-overlay-content {
        max-width: 100%;
        max-height: 90vh;
        padding: 16px;
        border-radius: 16px;
    }

    .boost-step-header {
        margin-bottom: 24px;
    }

    .boost-step-header h2 {
        font-size: 22px;
    }

    .boost-categories-grid {
        grid-template-columns: 1fr;
    }

    .boost-products-grid-left {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .boost-product-card-rect {
        min-height: 100px;
    }

    .boost-rect-quantity {
        font-size: 22px;
    }

    .boost-rect-category {
        font-size: 12px;
    }

    .boost-calculator-box {
        padding: 20px 16px;
    }

    .boost-calculator-box h3 {
        font-size: 18px;
        margin-bottom: 16px;
    }

    .boost-price-amount {
        font-size: 20px;
    }

    .pg-cart-panel {
        max-width: 100%;
    }

    .pg-cart-icon {
        bottom: 20px;
        left: 20px;
        width: 52px;
        height: 52px;
    }

    .pg-cart-badge {
        width: 28px;
        height: 28px;
        font-size: 12px;
        top: -6px;
        right: -6px;
    }
}

.error {
    padding: 20px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 12px;
    color: #dc2626;
    text-align: center;
    font-size: 14px;
}