/* C.T. Pundole "Add to Compare" Luxury Stylesheet */

/* --- Card & Listing Compare Button --- */
.ctp-compare-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 7px 12px;
    margin-top: 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.25s ease;
    background: #ffffff;
    border: 1.5px solid #a67c1e;
    color: #a67c1e;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    outline: none;
    text-decoration: none;
}

.ctp-compare-btn:hover {
    background: #fdfbf7;
    border-color: #c59b27;
    color: #855f13;
    text-decoration: none;
}

.ctp-compare-btn.is-active {
    background: #a67c1e;
    border-color: #a67c1e;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(166, 124, 30, 0.25);
}

.ctp-compare-btn.is-active:hover {
    background: #855f13;
    border-color: #855f13;
    color: #ffffff;
}

.ctp-compare-btn svg {
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

/* --- Product Detail Page (PDP) Trigger --- */
.ctp-pdp-compare-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    margin-top: 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.25s ease;
    background: #ffffff;
    border: 1.5px solid #a67c1e;
    color: #a67c1e;
    font-family: inherit;
    text-decoration: none;
}

.ctp-pdp-compare-btn:hover {
    background: #fef7e0;
    color: #855f13;
    text-decoration: none;
}

.ctp-pdp-compare-btn.is-active {
    background: #a67c1e;
    color: #ffffff;
    border-color: #a67c1e;
}

/* --- Floating Sticky Bottom Comparison Drawer --- */
#ctp-compare-drawer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 99999;
    background: #ffffff;
    border-top: 2px solid #a67c1e;
    box-shadow: 0 -8px 28px rgba(15, 23, 42, 0.16);
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    display: none;
}

#ctp-compare-drawer.drawer-visible {
    display: block;
    transform: translateY(0);
}

.ctp-drawer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.ctp-drawer-left {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
    overflow-x: auto;
    padding-bottom: 2px;
}

.ctp-drawer-title-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.ctp-drawer-title-icon {
    color: #a67c1e;
    font-size: 15px;
}

.ctp-drawer-title {
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    white-space: nowrap;
}

.ctp-drawer-count {
    background: #fef7e0;
    border: 1px solid #e8d7a5;
    color: #a67c1e;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 12px;
    white-space: nowrap;
}

.ctp-drawer-items-list {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
}

.ctp-drawer-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 5px 10px;
    border-radius: 6px;
    flex-shrink: 0;
    transition: border-color 0.2s ease;
}

.ctp-drawer-item:hover {
    border-color: #cbd5e1;
}

.ctp-drawer-item-thumb {
    width: 32px;
    height: 32px;
    object-fit: contain;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    padding: 2px;
}

.ctp-drawer-item-info {
    line-height: 1.25;
}

.ctp-drawer-item-name {
    font-size: 12px;
    font-weight: 700;
    color: #0f172a;
    max-width: 140px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ctp-drawer-item-price {
    font-size: 11px;
    font-weight: 600;
    color: #a67c1e;
}

.ctp-drawer-item-remove {
    background: transparent;
    border: none;
    color: #ef4444;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    padding: 0 2px;
    margin-left: 2px;
    font-weight: bold;
}

.ctp-drawer-item-remove:hover {
    color: #b91c1c;
}

.ctp-drawer-right {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}

.ctp-drawer-clear-btn {
    background: transparent;
    border: none;
    font-size: 12px;
    color: #64748b;
    text-decoration: underline;
    cursor: pointer;
    font-weight: 600;
    padding: 4px 6px;
}

.ctp-drawer-clear-btn:hover {
    color: #0f172a;
}

.ctp-drawer-compare-btn {
    background: #a67c1e;
    color: #ffffff !important;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 9px 20px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.15s ease;
}

.ctp-drawer-compare-btn:hover {
    background: #855f13;
    transform: translateY(-1px);
    text-decoration: none;
}

/* --- Toast Notification --- */
#ctp-compare-toast {
    position: fixed;
    top: 100px;
    right: 24px;
    z-index: 100000;
    background: #0f172a;
    color: #ffffff;
    padding: 12px 20px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
    border-left: 4px solid #a67c1e;
    display: none;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    animation: ctpToastFadeIn 0.3s ease;
}

@keyframes ctpToastFadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Mobile Responsiveness for Drawer --- */
@media (max-width: 768px) {
    .ctp-drawer-inner {
        padding: 10px 14px;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .ctp-drawer-left {
        width: 100%;
    }

    .ctp-drawer-right {
        justify-content: space-between;
        width: 100%;
    }

    .ctp-drawer-compare-btn {
        flex: 1;
        justify-content: center;
    }
}
