/*
Theme Name: LY Starter V2
Theme URI: https://developer.developer.developer
Author: LY Developer
Author URI: https://developer.developer.developer
Description: 林林藥局第二套主題 - 深藍科技風格，簡潔現代設計
Version: 1.0.0
Requires at least: 5.9
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ly-starter-v2
Tags: e-commerce, custom-colors, custom-menu, featured-images, full-width-template
*/

/* ==================== CSS Variables ==================== */
:root {
    /* 主色調 - 深藍科技 */
    --ly-primary: #2563eb;
    --ly-primary-dark: #1d4ed8;
    --ly-primary-light: #3b82f6;
    --ly-secondary: #0ea5e9;
    --ly-accent: #06b6d4;
    
    /* 背景色 */
    --ly-bg: #f8fafc;
    --ly-bg-card: #ffffff;
    --ly-bg-dark: #0f172a;
    --ly-bg-secondary: #f1f5f9;
    
    /* 文字色 */
    --ly-text: #1e293b;
    --ly-text-light: #64748b;
    --ly-text-muted: #94a3b8;
    
    /* 邊框 */
    --ly-border: #e2e8f0;
    --ly-border-dark: #cbd5e1;
    
    /* 圓角 */
    --ly-radius: 12px;
    --ly-radius-sm: 8px;
    --ly-radius-lg: 16px;
    
    /* 陰影 */
    --ly-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --ly-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --ly-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    
    /* 過渡 */
    --ly-transition: all 0.2s ease;
    
    /* 容器 */
    --ly-container: 1280px;
}

/* ==================== Reset & Base ==================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: var(--ly-text);
    background: var(--ly-bg);
}

a {
    color: var(--ly-primary);
    text-decoration: none;
    transition: var(--ly-transition);
}

a:hover {
    color: var(--ly-primary-dark);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ==================== Container ==================== */
.ly-container {
    max-width: var(--ly-container);
    margin: 0 auto;
    padding: 0 20px;
}

/* ==================== Header ==================== */
.ly-header {
    background: var(--ly-bg-dark);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.ly-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    height: 70px;
    max-width: var(--ly-container);
    margin: 0 auto;
}

.ly-logo a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-size: 20px;
    font-weight: 700;
}

.ly-logo img {
    height: 40px;
    width: auto;
}

/* 導航 */
.ly-nav {
    display: flex;
    align-items: center;
    gap: 5px;
}

.ly-nav a {
    color: rgba(255, 255, 255, 0.8);
    padding: 8px 16px;
    border-radius: var(--ly-radius-sm);
    font-size: 14px;
    font-weight: 500;
    transition: var(--ly-transition);
}

.ly-nav a:hover,
.ly-nav a.current {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

/* Header 右側 */
.ly-header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.ly-header-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    transition: var(--ly-transition);
    position: relative;
}

.ly-header-icon:hover {
    background: var(--ly-primary);
    color: #fff;
}

.ly-header-icon .count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--ly-accent);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

/* 搜索框 */
.ly-search-form {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    padding: 0 15px;
    width: 250px;
}

.ly-search-form input {
    flex: 1;
    background: none;
    border: none;
    padding: 10px 0;
    color: #fff;
    font-size: 14px;
    outline: none;
}

.ly-search-form input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.ly-search-form button {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    padding: 5px;
}

/* 移動端菜單 */
.ly-mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
}

/* 移動端側邊菜單 */
.ly-mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1100;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.ly-mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.ly-mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    max-width: 80%;
    height: 100%;
    background: #fff;
    z-index: 1101;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.ly-mobile-menu.active {
    transform: translateX(0);
}

.ly-mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-height: 60px;
    padding: 0 20px;
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.ly-mobile-menu-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #64748b;
    cursor: pointer;
    padding: 8px;
    line-height: 1;
}

.ly-mobile-menu-close:hover {
    color: #1e293b;
}

.ly-mobile-menu-inner {
    flex: 1;
    overflow-y: auto;
    padding: 10px 0;
}

.ly-mobile-menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ly-mobile-menu-list li {
    border-bottom: 1px solid #f1f5f9;
}

.ly-mobile-menu-list li a {
    display: block;
    padding: 15px 20px;
    font-size: 15px;
    font-weight: 500;
    color: #334155;
    text-decoration: none;
}

.ly-mobile-menu-list li a:hover {
    color: var(--ly-primary);
    background: #f8fafc;
}

/* ==================== Hero Section ==================== */
.ly-hero {
    background: linear-gradient(135deg, var(--ly-bg-dark) 0%, #1e3a5f 100%);
    padding: 80px 0;
    color: #fff;
}

.ly-hero-content {
    max-width: 600px;
}

.ly-hero h1 {
    font-size: 42px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
}

.ly-hero p {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 30px;
}

.ly-hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--ly-primary);
    color: #fff;
    padding: 14px 28px;
    border-radius: var(--ly-radius);
    font-weight: 600;
    transition: var(--ly-transition);
}

.ly-hero-btn:hover {
    background: var(--ly-primary-light);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: var(--ly-shadow-lg);
}

/* ==================== Section Title ==================== */
.ly-section-title {
    text-align: center;
    margin-bottom: 40px;
}

.ly-section-title h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--ly-text);
    margin-bottom: 10px;
}

.ly-section-title p {
    color: var(--ly-text-light);
    font-size: 16px;
}

/* ==================== Product Grid ==================== */
.ly-products-section {
    padding: 60px 0;
}

.ly-products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

/* Product Card - 卡片風格 */
.ly-product-card {
    background: var(--ly-bg-card);
    border-radius: var(--ly-radius);
    overflow: hidden;
    box-shadow: var(--ly-shadow);
    transition: var(--ly-transition);
}

.ly-product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--ly-shadow-xl);
}

.ly-product-thumb {
    position: relative;
    padding-top: 100%;
    overflow: hidden;
}

.ly-product-thumb img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.ly-product-card:hover .ly-product-thumb img {
    transform: scale(1.05);
}

.ly-product-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--ly-accent);
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.ly-product-actions {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    transform: translateX(10px);
    transition: var(--ly-transition);
}

.ly-product-card:hover .ly-product-actions {
    opacity: 1;
    transform: translateX(0);
}

.ly-product-action-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ly-bg-card);
    border-radius: 50%;
    color: var(--ly-text);
    box-shadow: var(--ly-shadow);
    transition: var(--ly-transition);
}

.ly-product-action-btn:hover {
    background: var(--ly-primary);
    color: #fff;
}

.ly-product-info {
    padding: 20px;
}

.ly-product-category {
    font-size: 12px;
    color: var(--ly-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.ly-product-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--ly-text);
    margin-bottom: 10px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ly-product-title a {
    color: inherit;
}

.ly-product-title a:hover {
    color: var(--ly-primary);
}

.ly-product-price {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ly-product-price .current {
    font-size: 20px;
    font-weight: 700;
    color: var(--ly-primary);
}

.ly-product-price .original {
    font-size: 14px;
    color: var(--ly-text-muted);
    text-decoration: line-through;
}

.ly-product-add-cart {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: 15px;
    padding: 12px;
    background: var(--ly-primary);
    color: #fff;
    border: none;
    border-radius: var(--ly-radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--ly-transition);
}

.ly-product-add-cart:hover {
    background: var(--ly-primary-dark);
}

/* ==================== Footer ==================== */
.ly-footer {
    background: var(--ly-bg-dark);
    color: rgba(255, 255, 255, 0.8);
    padding: 60px 0 0;
}

.ly-footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.ly-footer-about h3 {
    color: #fff;
    font-size: 20px;
    margin-bottom: 15px;
}

.ly-footer-about p {
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 20px;
}

.ly-footer-social {
    display: flex;
    gap: 10px;
}

.ly-footer-social a {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: #fff;
    transition: var(--ly-transition);
}

.ly-footer-social a:hover {
    background: var(--ly-primary);
}

.ly-footer-links h4 {
    color: #fff;
    font-size: 16px;
    margin-bottom: 20px;
}

.ly-footer-links ul {
    list-style: none;
}

.ly-footer-links li {
    margin-bottom: 12px;
}

.ly-footer-links a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

.ly-footer-links a:hover {
    color: var(--ly-primary-light);
}

.ly-footer-bottom {
    padding: 20px 0;
    text-align: center;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
}

/* ==================== Buttons ==================== */
.ly-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--ly-radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--ly-transition);
    border: none;
}

.ly-btn-primary {
    background: var(--ly-primary);
    color: #fff;
}

.ly-btn-primary:hover {
    background: var(--ly-primary-dark);
    color: #fff;
}

.ly-btn-outline {
    background: transparent;
    border: 2px solid var(--ly-primary);
    color: var(--ly-primary);
}

.ly-btn-outline:hover {
    background: var(--ly-primary);
    color: #fff;
}

/* ==================== Breadcrumb ==================== */
.ly-breadcrumb {
    padding: 15px 0;
    font-size: 14px;
    color: var(--ly-text-light);
}

.ly-breadcrumb a {
    color: var(--ly-text-light);
}

.ly-breadcrumb a:hover {
    color: var(--ly-primary);
}

.ly-breadcrumb .separator {
    margin: 0 10px;
    color: var(--ly-border-dark);
}

/* ==================== Single Product ==================== */
.ly-single-product {
    padding: 40px 0 60px;
}

.ly-product-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    background: var(--ly-bg-card);
    border-radius: var(--ly-radius-lg);
    padding: 30px;
    box-shadow: var(--ly-shadow);
}

.ly-product-gallery {
    position: relative;
}

.ly-product-main-image {
    border-radius: var(--ly-radius);
    overflow: hidden;
    margin-bottom: 15px;
}

.ly-product-main-image img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
}

.ly-product-thumbnails {
    display: flex;
    gap: 10px;
}

.ly-product-thumbnails img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--ly-radius-sm);
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--ly-transition);
}

.ly-product-thumbnails img:hover,
.ly-product-thumbnails img.active {
    border-color: var(--ly-primary);
}

.ly-product-details h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--ly-text);
    margin-bottom: 15px;
    line-height: 1.3;
}

.ly-product-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--ly-border);
    margin-bottom: 20px;
}

.ly-product-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #fbbf24;
}

.ly-product-stock {
    font-size: 14px;
    color: #22c55e;
    font-weight: 500;
}

.ly-product-stock.out {
    color: #ef4444;
}

.ly-product-price-box {
    margin-bottom: 25px;
}

.ly-product-price-box .price {
    font-size: 32px;
    font-weight: 700;
    color: var(--ly-primary);
}

.ly-product-price-box .original {
    font-size: 18px;
    color: var(--ly-text-muted);
    text-decoration: line-through;
    margin-left: 10px;
}

.ly-product-description {
    color: var(--ly-text-light);
    line-height: 1.8;
    margin-bottom: 25px;
}

/* 購買區域美化 */
.ly-purchase-box {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid var(--ly-border);
    border-radius: var(--ly-radius);
    padding: 20px;
    margin: 20px 0;
}

.ly-purchase-row {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.ly-qty-label {
    font-weight: 600;
    color: var(--ly-text);
    font-size: 14px;
}

.ly-qty-control {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid var(--ly-border);
    border-radius: 8px;
    overflow: hidden;
}

.ly-qty-btn {
    width: 40px;
    height: 40px;
    background: #fff;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: var(--ly-text);
    transition: var(--ly-transition);
}

.ly-qty-btn:hover {
    background: var(--ly-bg-secondary);
    color: var(--ly-primary);
}

.ly-qty-input {
    width: 50px;
    height: 40px;
    border: none;
    border-left: 1px solid var(--ly-border);
    border-right: 1px solid var(--ly-border);
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    color: var(--ly-text);
    outline: none;
}

.ly-subtotal {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ly-subtotal-label {
    color: var(--ly-text-light);
    font-size: 14px;
}

.ly-subtotal-price {
    font-size: 22px;
    font-weight: 700;
    color: var(--ly-primary);
}

.ly-purchase-actions {
    display: flex;
    gap: 12px;
}

.ly-btn-cart,
.ly-btn-buy {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--ly-transition);
}

.ly-btn-cart {
    background: #fff;
    border: 2px solid var(--ly-primary);
    color: var(--ly-primary);
}

.ly-btn-cart:hover {
    background: rgba(37, 99, 235, 0.08);
    transform: translateY(-2px);
}

.ly-btn-buy {
    background: linear-gradient(135deg, var(--ly-primary) 0%, var(--ly-primary-dark) 100%);
    border: none;
    color: #fff;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.ly-btn-buy:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

/* 熱門文章區域 */
.ly-related-articles {
    margin-top: 50px;
}

.ly-related-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 25px;
    color: var(--ly-text);
}

.ly-related-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.ly-related-card {
    background: var(--ly-bg-card);
    border-radius: var(--ly-radius);
    overflow: hidden;
    box-shadow: var(--ly-shadow);
    transition: var(--ly-transition);
}

.ly-related-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--ly-shadow-lg);
}

.ly-related-thumb {
    display: block;
    aspect-ratio: 16/10;
    overflow: hidden;
}

.ly-related-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.ly-related-card:hover .ly-related-thumb img {
    transform: scale(1.05);
}

.ly-related-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f0f4f8 0%, #e2e8f0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.ly-related-info {
    padding: 15px;
}

.ly-related-info h4 {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ly-related-info h4 a {
    color: var(--ly-text);
    transition: var(--ly-transition);
}

.ly-related-info h4 a:hover {
    color: var(--ly-primary);
}

.ly-related-date {
    font-size: 13px;
    color: var(--ly-text-light);
}

@media (max-width: 768px) {
    .ly-related-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .ly-related-title {
        font-size: 18px;
        margin-bottom: 15px;
    }
    
    .ly-related-info {
        padding: 12px;
    }
    
    .ly-related-info h4 {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .ly-purchase-box {
        padding: 15px;
        margin: 15px 0;
    }
    
    .ly-purchase-row {
        gap: 12px;
        margin-bottom: 15px;
    }
    
    .ly-qty-btn {
        width: 36px;
        height: 36px;
    }
    
    .ly-qty-input {
        width: 45px;
        height: 36px;
    }
    
    .ly-subtotal-price {
        font-size: 18px;
    }
    
    .ly-btn-cart,
    .ly-btn-buy {
        padding: 12px 16px;
        font-size: 14px;
    }
}

.ly-quantity-selector {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.ly-quantity-selector label {
    font-weight: 600;
    color: var(--ly-text);
}

.ly-quantity-input {
    display: flex;
    align-items: center;
    border: 1px solid var(--ly-border);
    border-radius: var(--ly-radius-sm);
    overflow: hidden;
}

.ly-quantity-input button {
    width: 40px;
    height: 40px;
    background: var(--ly-bg-secondary);
    border: none;
    font-size: 18px;
    cursor: pointer;
    transition: var(--ly-transition);
}

.ly-quantity-input button:hover {
    background: var(--ly-primary);
    color: #fff;
}

.ly-quantity-input input {
    width: 60px;
    height: 40px;
    border: none;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
}

.ly-add-to-cart-btn {
    width: 100%;
    padding: 16px;
    font-size: 16px;
}

/* ==================== Cart ==================== */
.ly-cart-page {
    padding: 40px 0 60px;
}

.ly-cart-table {
    width: 100%;
    background: var(--ly-bg-card);
    border-radius: var(--ly-radius);
    box-shadow: var(--ly-shadow);
    overflow: hidden;
}

.ly-cart-table th {
    background: var(--ly-bg-secondary);
    padding: 15px 20px;
    text-align: left;
    font-weight: 600;
    color: var(--ly-text);
    font-size: 14px;
}

.ly-cart-table td {
    padding: 20px;
    border-bottom: 1px solid var(--ly-border);
    vertical-align: middle;
}

.ly-cart-product {
    display: flex;
    align-items: center;
    gap: 15px;
}

.ly-cart-product img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--ly-radius-sm);
}

.ly-cart-product-name {
    font-weight: 600;
    color: var(--ly-text);
}

.ly-cart-remove {
    color: var(--ly-text-muted);
    cursor: pointer;
    transition: var(--ly-transition);
}

.ly-cart-remove:hover {
    color: #ef4444;
}

/* ==================== Checkout ==================== */
.ly-checkout-page {
    padding: 40px 0 60px;
}

.ly-checkout-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 30px;
}

.ly-checkout-form {
    background: var(--ly-bg-card);
    border-radius: var(--ly-radius);
    padding: 30px;
    box-shadow: var(--ly-shadow);
}

.ly-checkout-form h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--ly-border);
}

.ly-form-row {
    margin-bottom: 20px;
}

.ly-form-row label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--ly-text);
    margin-bottom: 8px;
}

.ly-form-row input,
.ly-form-row select,
.ly-form-row textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--ly-border);
    border-radius: var(--ly-radius-sm);
    font-size: 14px;
    transition: var(--ly-transition);
}

.ly-form-row input:focus,
.ly-form-row select:focus,
.ly-form-row textarea:focus {
    outline: none;
    border-color: var(--ly-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.ly-order-summary {
    background: var(--ly-bg-card);
    border-radius: var(--ly-radius);
    padding: 30px;
    box-shadow: var(--ly-shadow);
    position: sticky;
    top: 100px;
}

.ly-order-summary h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 25px;
}

.ly-order-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.ly-order-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: var(--ly-radius-sm);
}

.ly-order-item-info {
    flex: 1;
}

.ly-order-item-name {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
}

.ly-order-item-qty {
    font-size: 13px;
    color: var(--ly-text-light);
}

.ly-order-item-price {
    font-weight: 600;
    color: var(--ly-primary);
}

.ly-order-totals {
    padding-top: 20px;
}

.ly-order-totals .row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    font-size: 14px;
}

.ly-order-totals .total {
    font-size: 18px;
    font-weight: 700;
    border-top: 2px solid var(--ly-border);
    padding-top: 15px;
    margin-top: 10px;
}

.ly-order-totals .total span:last-child {
    color: var(--ly-primary);
}

/* ==================== Article / Blog ==================== */
.ly-articles-section {
    padding: 60px 0;
    background: var(--ly-bg-secondary);
}

.ly-articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.ly-article-card {
    background: var(--ly-bg-card);
    border-radius: var(--ly-radius);
    overflow: hidden;
    box-shadow: var(--ly-shadow);
    transition: var(--ly-transition);
}

.ly-article-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--ly-shadow-xl);
}

.ly-article-thumb {
    position: relative;
    padding-top: 60%;
    overflow: hidden;
}

.ly-article-thumb img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ly-article-content {
    padding: 25px;
}

.ly-article-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 13px;
    color: var(--ly-text-light);
    margin-bottom: 12px;
}

.ly-article-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.4;
}

.ly-article-title a {
    color: var(--ly-text);
}

.ly-article-title a:hover {
    color: var(--ly-primary);
}

.ly-article-excerpt {
    color: var(--ly-text-light);
    font-size: 14px;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ==================== Single Article ==================== */
.ly-single-article {
    padding: 40px 0 60px;
}

.ly-article-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px;
}

.ly-article-header h1 {
    font-size: 36px;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 20px;
}

.ly-article-header .meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    color: var(--ly-text-light);
    font-size: 14px;
}

.ly-article-featured-image {
    max-width: 900px;
    margin: 0 auto 40px;
    border-radius: var(--ly-radius-lg);
    overflow: hidden;
}

.ly-article-body {
    max-width: 100%;
    margin: 0 auto;
    font-size: 16px;
    line-height: 1.9;
    color: var(--ly-text);
}

.ly-article-body h2,
.ly-article-body h3,
.ly-article-body h4 {
    margin-top: 40px;
    margin-bottom: 20px;
}

.ly-article-body p {
    margin-bottom: 20px;
}

.ly-article-body img {
    border-radius: var(--ly-radius);
    margin: 30px 0;
}

/* ==================== Account ==================== */
.ly-account-page {
    padding: 40px 0 60px;
}

.ly-account-grid {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 30px;
}

.ly-account-sidebar {
    background: var(--ly-bg-card);
    border-radius: var(--ly-radius);
    padding: 25px;
    box-shadow: var(--ly-shadow);
    height: fit-content;
}

.ly-account-user {
    text-align: center;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--ly-border);
    margin-bottom: 20px;
}

.ly-account-user img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 15px;
}

.ly-account-user h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 5px;
}

.ly-account-user p {
    font-size: 13px;
    color: var(--ly-text-light);
}

.ly-account-menu {
    list-style: none;
}

.ly-account-menu li {
    margin-bottom: 5px;
}

.ly-account-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    border-radius: var(--ly-radius-sm);
    color: var(--ly-text);
    font-size: 14px;
    transition: var(--ly-transition);
}

.ly-account-menu a:hover,
.ly-account-menu a.active {
    background: var(--ly-primary);
    color: #fff;
}

.ly-account-content {
    background: var(--ly-bg-card);
    border-radius: var(--ly-radius);
    padding: 30px;
    box-shadow: var(--ly-shadow);
}

/* ==================== Login / Register ==================== */
.ly-auth-page {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.ly-auth-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    max-width: 900px;
    width: 100%;
}

.ly-auth-box {
    background: var(--ly-bg-card);
    border-radius: var(--ly-radius);
    padding: 40px;
    box-shadow: var(--ly-shadow);
}

.ly-auth-box h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 30px;
    color: var(--ly-text);
}

/* ==================== Pagination ==================== */
.ly-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
}

.ly-pagination a,
.ly-pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--ly-radius-sm);
    font-size: 14px;
    font-weight: 500;
    transition: var(--ly-transition);
}

.ly-pagination a {
    background: var(--ly-bg-card);
    color: var(--ly-text);
    box-shadow: var(--ly-shadow);
}

.ly-pagination a:hover {
    background: var(--ly-primary);
    color: #fff;
}

.ly-pagination span.current {
    background: var(--ly-primary);
    color: #fff;
}

/* ==================== Responsive ==================== */
@media (max-width: 1024px) {
    .ly-products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .ly-footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .ly-header-inner {
        height: 60px;
    }
    
    .ly-nav,
    .ly-search-form {
        display: none;
    }
    
    .ly-mobile-toggle {
        display: block;
    }
    
    .ly-hero {
        padding: 50px 0;
    }
    
    .ly-hero h1 {
        font-size: 28px;
    }
    
    .ly-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .ly-product-main {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .ly-checkout-grid {
        grid-template-columns: 1fr;
    }
    
    .ly-articles-grid {
        grid-template-columns: 1fr;
    }
    
    .ly-account-grid {
        grid-template-columns: 1fr;
    }
    
    .ly-auth-container {
        grid-template-columns: 1fr;
    }
    
    .ly-footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .ly-section-title h2 {
        font-size: 22px;
    }
}

@media (max-width: 480px) {
    .ly-products-section, 
    .ly-articles-section,
    .ly-single-product,
    .ly-cart-page,
    .ly-checkout-page {
        padding: 30px 0;
    }

    .ly-section-title {
        margin-bottom: 20px;
    }
    
    .ly-section-title h2 {
        font-size: 20px;
        margin-bottom: 5px;
    }
    
    .ly-section-title p {
        font-size: 14px;
    }

    .ly-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .ly-product-info {
        padding: 10px;
    }
    
    .ly-product-title {
        font-size: 14px;
    }
    
    .ly-product-price .current {
        font-size: 16px;
    }
    
    /* 商品詳情頁 - 手機端調整 */
    .ly-product-main {
        padding: 12px;
        gap: 15px;
    }
    
    .ly-product-main-image {
        margin-bottom: 8px;
    }
    
    .ly-product-thumbnails {
        gap: 6px;
    }
    
    .ly-product-thumbnails img {
        width: 50px;
        height: 50px;
    }
    
    .ly-product-details h1 {
        font-size: 18px;
        margin-bottom: 10px;
        line-height: 1.4;
    }
    
    .ly-product-meta {
        gap: 12px;
        padding-bottom: 12px;
        margin-bottom: 12px;
    }
    
    .ly-product-price-box {
        margin-bottom: 12px;
    }
    
    .ly-product-features {
        flex-wrap: nowrap !important;
        gap: 15px !important;
        justify-content: space-between;
    }
    
    .ly-product-features > div {
        gap: 5px !important;
    }
    
    .ly-product-features svg {
        width: 18px !important;
        height: 18px !important;
    }
    
    .ly-product-features span {
        font-size: 12px !important;
    }

    /* Footer 手機端優化：一行兩列 */
    .ly-footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .ly-footer-about {
        grid-column: 1 / -1;
        text-align: center;
        margin-bottom: 10px;
    }

    .ly-footer-social {
        justify-content: center;
    }

    /* 最後一個區塊（聯繫我們）占滿一行 */
    .ly-footer-grid > div:last-child {
        grid-column: 1 / -1;
        margin-top: 10px;
    }

    .ly-footer-links {
        text-align: center;
    }

    .ly-footer-links h4 {
        margin-bottom: 12px;
        font-size: 15px;
    }
}

/* ==================== 移動端底部導航 ==================== */
.ly-mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #fff;
    border-top: 1px solid #e2e8f0;
    z-index: 1000;
    padding-bottom: env(safe-area-inset-bottom);
}

.ly-mobile-nav-inner {
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 60px;
}

.ly-mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 12px;
    text-decoration: none;
    flex: 1;
    position: relative;
    height: 100%;
}

.ly-mobile-nav-item svg {
    width: 24px;
    height: 24px;
    margin-bottom: 4px;
}

.ly-mobile-nav-item.active {
    color: var(--ly-primary);
}

.ly-mobile-cart-count {
    position: absolute;
    top: 5px;
    right: 50%;
    margin-right: -15px;
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

/* 商品詳情頁專屬底部導航 */
.ly-product-bottom-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #fff;
    border-top: 1px solid #e2e8f0;
    z-index: 1001;
    padding-bottom: env(safe-area-inset-bottom);
    height: 60px;
}

.ly-bottom-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 12px;
    text-decoration: none;
    flex: 1;
    height: 100%;
    border-right: 1px solid #f1f5f9;
}

.ly-bottom-item:last-child {
    border-right: none;
}

.ly-bottom-item svg {
    margin-bottom: 4px;
}

.ly-bottom-cart {
    flex: 2;
    background: #eff6ff;
    color: var(--ly-primary);
    border: none;
    font-size: 14px;
    font-weight: 600;
    flex-direction: row;
    gap: 5px;
}

.ly-bottom-cart svg {
    margin-bottom: 0;
}

.ly-bottom-buy {
    flex: 2;
    background: var(--ly-primary);
    color: #fff;
    border: none;
    font-size: 14px;
    font-weight: 600;
}

@media (max-width: 768px) {
    .ly-mobile-nav {
        display: block;
    }
    
    .ly-footer {
        padding-bottom: 80px; /* 為底部導航留出空間 */
    }
    
    /* 商品詳情頁顯示專屬底部，隱藏通用底部 */
    .single-ly_product .ly-product-bottom-bar {
        display: flex;
    }
    
    .single-ly_product .ly-mobile-nav {
        display: none;
    }
}

/* ==================== 購物車頁面美化 ==================== */
.ly-shop-cart {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.ly-shop-cart-empty {
    text-align: center;
    padding: 80px 20px;
    background: var(--ly-bg-card);
    border-radius: var(--ly-radius-lg);
    box-shadow: var(--ly-shadow);
}

.ly-shop-cart-empty p {
    font-size: 18px;
    color: var(--ly-text-light);
    margin-bottom: 20px;
}

.ly-shop-cart-items {
    background: var(--ly-bg-card);
    border-radius: var(--ly-radius-lg);
    box-shadow: var(--ly-shadow);
    border-top: 3px solid var(--ly-bg-dark);
    overflow: hidden;
}

.ly-shop-cart-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 0;
}

.ly-shop-cart-table thead {
    display: none !important;
}

.ly-shop-cart-table th {
    padding: 20px;
    text-align: left;
    font-weight: 600;
    color: var(--ly-text);
    font-size: 15px;
    border-bottom: none;
}

.ly-shop-cart-table td {
    padding: 20px;
    vertical-align: middle;
    border-bottom: 1px solid var(--ly-border);
}

.ly-shop-cart-table tbody tr:last-child td {
    border-bottom: none;
}

.ly-shop-cart-table .product-thumbnail {
    width: 100px;
}

.ly-shop-cart-table .product-thumbnail img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--ly-radius-sm);
    border: 1px solid var(--ly-border);
}

.ly-shop-cart-table .product-name a {
    color: var(--ly-text);
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s;
}

.ly-shop-cart-table .product-name a:hover {
    color: var(--ly-primary);
}

.ly-shop-cart-table .product-price,
.ly-shop-cart-table .product-subtotal {
    font-weight: 600;
    color: var(--ly-text);
}

.ly-shop-quantity {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--ly-border);
    border-radius: var(--ly-radius-sm);
    overflow: hidden;
    background: var(--ly-bg-card);
}

.ly-shop-quantity button {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--ly-bg-secondary);
    cursor: pointer;
    font-size: 18px;
    color: var(--ly-text);
    transition: all 0.2s;
}

.ly-shop-quantity button:hover {
    background: var(--ly-primary);
    color: white;
}

.ly-shop-quantity input {
    width: 50px;
    height: 36px;
    border: none;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    -moz-appearance: textfield;
}

.ly-shop-quantity input::-webkit-outer-spin-button,
.ly-shop-quantity input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.ly-shop-remove-item {
    width: 32px;
    height: 32px;
    border: none;
    background: #fee2e2;
    color: #dc2626;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.2s;
}

.ly-shop-remove-item:hover {
    background: #dc2626;
    color: white;
}

/* ==================== 購物車新佈局 (PC端适配) ==================== */
.ly-cart-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 30px;
    align-items: start;
}

.ly-cart-items {
    background: var(--ly-bg-card);
    border-radius: var(--ly-radius-lg);
    box-shadow: var(--ly-shadow);
    overflow: hidden;
}

.ly-cart-header {
    padding: 20px 25px;
    border-bottom: 1px solid var(--ly-border);
}

.ly-cart-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--ly-text);
}

.ly-cart-header h3 span {
    font-weight: 400;
    color: var(--ly-text-light);
}

/* PC端列表项布局 */
.ly-cart-item {
    display: grid;
    grid-template-columns: 100px 1fr 200px; /* 图片 | 信息 | 数量和小计 */
    gap: 20px;
    padding: 25px;
    border-bottom: 1px solid var(--ly-border);
    position: relative;
    align-items: center;
}

.ly-cart-item:last-child {
    border-bottom: none;
}

/* PC端左侧：图片区 */
.cart-item-left {
    position: relative;
    width: 100px;
    height: 100px;
    background: #fff;
    border: 1px solid var(--ly-border);
    border-radius: 8px;
    padding: 0; /* 移除 padding */
    display: flex;
    align-items: center;
    justify-content: center;
}

.ly-cart-item .cart-item-image {
    width: 100% !important;
    height: auto !important; /* 修改為 auto */
    min-width: unset !important;
    max-width: unset !important;
    border: none;
    border-radius: 7px;
    overflow: hidden;
    display: block;
    background: transparent;
}

.ly-cart-item .cart-item-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    padding: 5px; /* 图片本身保留一点内边距，避免贴边 */
}

/* PC端删除按钮 - 浮动在卡片左上角 */
.ly-cart-item .cart-item-left .cart-item-remove {
    top: -10px;
    left: -10px;
    width: 24px;
    height: 24px;
    background: #fff;
    border: 1px solid var(--ly-border);
    color: #94a3b8;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    z-index: 10;
    transition: all 0.2s;
    opacity: 1;
    display: flex;
}

.ly-cart-item .cart-item-left .cart-item-remove:hover {
    background: #ef4444;
    color: #fff;
    border-color: #ef4444;
    transform: scale(1.1);
}

/* PC端中间：信息区 */
.cart-item-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cart-item-name {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
}

.cart-item-name a {
    color: var(--ly-text);
    transition: color 0.2s;
    text-decoration: none;
}

.cart-item-name a:hover {
    color: var(--ly-primary);
}

.cart-item-meta {
    font-size: 14px;
    color: var(--ly-text-light);
}

.qty-display {
    color: var(--ly-text-light);
}

.cart-item-unit-price {
    font-weight: 600;
    color: var(--ly-text);
}

/* PC端右侧：数量和小计 */
.cart-item-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 15px;
}

.ly-shop-quantity {
    display: flex;
    align-items: center;
    border: 1px solid var(--ly-border);
    border-radius: 6px;
    overflow: hidden;
}

.ly-shop-quantity button {
    width: 32px;
    height: 32px;
    background: #f8fafc;
    border: none;
    font-size: 16px;
    color: var(--ly-text);
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ly-shop-quantity button:hover {
    background: #e2e8f0;
}

.ly-shop-quantity input {
    width: 40px;
    height: 32px;
    border: none;
    border-left: 1px solid var(--ly-border);
    border-right: 1px solid var(--ly-border);
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    -moz-appearance: textfield;
}

.ly-shop-quantity input::-webkit-outer-spin-button,
.ly-shop-quantity input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.cart-item-subtotal {
    font-size: 18px;
    font-weight: 700;
    color: var(--ly-primary);
}

.ly-cart-continue {
    padding: 15px 25px;
    border-top: 1px solid var(--ly-border);
}

.ly-cart-continue a {
    color: var(--ly-text-light);
    font-size: 14px;
    transition: color 0.2s;
}

.ly-cart-continue a:hover {
    color: var(--ly-primary);
}

/* 購物車總計區 */
.ly-cart-summary {
    background: var(--ly-bg-card);
    border-radius: var(--ly-radius-lg);
    box-shadow: var(--ly-shadow);
    padding: 25px;
    position: sticky;
    top: 100px;
    border-top: 3px solid var(--ly-primary);
}

.ly-cart-summary h3 {
    margin: 0 0 20px;
    font-size: 18px;
    font-weight: 700;
    color: var(--ly-text);
}

.summary-rows {
    margin-bottom: 15px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--ly-border);
    font-size: 14px;
    color: var(--ly-text-light);
}

.summary-row:last-child {
    border-bottom: none;
}

.free-shipping {
    color: #22c55e;
    font-weight: 500;
}

.summary-total {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    border-top: 2px solid var(--ly-border);
    margin-bottom: 20px;
    font-size: 16px;
    font-weight: 600;
    color: var(--ly-text);
}

.total-price {
    font-size: 22px;
    font-weight: 700;
    color: var(--ly-primary);
}

.btn-checkout {
    display: block;
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--ly-primary) 0%, var(--ly-primary-dark) 100%);
    color: #fff;
    border: none;
    border-radius: var(--ly-radius);
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.btn-checkout:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
    color: #fff;
}

.secure-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 15px;
    font-size: 13px;
    color: var(--ly-text-light);
}

/* 空購物車美化 */
.ly-shop-cart-empty {
    text-align: center;
    padding: 60px 20px;
    background: var(--ly-bg-card);
    border-radius: var(--ly-radius-lg);
    box-shadow: var(--ly-shadow);
}

.ly-shop-cart-empty .empty-icon {
    margin-bottom: 20px;
}

.ly-shop-cart-empty h3 {
    font-size: 20px;
    color: var(--ly-text);
    margin-bottom: 10px;
}

.ly-shop-cart-empty p {
    color: var(--ly-text-light);
    margin-bottom: 25px;
}

/* 手機端購物車 */
@media (max-width: 768px) {
    .ly-shop-cart {
        padding: 0;
    }
    
    .ly-cart-layout {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .ly-cart-items {
        border-radius: 0;
        box-shadow: none;
        border: none;
        background: transparent;
    }
    
    .ly-cart-header {
        display: none;
    }
    
    .ly-cart-item {
        display: flex;
        flex-wrap: nowrap;
        padding: 15px 12px;
        gap: 12px;
        background: var(--ly-bg-card);
        border-bottom: 1px solid var(--ly-border);
        position: relative;
    }
    
    /* 左側區域：圖片和刪除按鈕 */
    .cart-item-left {
        position: relative;
        width: 75px;
        height: 75px;
        flex-shrink: 0;
    }
    
    .cart-item-remove {
        position: absolute;
        top: -6px;
        left: -6px;
        width: 20px;
        height: 20px;
        background: rgba(255, 255, 255, 0.9);
        border: 1px solid var(--ly-border);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #94a3b8;
        z-index: 2;
        padding: 0;
        box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    }
    
    .cart-item-remove svg {
        width: 12px;
        height: 12px;
    }
    
    .ly-cart-item .cart-item-image {
        width: 75px !important;
        height: auto !important;
        min-width: 75px !important;
        max-width: 75px !important;
        min-height: unset !important;
        max-height: unset !important;
        flex-shrink: 0;
        border: 1px solid var(--ly-border);
        border-radius: 4px;
        overflow: hidden;
        background: #fff;
        display: block;
    }
    
    .ly-cart-item .cart-item-image img {
        width: 100% !important;
        height: auto !important;
        object-fit: contain !important;
        padding: 2px;
        display: block !important;
        margin: 0 !important;
    }
    
    /* 中間信息 */
    .cart-item-info {
        flex: 1;
        min-width: 0;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        padding: 2px 0;
    }
    
    .cart-item-name {
        font-size: 14px;
        font-weight: 500;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        margin: 0 0 4px 0;
        line-height: 1.4;
        color: var(--ly-text);
    }
    
    .cart-item-meta {
        font-size: 14px;
        color: var(--ly-text);
        font-weight: 600;
    }
    
    .qty-display {
        color: var(--ly-text-light);
        margin-right: 2px;
        font-weight: 400;
    }
    
    /* 右側數量 */
    .cart-item-right {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        justify-content: center;
        gap: 8px;
    }
    
    .cart-item-right .ly-shop-quantity {
        display: flex;
        align-items: center;
        border: 1px solid var(--ly-border);
        border-radius: 4px;
        overflow: hidden;
    }
    
    .cart-item-right .ly-shop-quantity button {
        width: 24px;
        height: 28px;
        background: #f8fafc;
        border: none;
        font-size: 14px;
        color: var(--ly-text);
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0;
    }
    
    .cart-item-right .ly-shop-quantity input {
        width: 30px;
        height: 28px;
        font-size: 13px;
        border: none;
        border-left: 1px solid var(--ly-border);
        border-right: 1px solid var(--ly-border);
        background: #fff;
        padding: 0;
    }
    
    /* 隱藏原本的小計和操作區，因為結構變了 */
    .cart-item-actions,
    .cart-item-unit-price,
    .cart-item-subtotal {
        display: none !important;
    }
    
    /* 顯示我們新加的價格 */
    .cart-item-meta .cart-item-unit-price {
        display: inline !important;
        font-size: 14px;
        color: var(--ly-text);
        font-weight: 600;
    }
    
    .ly-cart-continue {
        padding: 10px 5px;
        border-top: none;
        background: var(--ly-bg-card);
    }
    
    .ly-cart-summary {
        padding: 12px 5px;
        position: static;
        border-top: 1px solid var(--ly-border);
        box-shadow: none;
        border-radius: 0;
        background: var(--ly-bg-card);
    }
    
    .ly-cart-summary h3 {
        font-size: 15px;
        margin-bottom: 10px;
    }
    
    .summary-row {
        padding: 8px 0;
        font-size: 13px;
    }
    
    .summary-total {
        padding: 10px 0;
        font-size: 14px;
    }
    
    .total-price {
        font-size: 17px;
    }
    
    .btn-checkout {
        padding: 12px;
        font-size: 15px;
    }
    
    /* 購物車頁面標題區 */
    .page-template-default .ly-page-header {
        padding: 8px 5px;
        border: none;
        margin: 0;
    }
    
    .page-template-default .ly-page-title {
        font-size: 18px;
        margin: 0;
    }
    
    .page-template-default .ly-page-content {
        padding: 0;
        margin: 0;
    }
    
    .page-template-default .ly-container {
        padding: 0;
    }
    
    /* 結帳頁面手機端去除內邊距 */
    .ly-shop-checkout {
        padding: 0 !important;
    }
    
    .ly-shop-checkout-columns {
        gap: 10px !important;
    }
    
    .ly-shop-checkout-billing {
        padding: 15px 12px !important;
        border-radius: 0 !important;
    }
    
    .ly-shop-checkout-billing h3 {
        margin: 0 0 12px !important;
        padding-bottom: 10px !important;
        font-size: 18px !important;
    }
    
    .ly-shop-checkout-billing h4 {
        margin: 15px 0 10px !important;
        font-size: 15px !important;
    }
    
    .ly-shop-checkout-billing .ly-shop-field {
        margin-bottom: 10px !important;
    }
    
    .ly-shop-checkout-order {
        padding: 15px 12px !important;
        border-radius: 0 !important;
    }
    
    .ly-shop-checkout-order h3 {
        margin: 0 0 10px !important;
        font-size: 16px !important;
    }
    
    .ly-shop-checkout-submit {
        margin-top: 15px !important;
    }
}

/* 購物車左右佈局（舊結構兼容） */
.ly-shop-cart-container {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 30px;
    align-items: start;
}

.ly-shop-cart-totals {
    width: 100%;
    margin-left: 0;
    background: var(--ly-bg-card);
    border-radius: var(--ly-radius-lg);
    padding: 30px;
    box-shadow: var(--ly-shadow);
    position: sticky;
    top: 100px;
    border-top: 3px solid var(--ly-bg-dark);
}

.ly-shop-cart-totals h3 {
    margin: 0 0 20px;
    font-size: 18px;
    color: var(--ly-text);
    padding: 20px;
    margin: -30px -30px 20px;
    border-bottom: none;
}

.ly-shop-cart-totals table {
    width: 100%;
    margin-bottom: 20px;
}

.ly-shop-cart-totals th,
.ly-shop-cart-totals td {
    padding: 12px 0;
    border-bottom: 1px solid var(--ly-border);
}

.ly-shop-cart-totals th {
    text-align: left;
    font-weight: 500;
    color: var(--ly-text-light);
}

.ly-shop-cart-totals td {
    text-align: right;
    color: var(--ly-text);
}

.ly-shop-cart-totals .order-total th,
.ly-shop-cart-totals .order-total td {
    border-bottom: none;
    font-size: 18px;
    color: var(--ly-text);
    padding-top: 15px;
}

.ly-shop-cart-totals .order-total td strong {
    color: var(--ly-primary);
}

.ly-shop-btn-checkout {
    display: block;
    width: 100%;
    padding: 16px 24px;
    background: var(--ly-primary);
    color: white;
    text-align: center;
    border: none;
    border-radius: var(--ly-radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}

.ly-shop-btn-checkout:hover {
    background: var(--ly-primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--ly-shadow-lg);
}

/* ==================== 結帳頁面美化 ==================== */
/* 移除結帳頁和購物車頁的900px限制 */
.ly-shop-page-checkout .ly-page-content,
.ly-shop-page-cart .ly-page-content {
    max-width: 1400px !important;
}

/* 強制覆蓋所有結帳頁輸入框樣式 */
.ly-shop-checkout input[type="text"],
.ly-shop-checkout input[type="email"],
.ly-shop-checkout input[type="tel"],
.ly-shop-checkout input[type="number"],
.ly-shop-checkout input[type="password"],
.ly-shop-checkout textarea,
.ly-shop-checkout select,
.ly-shop-checkout-order input[type="text"],
.ly-shop-coupon-form input {
    background: #f8fafc !important;
    color: #1e293b !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 6px !important;
}

.ly-shop-checkout input:focus,
.ly-shop-checkout textarea:focus,
.ly-shop-checkout select:focus,
.ly-shop-coupon-form input:focus {
    background: white !important;
    border-color: var(--ly-primary) !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1) !important;
}

.ly-shop-checkout input::placeholder,
.ly-shop-checkout textarea::placeholder,
.ly-shop-coupon-form input::placeholder {
    color: #94a3b8 !important;
}

.ly-shop-checkout {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.ly-shop-checkout-columns {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 30px;
    align-items: start;
}

.ly-shop-checkout-billing {
    background: var(--ly-bg-card);
    border-radius: var(--ly-radius-lg);
    padding: 25px;
    box-shadow: var(--ly-shadow);
}

.ly-shop-checkout-billing h3 {
    margin: 0 0 20px;
    font-size: 20px;
    color: var(--ly-text);
    padding-bottom: 15px;
    border-bottom: 2px solid var(--ly-primary);
}

.ly-shop-checkout-billing h4 {
    margin: 25px 0 15px;
    font-size: 16px;
    color: var(--ly-text);
    font-weight: 600;
}

.ly-shop-checkout-order {
    background: var(--ly-bg-card);
    border-radius: var(--ly-radius-lg);
    padding: 25px;
    box-shadow: var(--ly-shadow);
    position: sticky;
    top: 100px;
}

.ly-shop-checkout-order h3 {
    margin: 0 0 15px;
    font-size: 20px;
    color: var(--ly-text);
    padding-bottom: 12px;
    border-bottom: 2px solid var(--ly-primary);
}

.ly-order-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 0;
}

.ly-shop-order-table th,
.ly-shop-order-table td {
    padding: 8px 0;
    border-bottom: 1px solid var(--ly-border);
    text-align: left;
}

.ly-shop-order-table thead th {
    font-weight: 600;
    color: var(--ly-text);
    font-size: 14px;
    padding-bottom: 10px;
}

.ly-shop-order-table tbody td {
    color: var(--ly-text);
    padding: 6px 0;
}

.ly-shop-order-table tbody td .quantity {
    color: var(--ly-text-light);
    font-size: 13px;
}

.ly-shop-coupon-section {
    margin: 15px 0;
    padding: 15px 0;
    border-top: 1px dashed var(--ly-border);
    border-bottom: 1px dashed var(--ly-border);
    background: transparent !important;
}

.ly-shop-coupon-section h4 {
    display: none;
}

.ly-shop-coupon-form {
    display: flex;
    gap: 8px;
    position: relative;
    background: transparent !important;
    padding: 0 !important;
    border: none !important;
}

.ly-shop-coupon-form input,
.ly-shop-coupon-form input[type="text"],
.ly-shop-checkout-order .ly-shop-coupon-form input {
    flex: 1;
    height: 42px;
    padding: 0 15px !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 6px !important;
    font-size: 14px;
    background: #f8fafc !important;
    transition: all 0.2s;
    color: #1e293b !important;
    text-transform: none !important;
}

.ly-shop-coupon-form input:focus,
.ly-shop-checkout-order .ly-shop-coupon-form input:focus {
    outline: none;
    border-color: var(--ly-primary) !important;
    background: white !important;
}

.ly-shop-coupon-form input::placeholder {
    color: #94a3b8 !important;
    text-transform: none !important;
}

.ly-shop-apply-coupon {
    height: 42px;
    padding: 0 20px;
    background: var(--ly-primary) !important;
    border: none !important;
    border-radius: 6px !important;
    color: white !important;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.ly-shop-apply-coupon:hover {
    background: var(--ly-primary-dark) !important;
}

/* 運送方式美化 */
.ly-shipping-methods {
    margin: 20px 0;
    padding: 0;
}

.ly-shipping-methods h4 {
    margin: 0 0 12px;
    font-size: 15px;
    font-weight: 600;
    color: var(--ly-text);
}

.ly-shipping-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ly-shipping-option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 15px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.ly-shipping-option:hover {
    border-color: var(--ly-primary);
    background: #f1f5f9;
}

.ly-shipping-option.selected {
    border-color: var(--ly-primary);
    background: #eff6ff;
}

.ly-shipping-option input[type="radio"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--ly-primary);
    flex-shrink: 0;
}

.ly-shipping-option-content {
    flex: 1;
    min-width: 0;
}

.ly-shipping-option-title {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--ly-text);
    margin-bottom: 2px;
}

.ly-shipping-option-desc {
    display: block;
    font-size: 12px;
    color: var(--ly-text-light);
    line-height: 1.4;
}

.ly-shipping-option-cost {
    font-size: 13px;
    font-weight: 600;
    color: var(--ly-primary);
    white-space: nowrap;
}

.ly-shop-payment-methods {
    margin: 20px 0;
}

.ly-shop-payment-methods h4 {
    margin: 0 0 12px;
    font-size: 15px;
    font-weight: 600;
    color: var(--ly-text);
}

.ly-shop-payment-method {
    display: block;
    padding: 12px 15px;
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.ly-shop-payment-method:hover {
    border-color: var(--ly-primary) !important;
    background: #f1f5f9 !important;
}

.ly-shop-payment-method.selected,
.ly-shop-payment-method:has(input:checked) {
    border-color: var(--ly-primary) !important;
    background: #eff6ff !important;
}

.ly-shop-payment-method label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 500;
}

.ly-shop-payment-method input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--ly-primary);
    flex-shrink: 0;
}

.ly-shop-payment-method .payment-title,
.ly-shop-payment-method .payment-method-title {
    font-size: 14px;
    font-weight: 500;
    color: #1e293b !important;
}

.ly-shop-payment-method .payment-description {
    display: block;
    margin-top: 8px;
    margin-left: 28px;
    padding: 0;
    font-size: 13px;
    color: #64748b !important;
    line-height: 1.5;
}

.ly-shop-checkout-submit {
    margin-top: 20px;
}

.ly-shop-btn-place-order {
    display: block;
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, var(--ly-primary) 0%, var(--ly-primary-dark) 100%);
    color: white;
    border: none;
    border-radius: var(--ly-radius);
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.ly-shop-btn-place-order:hover {
    transform: translateY(-2px);
    box-shadow: var(--ly-shadow-lg);
}

.ly-shop-checkout-billing .ly-shop-field {
    margin-bottom: 15px;
}

.ly-shop-checkout-billing .ly-shop-field label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 500;
    color: var(--ly-text);
}

.ly-shop-checkout-billing .ly-shop-field input,
.ly-shop-checkout-billing .ly-shop-field select,
.ly-shop-checkout-billing .ly-shop-field textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--ly-border);
    border-radius: var(--ly-radius-sm);
    font-size: 14px;
    transition: all 0.2s;
    background: #f8fafc !important;
    color: var(--ly-text) !important;
}

.ly-shop-checkout-billing .ly-shop-field input:focus,
.ly-shop-checkout-billing .ly-shop-field select:focus,
.ly-shop-checkout-billing .ly-shop-field textarea:focus {
    outline: none;
    border-color: var(--ly-primary);
    background: white !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* 地址選擇器美化 */
.ly-shop-address-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 15px;
}

.ly-shop-address-row select {
    padding: 12px 14px;
    border: 1px solid var(--ly-border);
    border-radius: var(--ly-radius-sm);
    font-size: 14px;
    background: #f8fafc !important;
    color: var(--ly-text) !important;
    cursor: pointer;
}

.ly-shop-address-row select:focus {
    outline: none;
    border-color: var(--ly-primary);
    background: white !important;
}

/* 詳細地址輸入框 */
.ly-shop-checkout-billing input[type="text"],
.ly-shop-checkout-billing textarea,
.ly-shop-checkout-billing select {
    background: #f8fafc !important;
    color: var(--ly-text) !important;
}

/* 優惠券輸入框 */
.ly-shop-coupon-form input {
    flex: 1;
    height: 42px;
    padding: 0 15px;
    border: 1px solid var(--ly-border);
    border-radius: var(--ly-radius-sm);
    font-size: 14px;
    background: #f8fafc !important;
    transition: all 0.2s;
    color: var(--ly-text) !important;
}

.ly-shop-coupon-form input:focus {
    outline: none;
    border-color: var(--ly-primary);
    background: white !important;
}

.ly-shop-coupon-form input::placeholder {
    color: #94a3b8;
}

/* 結帳與購物車響應式 */
@media (max-width: 900px) {
    .ly-shop-checkout-columns,
    .ly-shop-cart-container {
        grid-template-columns: 1fr;
    }
    
    .ly-shop-checkout-order,
    .ly-shop-cart-totals {
        position: static;
    }
}

@media (max-width: 768px) {
    /* 購物車頁面手機端美化 */
    .ly-shop-cart {
        padding: 15px 10px;
    }
    
    .ly-shop-cart-items {
        border-radius: var(--ly-radius);
        margin-bottom: 15px;
    }
    
    .ly-shop-cart-table thead {
        display: none;
    }
    
    .ly-shop-cart-table tbody tr {
        display: flex;
        flex-wrap: wrap;
        align-items: flex-start;
        padding: 15px;
        border-bottom: 1px solid var(--ly-border);
        gap: 10px;
        position: relative;
    }
    
    .ly-shop-cart-table td {
        padding: 0;
        border: none;
    }
    
    .ly-shop-cart-table .product-thumbnail {
        width: 70px;
        flex-shrink: 0;
    }
    
    .ly-shop-cart-table .product-thumbnail img {
        width: 70px;
        height: 70px;
        border-radius: 8px;
    }
    
    .ly-shop-cart-table .product-name {
        flex: 1;
        min-width: 0;
        padding-right: 25px;
    }
    
    .ly-shop-cart-table .product-name a {
        font-size: 14px;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    .ly-shop-cart-table .product-price {
        display: none;
    }
    
    .ly-shop-cart-table .product-quantity {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-top: 5px;
        padding-left: 80px;
    }
    
    .ly-shop-cart-table .product-quantity::before {
        display: none;
    }
    
    .ly-shop-cart-table .ly-shop-quantity {
        display: flex;
        align-items: center;
        border: 1px solid var(--ly-border);
        border-radius: 6px;
        overflow: hidden;
    }
    
    .ly-shop-cart-table .ly-shop-quantity button {
        width: 32px;
        height: 32px;
        background: var(--ly-bg-secondary);
        border: none;
        font-size: 16px;
        cursor: pointer;
    }
    
    .ly-shop-cart-table .ly-shop-quantity input {
        width: 40px;
        height: 32px;
        border: none;
        border-left: 1px solid var(--ly-border);
        border-right: 1px solid var(--ly-border);
        text-align: center;
        font-size: 14px;
        font-weight: 600;
    }
    
    .ly-shop-cart-table .product-subtotal {
        font-size: 15px;
        font-weight: 700;
        color: var(--ly-primary);
    }
    
    .ly-shop-cart-table .product-remove {
        position: absolute;
        top: 12px;
        right: 12px;
    }
    
    .ly-shop-cart-table .product-remove a {
        width: 24px;
        height: 24px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: #fee2e2;
        color: #ef4444;
        border-radius: 50%;
        font-size: 14px;
        text-decoration: none;
    }
    
    /* 購物車總計手機端 */
    .ly-shop-cart-totals {
        max-width: 100%;
        border-radius: var(--ly-radius);
        padding: 20px 15px;
        border-top: 3px solid var(--ly-primary);
    }
    
    .ly-shop-cart-totals h3 {
        font-size: 16px;
        margin-bottom: 15px;
    }
    
    .ly-shop-cart-totals th,
    .ly-shop-cart-totals td {
        padding: 10px 0;
        font-size: 14px;
    }
    
    .ly-shop-cart-totals .order-total th,
    .ly-shop-cart-totals .order-total td {
        font-size: 16px;
    }
    
    .ly-shop-cart-totals .checkout-button {
        padding: 14px 20px;
        font-size: 15px;
        border-radius: 8px;
    }
    
    .ly-shop-address-row {
        grid-template-columns: 1fr;
    }
}

/* ==================== 訂單成功頁美化 ==================== */
.ly-shop-order-received {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

/* 成功頭部 */
.order-success-header {
    text-align: center;
    padding: 30px 20px;
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border-radius: var(--ly-radius-lg);
    margin-bottom: 20px;
}

.order-success-header .success-icon {
    width: 60px;
    height: 60px;
    background: #10b981;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    color: white;
}

.order-success-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: #065f46;
    margin: 0 0 8px;
}

.order-success-header p {
    color: #047857;
    font-size: 14px;
    margin: 0;
}

/* 訂單概覽 */
.order-overview-card {
    background: var(--ly-bg-card);
    border-radius: var(--ly-radius-lg);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--ly-shadow);
    border-top: 3px solid var(--ly-bg-dark);
}

.order-overview-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.overview-item {
    text-align: center;
    padding: 15px 10px;
    background: #f8fafc;
    border-radius: var(--ly-radius);
}

.overview-item.highlight {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
}

.overview-label {
    display: block;
    font-size: 12px;
    color: var(--ly-text-light);
    margin-bottom: 6px;
}

.overview-value {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--ly-text);
    word-break: break-all;
}

.overview-value.total {
    font-size: 18px;
    color: var(--ly-primary);
}

/* 內容網格 */
.order-content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

/* 訂單商品卡片 */
.order-items-card,
.customer-info-card {
    background: var(--ly-bg-card);
    border-radius: var(--ly-radius-lg);
    padding: 20px;
    box-shadow: var(--ly-shadow);
    border-top: 3px solid var(--ly-bg-dark);
}

.order-items-card h3,
.customer-info-card h3 {
    margin: 0 0 15px;
    font-size: 16px;
    font-weight: 600;
    color: var(--ly-text);
    padding-bottom: 12px;
    border-bottom: 1px solid var(--ly-border);
}

/* 訂單商品列表 */
.order-items-list {
    margin-bottom: 15px;
}

.order-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--ly-border);
}

.order-item:last-child {
    border-bottom: none;
}

.item-info {
    flex: 1;
}

.item-name {
    display: block;
    font-size: 14px;
    color: var(--ly-text);
    margin-bottom: 3px;
}

.item-qty {
    font-size: 12px;
    color: var(--ly-text-light);
}

.item-price {
    font-size: 14px;
    font-weight: 600;
    color: var(--ly-text);
}

/* 訂單總計 */
.order-totals {
    padding-top: 15px;
    border-top: 1px dashed var(--ly-border);
}

.total-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 13px;
    color: var(--ly-text-light);
}

.total-row.grand-total {
    padding-top: 10px;
    margin-top: 5px;
    border-top: 1px solid var(--ly-border);
    font-size: 16px;
    font-weight: 600;
    color: var(--ly-text);
}

.total-row.grand-total span:last-child {
    color: var(--ly-primary);
}

/* 客戶資訊 */
.info-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.info-row {
    display: flex;
    gap: 15px;
}

.info-label {
    width: 80px;
    flex-shrink: 0;
    font-size: 13px;
    color: var(--ly-text-light);
}

.info-value {
    flex: 1;
    font-size: 13px;
    color: var(--ly-text);
}

/* 操作按鈕 */
.order-actions {
    text-align: center;
}

.btn-continue {
    display: inline-block;
    padding: 12px 40px;
    background: var(--ly-primary);
    color: white !important;
    border-radius: var(--ly-radius);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
}

.btn-continue:hover {
    background: var(--ly-primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--ly-shadow-lg);
}

@media (max-width: 768px) {
    .order-overview-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .order-content-grid {
        grid-template-columns: 1fr;
    }
}

/* ==================== 商品列表頁美化 ==================== */
.ly-shop-archive {
    padding: 40px 0 60px;
}

.ly-shop-archive-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 40px;
}

/* 左側分類導航 */
.ly-shop-sidebar {
    position: sticky;
    top: 90px;
    height: fit-content;
}

.ly-sidebar-widget {
    background: var(--ly-bg-card);
    border-radius: var(--ly-radius);
    box-shadow: var(--ly-shadow);
    overflow: hidden;
}

.ly-sidebar-title {
    font-size: 16px;
    font-weight: 700;
    padding: 20px;
    margin: 0;
    background: var(--ly-bg-dark);
    color: #fff;
}

.ly-category-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ly-category-list > li {
    border-bottom: 1px solid var(--ly-border);
}

.ly-category-list > li:last-child {
    border-bottom: none;
}

.ly-category-list > li > a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    color: var(--ly-text);
    font-size: 14px;
    transition: var(--ly-transition);
}

.ly-category-list > li > a:hover,
.ly-category-list > li.active > a {
    background: var(--ly-bg-secondary);
    color: var(--ly-primary);
}

.ly-category-list > li.active > a {
    font-weight: 600;
    border-left: 3px solid var(--ly-primary);
}

.ly-category-list .cat-count {
    background: var(--ly-bg-secondary);
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    color: var(--ly-text-light);
}

.ly-category-list > li.active .cat-count {
    background: var(--ly-primary);
    color: #fff;
}

/* 子分類 */
.ly-category-children {
    list-style: none;
    margin: 0;
    padding: 0;
    background: var(--ly-bg-secondary);
}

.ly-category-children li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px 12px 35px;
    color: var(--ly-text-light);
    font-size: 13px;
    transition: var(--ly-transition);
}

.ly-category-children li a:hover,
.ly-category-children li.active a {
    color: var(--ly-primary);
}

.ly-category-children li.active a {
    font-weight: 600;
}

/* 右側商品列表 */
.ly-shop-main {
    min-width: 0;
}

.ly-shop-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    background: var(--ly-bg-card);
    border-radius: var(--ly-radius);
    box-shadow: var(--ly-shadow);
    margin-bottom: 25px;
}

.ly-shop-header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.ly-shop-header-left h1 {
    font-size: 22px;
    font-weight: 700;
    margin: 0;
    color: var(--ly-text);
}

.ly-product-count {
    color: var(--ly-text-light);
    font-size: 14px;
}

.ly-shop-orderby {
    padding: 10px 35px 10px 15px;
    border: 1px solid var(--ly-border);
    border-radius: var(--ly-radius-sm);
    background: var(--ly-bg-card);
    color: var(--ly-text);
    font-size: 14px;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.ly-shop-orderby:focus {
    outline: none;
    border-color: var(--ly-primary);
}

/* 商品列表頁的商品網格 - 3列 */
.ly-shop-archive .ly-products-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* 無商品狀態 */
.ly-no-products {
    text-align: center;
    padding: 80px 20px;
    background: var(--ly-bg-card);
    border-radius: var(--ly-radius);
    box-shadow: var(--ly-shadow);
}

.ly-no-products svg {
    margin-bottom: 20px;
}

.ly-no-products h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--ly-text);
    margin-bottom: 10px;
}

.ly-no-products p {
    color: var(--ly-text-light);
    font-size: 14px;
}

/* 商品列表頁響應式 */
@media (max-width: 1024px) {
    .ly-shop-archive-layout {
        grid-template-columns: 220px 1fr;
        gap: 25px;
    }
    
    .ly-shop-archive .ly-products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .ly-shop-archive-layout {
        grid-template-columns: 1fr;
    }
    
    .ly-shop-sidebar {
        position: static;
        display: none; /* 手機端隱藏側邊欄 */
    }
    
    .ly-shop-header {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }
    
    .ly-shop-header-left {
        flex-direction: column;
        gap: 5px;
        text-align: center;
    }
    
    .ly-shop-header-left h1 {
        font-size: 18px;
    }
    
    .ly-shop-archive .ly-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}

/* ==================== 覆蓋插件樣式 - 統一色調 ==================== */
:root {
    /* 覆蓋 ly-shop 插件變量為淺色主題 */
    --ly-shop-primary: var(--ly-primary);
    --ly-shop-secondary: var(--ly-secondary);
    --ly-shop-dark: var(--ly-bg-dark);
    --ly-shop-dark-light: var(--ly-bg-card);
    --ly-shop-text: var(--ly-text);
    --ly-shop-text-muted: var(--ly-text-light);
    --ly-shop-border: var(--ly-border);
    --ly-shop-radius: var(--ly-radius);
}

/* 商品按鈕樣式統一 */
.ly-shop-btn {
    background: var(--ly-primary) !important;
    border-radius: var(--ly-radius-sm) !important;
}

.ly-shop-btn:hover {
    background: var(--ly-primary-dark) !important;
    box-shadow: var(--ly-shadow-lg) !important;
}

/* 商品卡片樣式統一（插件渲染的卡片） */
.ly-shop-product {
    background: var(--ly-bg-card) !important;
    border: 1px solid var(--ly-border) !important;
    box-shadow: var(--ly-shadow) !important;
    padding: 0 !important;
    border-radius: var(--ly-radius) !important;
}

.ly-shop-product::before,
.ly-shop-product::after {
    display: none !important;
}

.ly-shop-product:hover {
    box-shadow: var(--ly-shadow-xl) !important;
}

.ly-shop-product-inner,
.ly-shop-product .ly-shop-product-inner,
div.ly-shop-product-inner {
    padding: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin: 0 !important;
    background: transparent !important;
}

.ly-shop-product-image {
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
    aspect-ratio: auto !important;
    height: auto !important;
}

.ly-shop-product-image img {
    display: block !important;
    margin: 0 !important;
    width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
}

.ly-shop-product-info {
    background: var(--ly-bg-card) !important;
    padding: 12px 15px 15px !important;
    margin-top: 0 !important;
}

.ly-shop-product-image + .ly-shop-product-info,
.ly-shop-product-inner > .ly-shop-product-info {
    padding-top: 12px !important;
}

.ly-shop-product-title,
h3.ly-shop-product-title {
    margin: 0 0 8px !important;
    margin-top: 0 !important;
    padding: 0 !important;
}

.ly-shop-product-title a {
    color: var(--ly-text) !important;
}

.ly-shop-product-title a:hover {
    color: var(--ly-primary) !important;
}

.ly-shop-product-price {
    color: var(--ly-primary) !important;
}

.ly-shop-product-price del {
    color: var(--ly-text-muted) !important;
}

/* ==================== 會員登入頁美化 ==================== */
.ly-shop-account-login {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    max-width: 900px;
    margin: 0 auto;
}

.ly-shop-login-form,
.ly-shop-register-form {
    background: var(--ly-bg-card);
    border-radius: var(--ly-radius-lg);
    padding: 30px;
    box-shadow: var(--ly-shadow);
}

.ly-shop-login-form h2,
.ly-shop-register-form h2 {
    margin: 0 0 25px;
    font-size: 24px;
    font-weight: 700;
    color: var(--ly-text);
    padding-bottom: 15px;
    border-bottom: 2px solid var(--ly-primary);
}

/* WordPress 登入表單樣式 */
.ly-shop-login-form #ly-shop-login-form {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.ly-shop-login-form #ly-shop-login-form p {
    margin: 0 0 15px;
}

.ly-shop-login-form #ly-shop-login-form label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 500;
    color: var(--ly-text);
}

.ly-shop-login-form #ly-shop-login-form input[type="text"],
.ly-shop-login-form #ly-shop-login-form input[type="password"] {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--ly-border);
    border-radius: var(--ly-radius);
    font-size: 14px;
    background: #f8fafc;
    transition: all 0.2s;
    box-sizing: border-box;
}

.ly-shop-login-form #ly-shop-login-form input[type="text"]:focus,
.ly-shop-login-form #ly-shop-login-form input[type="password"]:focus {
    outline: none;
    border-color: var(--ly-primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.ly-shop-login-form #ly-shop-login-form .forgetmenot {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}

.ly-shop-login-form #ly-shop-login-form .forgetmenot input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--ly-primary);
}

.ly-shop-login-form #ly-shop-login-form .forgetmenot label {
    margin: 0;
    font-size: 14px;
    color: var(--ly-text-light);
}

.ly-shop-login-form #ly-shop-login-form input[type="submit"] {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, var(--ly-primary) 0%, var(--ly-primary-dark) 100%);
    color: #fff;
    border: none;
    border-radius: var(--ly-radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.ly-shop-login-form #ly-shop-login-form input[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

.ly-shop-lost-password {
    margin-top: 15px;
    text-align: center;
}

.ly-shop-lost-password a {
    color: var(--ly-primary);
    font-size: 14px;
    text-decoration: none;
}

.ly-shop-lost-password a:hover {
    text-decoration: underline;
}

/* 註冊表單樣式 */
.ly-shop-register-form .ly-shop-form-row {
    margin-bottom: 15px;
}

.ly-shop-register-form .ly-shop-form-row label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 500;
    color: var(--ly-text);
}

.ly-shop-register-form .ly-shop-form-row label .required {
    color: #ef4444;
}

.ly-shop-register-form .ly-shop-form-row input[type="email"],
.ly-shop-register-form .ly-shop-form-row input[type="text"],
.ly-shop-register-form .ly-shop-form-row input[type="password"] {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--ly-border);
    border-radius: var(--ly-radius);
    font-size: 14px;
    background: #f8fafc;
    transition: all 0.2s;
    box-sizing: border-box;
}

.ly-shop-register-form .ly-shop-form-row input:focus {
    outline: none;
    border-color: var(--ly-primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.ly-shop-register-form .ly-shop-btn {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, var(--ly-primary) 0%, var(--ly-primary-dark) 100%);
    color: #fff;
    border: none;
    border-radius: var(--ly-radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
    margin-top: 10px;
}

.ly-shop-register-form .ly-shop-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

/* 手機端會員登入頁 */
@media (max-width: 768px) {
    .ly-shop-account-login {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 0;
    }
    
    .ly-shop-login-form,
    .ly-shop-register-form {
        padding: 20px 15px;
        border-radius: 0;
        box-shadow: none;
    }
    
    .ly-shop-login-form h2,
    .ly-shop-register-form h2 {
        font-size: 20px;
        margin-bottom: 20px;
        padding-bottom: 12px;
    }
}
