/* ========================================
   Offcanvas Product Index - Luxe Peptides
   Theme: Dark luxury (#282828 / #F7CC7F)
   ======================================== */

/* --- Floating Button --- */
#cpo-floating-btn {
    position: fixed;
    left: 0;
    top: 200px;
    z-index: 9998;
    padding: 14px 18px;
    background: #282828;
    color: #F7CC7F;
    border: 1px solid #F7CC7F;
    border-left: none;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0.02em;
    transition: background 0.2s, color 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}
#cpo-floating-btn:hover {
    background: #F7CC7F;
    color: #282828;
}
#cpo-floating-btn svg {
    width: 8px;
    height: 14px;
}

/* --- Offcanvas Panel --- */
#cpo-offcanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 440px;
    height: 100vh;
    background: #1a1a1a;
    color: #e8e8e8;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.5);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
#cpo-offcanvas.active {
    transform: translateX(0);
}

/* --- Header --- */
.cpo-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #333;
}
.cpo-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #F7CC7F;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.cpo-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid #555;
    border-radius: 6px;
    color: #aaa;
    font-size: 22px;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
    padding: 0;
    line-height: 1;
}
.cpo-close:hover {
    border-color: #F7CC7F;
    color: #F7CC7F;
}

/* --- Search --- */
.cpo-search-bar {
    padding: 12px 24px;
    border-bottom: 1px solid #333;
}
#cpo-search {
    width: 100%;
    padding: 10px 14px;
    background: #282828;
    border: 1px solid #444;
    border-radius: 6px;
    color: #e8e8e8;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}
#cpo-search:focus {
    border-color: #F7CC7F;
}
#cpo-search::placeholder {
    color: #777;
}

/* --- Product List --- */
.cpo-body {
    flex: 1;
    overflow-y: auto;
    padding: 8px 24px;
}
.cpo-body::-webkit-scrollbar {
    width: 6px;
}
.cpo-body::-webkit-scrollbar-track {
    background: transparent;
}
.cpo-body::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 3px;
}

/* --- Product Row --- */
.cpo-product {
    padding: 14px 0;
    border-bottom: 1px solid #2a2a2a;
}
.cpo-product h4 {
    margin: 0 0 8px;
    font-size: 15px;
    font-weight: 500;
}
.cpo-product h4 a {
    color: #e8e8e8;
    text-decoration: none;
    transition: color 0.15s;
}
.cpo-product h4 a:hover {
    color: #F7CC7F;
}

/* Actions row: pills + qty/add */
.cpo-product-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

/* --- Variant Pills --- */
.variant-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    flex: 1;
}
.variant-pill {
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 500;
    background: #282828;
    color: #ccc;
    border: 1px solid #444;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}
.variant-pill:hover {
    border-color: #F7CC7F;
    color: #F7CC7F;
}
.variant-pill.variant-selected {
    background: #F7CC7F;
    color: #1a1a1a;
    border-color: #F7CC7F;
    font-weight: 600;
}
.variant-pill.in-cart {
    border-color: #F7CC7F;
}

/* Single variant label */
.cpo-single-variant-label {
    font-size: 12px;
    color: #999;
    flex: 1;
}

/* --- Quantity Controls --- */
.cpo-qty-wrap {
    display: flex;
    align-items: center;
    gap: 0;
    flex-shrink: 0;
    margin-left: auto;
}
.cpo-qty-btn {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #282828;
    border: 1px solid #444;
    color: #e8e8e8;
    cursor: pointer;
    font-size: 16px;
    transition: border-color 0.15s, color 0.15s;
    padding: 0;
}
.cpo-qty-btn:hover {
    border-color: #F7CC7F;
    color: #F7CC7F;
}
.cpo-qty-btn.dec {
    border-radius: 4px 0 0 4px;
}
.cpo-qty-btn.inc {
    border-radius: 0 4px 4px 0;
}
.cpo-qty {
    width: 38px;
    height: 30px;
    text-align: center;
    background: #1a1a1a;
    border: 1px solid #444;
    border-left: none;
    border-right: none;
    color: #e8e8e8;
    font-size: 14px;
    -moz-appearance: textfield;
    box-sizing: border-box;
}
.cpo-qty::-webkit-outer-spin-button,
.cpo-qty::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* --- Add to Cart Button --- */
.cpo-add-to-cart {
    padding: 6px 14px;
    background: transparent;
    border: 1px solid #F7CC7F;
    border-radius: 4px;
    color: #F7CC7F;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
    flex-shrink: 0;
    margin-left: auto;
}
.cpo-add-to-cart:hover {
    background: #F7CC7F;
    color: #1a1a1a;
}
.cpo-add-to-cart:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* --- Footer / Checkout --- */
.cpo-footer {
    padding: 16px 24px;
    border-top: 1px solid #333;
    background: #1a1a1a;
}
.cpo-checkout-btn {
    display: block;
    width: 100%;
    padding: 14px;
    background: #F7CC7F;
    color: #1a1a1a;
    font-size: 15px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    letter-spacing: 0.02em;
    transition: background 0.2s;
    box-sizing: border-box;
}
.cpo-checkout-btn:hover {
    background: #e5b96e;
    color: #1a1a1a;
}

/* --- Responsive --- */
@media (max-width: 991px) {
    #cpo-floating-btn {
        top: 180px;
        padding: 10px 14px;
        font-size: 13px;
        transform: rotate(-90deg);
        transform-origin: left top;
        left: 0;
        border-radius: 0 0 8px 8px;
        border: 1px solid #F7CC7F;
        border-top: none;
    }
    #cpo-floating-btn svg {
        transform: rotate(90deg);
    }
}
@media (max-width: 576px) {
    #cpo-offcanvas {
        width: 100%;
    }
    #cpo-floating-btn span {
        font-size: 12px;
    }
}
