/* =====================================================
   Custom Mini Cart Styles - Matching Image Design
   ===================================================== */

/* Cart Widget Sidebar */
.cart-widget-side {
    width: 380px;
    max-width: 100%;
}

/* Cart Header Override */
.cart-widget-side .wd-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #e5e5e5;
    background: #fff;
}

.cart-widget-side .wd-heading .title {
    font-size: 14px;
    font-weight: 400;
    color: #000;
    letter-spacing: 0;
}

.cart-widget-side .wd-heading .close-side-widget {
    padding: 0;
    margin: 0;
}

.cart-widget-side .wd-heading .close-side-widget a {
    font-size: 14px;
    color: #000;
    text-decoration: none;
    font-weight: 400;
    line-height: 1;
    letter-spacing: 0;
}

/* Scrollable Content Area */
.shopping-cart-widget-body {
    background: #fff;
}

.shopping-cart-widget-body .wd-scroll-content {
    padding: 20px;
}

/* Mini Cart List */
.custom-minicart-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Mini Cart Item */
.custom-minicart-item {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 16px;
    padding: 0 0 20px 0;
    border-bottom: none;
}

.custom-minicart-item:first-child {
    padding-top: 0;
}

/* Product Image */
.minicart-item-image {
    width: 100px;
    height: 130px;
    flex-shrink: 0;
    background: #f5f5f5;
}

.minicart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Product Content Area */
.minicart-item-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Product Info (Title + Price on same line) */
.minicart-item-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.minicart-item-title {
    font-size: 14px;
    font-weight: 400;
    color: #000;
    margin: 0;
    line-height: 1.3;
    letter-spacing: 0;
    flex: 1;
}

.minicart-item-info .minicart-item-price {
    font-size: 14px;
    color: #000;
    font-weight: 400;
    white-space: nowrap;
}

.minicart-item-price .woocommerce-Price-amount {
    font-size: 14px;
}

/* Gift Section */
.minicart-gift-section {
    margin: 0;
}

.minicart-gift-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0;
    border: none;
    background: transparent;
    font-size: 12px;
    color: #000;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s;
    font-family: inherit;
}

.minicart-gift-toggle:hover {
    color: #666;
}

.minicart-gift-arrow {
    transition: transform 0.3s ease;
    flex-shrink: 0;
    width: 10px;
    height: 6px;
}

.minicart-gift-toggle.active .minicart-gift-arrow {
    transform: rotate(180deg);
}

.minicart-gift-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.minicart-gift-content.open {
    max-height: 200px;
    padding-top: 8px;
}

.minicart-gift-message {
    width: 100%;
    padding: 8px;
    border: 1px solid #e5e5e5;
    background: #fff;
    font-size: 12px;
    color: #000;
    font-family: inherit;
    resize: vertical;
    min-height: 60px;
}

.minicart-gift-message:focus {
    outline: none;
    border-color: #ccc;
}

.minicart-gift-message::placeholder {
    color: #999;
}

/* Quantity Controls and Price Row */
.minicart-item-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

/* Quantity Controls */
.minicart-quantity-wrapper {
    margin: 0;
}

.minicart-quantity-wrapper .quantity {
    display: inline-flex;
    align-items: center;
    border: 1px solid #d1d1d1;
}

.minicart-quantity-wrapper .quantity input[type="button"] {
    width: 30px;
    height: 30px;
    padding: 0;
    background: transparent;
    border: none;
    color: #000;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.minicart-quantity-wrapper .quantity input[type="button"]:hover {
    background: #f5f5f5;
}

.minicart-quantity-wrapper .quantity .qty {
    width: 35px;
    height: 30px;
    border: none;
    border-left: 1px solid #d1d1d1;
    border-right: 1px solid #d1d1d1;
    text-align: center;
    font-size: 14px;
    color: #000;
    background: transparent;
    -moz-appearance: textfield;
    appearance: textfield;
}

.minicart-quantity-wrapper .quantity .qty::-webkit-outer-spin-button,
.minicart-quantity-wrapper .quantity .qty::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.minicart-quantity-wrapper .quantity .qty:focus {
    outline: none;
}

.minicart-quantity-display {
    font-size: 13px;
    color: #666;
}

/* Product Total Price in Controls Row */
.minicart-item-controls .minicart-item-total {
    font-size: 14px;
    color: #000;
    font-weight: 400;
    white-space: nowrap;
}

/* Remove Link */
.minicart-remove-link {
    font-size: 10px;
    color: #666;
    text-decoration: underline;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: color 0.2s;
    display: inline-block;
    text-transform: uppercase;
}

.minicart-remove-link:hover {
    color: #000;
}

/* Empty Cart */
.custom-minicart-empty {
    padding: 40px 20px;
    text-align: center;
}

.custom-minicart-empty p {
    font-size: 14px;
    color: #666;
    margin: 0;
}

/* Mini Cart Footer */
.shopping-cart-widget-footer.custom-minicart-footer {
    padding: 0 20px 20px;
    background: #fff;
    border-top: none;
}

/* Subtotal */
.minicart-subtotal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid #e5e5e5;
}

.minicart-subtotal-label {
    font-size: 11px;
    color: #000;
    font-weight: 400;
    letter-spacing: 0.5px;
}

.minicart-subtotal-amount {
    font-size: 14px;
    color: #000;
    font-weight: 400;
}

.minicart-subtotal-amount .woocommerce-Price-amount {
    font-size: 14px;
}

/* Terms Checkbox */
.minicart-terms {
    margin-bottom: 20px;
}

.minicart-terms label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
    font-size: 12px;
    color: #000;
    line-height: 1.4;
}

.minicart-terms input[type="checkbox"] {
    margin-top: 2px;
    width: 14px;
    height: 14px;
    cursor: pointer;
    flex-shrink: 0;
}

/* Checkout Button */
.minicart-checkout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 20px;
    background: #000;
    color: #fff;
    text-align: center;
    text-decoration: none;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.minicart-checkout-btn:hover {
    background: #333;
    color: #fff;
}

.minicart-checkout-btn .lock-icon {
    width: 11px;
    height: 14px;
}

/* View Cart Button */
.minicart-viewcart-btn {
    display: block;
    width: 100%;
    padding: 14px 20px;
    margin-top: 10px;
    background: transparent;
    border: 1px solid #000;
    color: #000;
    text-align: center;
    text-decoration: none;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.minicart-viewcart-btn:hover {
    background: #000;
    color: #fff;
}

/* Checkout Note */
.minicart-checkout-note {
    margin-top: 16px;
    font-size: 11px;
    color: #666;
    line-height: 1.5;
    font-style: italic;
    text-align: center;
}

/* Responsive */
@media (max-width: 480px) {
    .cart-widget-side {
        width: 100%;
    }

    .cart-widget-side .wd-heading,
    .shopping-cart-widget-body .wd-scroll-content,
    .shopping-cart-widget-footer.custom-minicart-footer {
        padding-left: 16px;
        padding-right: 16px;
    }

    .custom-minicart-item {
        grid-template-columns: 80px 1fr;
        gap: 12px;
    }

    .minicart-item-image {
        width: 80px;
        height: 100px;
    }

    .minicart-item-title {
        font-size: 13px;
    }
}

/* Additional overrides to ensure clean styling */
.custom-minicart-list .custom-minicart-item .remove,
.custom-minicart-list .custom-minicart-item .cart-item-link {
    display: none !important;
}

/* Hide default WooCommerce mini cart elements */
.cart-widget-side .woocommerce-mini-cart__buttons,
.cart-widget-side .woocommerce-mini-cart__total {
    display: none !important;
}
