/*
Theme Name: Custom WC Lightweight
Author: Nilesh Asodariya
Description: Ultra-fast custom WooCommerce theme built from scratch.
Version: 1.0.0
Text Domain: custom-wc
*/
/* === SURAT'S FABRIC HEADER & MYNTRA MEGA MENU === */
.sf-header {
    position: sticky;
    top: 0;
    z-index: 9999;
    background: #ffffff;
    box-shadow: 0 4px 12px 0 rgba(0, 0, 0, 0.05);
    width: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.admin-bar .sf-header {
    top: 32px;
}

.sf-header-inner {
    max-width: 1440px;
    margin: 0 auto;
    height: 80px;
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

.sf-logo-text {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: #1a1a1a;
    text-decoration: none;
}

/* Desktop Navigation */
.sf-nav {
    height: 100%;
    margin-left: 24px;
}

.sf-menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    height: 100%;
    align-items: center;
}

.sf-menu-item {
    height: 100%;
    display: flex;
    align-items: center;
    position: static;
}

.sf-menu-item > a {
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 18px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.4px;
    color: #282c3f;
    text-decoration: none;
    border-bottom: 4px solid transparent;
    transition: border-color 0.15s ease;
    position: relative;
}

.sf-menu-item[data-accent="#ff3f6c"]:hover > a { border-bottom-color: #ff3f6c; }
.sf-menu-item[data-accent="#ee5f73"]:hover > a { border-bottom-color: #ee5f73; }
.sf-menu-item[data-accent="#f26a10"]:hover > a { border-bottom-color: #f26a10; }
.sf-menu-item:hover > a { border-bottom-color: #1a1a1a; }

.sf-badge {
    font-size: 9px;
    font-weight: 800;
    color: #ff3f6c;
    margin-left: 4px;
    margin-top: -10px;
}

/* Mega Dropdown - Hover Persistence Fix */
.sf-mega-dropdown {
    position: absolute;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    width: 1120px;
    max-width: 95vw;
    background: #ffffff;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
    border-top: 1px solid #f0f0f0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.18s ease, visibility 0.18s ease;
    z-index: 9998;
}

.sf-menu-item.has-mega:hover .sf-mega-dropdown,
.sf-mega-dropdown:hover {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.sf-mega-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.sf-mega-col {
    padding: 24px 28px;
}

.sf-col-alt {
    background-color: #fbfbfc;
}

.sf-mega-col h4 {
    font-size: 13px;
    font-weight: 700;
    margin: 0 0 12px 0;
    text-transform: capitalize;
}

.sf-mega-col ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sf-mega-col ul li {
    margin-bottom: 6px;
}

.sf-mega-col ul li a {
    font-size: 13px;
    color: #282c3f;
    text-decoration: none;
    line-height: 1.6;
    display: block;
    transition: font-weight 0.1s ease, color 0.1s ease;
}

.sf-mega-col ul li a:hover {
    font-weight: 700;
    color: #000000;
}

/* Search Bar */
.sf-search-wrap {
    flex: 1;
    max-width: 400px;
    margin: 0 24px;
}

.sf-search-form {
    display: flex;
    align-items: center;
    background: #f5f5f6;
    border: 1px solid #f5f5f6;
    border-radius: 4px;
    height: 40px;
    padding: 0 12px;
    transition: background 0.2s, border-color 0.2s;
}

.sf-search-form:focus-within {
    background: #ffffff;
    border-color: #d4d5d9;
}

.sf-search-form button {
    background: none;
    border: none;
    padding: 0 8px 0 0;
    cursor: pointer;
    display: flex;
}

.sf-search-form input {
    border: none;
    background: transparent;
    width: 100%;
    font-size: 13px;
    color: #282c3f;
    outline: none;
}

/* Header Actions */
.sf-actions {
    display: flex;
    align-items: center;
    gap: 22px;
}

.sf-action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #282c3f;
    font-size: 11px;
    font-weight: 700;
    position: relative;
}

.sf-cart-count {
    position: absolute;
    top: -5px;
    right: -8px;
    background: #ff3f6c;
    color: #fff;
    font-style: normal;
    font-size: 10px;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Mobile Toggle & Drawer */
.sf-mobile-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: #282c3f;
}

.sf-mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: 0.25s;
}

.sf-mobile-overlay.open {
    opacity: 1;
    visibility: visible;
}

.sf-mobile-drawer {
    position: fixed;
    top: 0;
    left: -300px;
    width: 280px;
    height: 100%;
    background: #fff;
    z-index: 10001;
    transition: left 0.25s ease;
    display: flex;
    flex-direction: column;
}

.sf-mobile-drawer.open {
    left: 0;
}

.sf-drawer-head {
    padding: 18px 20px;
    background: #1a1a1a;
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    letter-spacing: 1px;
}

.sf-drawer-head button {
    background: none;
    border: none;
    color: #fff;
    font-size: 26px;
    cursor: pointer;
    line-height: 1;
}

.sf-acc-btn {
    width: 100%;
    padding: 15px 20px;
    background: #fff;
    border: none;
    border-bottom: 1px solid #f0f0f0;
    text-align: left;
    font-size: 14px;
    font-weight: 700;
    color: #282c3f;
    display: flex;
    justify-content: space-between;
    cursor: pointer;
}

.sf-acc-panel {
    max-height: 0;
    overflow: hidden;
    background: #fafafa;
    transition: max-height 0.25s ease;
}

.sf-acc-panel a {
    display: block;
    padding: 11px 28px;
    font-size: 13px;
    color: #535766;
    text-decoration: none;
    border-bottom: 1px solid #f2f2f2;
}

.sf-drawer-single {
    display: block;
    padding: 15px 20px;
    font-size: 14px;
    font-weight: 700;
    color: #282c3f;
    text-decoration: none;
}

@media (max-width: 1024px) {
    .sf-nav, .sf-search-wrap { display: none; }
    .sf-mobile-toggle { display: block; }
    .sf-header-inner { height: 64px; padding: 0 16px; }
}