/* css/shared.css - 全站共享样式 */

/* ====== Reset & Root ====== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "仿宋", "宋体", serif;
}

:root {
    --color-rice: #f5f0e6;
    --color-bean: #a8c3b9;
    --color-ink: #232323;
    --color-bronze: #c2a36c;
    --color-trans: rgba(255, 255, 255, 0.7);
    --color-light: #888;
}

html, body {
    height: 100%;
}

body {
    background-color: var(--color-rice);
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%23a8c3b9' fill-opacity='0.05' fill-rule='evenodd'/%3E%3C/svg%3E");
    color: var(--color-ink);
    line-height: 1.8;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

.title {
    font-family: "书法字体", "楷体", serif;
    color: var(--color-ink);
    text-align: center;
    margin: 40px 0;
    font-size: 2.5rem;
    position: relative;
}

.title::after {
    content: "";
    display: block;
    width: 80px;
    height: 3px;
    background-color: var(--color-bronze);
    margin: 10px auto;
}

.sub-title {
    font-size: 1.5rem;
    color: var(--color-ink);
    margin: 20px 0;
    border-left: 4px solid var(--color-bean);
    padding-left: 15px;
}

.card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* ====== Page Spacing (for pages with fixed navbar) ====== */
.page-content {
    padding: 130px 0 80px;
}

/* ====== 购物车悬浮按钮 ====== */
.cart-floating {
    position: fixed; right: 30px; bottom: 100px; width: 60px; height: 60px;
    background-color: var(--color-bronze); border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    z-index: 1001; transition: transform 0.3s ease;
}
.cart-floating:hover { transform: scale(1.1); }
.cart-floating i { font-size: 1.5rem; color: white; }
.cart-count {
    position: absolute; top: -5px; right: -5px;
    background-color: #e74c3c; color: white; border-radius: 50%;
    width: 25px; height: 25px; display: flex;
    align-items: center; justify-content: center;
    font-size: 0.8rem; font-weight: bold;
}

/* ====== Utility ====== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
