/* =============================================
   Cart Page
   ============================================= */

.ah-cart-page {
    padding: 48px 0 80px;
}

.ah-cart-page__title {
    font-size: clamp(1.3rem, 3vw, 1.7rem);
    font-weight: 400;
    letter-spacing: 0.06em;
    margin: 0 0 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e8e8e8;
}

/* =============================================
   Empty Cart
   ============================================= */

.ah-cart-empty {
    padding: 60px 0;
    text-align: center;
}

.ah-cart-empty__text {
    font-size: 15px;
    color: #888;
    margin: 0 0 24px;
}

.ah-btn-back {
    display: block;
    width: fit-content;
    margin-left: auto;
    margin-top: 24px;
    padding: 11px 28px;
    border: 1px solid #1a1a1a;
    font-size: 13px;
    letter-spacing: 0.1em;
    color: #1a1a1a;
    transition: background 0.15s, color 0.15s;
}

.ah-btn-back:hover {
    background: #1a1a1a;
    color: #fff;
}

/* =============================================
   Cart Table
   ============================================= */

.ah-cart-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 16px;
}

.ah-cart-table thead th {
    padding: 10px 12px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: #888;
    text-align: left;
    border-bottom: 1px solid #e8e8e8;
}

.ah-cart-table__col-price,
.ah-cart-table__col-qty,
.ah-cart-table__col-subtotal {
    text-align: right;
}

.ah-cart-table__col-remove {
    width: 32px;
}

.ah-cart-table__row td {
    padding: 16px 12px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
    vertical-align: middle;
}

/* 商品カラム */
.ah-cart-product {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ah-cart-product__thumb {
    flex-shrink: 0;
}

.ah-cart-product__img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    display: block;
}

.ah-cart-product__name {
    font-size: 14px;
    color: #1a1a1a;
    transition: color 0.15s;
    line-height: 1.4;
}

.ah-cart-product__name:hover {
    color: #555;
}

/* 価格・小計 */
.ah-cart-table__price,
.ah-cart-table__subtotal {
    text-align: right;
    white-space: nowrap;
    color: #1a1a1a;
}

.ah-cart-table__subtotal {
    font-weight: 500;
}

/* 数量 */
.ah-cart-table__qty {
    text-align: right;
}

/* 削除ボタン */
.ah-cart-remove {
    display: inline-block;
    font-size: 16px;
    color: #bbb;
    line-height: 1;
    transition: color 0.15s;
}

.ah-cart-remove:hover {
    color: #888;
}

/* =============================================
   Cart Actions
   ============================================= */

.ah-cart-actions {
    display: flex;
    justify-content: flex-end;
    padding: 16px 0;
}

.ah-btn-update {
    padding: 9px 20px;
    background: none;
    border: 1px solid #aaa;
    font-size: 12px;
    letter-spacing: 0.08em;
    color: #666;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
}

.ah-btn-update:hover {
    border-color: #1a1a1a;
    color: #1a1a1a;
}

/* =============================================
   Cart Totals
   ============================================= */

.ah-cart-totals {
    margin-left: auto;
    max-width: 380px;
    padding: 28px;
    background: #f8f8f8;
}

.ah-cart-totals__table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.ah-cart-totals__table th,
.ah-cart-totals__table td {
    padding: 8px 0;
    font-size: 14px;
}

.ah-cart-totals__table th {
    font-weight: 400;
    color: #555;
}

.ah-cart-totals__total {
    text-align: right;
    font-size: 22px;
    font-weight: 500;
    color: #1a1a1a;
}

.ah-cart-checkout {
    margin-bottom: 16px;
}

.ah-cart-checkout__note {
    font-size: 11px;
    color: #aaa;
    margin: 0 0 12px;
}

.ah-btn-checkout {
    display: block;
    width: 100%;
    padding: 15px 0;
    background: #bbb;
    color: #fff;
    font-size: 13px;
    letter-spacing: 0.18em;
    border: none;
    cursor: not-allowed;
}

.ah-cart-clear-form {
    text-align: right;
}

.ah-btn-clear {
    background: none;
    border: none;
    font-size: 12px;
    color: #aaa;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
    transition: color 0.15s;
}

.ah-btn-clear:hover {
    color: #666;
}

/* =============================================
   Responsive
   ============================================= */

@media (max-width: 768px) {
    .ah-cart-table thead {
        display: none;
    }

    .ah-cart-table,
    .ah-cart-table tbody,
    .ah-cart-table__row,
    .ah-cart-table__row td {
        display: block;
        width: 100%;
    }

    .ah-cart-table__row {
        padding: 16px 0;
        border-bottom: 1px solid #e8e8e8;
    }

    .ah-cart-table__row td {
        padding: 4px 0;
        border-bottom: none;
        text-align: left;
    }

    .ah-cart-table__price,
    .ah-cart-table__subtotal,
    .ah-cart-table__qty {
        text-align: left;
    }

    .ah-cart-table__remove {
        text-align: left;
    }

    .ah-cart-totals {
        max-width: 100%;
    }
}
