@keyframes cekonay-shake {
    10%,90% { transform: translate3d(-1px, 0, 0); }
    20%,80% { transform: translate3d(2px, 0, 0); }
    30%,50%,70% { transform: translate3d(-4px, 0, 0); }
    40%,60% { transform: translate3d(4px, 0, 0); }
}
@keyframes cekonay-spin {
    to { transform: rotate(360deg); }
}
.cekonay-flycart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(23, 23, 25, 0.58);
    z-index: 99998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    backdrop-filter: blur(4px);
}
.cekonay-flycart-container {
    position: fixed;
    top: 0;
    left: 100%;
    width: 100%;
    max-width: 440px;
    height: 100%;
    background: #fff;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    transition: left 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    /* Ombre seulement panier ouvert : fermé, elle débordait sur le bord droit de toutes les pages. */
    box-shadow: none;
}
body.cekonay-flycart-open { overflow: hidden; }
body.cekonay-flycart-open .cekonay-flycart-overlay { opacity: 1; visibility: visible; }
body.cekonay-flycart-open .cekonay-flycart-container { left: calc(100% - 440px); box-shadow: -18px 0 48px rgba(23, 23, 25, 0.18); }
.cekonay-flycart-header {
    min-height: 64px;
    padding: 10px 16px 10px 20px;
    padding-top: max(10px, env(safe-area-inset-top));
    background: #171719;
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    transition: background-color 0.3s ease, color 0.3s ease;
}
body.cekonay-dark-mode .cekonay-flycart-header {
    background: #171719; color: #fff;
}
.cekonay-flycart-header h3 { margin: 0; font-size: 18px; font-weight: 700; color: inherit; letter-spacing: -.01em; }
body.cekonay-dark-mode .cekonay-flycart-header h3 {
    color: #fff !important;
}
.cekonay-flycart-close {
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    transition: transform 0.3s ease, opacity 0.3s ease, color 0.3s ease;
    opacity: 0.82;
}
body.cekonay-dark-mode .cekonay-flycart-close {
    color: #fff;
}
.cekonay-flycart-close:hover { opacity: 1; transform: scale(1.1); }
.cekonay-flycart-wrapper { display: flex; flex-direction: column; flex-grow: 1; overflow: hidden; }
.cekonay-flycart-content {
    flex-grow: 1;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 18px 0;
    background: #f6f3ef;
}
body.cekonay-dark-mode .cekonay-flycart-content {
    background: #f6f3ef;
}
.cekonay-flycart-content::-webkit-scrollbar { width: 8px; }
.cekonay-flycart-content::-webkit-scrollbar-track { background: #f1f1f1; }
.cekonay-flycart-content::-webkit-scrollbar-thumb { background: #ccc; border-radius: 4px; }
.cekonay-flycart-content::-webkit-scrollbar-thumb:hover { background: #999; }
.cekonay-flycart-items { padding: 0; }
.cekonay-flycart-item { padding: 0 18px; margin: 12px 0 0; position: relative; }
.cekonay-flycart-item:first-child { margin-top: 0; }
.cekonay-flycart-item-inner {
    padding: 12px;
    display: flex;
    align-items: flex-start;
    background: #ffffff;
    border: 1px solid #e6e1da;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(31, 28, 24, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}
.cekonay-flycart-item-inner:hover { box-shadow: 0 12px 30px rgba(31, 28, 24, 0.10); }
.cekonay-flycart-item-image-qty {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 90px;
    flex: 0 0 90px;
    margin-right: 12px;
}
.cekonay-flycart-item-image {
    width: 80px;
    height: 80px;
    overflow: hidden;
    border-radius: 12px;
    margin-bottom: 8px;
}
.cekonay-flycart-item-image img { width: 100%; height: 100%; object-fit: cover; border-radius: 12px; }
.cekonay-flycart-qty { display: flex; align-items: center; justify-content: center; }
.cekonay-flycart-qty-btn {
    width: 29px;
    height: 32px;
    background: #1c71e3;
    border: none;
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: transform 0.18s ease, background 0.18s ease;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    box-shadow: none;
}
.cekonay-flycart-qty-btn:hover { background: #155fca; transform: translateY(-1px); box-shadow: none; }
.cekonay-flycart-qty-btn:active { transform: scale(0.98); }
.cekonay-flycart-qty-minus { border-radius: 4px 0 0 4px; }
.cekonay-flycart-qty-plus { border-radius: 0 4px 4px 0; }
.cekonay-flycart-qty-input {
    width: 32px;
    height: 32px;
    text-align: center;
    border: none;
    background: #eef5ff;
    color: #171719;
    font-size: 14px;
    font-weight: 600;
    padding: 0;
    -moz-appearance: textfield;
}
.cekonay-flycart-qty-input::-webkit-inner-spin-button,
.cekonay-flycart-qty-input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.cekonay-flycart-qty-input:focus { outline: none; }
.cekonay-flycart-item-details { flex-grow: 1; display: flex; flex-direction: column; min-width: 0; }
.cekonay-flycart-item-name { max-width: calc(100% - 34px); margin: 0 0 6px; color: #171719; font-size: 14px; font-weight: 700; line-height: 1.35; }
.cekonay-flycart-item-name a { color: #171719; text-decoration: none; }
.cekonay-flycart-item-name a:hover { color: #1c71e3; }
.cekonay-flycart-item-data {
    font-size: 11px;
    color: #67635f;
    margin: 4px 0;
    line-height: 1.4;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 10px;
    align-items: center;
}
.cekonay-flycart-item-data p,
.cekonay-flycart-item-data dl { margin: 0; padding: 0; display: inline-flex; flex-wrap: wrap; gap: 3px; }
.cekonay-flycart-item-data dt { font-weight: 600; display: inline; margin: 0; }
.cekonay-flycart-item-data dd { display: inline; margin: 0; }
.cekonay-flycart-item-data dd:after { content: ' | '; display: inline; margin: 0 4px; color: #ccc; }
.cekonay-flycart-item-data dd:last-child:after { content: ''; }
.cekonay-flycart-item-price { margin: 2px 0 4px; color: #67635f; font-size: 13px; }
.cekonay-flycart-item-price .amount { color: #171719; font-weight: 700; }
.cekonay-flycart-item-remove {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    background: #fff;
    border: 1px solid #e6e1da;
    border: none;
    border-radius: 50%;
    color: #67635f;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    opacity: 0.72;
    transition: opacity 0.3s ease, transform 0.3s ease;
    display: flex;
    align-items: baseline;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
}
.cekonay-flycart-item-inner:hover .cekonay-flycart-item-remove { opacity: 1; }
.cekonay-flycart-item-remove:hover { color: #b42318; border-color: #f0c8c4; transform: translateY(-1px); }
.cekonay-flycart-empty { display: grid; min-height: 320px; place-content: center; justify-items: center; padding: 48px 24px; color: #67635f; text-align: center; }
.cekonay-flycart-empty-icon { margin-bottom: 14px; font-size: 46px; line-height: 1; opacity: 0.5; }
.cekonay-flycart-empty-text { max-width: 280px; color: #67635f; font-size: 16px; line-height: 1.45; }
.cekonay-flycart-wrapper:has(.cekonay-flycart-empty) .cekonay-flycart-footer { display: none; }
.cekonay-flycart-footer {
    padding: 18px 20px;
    padding-bottom: max(18px, env(safe-area-inset-bottom));
    background: #fff;
    border-top: 1px solid #e0e0e0;
    flex-shrink: 0;
}
body.cekonay-dark-mode .cekonay-flycart-footer {
    background: #fff;
}
.cekonay-flycart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    color: #171719;
    font-size: 15px;
    font-weight: 700;
}
.cekonay-flycart-total-label { color: #67635f; }
.cekonay-flycart-total-amount { color: #171719; font-size: 19px; }
.cekonay-flycart-actions { display: flex; gap: 10px; }
.cekonay-flycart-btn {
    flex: 1;
    min-height: 48px;
    padding: 0 18px;
    border: none;
    border-radius: 98px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: background .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.cekonay-flycart-btn-cart {
    background: #fff;
    color: #1c71e3;
    border: 1px solid #1c71e3;
    font-weight: 700;
    transition: all 0.3s ease;
}
.cekonay-flycart-btn-cart:hover {
    background: #eef5ff;
    border-color: #155fca;
    color: #155fca;
    transform: translateY(-2px);
    box-shadow: none;
}
.cekonay-flycart-btn-checkout {
    background: #1c71e3;
    color: #ffffff;
    font-weight: 700;
    border: none;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(28, 113, 227, 0.20);
}
.cekonay-flycart-btn-checkout:hover {
    background: #155fca;
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(28, 113, 227, 0.24);
}
.cekonay-flycart-count {
    position: fixed;
    bottom: max(20px, env(safe-area-inset-bottom, 20px));
    right: max(20px, env(safe-area-inset-right, 20px));
    width: 60px;
    height: 60px;
    background: #1c71e3;
    border-radius: 50%;
    box-shadow: 0 10px 24px rgba(28, 113, 227, 0.28);
    cursor: pointer;
    z-index: 99997;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    pointer-events: auto !important;
}
.cekonay-flycart-count:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 14px 30px rgba(28, 113, 227, 0.34);
}
.cekonay-flycart-count svg { width: 26px; height: 26px; color: #ffffff; stroke: #ffffff; fill: none; }
.cekonay-flycart-count-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 22px;
    height: 22px;
    background: #ff4444;
    color: #fff;
    border-radius: 11px;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
/* Keep the reCAPTCHA privacy badge clear of the floating cart on product pages. */
body.single-product .grecaptcha-badge {
    bottom: max(96px, calc(env(safe-area-inset-bottom, 0px) + 84px)) !important;
    z-index: 99996 !important;
}
body.cekonay-product-body-pilot.single-product .grecaptcha-badge {
	visibility: hidden !important;
}
body.cekonay-product-body-pilot .cekonay-recaptcha-notice {
	margin: 9px 0 0;
	color: #77716b;
	font-size: 10px;
	line-height: 1.4;
}
body.cekonay-product-body-pilot .cekonay-recaptcha-notice a {
	color: inherit;
	text-decoration: underline;
}
@media (max-width: 767px) {
    body.single-product .grecaptcha-badge {
		right: calc(env(safe-area-inset-right, 0px) - 186px) !important;
		left: auto !important;
		bottom: max(86px, calc(env(safe-area-inset-bottom, 0px) + 74px)) !important;
    }
}
.cekonay-flycart-shake { animation: cekonay-shake 0.5s; }
.cekonay-flycart-count-empty { display: none !important; }
.cekonay-flycart-loading { pointer-events: none; opacity: 0.6; }
.cekonay-flycart-loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    margin: -12px 0 0 -12px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #1c71e3;
    border-radius: 50%;
    animation: cekonay-spin 1s linear infinite;
    z-index: 100000;
}
@media (max-width: 768px) {
    .cekonay-flycart-content {
        padding-left: max(0px, env(safe-area-inset-left));
        padding-right: max(0px, env(safe-area-inset-right));
    }
    .cekonay-flycart-count { width: 56px; height: 56px; }
    .cekonay-flycart-item-remove { opacity: 1; }
}

@media (max-width: 560px) {
    .cekonay-flycart-container { max-width: 100%; }
    body.cekonay-flycart-open .cekonay-flycart-container { left: 0; }
}

@media (max-width: 922px) {
    .page-template-chat-secure .cekonay-flycart-count {
        bottom: max(153px, env(safe-area-inset-bottom, 20px));
    }
    .page-template-chat-secure.cekonay-devis-open .cekonay-flycart-count,
    .page-template-chat-secure.cekonay-input-active .cekonay-flycart-count {
        bottom: max(294px, env(safe-area-inset-bottom, 20px));
    }
    .page-template-chat-secure .cekonay-fab {
        display: none !important;
    }
}
@media (max-width: 480px) {
    .cekonay-flycart-header {
        min-height: 60px;
        padding-left: max(16px, env(safe-area-inset-left));
        padding-right: max(10px, env(safe-area-inset-right));
    }
    .cekonay-flycart-header h3 { font-size: 17px; }
    .cekonay-flycart-item { padding-right: 12px; padding-left: 12px; }
    .cekonay-flycart-item-inner { padding: 11px; }
    .cekonay-flycart-item-image-qty { width: 90px; flex-basis: 90px; margin-right: 10px; }
    .cekonay-flycart-item-image { width: 72px; height: 72px; }
    .cekonay-flycart-qty-input { font-size: 16px; }
    .cekonay-flycart-empty { min-height: 280px; padding: 40px 20px; }
    .cekonay-flycart-empty-text { font-size: 15px; }
    .cekonay-flycart-footer {
        padding: 14px max(14px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
    }
    .cekonay-flycart-actions { flex-direction: column; gap: 8px; }
    .cekonay-flycart-btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
