/**
 * Header styles for glove customization interface
 * Extracted from custom-header.php for better maintainability
 *
 * @version 1.0
 */

/* ========== Base Styles ========== */
body {
    background-color: #f0f0f0;
}

/* ========== Custom Header ========== */
.custom-header {
    display: none;  /* 預設隱藏，step 1-6 使用 Elementor header */
    background-color: #3A3535;
    color: #fff;
    padding: 1% 0;
    transition: all 0.3s ease;
}

/* Step 7-11 模式：顯示 customHeader */
.custom-header.alternate-header {
    display: block;
}

/* 當 customHeader 顯示時，隱藏 Elementor header/footer */
body.custom-header-active .elementor.elementor-location-header,
body.custom-header-active .elementor.elementor-location-footer {
    display: none !important;
}

.custom-header h1 {
    font-size: 28px;
    text-align: left;
    padding-left: 20px;
}

/* ========== Navigation ========== */
.custom-nav ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    text-wrap: nowrap;
}

.custom-nav ul li a {
    color: #fff;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    line-height: 23.68px;
    letter-spacing: 0.05em;
    text-align: center;
    text-underline-position: from-font;
    text-decoration-skip-ink: none;
}

/* ========== Alternate Header ========== */
.custom-header.alternate-header {
    background-color: #3A3535;
    padding: 12px 12px;
}

.custom-header.alternate-header h1 {
    font-size: 28px;
    text-align: left;
    padding-left: 20px;
}

.custom-header.alternate-header .custom-nav {
    margin-top: 15px;
}

.custom-header.alternate-header .custom-nav ul {
    justify-content: flex-start;
    padding-left: 20px;
}

.custom-header.alternate-header .custom-nav ul li {
    margin-right: 20px;
}

.custom-header.alternate-header .custom-nav ul li a {
    font-weight: bold;
}

/* ========== Hamburger Menu ========== */
.hamburger-menu {
    display: none;
    cursor: pointer;
    padding: 10px;
    position: relative;
    margin-right: 20px;
    z-index: 1000;
}

.hamburger-menu span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #fff;
    margin: 5px 0;
}

.alternate-header .custom-nav {
    display: none;
}

.alternate-header .hamburger-menu {
    display: block;
}

.alternate-header .custom-nav.show {
    display: block;
    position: absolute;
    left: 0;
    width: 100%;
    background-color: #4a90e2;
}

.alternate-header .custom-nav.show ul {
    flex-direction: column;
    align-items: flex-start;
}

.alternate-header .custom-nav.show ul li {
    margin: 10px 0;
}

/* ========== Header Layout ========== */
.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left {
    display: flex;
    align-items: center;
}

.header-right {
    display: flex;
    align-items: center;
}

/* ========== Next Step Button ========== */
.next-step-button {
    text-align: right;
    padding-right: 20px;
}

.next-step-button button {
    background-color: #DADADA;
    border: none;
    color: #959595;
    padding: 10px 20px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    margin: 4px 2px;
    cursor: pointer;
    border-radius: 4px;
}

.next-step-button button:hover {
    color: #fff;
    background-color: #F3AD29;
}

/* ========== Header Icons ========== */
#search,
#cart,
#profile {
    margin-right: 10px;
    margin-left: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ========== Canvas Container ========== */
.canvas-container {
    width: 100%;
    height: 100%;
    position: relative;
}

#gloveCanvas {
    display: block;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* ========== Step Menu ========== */
.step-menu {
    position: absolute;
    top: 45%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #333333;
    border-radius: 8px;
    padding: 10px 0;
    width: 90%;
    max-width: 320px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: none;
}

/* Step menu triangle arrow */
.step-menu:before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-bottom: 20px solid #333333;
    width: 0;
    height: 0;
}

.step-menu-items {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.step-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #FFFFFF !important;
    text-decoration: none;
    transition: background-color 0.3s;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
}

.step-item:last-child {
    border-bottom: none;
}

.step-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.step-item.current {
    background-color: rgba(243, 173, 41, 0.2);
}

.step-number {
    font-weight: bold;
    margin-right: 15px;
    min-width: 70px;
}

.step-name {
    flex: 1;
}

/* ========== System Menu ========== */
#systemMenu {
    display: none;
    top: 110px;
    left: 20px;
    transform: translateX(0);
    z-index: 1001;
}

#systemMenu:before {
    left: 30px;
    transform: translateX(0);
}

#systemMenu .menu-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
    margin-right: 10px;
}

#systemMenu .step-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    transition: background-color 0.3s;
}

#systemMenu .step-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

#systemMenu .step-number {
    display: flex;
    align-items: center;
    min-width: auto;
    margin-right: 15px;
}
