* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    min-height: 100%;
    font-size: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI",
        Helvetica, Arial, "PingFang TC", "Microsoft JhengHei", sans-serif;
}

body {
    min-height: 100vh;
    margin: 0 0 20px 0;
    display: flex;
    flex-direction: column;
    text-size-adjust: 100%;
    line-height: 1.5;
    background: #fdfaf0;
}

body.drawer-open {
    overflow: hidden;
}

a {
    color: #a93e33;
    text-decoration: none;
}

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

h1 {
    font-size: 1.5rem;
    margin-bottom: 20px;
}

h2 {
    font-size: 1.3rem;
}

h3 {
    font-size: 1.1rem;
}

p {
    margin-bottom: 20px;
}

ul {
    padding-left: 40px;
    margin-bottom: 20px;
}

hr {
    background-color: #003153;
    margin: 20px 0;
    border: 0;
    height: 1px;
    width: 100%;
}

.sale-price {
    list-style-type: none;
    font-size: 1.8rem;
	margin-bottom: 10px;
}

.list-price span {
    color: green;
}


/* ========================================
   SHOPPING CART
   ======================================== */

.cart {
    margin-left: auto;
}

.cart a {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #fdfaf0;
    font-size: 0.88rem;
}

.cart img {
    display: block;
}

.cart-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 20px 0;
    border-bottom: 1px solid #ddd;
}

.cart-item-image {
    width: 100px;
    flex: 0 0 100px;
}

.cart-item-image img {
    display: block;
    height: auto;
}

.cart-item-info {
    flex: 1;
    min-width: 0;
}

.cart-item-name {
    margin-bottom: 8px;
}

.cart-item-caption {
    margin-top: 8px;
    font-size: 0.88rem;
}

.cart-remove {
    border: 0;
    background: none;
    padding: 0;
    cursor: pointer;
    font-size: 0.88rem;
    color: #000;
}

.cart-empty {
    padding: 40px 0;
}

.cart-summary {
    margin-top: 20px;
}

.cart-total-row {
    text-align: right;
}

#paypal-button-container {
    width: 100%;
    margin-top: 40px;
}

button:disabled {
	cursor: not-allowed;
	opacity: 0.5;
}

/* ========================================
   ADD TO CART
   ======================================== */

[data-add-to-cart] {
    background-color: #003153;
    color: #fdfaf0;
    padding: 8px 0;
    border: 0;
    cursor: pointer;
    width: 100%;
    border-radius: 4px;
    margin-bottom: 30px;
    font: inherit;
}


/* ========================================
   IMAGE GROUP
   ======================================== */

.imgimg {
    display: flex;
    flex-direction: row;
    gap: 20px;
    width: 100%;
    min-width: 0;
}

.imgimg .grid1,
.imgimg .grid2 {
    width: 50%;
    min-width: 0;
}


/* ========================================
   FEATURED
   ======================================== */

.featured {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    min-width: 0;
    margin-bottom: 10px;
}

.featured .grid1,
.featured .grid2 {
    width: 100%;
    min-width: 0;
}


/* ========================================
   NEW ARRIVALS
   ======================================== */

.newarrivals {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    min-width: 0;
    margin-bottom: 10px;
}

.newarrivals .grid1,
.newarrivals .grid2 {
    width: 100%;
    min-width: 0;
}


/* ========================================
   ITEM IMAGE
   ======================================== */

.item-pic a {
    display: inline-block;
    width: fit-content;
    line-height: 0;
    margin-bottom: 20px;
}


/* ========================================
   HEADER
   ======================================== */

header {
    width: 100%;
    background: #003153;
    color: #fdfaf0;
}

.header-inner {
    width: 100%;
    max-width: 1200px;
    min-height: 70px;
    margin: 0 auto;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.site-logo {
    display: block;
    font-size: 1.6rem;
    color: #fdfaf0;
    white-space: nowrap;
}


/* ========================================
   MENU BUTTON
   ======================================== */

.menu-button {
    display: block;
    border: 0;
    background: transparent;
    color: #fdfaf0;
    font-size: 1.6rem;
    line-height: 1;
    padding: 5px;
    cursor: pointer;
    flex-shrink: 0;
}

/* ========================================
   DRAWER OVERLAY
   ======================================== */

.drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition:
        opacity 0.3s ease,
        visibility 0.3s ease;
}

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


/* ========================================
   PAGE LAYOUT
   ======================================== */

.layout {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    flex: 1;
    min-width: 0;
}


/* ========================================
   SIDEBAR / DRAWER
   ======================================== */

aside {
    position: fixed;
    top: 0;
    left: 0;
    width: 300px;
    max-width: 85vw;
    height: 100vh;
    background: #fdfaf0;
    z-index: 1000;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    order: initial;
    padding: 0;
    border: 0;
}


/* ========================================
   DRAWER OPEN
   ======================================== */

aside.active {
    transform: translateX(0);
}


/* ========================================
   DRAWER HEADER
   ======================================== */

.drawer-header {
    width: 100%;
    height: 70px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #003153;
    color: #fdfaf0;
}

.drawer-header span {
    font-size: 1.2rem;
}

.drawer-close {
    border: 0;
    background: transparent;
    color: #fdfaf0;
    font-size: 2rem;
    line-height: 1;
    padding: 0;
    cursor: pointer;
}


/* ========================================
   SIDEBAR NAV
   ======================================== */

nav {
    padding: 25px 20px;
}

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

nav > ul > li + li {
    margin-top: 10px;
}

nav > ul > li > ul {
    margin: 0;
    padding-left: 30px;
    list-style-type: "- ";
    font-size: 0.88rem;
}

nav > ul > li > ul > li {
    margin-top: 5px;
}

nav a.active {
    font-weight: 700;
}

nav hr {
    background-color: #003153;
    margin: 20px 0;
    border: 0;
    height: 1px;
}


/* ========================================
   PAGE CONTENT
   ======================================== */

main {
    width: 100%;
    min-width: 0;
    order: 1;
    padding: 25px 0;
}


/* ========================================
   ITEMS
   ======================================== */

.items {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 20px 20px;
    width: 100%;
    min-width: 0;
}

.items .item {
    width: 100%;
    min-width: 0;
    overflow: hidden;
}

.item img {
    margin-bottom: 10px;
}

.item .caption {
    width: 100%;
    min-width: 0;
    font-size: 0.8rem;
    color: #808080;
}

.oneline {
    width: 100%;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.pagination {
    display: flex;
    gap: 50px;
    justify-content: center;
    margin: 60px auto 0;
}


/* ========================================
   TAGS
   ======================================== */

.tags-list {
    display: block;
    width: 100%;
    line-height: 2;
}

.tags-list a {
    display: inline;
}


/* ========================================
   FOOTER
   ======================================== */

footer {
    width: 100%;
    padding: 20px;
    background: #fdfaf0;
    border-top: 0;
    text-align: center;
    font-size: 0.8rem;
}


/* ========================================
   ERROR
   ======================================== */

.layout-error {
    width: 100%;
    min-height: 100vh;
    padding: 60px 20px;
    text-align: center;
}

.layout-error p {
    margin-bottom: 10px;
}

.error-detail {
    color: #999;
    font-size: 1rem;
}

/* ========================================
 * Order
 * Mobile First
 * ======================================== */

.order-lookup {
	width: 100%;
}

/* ========================================
 * Order ID
 * ======================================== */

.order-id-box {
	margin: 20px 0;
	padding: 15px;
	border: 1px solid #ddd;
	background: #f7f7f7;
    max-width: 500px;
}

.order-id-label {
	margin-bottom: 5px;
	color: #666;
    font-size: 0.88rem;
}

.order-id-value {
	font-weight: 600;
}

/* ========================================
 * Lookup Form
 * ======================================== */

.order-lookup-form {
	width: 100%;
	max-width: 500px;
	margin: 20px 0;
}

.order-lookup-label {
	display: block;
	margin-bottom: 5px;
    font-size: 0.88rem;
    color: #666;
}

.order-lookup-input {
	display: block;
	width: 100%;
	height: 45px;
	padding: 0 15px;
	box-sizing: border-box;
	border: 1px solid #ccc;
	border-radius: 4px;
	background: #fff;
	color: #333;
	font: inherit;
	outline: none;
}

.order-lookup-input:focus {
	border-color: #003153;
}

.order-lookup-button {
	display: block;
	width: 100%;
	margin-top: 20px;
	padding: 8px 0;
	border: 0;
	border-radius: 4px;
	background: #003153;
	color: #fdfaf0;
	font: inherit;
	cursor: pointer;
}

.order-lookup-button:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

/* ========================================
 * Message
 * ======================================== */

.order-message {
	min-height: 10px;
}

/* ========================================
 * Order Result
 * ======================================== */

.order-result h2 {
	margin-bottom: 20px;
}

/* ========================================
 * Order Information
 * ======================================== */

.order-info {
	margin: 0 0 20px;
	border-top: 1px solid #ddd;
}

.order-info-row {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 12px 0;
	border-bottom: 1px solid #ddd;
}

.order-info-label {
	font-size: 0.88rem;
	color: #666;
}

.order-info-value {
	word-break: break-word;
}

/* ========================================
 * Products
 * ======================================== */

.order-products {
	display: grid;
	grid-template-columns: 1fr;
	gap: 15px;
	margin: 20px 0;
}

.order-product {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 14px;
	border: 1px solid #ddd;
}

.order-product-image-link {
	display: block;
	flex: 0 0 90px;
}

.order-product-image {
	display: block;
	width: 100px;
	height: 100px;
	object-fit: cover;
}

.order-product-info {
	min-width: 0;
	flex: 1;
}

.order-product-name {
	margin: 0 0 6px;
	line-height: 1.4;
}

/* ========================================
   TABLET
   600px+
   
   整體仍然單欄
   Featured 50% / 50%
   New Arrivals 25% / 75%
   Items 2 欄
   ======================================== */

@media (min-width: 600px) {

    [data-add-to-cart] {
        width: 50%;
    }

    #paypal-button-container {
        width: 50%;
        margin-left: auto;
    }

    /* --------------------------------
       Header
       -------------------------------- */

    .header-inner {
        min-height: 100px;
        padding: 0 20px;
    }

    .site-logo {
        font-size: 2rem;
    }


    /* --------------------------------
       Featured
       -------------------------------- */

    .featured {
        flex-direction: row;
        gap: 20px;
        margin-bottom: 20px;
    }

    .featured .grid1,
    .featured .grid2 {
        width: 50%;
        min-width: 0;
    }


    /* --------------------------------
       New Arrivals
       -------------------------------- */

    .newarrivals {
        flex-direction: row;
        gap: 20px;
        margin-bottom: 20px;
    }

    .newarrivals .grid1 {
        width: 25%;
        min-width: 0;
    }

    .newarrivals .grid2 {
        width: 75%;
        min-width: 0;
    }

    .items {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

/* ========================================
 * Order
 * ======================================== */

	.order-lookup-form {
		max-width: 500px;
	}

	.order-lookup-button {
		width: auto;
		min-width: 160px;
	}

	.order-info-row {
		flex-direction: row;
		align-items: baseline;
	}

	.order-info-label {
		flex: 0 0 120px;
	}

	.order-info-value {
		flex: 1;
	}

	.order-product {
		padding: 18px;
	}

	.order-product-image-link {
		flex: 0 0 110px;
	}

	.order-product-image {
		width: 110px;
		height: 110px;
	}
}


/* ========================================
   DESKTOP
   1024px+
   
   Sidebar + Content 左右兩欄
   Sidebar 240px
   ======================================== */

@media (min-width: 1024px) {

    /* --------------------------------
       Header
       -------------------------------- */

    .header-inner {
        min-height: 100px;
        padding: 0 20px;
    }

    .site-logo {
        font-size: 2rem;
    }


    /* --------------------------------
       Menu Button
       -------------------------------- */

    .menu-button {
        display: none;
    }


    /* --------------------------------
       Overlay
       -------------------------------- */

    .drawer-overlay {
        display: none;
    }


    /* --------------------------------
       Page Layout
       -------------------------------- */

    .layout {
        padding: 0 20px;
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: stretch;
    }


    /* --------------------------------
       Sidebar
       -------------------------------- */

    aside {
        position: static;
        width: 240px;
        min-width: 240px;
        max-width: 240px;
        height: auto;
        flex: 0 0 240px;
        order: 1;
        padding: 30px 20px 30px 0;
        background: transparent;
        overflow: visible;
        transform: none;
        transition: none;
        border-top: none;
        border-right: 1px solid #ddd;
    }


    /* --------------------------------
       Drawer Header
       Desktop 不需要
       -------------------------------- */

    .drawer-header {
        display: none;
    }


    /* --------------------------------
       Sidebar Navigation
       -------------------------------- */

    nav {
        padding: 0;
    }


    /* --------------------------------
       Page Content
       -------------------------------- */

    main {
        flex: 1 1 0;
        min-width: 0;
        width: auto;
        order: 2;
        padding: 30px;
    }


    /* --------------------------------
       Footer
       -------------------------------- */

    footer {
        padding: 25px 20px;
        border-top: 1px solid #ddd;
    }

/* ========================================
 * Order
 * ======================================== */

	.order-products {
		grid-template-columns: repeat(2, 1fr);
	}

	.order-product {
		padding: 20px;
	}


}