/**
 * Box Contents - Product Weight & Accordion Styles
 */

/* Equal height for product cards in loop */
.woocommerce .wgl-products {
    align-items: stretch;
}

.wgl-products .product .woo_product_inner_wrapper {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.woocommerce .wgl-products .woo_product_content {
    align-self: stretch;
    flex: 1;
}

/* Weight display */
.masar-box-weight {
    font-size: 14px;
    color: #b8a88a;
    margin: 4px 0 8px;
    font-weight: 400;
    letter-spacing: 0.3px;
}

.masar-box-weight--single {
    font-size: 16px;
    margin: 8px 0 16px;
}

/* Contents wrapper */
.masar-box-contents-wrapper {
    margin: 8px 0 0;
    position: relative;
}

.masar-box-contents-wrapper--single {
    margin: 12px 0 20px;
}

/* Toggle button */
.masar-contents-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    color: #b8a88a;
    cursor: pointer;
    padding: 4px 0;
    font-size: 13px;
    font-family: inherit;
    transition: color 0.2s ease;
    line-height: 1;
}

.masar-contents-toggle:hover {
    color: #d4c4a0;
}

.masar-contents-toggle:focus {
    outline: none;
}

.masar-toggle-icon {
    display: inline-block;
    font-size: 16px;
    line-height: 1;
    transition: transform 0.3s ease;
    transform: rotate(0deg);
}

.masar-contents-toggle[aria-expanded="true"] .masar-toggle-icon {
    transform: rotate(180deg);
}

.masar-contents-toggle[aria-expanded="true"] .masar-toggle-text::after {
    content: none;
}

/* Panel - smooth accordion */
.masar-contents-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    opacity: 0;
}

.masar-contents-panel.is-open {
    opacity: 1;
}

/* Contents table */
.masar-contents-table {
    width: 100%;
    border-collapse: collapse;
    margin: 8px 0 4px;
    font-size: 12px;
    line-height: 1.5;
}

.masar-contents-table td {
    padding: 3px 4px 3px 0;
    vertical-align: top;
    border: none;
    color: #ccc;
}

.masar-item-name {
    font-weight: 600;
    color: #e0d5c0;
    white-space: nowrap;
}

.masar-item-qty {
    white-space: nowrap;
    text-align: center;
    color: #aaa;
}

.masar-item-weight {
    white-space: nowrap;
    text-align: right;
    color: #aaa;
}

/* Single product table - slightly larger */
.masar-box-contents-wrapper--single .masar-contents-table {
    font-size: 14px;
}

.masar-box-contents-wrapper--single .masar-contents-toggle {
    font-size: 15px;
}

.masar-box-contents-wrapper--single .masar-contents-table td {
    padding: 4px 8px 4px 0;
}

/* Responsive */
@media (max-width: 768px) {
    .masar-contents-table {
        font-size: 11px;
    }
    
    .masar-item-name {
        white-space: normal;
    }
}

/* =========================================
   Mini Cart Customizations 
   ========================================= */

/* Cursor X on overlay */
.wgl-theme-header .mini-cart .mini_cart-overlay {
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24" fill="none" stroke="%23ffffff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>') 16 16, pointer !important;
}

/* Mini cart header with close button */
.masar-mini-cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 15px;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(var(--masar-primary-rgb), 0.2);
}

.masar-mini-cart-title {
    font-size: 18px;
    font-weight: 500;
    color: var(--masar-header-font-color);
}

.masar-mini-cart-close {
    background: none;
    border: none;
    font-size: 42px;
    line-height: 1;
    color: var(--masar-primary-color, #c8b082);
    cursor: pointer;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease, transform 0.3s ease;
}

.masar-mini-cart-close:hover {
    color: var(--masar-primary-color, #c8b082);
opacity: .5;
    background: transparent;
}

.masar-mini-cart-close:focus {
    outline: none;
}
