/* PBN Cart Gifts - Cart Drawer */

/* Overlay */
.pcg-cart-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999998;
    transition: opacity 0.3s ease;
}
.pcg-cart-overlay.active {
    display: block;
}

/* Drawer */
.pcg-cart-drawer {
    position: fixed;
    top: 0;
    right: -450px;
    width: 420px;
    max-width: 90vw;
    height: 100%;
    background: #fff;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -4px 0 20px rgba(0,0,0,0.15);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.pcg-cart-drawer.open {
    right: 0;
}

/* Header */
.pcg-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
}
.pcg-drawer-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #333;
}
.pcg-close-btn {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #666;
    padding: 0;
    line-height: 1;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pcg-close-btn:hover {
    color: #333;
}

/* Progress Bar */
.pcg-progress-bar-wrap {
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
}
.pcg-progress-status {
    font-size: 13px;
    color: #333;
    margin-bottom: 8px;
    font-weight: 600;
    text-align: center;
}
.pcg-progress-track {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px;
    margin-top: 10px;
}
.pcg-progress-line-bg {
    position: absolute;
    top: 50%;
    left: 20px;
    right: 20px;
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    transform: translateY(-50%);
    z-index: 0;
}
.pcg-progress-line-fill {
    position: absolute;
    top: 50%;
    left: 20px;
    height: 4px;
    background: #f7941d;
    border-radius: 2px;
    transform: translateY(-50%);
    transition: width 0.4s ease;
    z-index: 1;
}
.pcg-milestone {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.pcg-milestone-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 3px solid #e0e0e0;
    transition: all 0.3s ease;
}
.pcg-milestone.unlocked .pcg-milestone-icon {
    background: #f7941d;
    border-color: #f7941d;
}
.pcg-milestone-icon img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}
.pcg-milestone-label {
    font-size: 9px;
    color: #999;
    text-align: center;
    max-width: 60px;
    line-height: 1.2;
    font-weight: 600;
    text-transform: uppercase;
}
.pcg-milestone.unlocked .pcg-milestone-label {
    color: #f7941d;
}
.pcg-progress-next-msg {
    font-size: 12px;
    color: #666;
    text-align: center;
    margin-top: 6px;
}

/* Cart Items */
.pcg-cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}
.pcg-cart-item {
    display: flex;
    gap: 12px;
    padding: 14px 20px;
    border-bottom: 1px solid #f0f0f0;
    align-items: flex-start;
}
.pcg-item-image {
    width: 70px;
    height: 70px;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
    background: #f5f5f5;
}
.pcg-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.pcg-item-details {
    flex: 1;
    min-width: 0;
}
.pcg-item-name {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin: 0 0 4px;
    line-height: 1.3;
}
.pcg-item-name.gift-name {
    color: #333;
}
.pcg-item-price {
    margin: 0 0 6px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.pcg-price-current {
    color: #f7941d;
    font-weight: 700;
}
.pcg-price-original {
    color: #999;
    text-decoration: line-through;
    font-size: 13px;
}
.pcg-item-attributes {
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
    margin: 0 0 6px;
    letter-spacing: 0.3px;
}
.pcg-item-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}
.pcg-qty-wrap {
    display: inline-flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}
.pcg-qty-btn {
    width: 28px;
    height: 28px;
    background: #fff;
    border: none;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    transition: background 0.2s;
}
.pcg-qty-btn:hover {
    background: #f5f5f5;
}
.pcg-qty-value {
    width: 30px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    border-left: 1px solid #ddd;
    border-right: 1px solid #ddd;
    height: 28px;
    line-height: 28px;
}
.pcg-remove-btn {
    background: none;
    border: none;
    color: #999;
    font-size: 12px;
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
}
.pcg-remove-btn:hover {
    color: #e74c3c;
}

/* B2G1F Badge */
.pcg-b2g1f-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #fff8f0;
    border: 1px solid #f7941d;
    border-radius: 4px;
    padding: 2px 8px;
    font-size: 11px;
    color: #f7941d;
    font-weight: 600;
    margin-top: 4px;
}
.pcg-b2g1f-badge .pcg-badge-icon {
    font-size: 12px;
}
.pcg-b2g1f-amount {
    font-weight: 700;
}

/* Footer */
.pcg-cart-footer {
    border-top: 1px solid #eee;
    padding: 14px 20px;
    flex-shrink: 0;
    background: #fff;
}
.pcg-free-returns {
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: center;
    margin-bottom: 10px;
    font-size: 13px;
    color: #333;
}
.pcg-returns-icon {
    color: #27ae60;
    font-size: 16px;
    font-weight: 700;
}
.pcg-cart-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 16px;
}
.pcg-total-label {
    font-weight: 600;
    color: #333;
}
.pcg-total-price {
    font-weight: 700;
    color: #f7941d;
    font-size: 18px;
}
.pcg-total-original {
    color: #999;
    text-decoration: line-through;
    font-size: 14px;
    margin-left: 6px;
}
.pcg-checkout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 20px;
    background: #f7941d;
    color: #fff;
    text-decoration: none;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: background 0.2s;
    text-transform: uppercase;
}
.pcg-checkout-btn:hover {
    background: #e8850f;
    color: #fff;
    text-decoration: none;
}
.pcg-lock-icon {
    font-size: 14px;
}

/* Empty Cart */
.pcg-cart-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
}
.pcg-cart-empty p {
    font-size: 16px;
    color: #888;
    margin-bottom: 16px;
}
.pcg-continue-shopping {
    color: #f7941d;
    text-decoration: underline;
    font-weight: 600;
}

/* Loading spinner */
.pcg-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}
.pcg-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid #eee;
    border-top-color: #f7941d;
    border-radius: 50%;
    animation: pcg-spin 0.6s linear infinite;
}
@keyframes pcg-spin {
    to { transform: rotate(360deg); }
}

/* Mobile */
@media (max-width: 480px) {
    .pcg-cart-drawer {
        width: 100%;
        max-width: 100vw;
        right: -100%;
    }
    .pcg-item-image {
        width: 60px;
        height: 60px;
    }
}
