/* Fine Takeout Front-end Styles */

:root {
    --ft-primary: #e07b54;
    --ft-accent:  #c0392b;
    --ft-bg:      #fff8f5;
    --ft-text:    #2d2d2d;
    --ft-border:  #e5d5cc;
    --ft-radius:  .5rem;
    --ft-shadow:  0 .25rem .5rem rgba(0,0,0,0.08);
}

.ft-wrap {
    width: 100%;
    max-width: none;
    margin: 0 auto;
    padding: 1rem;
    color: var(--ft-text);
    background: var(--ft-bg);
    box-sizing: border-box;
}

/* ステップナビ */
.ft-steps-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2.5rem;
    gap: 0;
}

.ft-steps-nav__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .25rem;
    opacity: 0.4;
    transition: opacity 0.2s;
}

.ft-steps-nav__item--active,
.ft-steps-nav__item--done {
    opacity: 1;
}

.ft-steps-nav__num {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: #ddd;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: .875rem;
    transition: background 0.2s;
}

.ft-steps-nav__item--active .ft-steps-nav__num {
    background: var(--ft-primary);
}

.ft-steps-nav__item--done .ft-steps-nav__num {
    background: #4caf50;
}

.ft-steps-nav__label {
    font-size: .75rem;
    white-space: nowrap;
}

.ft-steps-nav__sep {
    flex: 1;
    height: 2px;
    background: #ddd;
    margin: 0 .5rem;
    margin-bottom: 1rem;
    min-width: 20px;
}

/* ステップ */
.ft-step {
    display: none;
}

.ft-step--active {
    display: block;
}

/* step1 layout: products on left, cart on right */
.ft-step1-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 1rem;
    align-items: start;
}

.ft-step1-main {
    min-width: 0;
}

.ft-step1-cart .ft-cart {
    margin-bottom: 0;
    position: sticky;
    top: 1rem;
}

.ft-step-title {
    font-size: 1.25rem !important;
    font-weight: 700;
    margin: 0 0 1rem !important;
    padding-bottom: 1rem !important;
    border-bottom: 2px solid var(--ft-primary);
    color: var(--ft-primary);
}

/* タブ */
.ft-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-bottom: 1rem;
}

.ft-tab {
    padding: .5rem .875rem;
    border-radius: 20px;
    border: 2px solid var(--ft-border);
    background: #fff;
    color: var(--ft-text);
    cursor: pointer;
    font-size: .875rem;
    transition: all 0.15s;
}

.ft-tab:hover {
    border-color: var(--ft-primary);
    color: var(--ft-primary);
}

.ft-tab--active {
    background: var(--ft-primary);
    border-color: var(--ft-primary);
    color: #fff;
}

/* 商品グリッド */
.ft-products {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.ft-product {
    background: #fff;
    border-radius: var(--ft-radius);
    box-shadow: var(--ft-shadow);
    overflow: hidden;
    transition: transform 0.15s, box-shadow 0.15s;
}

.ft-product:hover {
    transform: translateY(-.25rem);
    box-shadow: 0 .25rem 1rem rgba(0,0,0,0.12);
}

.ft-product--suspended {
    opacity: 0.6;
}

.ft-product--hidden {
    display: none;
}

.ft-product__img {
    position: relative;
    overflow: hidden;
    background: #f5f0ed;
}

.ft-product__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ft-product__no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #bbb;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: .25rem;
}

.ft-product__suspended-badge {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: .875rem;
}

.ft-product__body {
    padding: .875rem;
}

.ft-product__name {
    font-size: 1rem !important;
    font-weight: 700;
    margin: 0 0 .25rem !important;
    line-height: 1.5;
}

.ft-product__desc {
    font-size: .875rem;
    color: #777;
    margin: 0 0 1rem;
    line-height: 1.5;
}

.ft-product__price {
    font-size: 1rem;
    font-weight: 700;
    color: var(--ft-accent);
    margin-bottom: 1rem;
}

.ft-product__tax {
    font-size: 11px;
    color: #999;
    font-weight: 400;
}

.ft-product__qty {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.ft-qty-btn {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    border: 2px solid var(--ft-primary);
    background: #fff;
    color: var(--ft-primary);
    cursor: pointer;
    font-size: 1.5rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.ft-qty-btn:hover {
    background: var(--ft-primary);
    color: #fff;
}

.ft-qty-count {
    font-size: 1rem;
    font-weight: 700;
    min-width: 2.25rem;
    text-align: center;
}

/* カート */
.ft-cart {
    background: #fff;
    border: 2px solid var(--ft-border);
    border-radius: var(--ft-radius);
    padding: .875rem;
    margin-bottom: 1rem;
}

.ft-cart__header {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.ft-cart__empty {
    color: #aaa;
    font-size: .875rem;
    margin: 0;
    text-align: center;
    padding: .5rem 0;
}

.ft-cart__item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: .875em;
    padding: .25rem 0;
    border-bottom: 1px solid #f5f0ed;
}

.ft-cart__total {
    display: flex;
    justify-content: space-between;
    font-weight: 700;
    font-size: 1rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px solid var(--ft-border);
    color: var(--ft-accent);
}

/* 時間枠 */
.ft-slots {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

.ft-slot {
    padding: 1rem 1rem;
    border: 2px solid var(--ft-border);
    border-radius: var(--ft-radius);
    background: #fff;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.15s;
    min-width: 80px;
    text-align: center;
}

.ft-slot:hover:not(.ft-slot--full) {
    border-color: var(--ft-primary);
    color: var(--ft-primary);
}

.ft-slot--selected {
    background: var(--ft-primary);
    border-color: var(--ft-primary);
    color: #fff;
}

.ft-slot--full {
    background: #f5f5f5;
    border-color: #ddd;
    color: #bbb;
    cursor: not-allowed;
    text-decoration: line-through;
}

.ft-loading {
    color: #aaa;
    font-size: .875rem;
}

/* 日付選択 */
.ft-date-list {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.ft-date-btn {
    padding: .6rem .9rem;
    border-radius: 999px;
    border: 2px solid var(--ft-border);
    background: #fff;
    color: var(--ft-text);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.15s;
}

.ft-date-btn:hover:not(.ft-date-btn--disabled) {
    border-color: var(--ft-primary);
    color: var(--ft-primary);
}

.ft-date-btn--selected {
    background: var(--ft-primary);
    border-color: var(--ft-primary);
    color: #fff;
}

.ft-date-btn--disabled {
    background: #f5f5f5;
    border-color: #ddd;
    color: #bbb;
    cursor: not-allowed;
}

.ft-date-notes {
    margin-top: .75rem;
    color: #666;
    font-size: .875rem;
}

.ft-date-note {
    margin: .25rem 0;
}

/* フォーム */
.ft-form {
    margin-bottom: 1rem;
}

.ft-field {
    margin-bottom: 1rem;
}

.ft-field label {
    display: block;
    font-size: .875rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--ft-text);
}

.ft-required {
    color: var(--ft-accent);
}

.ft-field input[type="text"],
.ft-field input[type="tel"],
.ft-field input[type="email"],
.ft-field textarea {
    width: 100%;
    padding: 1rem .875rem;
    border: 2px solid var(--ft-border);
    border-radius: var(--ft-radius);
    font-size: 15px;
    box-sizing: border-box;
    transition: border-color 0.15s;
    background: #fff;
    color: var(--ft-text);
}

.ft-field input:focus,
.ft-field textarea:focus {
    outline: none;
    border-color: var(--ft-primary);
}

/* ボタン */
.ft-btn {
    display: inline-block;
    padding: .875rem 2.25rem;
    border-radius: 2.25rem;
    border: none;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s;
}

.ft-btn--primary {
    background: var(--ft-primary);
    color: #fff;
}

.ft-btn--primary:hover {
    background: var(--ft-accent);
}

.ft-btn--primary:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.ft-btn--secondary {
    background: #fff;
    color: var(--ft-text);
    border: 2px solid var(--ft-border);
}

.ft-btn--secondary:hover {
    border-color: var(--ft-primary);
    color: var(--ft-primary);
}

.ft-step-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .875rem;
    margin-top: 20px;
    flex-wrap: wrap;
}

.ft-step-nav .ft-btn:only-child {
    margin-left: auto;
}

/* 確認画面 */
.ft-confirm-section {
    background: #fff;
    border: 1px solid var(--ft-border);
    border-radius: var(--ft-radius);
    padding: .875rem;
    margin-bottom: .875rem;
}

.ft-confirm-section h3 {
    font-size: .875rem;
    font-weight: 700;
    margin: 0 0 .5rem;
    color: var(--ft-primary);
    padding-bottom: .5rem;
    border-bottom: 1px solid var(--ft-border);
}

.ft-confirm-row {
    display: flex;
    font-size: .875rem;
    padding: .25rem 0;
}

.ft-confirm-row__label {
    min-width: 100px;
    color: #777;
    flex-shrink: 0;
}

.ft-confirm-total {
    font-size: 1rem;
    font-weight: 700;
    color: var(--ft-accent);
    text-align: right;
    padding-top: .5rem;
    border-top: .25rem solid var(--ft-border);
    margin-top: .5rem;
}

/* サンキューページ */
.ft-thanks {
    text-align: center;
    padding: 40px 20px;
}

.ft-thanks__icon {
    width: 6.25rem;
    height: 6.25rem;
    border-radius: 50%;
    background: #4caf50;
    color: #fff;
    font-size: 3.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.ft-thanks h2 {
    font-size: 20px;
    color: var(--ft-primary);
    margin-bottom: 1rem;
}

.ft-thanks__order {
    background: #fff;
    border: 2px solid var(--ft-border);
    border-radius: var(--ft-radius);
    padding: 1rem;
    margin: 1rem auto;
    max-width: 400px;
    text-align: left;
}

.ft-thanks__note {
    font-size: .875rem;
    color: #888;
    margin-top: 1rem;
}

/* 営業時間外メッセージ */
.ft-closed-message {
    background: #f5f5f5;
    border-left: .25rem solid #ccc;
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 0 var(--ft-radius) var(--ft-radius) 0;
    color: #555;
    font-size: 15px;
}

/* エラーメッセージ */
.ft-error {
    background: #fce8e8;
    color: var(--ft-accent);
    padding: 1rem .875rem;
    border-radius: var(--ft-radius);
    font-size: .875rem;
    margin-bottom: .875rem;
    border-left: 3px solid var(--ft-accent);
}

@media (max-width: 640px) {
    .ft-step1-layout {
        grid-template-columns: 1fr;
    }

    .ft-step1-cart .ft-cart {
        position: static;
    }

    .ft-products {
        grid-template-columns: 1fr;
    }
}

/* レスポンシブ */
@media (max-width: 480px) {
    .ft-steps-nav__label {
        display: none;
    }

    .ft-btn {
        padding: 1rem 1rem;
        font-size: .875rem;
    }
}
