/**
 * Crista Shop Icons - Styles
 */

/* --- Wrapper & Icons --- */
.crista-shop-icons {
    display: flex;
    align-items: center;
    gap: 15px;
    /* Default gap */
}

.crista-shop-icons__item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    line-height: 1;
}

.crista-shop-icons__item a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: inherit;
    text-decoration: none;
}

.crista-shop-icons__icon {
    font-size: 16px;
    /* Default size */
    transition: color 0.3s;
}

/* --- Cart Count Badge --- */
.crista-shop-icons__count {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #ff0000;
    color: #fff;
    font-size: 10px;
    font-weight: bold;
    min-width: 16px;
    height: 16px;
    line-height: 16px;
    text-align: center;
    border-radius: 50%;
    padding: 0 4px;
    pointer-events: none;
}

/* --- Search Modal --- */
.crista-search-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.crista-search-modal--open {
    opacity: 1;
    visibility: visible;
}

.crista-search-modal__close {
    position: absolute;
    top: 30px;
    right: 30px;
    background: none;
    border: none;
    color: #fff;
    font-size: 30px;
    cursor: pointer;
}

.crista-search-modal__form {
    width: 80%;
    max-width: 800px;
    position: relative;
}

.crista-search-modal__input {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 2px solid #fff;
    color: #fff;
    font-size: 32px;
    padding: 15px 50px 15px 0;
    outline: none;
}

.crista-search-modal__input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.crista-search-modal__submit {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
}


/* --- Cart Drawer --- */
.crista-cart-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 99998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.crista-cart-drawer-overlay--open {
    opacity: 1;
    visibility: visible;
}

.crista-cart-drawer {
    position: fixed;
    top: 0;
    right: -400px;
    /* Hidden by default */
    width: 350px;
    max-width: 100%;
    height: 100%;
    background-color: #fff;
    z-index: 99999;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.crista-cart-drawer--open {
    transform: translateX(-400px);
    /* Matches default width + some buffer? No, simple translate. */
    right: 0;
    /* Reset right to 0 and use transform, or just toggle right? Let's use transform for better performance usually, but right is easier for width changes. Let's use right property transition or transform 100%. */
}

/* Better drawer transition */
.crista-cart-drawer {
    right: 0;
    transform: translateX(100%);
}

.crista-cart-drawer--open {
    transform: translateX(0);
}

.crista-cart-drawer--left {
    left: 0;
    right: auto;
    transform: translateX(-100%);
}

.crista-cart-drawer--left.crista-cart-drawer--open {
    transform: translateX(0);
}


.crista-cart-drawer__header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.crista-cart-drawer__title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.crista-cart-drawer__close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
}

.crista-cart-drawer__content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

/* WooCommerce Mini Cart Overrides */
.crista-cart-drawer .widget_shopping_cart_content {
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

.crista-cart-drawer ul.woocommerce-mini-cart {
    flex: 1;
}

.crista-cart-drawer .woocommerce-mini-cart__total {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid #eee;
    font-size: 18px;
    display: flex;
    justify-content: space-between;
}

.crista-cart-drawer .woocommerce-mini-cart__buttons {
    display: grid;
    gap: 10px;
    margin-bottom: 0;
}

.crista-cart-drawer .button {
    width: 100%;
    text-align: center;
    margin: 0 !important;
}