/* ==========================================================================
   XYVRA CRYPTO-GRID RESPONSIVE INTERFACE SHEET - REVISED DYNAMIC EDITION
   ========================================================================== */

/* Main Section Insulation Container Wrapper */
.cyber-cart-container {
    max-width: 1240px !important;
    margin: 0 auto 60px auto !important; /* Clamps layout directly to the header */
    padding: 0 24px !important;
    box-sizing: border-box !important;
}

.cyber-cart-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-family: 'Bebas Neue', sans-serif !important;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 16px;
    line-height: 1.1;

    background: linear-gradient(
        135deg,
        #c77dff 0%,
        #9d4edd 50%,
        #7b2cbf 100%
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;

    text-shadow:
        0 0 10px rgba(157, 78, 221, 0.4),
        0 0 20px rgba(157, 78, 221, 0.2);

    position: relative;
}
.cyber-cart-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 3px;
    margin-top: 10px;
    border-radius: 999px;
    background: linear-gradient(
        90deg,
        #c77dff,
        #9d4edd,
        transparent
    );
    box-shadow: 0 0 12px rgba(157, 78, 221, 0.5);
}

.custom-summary-card .cart_totals > h2 {
    color: rgb(157, 78, 221) !important;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 16px;
    line-height: 1.1;

    background: linear-gradient(
        135deg,
        #c77dff 0%,
        #9d4edd 50%,
        #7b2cbf 100%
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;

    text-shadow:
        0 0 10px rgba(157, 78, 221, 0.4),
        0 0 20px rgba(157, 78, 221, 0.2);
}

/* Flex Framework Allocation System GRID */
.cyber-cart-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 32px !important;
    width: 100% !important;
}

@media (min-width: 992px) {
    .cyber-cart-grid {
        flex-direction: row !important;
        align-items: flex-start !important;
    }
    .cyber-cart-main-panel {
        width: 68% !important;
        flex-shrink: 0 !important;
    }
    .cyber-cart-sidebar-panel {
        width: 32% !important;
        flex-shrink: 0 !important;
        position: sticky !important;
        top: 40px !important;
    }
}

/* Individual Cart Item Flex Component Row Framework */
.cyber-cart-card {
    background: rgba(255, 255, 255, 0.02) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    border-radius: 16px !important;
    padding: 24px !important;
    margin-bottom: 16px !important;
    display: flex !important;
    flex-wrap: nowrap !important; /* Prevents awkward multi-line snapping on high-end viewports */
    align-items: center !important;
    justify-content: space-between !important;
    gap: 20px !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2) !important;
    box-sizing: border-box !important;
    transition: border-color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease !important;
}

/* Subtle Card Glow Lift on Hover */
.cyber-cart-card:hover {
    background: rgba(255, 255, 255, 0.03) !important;
    border-color: rgba(157, 78, 221, 0.3) !important;
    box-shadow: 0 20px 40px rgba(157, 78, 221, 0.08) !important;
}

/* Axis Positioning Layout Maps */
.card-remove-zone    { order: 1 !important; width: auto !important; }
.card-image-zone     { order: 2 !important; width: 80px !important; flex-shrink: 0 !important; }
.card-info-zone      { order: 3 !important; flex: 1 1 auto !important; min-width: 0 !important; }
.card-controls-zone  { order: 4 !important; width: auto !important; flex-shrink: 0 !important; }
.card-total-zone     { order: 5 !important; width: auto !important; text-align: right !important; flex-shrink: 0 !important; }

/* Item Component Elements Specific Styling Overrides */
.remove-card-trigger {
    color: rgba(239, 68, 68, 0.7) !important;
    font-size: 2rem !important;
    text-decoration: none !important;
    font-weight: 300 !important;
    transition: transform 0.2s ease, color 0.2s ease !important;
    display: inline-block !important;
}
.remove-card-trigger:hover {
    transform: scale(1.15) !important;
    color: #ef4444 !important;
}

/* Enhanced: Circular styling masks with custom glowing shadow-boxes */
.card-image-zone img {
    width: 80px !important;
    height: 80px !important;
    object-fit: cover !important;
    border-radius: 10% !important;
    border: 2px solid rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4) !important;
    box-sizing: border-box !important;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease !important;
}

/* Hover matrix response for round image assets */
.cyber-cart-card:hover .card-image-zone img {
    border-color: var(--active-accent, #9d4edd) !important;
    transform: scale(1.05) !important;
    box-shadow: 0 0 15px rgba(157, 78, 221, 0.4) !important;
}

.card-meta-tag {
    font-family: 'Barlow Condensed', sans-serif !important;
    font-size: 0.7rem !important;
    color: var(--active-accent, #9d4edd) !important;
    text-transform: uppercase !important;
    letter-spacing: 2px !important;
    display: block !important;
    margin-bottom: 4px !important;
}

.card-info-zone h3 {
    margin: 0 !important;
    font-size: 1.2rem !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
}
.card-title-link {
    color: #ffffff !important;
    text-decoration: none !important;
    transition: color 0.2s ease !important;
}
.card-title-link:hover {
    color: var(--active-accent, #9d4edd) !important;
}

.card-unit-price {
    font-family: 'Barlow', sans-serif !important;
    font-size: 0.9rem !important;
    color: #888888 !important;
    margin-top: 4px !important;
}

.custom-field-label {
    display: block !important;
    font-size: 0.7rem !important;
    color: #666666 !important;
    letter-spacing: 1px !important;
    margin-bottom: 6px !important;
    text-transform: uppercase !important;
}

/* ==========================================================================
   ADVANCED QUANTITY CONTROLS (SPINNER ARROW DESTRUCTION)
   ========================================================================== */
.cyber-cart-card .quantity input.qty::-webkit-outer-spin-button,
.cyber-cart-card .quantity input.qty::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
}

.cyber-cart-card .quantity input.qty {
    -moz-appearance: textfield !important;
}

.cyber-cart-card .quantity {
    display: inline-block !important;
    position: relative !important;
}

.cyber-cart-card .quantity input.qty {
    width: 60px !important;
    height: 42px !important;
    background: rgba(0, 0, 0, 0.7) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    color: var(--active-accent, #9d4edd) !important;
    border-radius: 8px !important;
    text-align: center !important;
    font-weight: 700 !important;
    font-size: 1rem !important;
    font-family: 'Barlow', sans-serif !important;
    outline: none !important;
    letter-spacing: 0.5px !important;
    transition: all 0.2s ease-in-out !important;
}

.cyber-cart-card .quantity input.qty:hover {
    border-color: rgba(157, 78, 221, 0.5) !important;
    background: rgba(0, 0, 0, 0.8) !important;
    box-shadow: 0 0 10px rgba(157, 78, 221, 0.15) !important;
}

.cyber-cart-card .quantity input.qty:focus {
    border-color: var(--active-accent, #9d4edd) !important;
    box-shadow: 0 0 15px rgba(157, 78, 221, 0.3) !important;
    background: rgba(0, 0, 0, 0.9) !important;
}

.card-total-price {
    font-family: 'Barlow', sans-serif !important;
    font-size: 1.25rem !important;
    font-weight: 700 !important;
    color: var(--active-accent, #9d4edd) !important;
}

/* Actions Operational Bottom Interface Strip */
.cyber-cart-action-toolbar {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 16px !important;
    margin-top: 24px !important;
}

.custom-coupon-block {
    display: flex !important;
    gap: 10px !important;
}

/* Enhanced Coupon Input Fields */
.cyber-input {
    background: rgba(0, 0, 0, 0.6) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: #ffffff !important;
    padding: 0 16px !important;
    border-radius: 8px !important;
    width: 180px !important;
    height: 44px !important;
    outline: none !important;
    transition: all 0.2s ease !important;
}
.cyber-input:hover {
    border-color: rgba(157, 78, 221, 0.4) !important;
}
.cyber-input:focus {
    border-color: var(--active-accent, #9d4edd) !important;
    box-shadow: 0 0 10px rgba(157, 78, 221, 0.2) !important;
    background: rgba(0, 0, 0, 0.8) !important;
}

.cyber-btn-secondary {
    background: rgba(255, 255, 255, 0.02) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: #ffffff !important;
    height: 44px !important;
    padding: 0 24px !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    font-size: 0.8rem !important;
    transition: all 0.2s ease !important;
}
.cyber-btn-secondary:hover {
    background: rgba(157, 78, 221, 0.08) !important;
    border-color: var(--active-accent, #9d4edd) !important;
    color: #ffffff !important;
    box-shadow: 0 0 15px rgba(157, 78, 221, 0.2) !important;
}

/* Sidebar Totals Breakdown Overhaul Module Rules */
.custom-summary-card {
    background: rgba(255, 255, 255, 0.01) !important;
    border: 1px solid rgba(255, 255, 255, 0.04) !important;
    border-radius: 16px !important;
    padding: 28px !important;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4) !important;
}

.custom-summary-card h2,
.custom-summary-card .cyber-totals-heading {
    font-family: 'Bebas Neue', sans-serif !important;
    font-size: 1.6rem !important;
    letter-spacing: 1px !important;
    color: #ffffff !important;
    margin-bottom: 24px !important;
    text-transform: uppercase !important;
}

.custom-summary-card table {
    width: 100% !important;
    border-collapse: collapse !important;
    margin-bottom: 24px !important;
}

.custom-summary-card table tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
}

.custom-summary-card table th, 
.custom-summary-card table td {
    padding: 14px 0 !important;
    font-size: 0.95rem !important;
    background: transparent !important;
}

.custom-summary-card table th {
    text-align: left !important;
    color: #888888 !important;
    font-weight: 500;
    text-transform: uppercase !important;
    font-family: 'Barlow Condensed', sans-serif !important;
    letter-spacing: 1px !important;
}

.custom-summary-card table td {
    text-align: right !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    font-family: 'Barlow', sans-serif !important;
}

.custom-summary-card table td amount,
.custom-summary-card table td .woocommerce-Price-amount {
    color: #ffffff !important;
    transition: color 0.2s ease !important;
}

/* Total Gross Panel Accents */
.custom-summary-card .order-total th {
    color: var(--active-accent, #9d4edd) !important;
    font-family: 'Bebas Neue', sans-serif !important;
    font-size: 1.5rem !important;
    letter-spacing: 1px !important;
}
.custom-summary-card .order-total td,
.custom-summary-card .order-total td .woocommerce-Price-amount {
    color: var(--active-accent, #9d4edd) !important;
    font-size: 1.6rem !important;
    font-weight: 800 !important;
    text-shadow: 0 0 10px rgba(157, 78, 221, 0.2) !important;
}

/* Main Call to Action Gateway Checkout Link Styling Button */
.woocommerce .wc-proceed-to-checkout a.checkout-button {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    background: var(--active-accent, #9d4edd) !important;
    color: #000000 !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    height: 52px !important;
    border-radius: 10px !important;
    text-decoration: none !important;
    margin-top: 16px !important;
    box-shadow: 0 10px 25px rgba(157, 78, 221, 0.2) !important;
    transition: all 0.3s ease !important;
}
.woocommerce .wc-proceed-to-checkout a.checkout-button:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 15px 35px rgba(157, 78, 221, 0.5) !important;
    color: #ffffff !important;
    background: #b577e6 !important;
}

/* ==========================================================================
   COMPRESSION SYSTEM ENGINE: MOBILE & TABLET MEDIA QUERY OVERRIDES
   ========================================================================== */

@media (max-width: 991px) and (min-width: 769px) {
    /* Tablet Balancing Mode: Keep cards running in lines but redistribute shrinking priorities */
    .cyber-cart-card {
        padding: 16px !important;
        gap: 12px !important;
    }
    .card-image-zone, .card-image-zone img {
        width: 65px !important;
        height: 65px !important;
    }
    .card-info-zone h3 {
        font-size: 1.05rem !important;
    }
}

@media (max-width: 768px) {
    /* Smartphone Viewport Optimization */
    .cyber-cart-container {
        padding: 0 16px !important;
    }

    .cyber-cart-card {
        flex-direction: row !important; /* Block items are split to stack natively over zones */
        flex-wrap: wrap !important;
        padding: 20px 16px !important;
        gap: 16px !important;
    }

    /* Core Layout Structural Redistribution Matrix */
    .card-remove-zone {
        order: 1 !important;
        width: 10% !important;
    }
    .card-image-zone {
        order: 2 !important;
        width: 70px !important;
        height: 70px !important;
    }
    .card-image-zone img {
        width: 70px !important;
        height: 70px !important;
    }
    .card-info-zone {
        order: 3 !important;
        flex: 1 1 calc(90% - 90px) !important; /* Dynamically spans space adjacent to image */
        text-align: left !important;
    }
    .card-controls-zone {
        order: 4 !important;
        width: 50% !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
    }
    .card-total-zone {
        order: 5 !important;
        width: calc(50% - 16px) !important;
        text-align: right !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
    }

    .card-info-zone h3 {
        font-size: 1.1rem !important;
    }

    /* Toolbar Blocks Adjustments */
    .cyber-cart-action-toolbar {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 14px !important;
    }
    .custom-coupon-block {
        flex-direction: row !important; /* Keep input and apply coupon side by side */
        width: 100% !important;
    }
    .cyber-input {
        flex: 1 !important;
        width: auto !important;
    }
    .custom-coupon-block .cyber-btn-secondary {
        width: auto !important;
    }
    .cyber-cart-action-toolbar > .cyber-btn-secondary {
        width: 100% !important; /* Update Cart becomes a solid action block */
    }
    
    /* Totals Summary Panel Overhauls */
    .custom-summary-card {
        padding: 20px !important;
    }
}

/* Empty Cart Warning States */
.cart-empty-alert {
    text-align: center !important;
    background: rgba(255, 255, 255, 0.02) !important;
    border: 1px dashed rgba(255, 255, 255, 0.1) !important;
    border-radius: 16px !important;
    padding: 60px 40px !important;
    margin: 40px auto !important;
    max-width: 600px !important;
}

.cart-empty-alert p {
    font-size: 1.2rem !important;
    color: #888888 !important;
    margin-bottom: 24px !important;
}

/* ==========================================================================
   CYBER SUB-TEMPLATE SIDEBAR MATRIX STRUCTURAL ALIGNMENTS (FALLBACK RECON)
   ========================================================================== */
.custom-summary-card-inner {
    width: 100% !important;
    box-sizing: border-box !important;
}

.cyber-totals-row {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
}

.cyber-totals-label {
    text-align: left !important;
    color: #888888 !important;
    font-weight: 500 !important;
    text-transform: uppercase !important;
    font-family: 'Barlow Condensed', sans-serif !important;
    letter-spacing: 1px !important;
}

.cyber-totals-value {
    text-align: right !important;
    color: #ffffff !important;
    font-weight: 600 !important;
}

/* Shipping Inner Elements Realignment Overrides */
.custom-summary-card ul#shipping_method {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    text-align: right !important;
}

.custom-summary-card ul#shipping_method li {
    margin-bottom: 8px !important;
    color: #ffffff !important;
}

/* Final Gross Total Highlights via Fallback Selectors */
.custom-summary-card tr.order-total th {
    color: var(--active-accent, #9d4edd) !important;
    font-family: 'Bebas Neue', sans-serif !important;
}

.custom-summary-card tr.order-total td,
.custom-summary-card tr.order-total td strong {
    color: var(--active-accent, #9d4edd) !important;
    font-size: 1.6rem !important;
    font-weight: 800 !important;
}

.cyber-checkout-action-area {
    margin-top: 10px !important;
    width: 100% !important;
}

/* ==========================================================================
   GLOBAL PARENT WRAPPER OVERRIDES (FORCING WHITE SPACE ELIMINATION)
   ========================================================================== */
.woocommerce-cart #primary, 
.woocommerce-cart main, 
.woocommerce-cart .entry-content {
    padding-top: 0 !important;
    margin-top: 0 !important;
}