/* ============ 固定在右上角的购物篮 ============ */
.cart-float {
    position: fixed;
    top: 16px;
    right: 20px;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    background: #c8102e;
    border-radius: 50%;
    color: #fff;
    text-decoration: none;
    font-size: 18px;
    box-shadow: 0 2px 8px rgba(0,0,0,.25);
}
.cart-float:hover { background: #a50000; }
.cart-float .cart-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    padding: 0 4px;
    background: #222;
    color: #fff;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    align-items: center;
    justify-content: center;
    display: none;
}

/* ============ 产品卡片：数量 stepper + 篮子按钮 ============ */
.product-buy-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 10px;
}
.qty-stepper {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
}
.qty-stepper button {
    background: #f5f5f5;
    border: none;
    width: 30px;
    height: 32px;
    font-size: 16px;
    cursor: pointer;
    color: #333;
}
.qty-stepper button:hover { background: #eaeaea; }
.qty-stepper input[name="qty"] {
    width: 40px;
    text-align: center;
    border: none;
    border-left: 1px solid #ddd;
    border-right: 1px solid #ddd;
    height: 32px;
    -moz-appearance: textfield;
}
.qty-stepper input[name="qty"]::-webkit-outer-spin-button,
.qty-stepper input[name="qty"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.cart-icon-btn {
    width: 36px;
    height: 32px;
    border: none;
    border-radius: 6px;
    background: #c8102e;
    color: #fff;
    cursor: pointer;
    font-size: 14px;
}
.cart-icon-btn:hover { background: #a50000; }
.cart-icon-btn:disabled { opacity: .6; cursor: default; }

/* ============ Toast 提示 ============ */
.cart-toast {
    position: fixed;
    top: 70px;
    right: 20px;
    z-index: 100000;
    padding: 10px 16px;
    border-radius: 6px;
    background: #2e7d32;
    color: #fff;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,.2);
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity .2s ease, transform .2s ease;
}
.cart-toast.show { opacity: 1; transform: translateY(0); }
.cart-toast-error { background: #b71c1c; }

/* ============ 购物篮页面：Your Basket + Order Review ============ */
.basket-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 24px;
    align-items: start;
}
@media (max-width: 800px) {
    .basket-layout { grid-template-columns: 1fr; }
}
.basket-title { color: #c8102e; font-size: 28px; margin-bottom: 16px; }
.basket-item {
    display: flex;
    gap: 16px;
    background: #f7f7f7;
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 12px;
}
.basket-item img { width: 90px; height: 90px; object-fit: cover; border-radius: 8px; }
.basket-item .basket-item-info { flex: 1; }
.basket-item .basket-item-sku { color: #888; font-size: 12px; }
.basket-item .basket-item-remove { color: #2e7d32; text-decoration: none; font-size: 14px; }

.order-review {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 18px;
}
.order-review h3 { margin-top: 0; font-size: 16px; }
.order-review-row { display: flex; justify-content: space-between; margin: 8px 0; font-size: 14px; }
.order-review-total { font-weight: 700; font-size: 16px; border-top: 1px solid #eee; padding-top: 10px; margin-top: 10px; }
.free-delivery-note {
    background: #fdecea;
    color: #b71c1c;
    font-size: 13px;
    padding: 8px 10px;
    border-left: 3px solid #c8102e;
    border-radius: 4px;
    margin: 10px 0;
}
.order-review .btn-checkout {
    display: block;
    width: 100%;
    text-align: center;
    background: #c8102e;
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 12px;
    font-size: 15px;
    cursor: pointer;
    margin-top: 8px;
}
.order-review .btn-checkout:hover { background: #a50000; }

/* ============ Delivery & Contact Details 表单 ============ */
.checkout-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 20px;
}
.checkout-form-grid .full-width { grid-column: 1 / -1; }
@media (max-width: 600px) {
    .checkout-form-grid { grid-template-columns: 1fr; }
}
.checkout-form-grid label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
}
.checkout-form-grid input[type="text"],
.checkout-form-grid input[type="email"],
.checkout-form-grid input[type="date"],
.checkout-form-grid textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
}
.checkout-form-grid input:focus,
.checkout-form-grid textarea:focus {
    outline: none;
    border-color: #c8102e;
}
.checkout-form-grid textarea { min-height: 70px; resize: vertical; }

.payment-method-options {
    display: flex;
    gap: 16px;
    margin-top: 4px;
}
.payment-method-options label {
    display: flex !important;
    align-items: center;
    gap: 6px;
    font-weight: 400 !important;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 10px 14px;
    cursor: pointer;
    flex: 1;
}
.payment-method-options input[type="radio"]:checked + span,
.payment-method-options label:has(input:checked) {
    border-color: #c8102e;
    background: #fdecea;
}

/* ============ Ship / Pickup 切换 ============ */
.fulfillment-toggle {
    display: flex;
    background: #f0f0f0;
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 18px;
}
.fulfillment-option {
    flex: 1;
    border: none;
    background: transparent;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    color: #555;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.fulfillment-option.active {
    background: #fff;
    color: #111;
    box-shadow: 0 1px 3px rgba(0,0,0,.15);
}

/* ============ Shopify 风格浮动 label 输入框 ============ */
.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
@media (max-width: 500px) {
    .field-row { grid-template-columns: 1fr; }
}
.field-float {
    position: relative;
    margin-bottom: 12px;
}
.field-float input,
.field-float select,
.field-float textarea {
    width: 100%;
    padding: 20px 14px 8px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    background: #fff;
    color: #111;
}
.field-float select { appearance: none; padding-top: 20px; }
.field-float textarea { min-height: 70px; resize: vertical; padding-top: 22px; }
.field-float input:focus,
.field-float select:focus,
.field-float textarea:focus {
    outline: none;
    border-color: #111;
    box-shadow: 0 0 0 1px #111;
}
.field-float label {
    position: absolute;
    left: 15px;
    top: 15px;
    font-size: 14px;
    color: #888;
    pointer-events: none;
    transition: all .12s ease;
    background: transparent;
}
.field-float input:focus + label,
.field-float input:not(:placeholder-shown) + label,
.field-float textarea:focus + label,
.field-float textarea:not(:placeholder-shown) + label,
.field-float select + label {
    top: 6px;
    font-size: 11px;
    color: #666;
}
.field-float input[type="date"] + label { top: 6px; font-size: 11px; color: #666; }
.field-icon {
    position: absolute;
    right: 14px;
    top: 16px;
    color: #999;
    font-size: 14px;
}

/* ============ Pickup 地址提示框 ============ */
.pickup-address-box {
    display: flex;
    gap: 12px;
    background: #fdecea;
    border: 1px solid #f3c9c4;
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 14px;
}
.pickup-address-box i { color: #c8102e; font-size: 18px; margin-top: 2px; }
.pickup-address-box strong { font-size: 13px; }
.pickup-address-box p { margin: 4px 0 0; font-size: 13px; color: #555; white-space: pre-wrap; }

/* ============ Discount code ============ */
.discount-code-box {
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px dashed #eee;
}
.discount-code-box input[type="text"] {
    padding: 9px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
}
.discount-applied {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #e8f5e9;
    color: #2e7d32;
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
}
.discount-remove-link {
    background: none;
    border: none;
    color: #2e7d32;
    text-decoration: underline;
    font-size: 12px;
    cursor: pointer;
    padding: 0;
}

/* ============ Billing address ============ */
.billing-same-checkbox {
    display: flex !important;
    align-items: center;
    gap: 8px;
    font-weight: 400 !important;
    font-size: 14px;
}

/* ============ Sold Out 按钮 ============ */
.sold-out-btn {
    margin-top: 10px;
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #f2f2f2;
    color: #999;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .03em;
    text-transform: uppercase;
    cursor: not-allowed;
}
