/* Mobile Off-Canvas Menu Styles */

/* Mobile Header - Only visible on mobile */
.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    padding: 0 20px;
    align-items: center;
    justify-content: space-between;
    transition: background-color 0.3s ease;
}

.mobile-header-logo {
    height: 40px;
}

.mobile-header-logo img {
    height: 100%;
    width: auto;
}

.mobile-header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.mobile-hamburger {
    background: none !important;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: var(--text-color);
    font-size: 24px;
    transition: color 0.2s;
}

.mobile-hamburger:hover {
    color: var(--primary-color);
}

/* Off-Canvas Overlay */
.goled-offcanvas-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--offcanvas-overlay-bg);
    z-index: 1998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        visibility 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Off-Canvas Menu */
.goled-offcanvas-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: 320px;
    max-width: 85vw;
    height: 100vh;
    background: var(--card-bg);
    z-index: 1999;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    box-shadow: var(--offcanvas-menu-shadow);
}

.goled-offcanvas-menu.active {
    transform: translateX(0);
}

/* Page Shift Effect */
body.offcanvas-open {
    overflow: hidden;
}

body.offcanvas-open .site-header,
body.offcanvas-open .site-content,
body.offcanvas-open footer {
    transform: translateX(-320px);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Off-Canvas Header */
.offcanvas-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.offcanvas-logo {
    height: 35px;
}

.offcanvas-logo img {
    height: 100%;
    width: auto;
}

.offcanvas-close {
    background: none;
    border: none;
    font-size: 28px;
    color: var(--text-color);
    cursor: pointer;
    padding: 5px;
    line-height: 1;
    transition: color 0.2s;
}

.offcanvas-close:hover {
    color: var(--primary-color);
    background: none;
}

/* Off-Canvas Body */
.offcanvas-body {
    padding: 20px;
    padding-bottom: 0;
}

/* Search in Off-Canvas */
.offcanvas-search {
    margin-bottom: 25px;
}

.offcanvas-search .search-form {
    position: relative;
}

.offcanvas-search .search-field {
    width: 100%;
    padding: 12px 45px 12px 15px;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-color);
    font-size: 0.95rem;
}

.offcanvas-search .search-submit {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary-color);
    border: none;
    color: #000;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
}

/* Navigation in Off-Canvas */
.offcanvas-nav {
    margin-bottom: 10px;
}

.offcanvas-nav-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}

.offcanvas-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.offcanvas-nav ul li {
    margin-bottom: 5px;
}

.offcanvas-nav ul li a {
    display: block;
    padding: 12px 15px;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s;
    font-size: 0.95rem;
}

.offcanvas-nav ul li a:hover,
.offcanvas-nav ul li.current-menu-item a {
    background: rgba(254, 185, 0, 0.1);
    color: var(--primary-color);
}

/* User Actions in Off-Canvas */
.offcanvas-user-actions {
    margin-bottom: 25px;
}

.offcanvas-action-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 15px;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-color);
    text-decoration: none;
    margin-bottom: 10px;
    transition: all 0.2s;
    font-size: 0.95rem;
}

.offcanvas-action-btn:hover {
    background: var(--primary-color);
    color: #000;
    border-color: var(--primary-color);
}

.offcanvas-action-btn i {
    font-size: 18px;
}

.offcanvas-user-actions:nth-child(4) {
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.offcanvas-action-btn:nth-child(2) {
    margin-bottom: 25px !important;
}

.offcanvas-cart-count,
.wishlist-count-mobile {
    background: var(--primary-color);
    color: #000;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: auto;
    height: 22px;
    width: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Mini Cart Content */
.offcanvas-mini-cart-content {
    padding: 20px;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

.woocommerce-mini-cart {
    list-style: none;
    padding: 0;
    margin: 0;
}

.woocommerce-mini-cart-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

.woocommerce-mini-cart-item:last-child {
    border-bottom: none;
}

/* Thumbnail Wrapper & Remove Button Overlay */
.mini-cart-image-wrapper {
    position: relative;
    width: 70px;
    height: 70px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.mini-cart-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Remove Button Styling */
.woocommerce-mini-cart-item .remove_from_cart_button {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.67);
    color: #FFF !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    opacity: 0;
    transition: opacity 0.2s ease;
    text-decoration: none;
    z-index: 10;
}

/* Show remove button on hover over the image wrapper */
.mini-cart-image-wrapper:hover .remove_from_cart_button {
    opacity: 1;
}

/* Ensure the cross icon is visible */
.woocommerce-mini-cart-item .remove_from_cart_button::before {
    content: "×";
    font-family: Arial, sans-serif;
    font-weight: bold;
    font-size: 24px;
}

/* Hide default text */
.woocommerce-mini-cart-item .remove_from_cart_button {
    font-size: 0;
}

/* Product Details */
.mini-cart-item-details {
    flex-grow: 1;
}

.woocommerce-mini-cart-item .quantity {
    display: block;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.mini-cart-item-details a {
    font-weight: 600;
    color: var(--text-color);
    text-decoration: none;
    display: block;
    margin-bottom: 5px;
    line-height: 1.2;
}

/* Subtotal & Buttons */
.woocommerce-mini-cart__total {
    margin-top: 20px;
    border-top: 2px solid var(--border-color);
    padding-top: 15px;
    font-size: 1.1rem;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    color: var(--text-color);
}

.woocommerce-mini-cart__buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

.woocommerce-mini-cart__buttons .button {
    width: 100%;
    text-align: center;
    padding: 12px;
    border-radius: 8px;
    background: var(--primary-color);
    color: #000;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.3s;
}

.woocommerce-mini-cart__buttons .button:hover {
    background: #e0a800;
}

.woocommerce-mini-cart__buttons .checkout {
    background: var(--offcanvas-checkout-bg);
    color: var(--offcanvas-checkout-color);
}

.woocommerce-mini-cart__buttons .checkout:hover {
    background: #000;
}

/* Dark Mode Adjustments */

/* ===========================================
   RESPONSIVE BREAKPOINTS
   =========================================== */

@media (max-width: 1200px) {
    .mobile-header {
        display: flex;
    }

    /* Hide entire site-header on mobile - prevents empty margin */
    .site-header {
        display: none !important;
    }
}

@media (max-width: 575px) {
    .goled-offcanvas-menu {
        width: 280px;
    }

    body.offcanvas-open .site-header,
    body.offcanvas-open .site-content,
    body.offcanvas-open footer {
        transform: translateX(-280px);
    }

    .offcanvas-body {
        padding: 15px;
        padding-bottom: 0;
    }

    .offcanvas-header {
        padding: 15px;
    }

    .offcanvas-user-actions {
        margin-bottom: 15px;
    }
}

@media (min-width: 1201px) {
    .mobile-header {
        display: none !important;
    }

    .goled-offcanvas-menu,
    .goled-offcanvas-overlay {
        display: none !important;
    }
}