/* Header Actions CSS */
body.overflow-hidden {
    overflow: hidden;
}

/* Search Overlay */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.search-overlay.active {
    opacity: 1;
    visibility: visible;
}

.search-overlay-close i,
.side-cart-close i {
    pointer-events: none;
}

.search-overlay-close {
    position: absolute;
    top: 40px;
    right: 40px;
    font-size: 32px;
    color: #111;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.search-overlay-close:hover {
    transform: rotate(90deg);
    color: var(--primary-gold);
}

.search-form-wrapper {
    width: 100%;
    max-width: 800px;
    padding: 0 20px;
    text-align: center;
}

.search-form-wrapper h2 {
    font-size: 42px;
    margin-bottom: 40px;
    color: var(--brand-navy);
    font-family: var(--font-heading);
}

.search-overlay .search-field {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 2px solid #eee;
    font-size: 36px;
    padding: 20px 0;
    font-family: var(--font-body);
    color: #111;
    outline: none;
    transition: border-color 0.3s ease;
}

.search-overlay .search-field:focus {
    border-color: var(--primary-gold);
}

/* Side Cart Drawer */
.side-cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 42, 68, 0.4);
    backdrop-filter: blur(4px);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.side-cart-drawer {
    position: fixed;
    top: 0;
    right: -450px;
    width: 100%;
    max-width: 450px;
    height: 100%;
    background: #fff;
    z-index: 10001;
    box-shadow: -20px 0 60px rgba(0,0,0,0.12);
    transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    flex-direction: column;
}

.side-cart-overlay.active {
    opacity: 1;
    visibility: visible;
}

.side-cart-drawer.active {
    right: 0;
}

.side-cart-header {
    padding: 30px 40px;
    border-bottom: 1px solid #f2f2f2;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.side-cart-header h3 {
    margin: 0;
    font-size: 26px;
    font-family: var(--font-heading);
    color: var(--brand-navy);
    letter-spacing: 0.5px;
    font-weight: 700;
}

.side-cart-close {
    font-size: 28px;
    cursor: pointer;
    color: #333;
    transition: all 0.3s ease;
}

.side-cart-close:hover {
    color: var(--primary-gold);
    transform: rotate(90deg);
}

.side-cart-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px 40px;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-gold) #f5f5f5;
}

.side-cart-content::-webkit-scrollbar {
    width: 5px;
}

.side-cart-content::-webkit-scrollbar-thumb {
    background: var(--primary-gold);
}

/* WooCommerce Mini-cart Redesign */
.side-cart-content .widget_shopping_cart_content {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.side-cart-content ul.cart_list,
.side-cart-content ul.product_list_widget {
    list-style: none;
    padding: 0;
    margin: 0;
}

.side-cart-content ul.cart_list li,
.side-cart-content ul.product_list_widget li {
    padding: 20px 0;
    border-bottom: 1px solid #f2f2f2;
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0; /* Gap handled by margins */
    min-height: 90px;
}

.side-cart-content ul.cart_list li a:not(.remove),
.side-cart-content ul.product_list_widget li a:not(.remove) {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    text-decoration: none;
    color: var(--brand-navy);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 15px;
    line-height: 1.4;
    width: 100%;
    padding-right: 30px;
}

.side-cart-content ul.cart_list li img,
.side-cart-content ul.product_list_widget li img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    flex-shrink: 0;
    margin: 0 !important;
}

.side-cart-content .quantity {
    display: block;
    width: 100%;
    margin-left: 100px; /* 80px img + 20px gap */
    margin-top: -30px; /* Pull up next to name */
    font-size: 14px;
    color: #777;
}

.side-cart-content .quantity .amount {
    color: var(--primary-gold);
    font-weight: 700;
    font-size: 16px;
    margin-left: 5px;
}

.side-cart-content .remove {
    position: absolute;
    top: 20px;
    right: 0;
    width: 24px;
    height: 24px;
    line-height: 22px;
    text-align: center;
    border-radius: 50%;
    background: #f9f9f9;
    color: #bbb !important;
    font-size: 16px !important;
    font-weight: 300 !important;
    text-decoration: none !important;
    transition: all 0.3s ease;
    z-index: 10;
}

.side-cart-content .remove:hover {
    background: #ffeded;
    color: #ff4d4d !important;
}

.side-cart-content .total {
    margin-top: 20px;
    padding: 25px 0;
    font-size: 19px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 500;
    color: var(--brand-navy);
    border-top: 2px solid #f2f2f2;
}

.side-cart-content .total .amount {
    color: var(--primary-gold);
    font-size: 22px;
}

/* Footer & Buttons */
.side-cart-content .buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 20px;
}

.side-cart-content .buttons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    text-align: center;
    padding: 14px 10px;
    text-transform: uppercase;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    color: #000;
    border: 1px solid;
}

.side-cart-content .buttons a.cart {
    background: transparent;
    border: 1px solid var(--brand-navy);
    color: var(--brand-navy);
}

.side-cart-content .buttons a.checkout {
    background: var(--primary-gold);
    color: #fff;
    box-shadow: 0 4px 15px rgba(184, 142, 47, 0.2);
}

.side-cart-content .buttons a:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.side-cart-content .buttons a.cart:hover {
    background: var(--brand-navy);
    color: #fff;
}

.side-cart-content .woocommerce-mini-cart__empty-message {
    padding: 60px 0;
    text-align: center;
    color: #999;
    font-size: 16px;
}

@media (max-width: 480px) {
    .side-cart-drawer {
        max-width: 100%;
    }
    .side-cart-header, .side-cart-content {
        padding-left: 20px;
        padding-right: 20px;
    }
}
