/* ==========================================
   GRADYZER MENU - CART MODAL CSS
   Shopping Cart Sidebar Styles
   Version: 2.9.1
   ========================================== */

/* Cart Icon & Badge */
.gradyzer-vault-cart {
    display: none;
    position: relative;
}

.gradyzer-cart-btn {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.2);
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
    position: relative;
    z-index: 10002;
    /* Mobile touch optimization */
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(255,255,255,0.2);
    pointer-events: auto;
    user-select: none;
    -webkit-user-select: none;
}

/* Expanded hit area for mobile */
.gradyzer-cart-btn::before {
    content: '';
    position: absolute;
    top: -15px;
    left: -15px;
    right: -15px;
    bottom: -15px;
    z-index: -1;
}

.gradyzer-cart-btn svg {
    stroke: #ffffff;
}

.gradyzer-cart-btn:hover {
    background: rgba(255,255,255,0.3);
    border-color: rgba(255,255,255,0.4);
    transform: scale(1.05);
}

.gradyzer-cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #6c757d;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    color: #ffffff;
    transition: all 0.3s ease;
}

.gradyzer-cart-badge.has-items {
    background: #dc3545;
    animation: gradyzer-pulse 2s ease-in-out infinite;
}

@keyframes gradyzer-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* Cart Sidebar */
.gradyzer-cart-sidebar {
    position: fixed;
    top: 0;
    right: -420px;
    width: 420px;
    height: 100vh;
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border-left: 3px solid rgba(255,255,255,0.15);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    transition: right 0.4s cubic-bezier(0.4,0,0.2,1);
    box-shadow: -4px 0 24px rgba(0,0,0,0.2);
}

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

.gradyzer-cart-sidebar-header {
    padding: 20px 25px;
    border-bottom: 2px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.gradyzer-cart-sidebar-header h3 {
    margin: 0;
    color: #ffffff;
    font-size: 20px;
    font-weight: 700;
}

.gradyzer-cart-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(220,53,69,0.3);
    border: 2px solid rgba(220,53,69,0.5);
    border-radius: 50%;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
    flex-shrink: 0;
}

.gradyzer-cart-close svg {
    display: block;
    width: 20px;
    height: 20px;
}

.gradyzer-cart-close:hover {
    background: rgba(220,53,69,0.5);
    border-color: rgba(220,53,69,0.7);
    transform: rotate(90deg);
}

.gradyzer-cart-sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.gradyzer-cart-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #ffffff;
}

.gradyzer-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255,255,255,0.2);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: gradyzer-spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes gradyzer-spin {
    to { transform: rotate(360deg); }
}

.gradyzer-cart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #ffffff;
    text-align: center;
}

.gradyzer-cart-empty svg {
    width: 80px;
    height: 80px;
    opacity: 0.5;
    margin-bottom: 20px;
    stroke: #ffffff;
}

.gradyzer-cart-empty p {
    font-size: 16px;
    opacity: 0.8;
    color: #ffffff;
}

.gradyzer-cart-items {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.gradyzer-cart-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    background: rgba(255,255,255,0.1);
    border: 2px solid rgba(255,255,255,0.15);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.gradyzer-cart-item:hover {
    background: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.25);
}

.gradyzer-cart-item-image {
    width: 70px;
    height: 70px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(0,0,0,0.2);
}

.gradyzer-cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gradyzer-cart-item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.gradyzer-cart-item-name {
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 5px;
    line-height: 1.4;
}

.gradyzer-cart-item-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: rgba(255,255,255,0.7);
}

.gradyzer-cart-item-price {
    color: rgba(255,255,255,0.9);
    font-weight: 600;
}

.gradyzer-cart-item-remove {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(220,53,69,0.3);
    border: 2px solid rgba(220,53,69,0.5);
    border-radius: 8px;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    align-self: center;
    padding: 0;
}

.gradyzer-cart-item-remove svg {
    stroke: #ffffff;
    display: block;
    width: 16px;
    height: 16px;
}

.gradyzer-cart-item-remove:hover {
    background: rgba(220,53,69,0.5);
    border-color: rgba(220,53,69,0.7);
    transform: scale(1.1);
}

.gradyzer-cart-sidebar-footer {
    padding: 20px 25px;
    border-top: 2px solid rgba(255,255,255,0.1);
}

.gradyzer-cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 15px;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    color: #ffffff;
    font-size: 18px;
    font-weight: 700;
}

.gradyzer-checkout-btn,
.gradyzer-view-cart-btn {
    display: block;
    width: 100%;
    padding: 14px 20px;
    text-align: center;
    text-decoration: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.gradyzer-checkout-btn {
    background: rgba(255,255,255,0.3);
    border: 2px solid rgba(255,255,255,0.4);
    color: #ffffff;
    margin-bottom: 10px;
}

.gradyzer-checkout-btn:hover {
    background: rgba(255,255,255,0.4);
    border-color: rgba(255,255,255,0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.gradyzer-view-cart-btn {
    background: rgba(255,255,255,0.1);
    border: 2px solid rgba(255,255,255,0.2);
    color: rgba(255,255,255,0.9);
}

.gradyzer-view-cart-btn:hover {
    background: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.3);
}

/* Responsive Cart */
@media (max-width: 991px) {
    .gradyzer-cart-sidebar {
        width: 100%;
        right: -100%;
    }
    
    .gradyzer-cart-sidebar.active {
        right: 0;
    }
}

@media (max-width: 480px) {
    .gradyzer-cart-sidebar {
        width: 100%;
    }
    
    .gradyzer-cart-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .gradyzer-cart-item-image {
        width: 100%;
        height: 150px;
    }
}

/* Custom Scrollbar for Cart */
.gradyzer-cart-sidebar-content::-webkit-scrollbar {
    width: 6px;
}

.gradyzer-cart-sidebar-content::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.08);
    border-radius: 3px;
}

.gradyzer-cart-sidebar-content::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.25);
    border-radius: 3px;
}

.gradyzer-cart-sidebar-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.35);
}

/* Cart Menu Positioning */
@media (min-width: 992px) {
    .gradyzer-vault-has-cart .gradyzer-vault-cart {
        display: flex !important;
    }
    
    /* When cart is enabled, adjust contact button positioning */
    .gradyzer-vault-has-cart .desktop-contact {
        order: 2;
        margin-right: 10px;
    }
    
    .gradyzer-vault-has-cart .gradyzer-vault-cart {
        order: 3;
    }
}

@media (max-width: 991px) {
    .gradyzer-vault-has-cart .mobile-message {
        display: none;
    }
    
    .gradyzer-vault-has-cart .gradyzer-vault-cart {
        display: flex;
    }
}
