/* ====================================
   MODERN SHOPPING CART - ESTILOS
   ==================================== */

/* Cart Trigger Button */
.modern-cart-trigger {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    transition: all 0.3s ease;
    cursor: pointer;
}

.modern-cart-trigger:hover {
    transform: scale(1.05);
}

/* Cart Counter Badge */
.modern-cart-counter {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    border-radius: 50%;
    padding: 0;
    animation: cartBounce 0.3s ease;
    background: #fff;
    color: var(--colorCorporativo);
    box-shadow: 0 2px 8px rgba(41,155,165,0.08);
    overflow: hidden;
    text-align: center;
    white-space: nowrap;
}

.modern-cart-counter span {
    width: 100%;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

@keyframes cartBounce {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

@keyframes cartPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

/* Cart Dropdown Container */
.modern-cart-dropdown {
    position: absolute;
    top: calc(100% + 15px);
    right: 0;
    width: 450px;
    max-height: 900px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s 0.3s;
}

.modern-cart-dropdown.active-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s 0s;
}

.modern-cart-dropdown.deactive-dropdown-menu {
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
}

/* Cart Header */
.modern-cart-header {
    padding: 20px;
    background: linear-gradient(135deg, var(--colorCorporativo) 0%, var(--colorCorporativo) 100%);
    color: #fff;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.modern-cart-header .cart-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    flex: 1;
}

.modern-cart-header .cart-title i {
    font-size: 22px;
}

.modern-cart-header .items-count {
    font-size: 14px;
    font-weight: 400;
    opacity: 0.9;
    margin-left: 5px;
}

.modern-cart-header .cart-header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.btn-goto-cart-full {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border-radius: 6px;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-goto-cart-full:hover {
    background: rgba(255, 255, 255, 0.3);
    color: #fff;
    transform: translateY(-2px);
    text-decoration: none;
}

.btn-close-cart {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.btn-close-cart:hover {
    transform: rotate(90deg);
}

/* Cart Body */
.modern-cart-body {
    flex: 1;
    overflow-y: auto;
    max-height: 600px;
    padding: 0;
}

.modern-cart-items {
    padding: 0;
}

/* Cart Item */
.modern-cart-item {
    display: flex;
    gap: 15px;
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.3s ease;
    position: relative;
    align-items: flex-start;
    gap: 16px;
    padding: 24px 32px;
    min-height: 100px;
}

.modern-cart-item:hover {
    background-color: #fafafa;
}

.modern-cart-item:last-child {
    border-bottom: none;
}

@media (max-width: 576px) {
    .modern-cart-item {
        padding: 12px 16px;
        min-height: unset;
    }
}

/* Item Image */
.item-image-wrapper {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
}


.item-remove-btn {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border: none;
    background-color: #fee;
    color: #d32f2f;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: static;
    margin-left: auto;
    margin-right: 0;
    box-shadow: 0 2px 8px rgba(211,47,47,0.07);
}
.item-remove-btn:hover {
    background-color: #d32f2f;
    color: white;
    transform: scale(1.08);
}
.item-remove-btn i {
    font-size: 16px;
}

@media (max-width: 576px) {
    .item-remove-btn {
        width: 28px;
        height: 28px;
        font-size: 14px;
        margin-left: 8px;
    }
}
   
.item-name a {
    color: #333;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.item-name a:hover {
    color: var(--colorCorporativo);
}

/* Item Quantity and Price */
.item-quantity-price {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.quantity-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    background: var(--colorCorporativo);
    color: #fff;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.quantity-badge i {
    font-size: 12px;
}

.unit-price {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.item-total-price {
    font-size: 16px;
    color: var(--colorCorporativo);
    font-weight: 700;
}

/* Item Canon Info */
.item-canon-info {
    margin-top: 8px;
    padding: 8px;
    background: #f8f8f8;
    border-radius: 6px;
    font-size: 12px;
}

.canon-label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 600;
    color: #666;
    margin-bottom: 5px;
}

.canon-label i {
    color: var(--colorCorporativo);
}

.canon-list {
    list-style: none;
    padding: 0;
    margin: 5px 0 0 0;
}

.canon-list li {
    padding: 2px 0;
    color: #777;
}

/* Item Special Shipping */
.item-special-shipping {
    margin-top: 8px;
    padding: 6px 10px;
    background: #fff3cd;
    border-left: 3px solid #ffc107;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    color: #856404;
    display: flex;
    align-items: center;
    gap: 8px;
}

.item-special-shipping i {
    color: #ffc107;
    font-size: 14px;
}

/* Item Remove Button */
.item-remove-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    background: transparent;
    border: none;
    color: #999;
    font-size: 16px;
    width: 32px;
    height: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modern-cart-item:hover .item-remove-btn {
}

.item-remove-btn:hover {
    color: #dc3545;
    background: #fee;
    transform: scale(1.1);
}

/* Cart Footer */
.modern-cart-footer {
    padding: 20px;
    background: #f8f8f8;
    border-radius: 0 0 12px 12px;
    flex-shrink: 0;
}

/* Cart Summary */

.cart-summary {
    margin-bottom: 18px;
    background: #f8fafd;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    padding: 18px 20px 12px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 15px;
    padding: 6px 0;
    border-bottom: 1px solid #e3e8ee;
}
.summary-row:last-child {
    border-bottom: none;
}
.summary-label {
    color: #3a4a5d;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}
.summary-label i {
    font-size: 15px;
    color: var(--colorCorporativo);
    opacity: 0.7;
}
.summary-value {
    color: #222;
    font-weight: 600;
}
.summary-value.negative {
    color: #d32f2f;
}
.summary-value.positive {
    color: #28a745;
}
.summary-total {
    background: linear-gradient(90deg, var(--colorCorporativo) 0%, #2196f3 100%);
    color: #fff;
    border-radius: 10px;
    margin-top: 10px;
    padding: 14px 18px;
    font-size: 18px;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(41, 155, 165, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    letter-spacing: 0.5px;
}
.summary-total .summary-label {
    color: #fff;
    font-weight: 700;
    font-size: 17px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.summary-total .summary-label i {
    font-size: 18px;
    color: #fff;
    opacity: 0.85;
}
.summary-total .summary-value {
    color: #fff;
    font-size: 22px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.08);
}

/* Shipping Notice */

.shipping-notice {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: #fff8e1;
    border-left: 4px solid #ffc107;
    border-radius: 8px;
    font-size: 13px;
    color: #856404;
    margin-bottom: 15px;
    box-shadow: 0 1px 4px rgba(255,193,7,0.07);
}
.shipping-notice i {
    font-size: 18px;
    color: #ffc107;
    margin-right: 4px;
    opacity: 0.8;
}

/* Cart Actions */
.cart-actions {
    display: flex;
    gap: 10px;
}

.btn-view-cart,
.btn-checkout {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid var(--colorCorporativo);
    cursor: pointer;
}

.btn-view-cart {
    background: #fff;
    color: var(--colorCorporativo);
}

.btn-view-cart:hover {
    background: var(--colorCorporativo);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    text-decoration: none;
}

.btn-checkout {
    background: var(--colorCorporativo);
    color: #fff;
}

.btn-checkout:hover {
    background: #fff;
    color: var(--colorCorporativo);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    text-decoration: none;
}

/* Empty Cart */
.modern-cart-empty {
    padding: 60px 20px;
    text-align: center;
}

.empty-cart-icon {
    font-size: 60px;
    color: #ddd;
    margin-bottom: 15px;
}

.empty-cart-message {
    font-size: 16px;
    color: #999;
    margin: 0;
}

/* Scrollbar Customization */
.modern-cart-body::-webkit-scrollbar {
    width: 6px;
}

.modern-cart-body::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.modern-cart-body::-webkit-scrollbar-thumb {
    background: #c0c0c0;
    border-radius: 3px;
}

.modern-cart-body::-webkit-scrollbar-thumb:hover {
    background: #a0a0a0;
}

/* ====================================
   RESPONSIVE DESIGN
   ==================================== */

/* Tablets and Small Desktop (481px - 768px) */
@media (min-width: 481px) and (max-width: 768px) {
    .modern-cart-dropdown {
        width: 420px;
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%) translateY(-10px);
    }

    .modern-cart-dropdown.active-dropdown-menu {
        transform: translateX(-50%) translateY(0);
    }
}

/* Mobile Devices (up to 576px) */
@media (max-width: 576px) {
    .modern-cart-dropdown {
        position: fixed !important;
        top: 60px !important;
        left: 50% !important;
        right: auto !important;
        width: calc(100vw - 20px) !important;
        max-width: calc(100vw - 20px) !important;
        transform: translateX(-50%) !important;
        max-height: calc(100vh - 70px);
        border-radius: 0;
        border-top-left-radius: 16px;
        border-top-right-radius: 16px;
        margin: 0 !important;
    }
    
    .modern-cart-dropdown.active-dropdown-menu {
        transform: translateX(-50%) !important;
    }
    
    .modern-cart-body {
        max-height: 240px;
    }
    
    .modern-cart-item {
        padding: 12px 16px;
        gap: 12px;
    }
    
    .item-image-wrapper {
        width: 60px;
        height: 60px;
    }
    
    .item-name {
        font-size: 13px;
    }
    
    .item-name a {
        -webkit-line-clamp: 2;
    }
    
    .item-quantity-price {
        font-size: 12px;
    }
    
    .item-remove-btn {
        width: 28px;
        height: 28px;
        top: 12px;
        right: 16px;
    }
    
    .modern-cart-header,
    .modern-cart-footer {
        padding: 16px;
    }
    
    .modern-cart-header .cart-title {
        font-size: 16px;
    }
    
    .btn-goto-cart-full {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    .btn-goto-cart-full span {
        display: none;
    }
    
    .btn-close-cart {
        width: 28px;
        height: 28px;
        font-size: 16px;
    }
    
    .cart-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .btn-view-cart,
    .btn-checkout {
        width: 100%;
        justify-content: center;
    }
}

/* Very Small Mobile (up to 375px) */
@media (max-width: 375px) {
    .modern-cart-header .cart-title {
        font-size: 15px;
    }
    
    .modern-cart-header .items-count {
        font-size: 12px;
    }
    
    .item-name {
        font-size: 12px;
    }
    
    .quantity-badge {
        font-size: 11px;
        padding: 3px 8px;
    }
}
