/**
 * Sticky Add to Cart for WooCommerce — Frontend Styles
 */
.kishi-sticky-atc {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: var(--kishi-atc-z-index, 9999);
    background-color: var(--kishi-atc-bar-bg, #1a1a2e);
    color: var(--kishi-atc-bar-text, #ffffff);
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.12), 0 -1px 4px rgba(0, 0, 0, 0.06);
    padding-bottom: env(safe-area-inset-bottom, 0);
}
.kishi-sticky-atc.is-visible { transform: translateY(0); }

.kishi-sticky-atc__inner {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 1280px;
    margin: 0 auto;
    padding: 10px 20px;
    min-height: 68px;
}

.kishi-sticky-atc__image { flex-shrink: 0; display: none; }
.kishi-sticky-atc__image img {
    display: block;
    width: 48px;
    height: 48px;
    border-radius: 6px;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: #fff;
}

.kishi-sticky-atc__info { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.kishi-sticky-atc__title { font-size: 14px; font-weight: 600; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.kishi-sticky-atc__price { font-size: 13px; line-height: 1.4; opacity: 0.9; }
.kishi-sticky-atc__price del { opacity: 0.6; margin-right: 6px; }
.kishi-sticky-atc__price ins { text-decoration: none; font-weight: 600; }

.kishi-sticky-atc__variations { display: flex; gap: 8px; flex-shrink: 0; }
.kishi-sticky-atc__variation-select {
    appearance: none; -webkit-appearance: none;
    background-color: rgba(255, 255, 255, 0.12);
    background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='white' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 10px center;
    border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 6px;
    color: inherit; font-size: 13px; padding: 8px 32px 8px 12px; min-width: 120px;
    cursor: pointer; transition: border-color 0.2s, background-color 0.2s;
}
.kishi-sticky-atc__variation-select:hover { border-color: rgba(255, 255, 255, 0.4); }
.kishi-sticky-atc__variation-select:focus { outline: none; border-color: rgba(255, 255, 255, 0.6); box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1); }

.kishi-sticky-atc__button {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    flex-shrink: 0; padding: 0 24px; height: 44px;
    background-color: var(--kishi-atc-button-bg, #ffffff);
    color: var(--kishi-atc-button-text, #1a1a2e);
    border: none; border-radius: 8px;
    font-size: 14px; font-weight: 700; line-height: 1; white-space: nowrap;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s, opacity 0.2s, background-color 0.3s, color 0.3s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.kishi-sticky-atc__button:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); }
.kishi-sticky-atc__button:active { transform: translateY(0); }
.kishi-sticky-atc__button:disabled, .kishi-sticky-atc__button.disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }
.kishi-sticky-atc__button.is-loading { opacity: 0.7; pointer-events: none; }
.kishi-sticky-atc__button.is-loading .kishi-sticky-atc__button-text::after { content: '…'; animation: kishi-atc-dots 1.5s steps(4, end) infinite; }
@keyframes kishi-atc-dots {
    0%, 20% { content: ''; } 40% { content: '.'; } 60% { content: '..'; } 80%, 100% { content: '...'; }
}
.kishi-sticky-atc__button-price { font-weight: 400; opacity: 0.85; font-size: 13px; }
.kishi-sticky-atc__button-icon { flex-shrink: 0; }

.kishi-sticky-atc__button.is-added { background-color: #16a34a !important; color: #ffffff !important; }
.kishi-sticky-atc__button.is-added .kishi-sticky-atc__button-icon { display: none; }

/* Hide WooCommerce duplicate View cart notice on product pages */
body.single-product .woocommerce-message { display: none !important; }

@media (min-width: 769px) {
    .kishi-sticky-atc__image { display: block; }
    .kishi-sticky-atc__inner { padding: 12px 24px; gap: 16px; }
    .kishi-sticky-atc__button { min-width: 160px; }
}
@media (max-width: 768px) {
    .kishi-sticky-atc[data-mobile-hidden="true"] { display: none; }
    .kishi-sticky-atc__inner { padding: 8px 12px; gap: 8px; min-height: 60px; }
    .kishi-sticky-atc__variations { display: none; }
    .kishi-sticky-atc__title { font-size: 13px; }
    .kishi-sticky-atc__button { padding: 0 20px; height: 40px; font-size: 13px; border-radius: 6px; }
}
@media (max-width: 400px) {
    .kishi-sticky-atc__info { display: none; }
    .kishi-sticky-atc__button { flex: 1; min-width: 0; }
}
