/**
 * Cart Styles - PRO Cotizador MERCH
 */

/* Floating Cart */
.pcm-floating-cart {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 9998;
}

.pcm-cart-toggle {
    background: #957319;
    color: white;
    padding: 15px 20px;
    border-radius: 50px;
    box-shadow: 0 6px 20px rgba(149, 115, 25, 0.3);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.pcm-cart-toggle:hover {
    background: #7a5e14;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(149, 115, 25, 0.4);
}

.pcm-cart-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.pcm-cart-count {
    background: #d63638;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
    min-width: 20px;
    text-align: center;
}

.pcm-cart-text {
    font-weight: 600;
    font-size: 14px;
}

/* Cart Sidebar */
.pcm-cart-sidebar {
    position: fixed;
    top: 0;
    right: -420px;
    width: 420px;
    height: 100%;
    background: #ffffff;
    box-shadow: -4px 0 24px rgba(0,0,0,0.15);
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 99999;
    display: flex;
    flex-direction: column;
}

.pcm-cart-sidebar.active {
    right: 0;
}

@media (max-width: 480px) {
    .pcm-cart-sidebar {
        width: 100%;
        right: -100%;
    }
}

.pcm-cart-header {
    padding: 24px;
    border-bottom: 2px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
}

.pcm-cart-header h3 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: #1d2327;
    letter-spacing: -0.5px;
}

.pcm-cart-close {
    background: transparent;
    border: none;
    font-size: 32px;
    color: #646970;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.pcm-cart-close:hover {
    color: #1d2327;
}

.pcm-cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #fafafa;
}

.pcm-cart-items::-webkit-scrollbar {
    width: 6px;
}

.pcm-cart-items::-webkit-scrollbar-track {
    background: #f0f0f0;
}

.pcm-cart-items::-webkit-scrollbar-thumb {
    background: #957319;
    border-radius: 3px;
}

.pcm-cart-items::-webkit-scrollbar-thumb:hover {
    background: #7a5e14;
}

.pcm-empty-cart {
    text-align: center;
    padding: 60px 20px;
    color: #646970;
    font-size: 15px;
}

.pcm-cart-item {
    display: flex;
    gap: 15px;
    padding: 16px;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    margin-bottom: 12px;
    position: relative;
    background: white;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}

.pcm-cart-item:hover {
    border-color: #957319;
    box-shadow: 0 4px 12px rgba(149, 115, 25, 0.1);
    transform: translateY(-2px);
}

.pcm-item-image {
    flex-shrink: 0;
}

.pcm-item-image img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #e8e8e8;
}

.pcm-item-details {
    flex: 1;
    min-width: 0;
}

.pcm-item-details h4 {
    margin: 0 0 6px 0;
    font-size: 14px;
    font-weight: 600;
    color: #1d2327;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.pcm-item-variation {
    color: #957319;
    font-size: 12px;
    margin: 0 0 5px 0;
    font-weight: 600;
    background: #fef8e7;
    padding: 3px 8px;
    border-radius: 4px;
    display: inline-block;
}

.pcm-item-sku {
    color: #646970;
    font-size: 11px;
    margin: 0 0 10px 0;
    font-family: monospace;
}

.pcm-item-quantity {
    display: flex;
    align-items: center;
    gap: 5px;
}

.pcm-qty-btn {
    width: 30px;
    height: 30px;
    border: 1px solid #e0e0e0;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.pcm-qty-btn:hover {
    background: #957319;
    color: white;
    border-color: #957319;
}

.pcm-qty-input {
    width: 50px;
    height: 30px;
    text-align: center;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
}

.pcm-qty-input:focus {
    outline: none;
    border-color: #957319;
}

.pcm-remove-item {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #fee;
    border: none;
    color: #d63638;
    cursor: pointer;
    padding: 4px;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.pcm-remove-item:hover {
    background: #d63638;
    color: white;
    transform: scale(1.1);
}

.pcm-cart-footer {
    padding: 24px;
    border-top: 2px solid #f0f0f0;
    background: white;
}

.pcm-cart-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    padding: 16px;
    background: #fafafa;
    border-radius: 8px;
}

.pcm-cart-summary span {
    font-size: 15px;
    font-weight: 500;
    color: #646970;
}

.pcm-total-count {
    font-size: 24px;
    font-weight: 700;
    color: #957319;
}

.pcm-btn {
    display: block;
    width: 100%;
    padding: 16px 24px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
    box-shadow: 0 4px 12px rgba(149, 115, 25, 0.2);
}

.pcm-btn-primary {
    background: #957319;
    color: white;
}

.pcm-btn-primary:hover {
    background: #7a5e14;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(149, 115, 25, 0.3);
}

.pcm-btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(149, 115, 25, 0.2);
}

/* Overlay */
.pcm-cart-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
}

.pcm-cart-overlay.active {
    display: block;
}

/* Animations */
@keyframes slideInRight {
    from {
        right: -400px;
    }
    to {
        right: 0;
    }
}

@keyframes slideOutRight {
    from {
        right: 0;
    }
    to {
        right: -400px;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .pcm-floating-cart {
        right: 15px;
        bottom: 15px;
    }
    
    .pcm-cart-toggle {
        padding: 12px 16px;
    }
    
    .pcm-cart-text {
        display: none;
    }
}

/* CRITICAL: Ensure sidebar is always on top */
.pcm-cart-sidebar.active {
    z-index: 99999 !important;
}

.pcm-cart-overlay.active {
    z-index: 9999 !important;
}
