﻿@charset "utf-8";

:root {
    --khy-orange: #F07C00;
    --khy-orange-dark: #D96E00;
    --khy-text: #333;
    --khy-gray: #666;
    --khy-light-gray: #f5f5f5;
    --khy-price-red: #D33F49;
}

body {
    font-family: 'Microsoft JhengHei', Arial, sans-serif;
    color: var(--khy-text);
    background-color: #fff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-content {
    background-color: #fff;
    flex: 1;
}

.container {
    max-width: 960px;
}

a {
    color: var(--khy-text);
    text-decoration: none;
}

a:hover {
    color: var(--khy-orange);
}

img {
    max-width: 100%;
    height: auto;
}

/* Header */
.header-top {
    padding: 10px 0;
}

.header-top .navbar-toggler {
    padding: 4px 8px;
    font-size: 1.2rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: none;
    cursor: pointer;
}

.header-top .navbar-toggler-icon {
    display: inline-block;
    width: 1.2em;
    height: 1.2em;
    vertical-align: middle;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2851,51,51,0.75%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 100%;
}

.header-logo img {
    max-height: 100px;
}

@media (min-width: 768px) {
    .header-top .container {
        position: relative;
    }

    .header-icons {
        position: absolute !important;
        right: 12px;
        top: 50%;
        transform: translateY(-50%);
    }
}

.header-icons a {
    color: var(--khy-text);
    font-size: 1.2rem;
    margin-left: 15px;
}

.header-icons a:hover {
    color: var(--khy-orange);
}

/* Navigation */
.navbar-khy {
    background-color: #fff;
    border-top: 1px solid var(--khy-orange);
    border-bottom: 1px solid var(--khy-orange);
    padding: 0;
}

.navbar-khy .navbar-nav {
    border-left: 1px solid var(--khy-orange);
}

.navbar-khy .nav-item {
    border-right: 1px solid var(--khy-orange);
}

.navbar-khy .nav-link {
    color: var(--khy-text);
    font-size: 0.95rem;
    padding: 6px 0;
    letter-spacing: 1px;
    text-align: center;
    width: 200px;
}

.navbar-khy .nav-link:hover,
.navbar-khy .nav-link.active {
    color: #fff;
    background-color: var(--khy-orange);
}

/* Breadcrumb */
.breadcrumb {
    background: none;
    padding: 15px 0 5px;
    margin-bottom: 0;
    font-size: 0.9rem;
}

.breadcrumb a {
    color: var(--khy-gray);
}

/* Hero Banner */
.hero-banner img {
    width: 100%;
    height: auto;
}

/* Product Grid */
.product-section {
    padding: 20px 0 40px;
}

.product-card {
    margin-bottom: 30px;
    text-align: center;
}

.product-card .product-img {
    overflow: hidden;
    position: relative;
}

.product-card .product-img::after {
    content: "";
    display: block;
    padding-top: 100%;
}

.product-card .product-img img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card .product-img:hover img {
    transform: scale(1.08);
}

.product-card .product-name {
    font-size: 0.95rem;
    color: var(--khy-text);
    margin-top: 10px;
    min-height: 2.5em;
}

.product-card .product-price {
    color: var(--khy-price-red);
    font-size: 1.4rem;
    font-weight: 700;
    margin: 5px 0;
}

.btn-cart {
    background-color: #fff;
    color: var(--khy-price-red);
    border: 1px solid var(--khy-price-red);
    padding: 6px 20px;
    font-size: 0.85rem;
    border-radius: 3px;
}

.btn-cart:hover {
    background-color: var(--khy-price-red);
    color: #fff;
}

/* Footer */
.footer-khy {
    background-color: var(--khy-orange);
    color: #fff;
    padding: 25px 0 0;
}

.footer-khy .footer-logo img {
    max-height: 60px;
    margin-bottom: 10px;
}

.footer-khy .row {
    justify-content: center;
}

.footer-khy .footer-logo,
.footer-khy .footer-info {
    flex: 0 0 auto;
    width: auto;
}

.footer-khy a {
    color: #fff;
}

.footer-khy a:hover {
    color: #ffe0c0;
}

.footer-khy .footer-info {
    font-size: 0.85rem;
    line-height: 1.8;
}

.footer-copyright {
    background-color: #5a3a1a;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.75rem;
    padding: 10px 0;
}

.footer-copyright a {
    color: #fff;
}

.footer-copyright a:hover {
    color: #ffe0c0;
}

/* Floating sidebar */
.floating-sidebar {
    position: fixed;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 900;
    text-align: center;
}

.floating-sidebar a {
    display: block;
    background: transparent;
    color: var(--khy-text);
    padding: 10px 8px;
    font-size: 0.7rem;
    width: 60px;
}

.floating-sidebar a i {
    font-size: 1.5rem;
    display: block;
    margin-bottom: 2px;
}

.floating-sidebar a:hover {
    color: var(--khy-orange);
}

.floating-sidebar a + a {
    border-top: 1px solid var(--khy-orange);
}

.sidebar-cart {
    position: relative;
}

.sidebar-cart-count {
    display: inline-block;
    background: var(--khy-orange);
    color: #fff;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    line-height: 18px;
    font-size: 10px;
    font-weight: 700;
    text-align: center;
    position: absolute;
    top: -2px;
    right: 2px;
}

/* Cart Section */
.cart-section {
    padding: 20px 0 40px;
}

/* Cart Wizard */
.cart-wizard {
    padding: 20px 0 10px;
}

.wizard-steps {
    display: flex;
    justify-content: space-between;
    position: relative;
    z-index: 2;
}

.wizard-step {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.wizard-step:first-child {
    margin-left: 6%;
}

.wizard-label {
    font-size: 0.9rem;
    color: #999;
    margin-bottom: 8px;
    white-space: nowrap;
}

.wizard-step.active .wizard-label {
    color: var(--khy-text);
    font-weight: 700;
}

.wizard-dot {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background-color: #fff;
    border: 3px solid #ccc;
}

.wizard-step.active .wizard-dot,
.wizard-step.completed .wizard-dot {
    border-color: var(--khy-orange);
}

.wizard-track {
    position: relative;
    height: 6px;
    background-color: #ddd;
    border-radius: 3px;
    margin-top: -14px;
    margin-bottom: 20px;
    margin-right: 2em;
    z-index: 1;
}

.wizard-track-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background-color: var(--khy-orange);
    border-radius: 3px;
}

/* Cart Table */
.cart-table thead {
    background-color: #e0e0e0;
    color: var(--khy-text);
}

.cart-table thead th {
    text-align: center;
    vertical-align: middle;
    font-weight: 600;
    border-color: #ccc;
    background-color: #e0e0e0 !important;
    --bs-table-bg: #e0e0e0;
}

.cart-table tbody td {
    text-align: center;
    vertical-align: middle;
}

.cart-qty {
    width: 70px;
    text-align: center;
    display: inline-block;
}

.cart-delete {
    color: var(--khy-orange);
    font-size: 1.2rem;
}

.cart-delete:hover {
    color: var(--khy-orange-dark);
}

/* Cart Totals */
.cart-totals {
    font-size: 1.05rem;
}

.cart-totals p {
    margin-bottom: 4px;
}

/* Cart Orange Button */
.btn-khy-orange {
    background-color: var(--khy-orange);
    color: #fff;
    border: none;
    padding: 8px 30px;
}

.btn-khy-orange:hover {
    background-color: var(--khy-orange-dark);
    color: #fff;
}

/* Cart Section Header (orange bar) */
.cart-section-header {
    background-color: var(--khy-orange);
    color: #fff;
    padding: 10px 15px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 4px;
}

.cart-section-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background-color: #fff;
    color: var(--khy-orange);
    border-radius: 50%;
    margin-right: 10px;
    font-size: 0.85rem;
}

/* Cart Form */
.cart-form .col-form-label {
    font-weight: 600;
}

/* Cart Shipping Info (read-only) */
.cart-shipping-info {
    padding: 10px 0;
    font-size: 0.95rem;
}

/* Cart Thank You */
.cart-thankyou {
    font-size: 1.1rem;
}

.cart-thankyou a {
    color: var(--khy-orange);
    font-weight: 600;
}

.cart-thankyou a:hover {
    color: var(--khy-orange-dark);
}

/* Category Sidebar */
.category-card .card-header {
    background-color: var(--khy-gray);
    color: #fff;
    font-weight: 600;
    border-radius: .375rem .375rem 0 0;
}

.category-link {
    color: var(--khy-text);
    border-bottom: 1px solid #eee;
}

.category-link:hover {
    background-color: var(--khy-light-gray);
    color: var(--khy-orange);
}

/* Member Nav Tabs */
.member-nav .nav-link {
    color: #fff;
    background-color: #aaa;
}

.member-nav .nav-link.active {
    background-color: var(--khy-orange);
}

/* Member Welcome */
.member-name {
    color: var(--khy-orange);
    font-weight: bold;
}

/* Member Order Table Link */
.member-link {
    color: var(--khy-orange);
}

.member-link:hover {
    color: var(--khy-orange-dark);
}

/* Text Utilities */
.text-orange {
    color: var(--khy-orange);
}

/* Info Section */
.info-section {
    padding: 20px 0 40px;
}

/* Product Detail */
.product-detail-section {
    padding: 20px 0;
}

.product-detail-no {
    color: var(--khy-gray);
    font-size: 0.85rem;
    margin-bottom: 5px;
}

.product-detail-name {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.product-detail-eng {
    color: var(--khy-gray);
    font-size: 0.95rem;
    margin-bottom: 10px;
}

.product-detail-price {
    color: var(--khy-price-red);
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.product-detail-desc {
    color: var(--khy-text);
    font-size: 0.95rem;
    margin-bottom: 5px;
}

.product-detail-qty {
    display: flex;
    align-items: center;
    margin: 20px 0;
}

.product-detail-qty label {
    margin-right: 10px;
    font-weight: 600;
}

.qty-btn-group {
    display: inline-flex;
    align-items: center;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.qty-btn-group .btn-qty {
    width: 36px;
    height: 36px;
    border: none;
    background: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.qty-btn-group .btn-qty:hover {
    background-color: var(--khy-light-gray);
}

.qty-btn-group .qty-input {
    width: 50px;
    height: 36px;
    text-align: center;
    border: none;
    border-left: 1px solid #ccc;
    border-right: 1px solid #ccc;
    font-size: 1rem;
}

.product-detail-btns {
    margin-top: 20px;
}

.btn-cart-outline {
    border: 2px solid var(--khy-orange);
    color: var(--khy-orange);
    background: #fff;
    padding: 8px 25px;
    border-radius: 4px;
    font-size: 0.95rem;
}

.btn-cart-outline:hover {
    background-color: var(--khy-orange);
    color: #fff;
}

.btn-buy {
    background-color: var(--khy-price-red);
    color: #fff;
    border: 1px solid var(--khy-price-red);
    padding: 6px 20px;
    border-radius: 3px;
    font-size: 0.85rem;
}

.btn-buy:hover {
    background-color: var(--khy-price-red);
    color: #fff;
}

.product-detail-img {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #fff;
}
.product-detail-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.product-detail-thumbs {
    margin-top: 15px;
}

.product-detail-thumbs img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border: 1px solid #ddd;
    margin-right: 8px;
    cursor: pointer;
}

.product-detail-thumbs img:hover {
    border-color: var(--khy-orange);
}

/* Product Content Section */
.product-content-section {
    padding: 20px 0 40px;
}

.product-content-section .cart-section-header {
    background-color: #f9e1cb;
    color: var(--khy-text);
    margin-bottom: 20px;
    margin-top: 30px;
}

.product-content-section .cart-section-icon {
    background-color: var(--khy-orange);
    color: #fff;
}

.product-content-section .content-block {
    padding: 0 15px;
    margin-bottom: 20px;
    line-height: 1.8;
}
